From: LetzteInstanz Date: Sun, 21 Mar 2021 07:37:38 +0000 (+0300) Subject: network: move AddressFamily into network-util for the use by wait-online later X-Git-Tag: v249-rc1~420^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86ae2d69a3b07de23f0c4ddb1fa3e5ec8bc85c1b;p=thirdparty%2Fsystemd.git network: move AddressFamily into network-util for the use by wait-online later --- diff --git a/src/libsystemd/sd-network/network-util.h b/src/libsystemd/sd-network/network-util.h index dd6a7dbe88c..ad8632d0120 100644 --- a/src/libsystemd/sd-network/network-util.h +++ b/src/libsystemd/sd-network/network-util.h @@ -11,6 +11,16 @@ bool network_is_online(void); +typedef enum AddressFamily { + /* This is a bitmask, though it usually doesn't feel that way! */ + ADDRESS_FAMILY_NO = 0, + ADDRESS_FAMILY_IPV4 = 1 << 0, + ADDRESS_FAMILY_IPV6 = 1 << 1, + ADDRESS_FAMILY_YES = ADDRESS_FAMILY_IPV4 | ADDRESS_FAMILY_IPV6, + _ADDRESS_FAMILY_MAX, + _ADDRESS_FAMILY_INVALID = -EINVAL, +} AddressFamily; + typedef enum LinkOperationalState { LINK_OPERSTATE_MISSING, LINK_OPERSTATE_OFF, diff --git a/src/network/networkd-util.h b/src/network/networkd-util.h index 01675e8b5c5..4926fc5eb70 100644 --- a/src/network/networkd-util.h +++ b/src/network/networkd-util.h @@ -8,18 +8,9 @@ #include "hashmap.h" #include "log.h" #include "macro.h" +#include "network-util.h" #include "string-util.h" -typedef enum AddressFamily { - /* This is a bitmask, though it usually doesn't feel that way! */ - ADDRESS_FAMILY_NO = 0, - ADDRESS_FAMILY_IPV4 = 1 << 0, - ADDRESS_FAMILY_IPV6 = 1 << 1, - ADDRESS_FAMILY_YES = ADDRESS_FAMILY_IPV4 | ADDRESS_FAMILY_IPV6, - _ADDRESS_FAMILY_MAX, - _ADDRESS_FAMILY_INVALID = -EINVAL, -} AddressFamily; - typedef struct NetworkConfigSection { unsigned line; bool invalid;