summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLetzteInstanz <faust6@inbox.ru>2021-03-21 08:37:38 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-04-14 01:30:18 +0200
commit86ae2d69a3b07de23f0c4ddb1fa3e5ec8bc85c1b (patch)
treeae38adaa177476c1c6fcde515d997034de76c5bb /src
parentudev: delete useless codes (diff)
downloadsystemd-86ae2d69a3b07de23f0c4ddb1fa3e5ec8bc85c1b.tar.xz
systemd-86ae2d69a3b07de23f0c4ddb1fa3e5ec8bc85c1b.zip
network: move AddressFamily into network-util for the use by wait-online later
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-network/network-util.h10
-rw-r--r--src/network/networkd-util.h11
2 files changed, 11 insertions, 10 deletions
diff --git a/src/libsystemd/sd-network/network-util.h b/src/libsystemd/sd-network/network-util.h
index dd6a7dbe88..ad8632d012 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 01675e8b5c..4926fc5eb7 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;