summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-network/network-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-06-16 01:58:39 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-06-16 16:17:23 +0200
commit1678fbb3c5016504a628dc90a45b3f8fbe4fc55d (patch)
treee3fc2f5e4a8cf0f6961a16c8a1d5ba693d6b9f87 /src/libsystemd/sd-network/network-util.h
parentnetwork: introduce manager_send_changed_strv() (diff)
downloadsystemd-1678fbb3c5016504a628dc90a45b3f8fbe4fc55d.tar.xz
systemd-1678fbb3c5016504a628dc90a45b3f8fbe4fc55d.zip
network: split operational states into carrier and address states
This should not change any behavior. The new states will be exposed by later commits.
Diffstat (limited to 'src/libsystemd/sd-network/network-util.h')
-rw-r--r--src/libsystemd/sd-network/network-util.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libsystemd/sd-network/network-util.h b/src/libsystemd/sd-network/network-util.h
index 6936fd536b..601d00146a 100644
--- a/src/libsystemd/sd-network/network-util.h
+++ b/src/libsystemd/sd-network/network-util.h
@@ -20,5 +20,24 @@ typedef enum LinkOperationalState {
_LINK_OPERSTATE_INVALID = -1
} LinkOperationalState;
+typedef enum LinkCarrierState {
+ LINK_CARRIER_STATE_OFF = LINK_OPERSTATE_OFF,
+ LINK_CARRIER_STATE_NO_CARRIER = LINK_OPERSTATE_NO_CARRIER,
+ LINK_CARRIER_STATE_DORMANT = LINK_OPERSTATE_DORMANT,
+ LINK_CARRIER_STATE_DEGRADED_CARRIER = LINK_OPERSTATE_DEGRADED_CARRIER,
+ LINK_CARRIER_STATE_CARRIER = LINK_OPERSTATE_CARRIER,
+ LINK_CARRIER_STATE_ENSLAVED = LINK_OPERSTATE_ENSLAVED,
+ _LINK_CARRIER_STATE_MAX,
+ _LINK_CARRIER_STATE_INVALID = -1
+} LinkCarrierState;
+
+typedef enum LinkAddressState {
+ LINK_ADDRESS_STATE_OFF,
+ LINK_ADDRESS_STATE_DEGRADED,
+ LINK_ADDRESS_STATE_ROUTABLE,
+ _LINK_ADDRESS_STATE_MAX,
+ _LINK_ADDRESS_STATE_INVALID = -1
+} LinkAddressState;
+
const char* link_operstate_to_string(LinkOperationalState s) _const_;
LinkOperationalState link_operstate_from_string(const char *s) _pure_;