]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
in-addr-util: move IPV4_ADDRESS_FMT_STR/VAL macros from networkd-address.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 May 2021 07:21:18 +0000 (16:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 12 May 2021 01:30:45 +0000 (10:30 +0900)
src/basic/in-addr-util.h
src/network/networkd-address.h

index 5f3c717615f64fc7a7edf30fa2fa903faf69746b..906b3fe97e567b354883e3a4d86dc33f68fff896 100644 (file)
@@ -126,3 +126,10 @@ extern const struct hash_ops in_addr_data_hash_ops;
 extern const struct hash_ops in_addr_prefix_hash_ops;
 extern const struct hash_ops in_addr_prefix_hash_ops_free;
 extern const struct hash_ops in6_addr_hash_ops;
+
+#define IPV4_ADDRESS_FMT_STR     "%u.%u.%u.%u"
+#define IPV4_ADDRESS_FMT_VAL(address)              \
+        be32toh((address).s_addr) >> 24,           \
+        (be32toh((address).s_addr) >> 16) & 0xFFu, \
+        (be32toh((address).s_addr) >> 8) & 0xFFu,  \
+        be32toh((address).s_addr) & 0xFFu
index 58f44cd4cd4e2530611f7d8ae1c4559773e93bb4..b8030c99df2e2a0d7103f2111e04a12505454869 100644 (file)
@@ -86,10 +86,3 @@ CONFIG_PARSER_PROTOTYPE(config_parse_address_flags);
 CONFIG_PARSER_PROTOTYPE(config_parse_address_scope);
 CONFIG_PARSER_PROTOTYPE(config_parse_address_route_metric);
 CONFIG_PARSER_PROTOTYPE(config_parse_duplicate_address_detection);
-
-#define IPV4_ADDRESS_FMT_STR     "%u.%u.%u.%u"
-#define IPV4_ADDRESS_FMT_VAL(address)              \
-        be32toh((address).s_addr) >> 24,           \
-        (be32toh((address).s_addr) >> 16) & 0xFFu, \
-        (be32toh((address).s_addr) >> 8) & 0xFFu,  \
-        be32toh((address).s_addr) & 0xFFu