]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: move AddressFamily into network-util for the use by wait-online later
authorLetzteInstanz <faust6@inbox.ru>
Sun, 21 Mar 2021 07:37:38 +0000 (10:37 +0300)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 13 Apr 2021 23:30:18 +0000 (08:30 +0900)
src/libsystemd/sd-network/network-util.h
src/network/networkd-util.h

index dd6a7dbe88c04b437c5d132f458c2f78870279f2..ad8632d0120b0051c4fbbf67da6312956c9799ed 100644 (file)
 
 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,
index 01675e8b5c5e13b6890b5bba67b31263caccc640..4926fc5eb704f37cf04794983c2c4b691ee05661 100644 (file)
@@ -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;