mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
in-addr-util: move IPV4_ADDRESS_FMT_STR/VAL macros from networkd-address.h
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user