diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-07-08 05:24:57 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-07-30 16:15:53 +0200 |
commit | 626d653a90d6971cf0c12bd1a26235064a35ed80 (patch) | |
tree | 4c14d2406a512ede39878f4207f2be5a5af6f790 /src/libsystemd-network/sd-ipv4acd.c | |
parent | network/ipv4acd: drop unused argument (diff) | |
download | systemd-626d653a90d6971cf0c12bd1a26235064a35ed80.tar.xz systemd-626d653a90d6971cf0c12bd1a26235064a35ed80.zip |
sd-ipv4acd: introduce sd_ipv4acd_is_bound()
Diffstat (limited to 'src/libsystemd-network/sd-ipv4acd.c')
-rw-r--r-- | src/libsystemd-network/sd-ipv4acd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-ipv4acd.c b/src/libsystemd-network/sd-ipv4acd.c index d34c63e854..0cc37a60bc 100644 --- a/src/libsystemd-network/sd-ipv4acd.c +++ b/src/libsystemd-network/sd-ipv4acd.c @@ -569,6 +569,12 @@ int sd_ipv4acd_is_running(sd_ipv4acd *acd) { return acd->state != IPV4ACD_STATE_INIT; } +int sd_ipv4acd_is_bound(sd_ipv4acd *acd) { + assert_return(acd, false); + + return IN_SET(acd->state, IPV4ACD_STATE_ANNOUNCING, IPV4ACD_STATE_RUNNING); +} + int sd_ipv4acd_start(sd_ipv4acd *acd, bool reset_conflicts) { int r; |