diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-13 19:48:19 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-13 20:17:06 +0100 |
commit | cb9fc36a1211967e8c58b0502a26c42552ac8060 (patch) | |
tree | 6693e9724db113f07fb6655e13f0c7780779d9c3 /src/network/networkd.h | |
parent | 66518acd40fbd99a87e553b2d0904c37c8929fb2 (diff) |
networkd: introduce an AddressFamilyBoolean enum type
This introduces am AddressFamilyBoolean type that works more or less
like a booleaan, but can optionally turn on/off things for ipv4 and ipv6
independently. THis also ports the DHCP field over to it.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index 39b2d2bec9..b36590e2d6 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -54,14 +54,14 @@ typedef struct Manager Manager; typedef struct AddressPool AddressPool; typedef struct FdbEntry FdbEntry; -typedef enum DHCPSupport { - DHCP_SUPPORT_NONE, - DHCP_SUPPORT_BOTH, - DHCP_SUPPORT_V4, - DHCP_SUPPORT_V6, - _DHCP_SUPPORT_MAX, - _DHCP_SUPPORT_INVALID = -1, -} DHCPSupport; +typedef enum AddressFamilyBoolean { + ADDRESS_FAMILY_NO, + ADDRESS_FAMILY_YES, + ADDRESS_FAMILY_IPV4, + ADDRESS_FAMILY_IPV6, + _ADDRESS_FAMILY_BOOLEAN_MAX, + _ADDRESS_FAMILY_BOOLEAN_INVALID = -1, +} AddressFamilyBoolean; typedef enum LLMNRSupport { LLMNR_SUPPORT_NO, @@ -102,7 +102,7 @@ struct Network { NetDev *bridge; NetDev *bond; Hashmap *stacked_netdevs; - DHCPSupport dhcp; + AddressFamilyBoolean dhcp; bool dhcp_dns; bool dhcp_ntp; bool dhcp_mtu; @@ -368,9 +368,6 @@ int config_parse_fdb_vlan_id(const char *unit, const char *filename, unsigned li /* DHCP support */ -const char* dhcp_support_to_string(DHCPSupport i) _const_; -DHCPSupport dhcp_support_from_string(const char *s) _pure_; - int config_parse_dhcp(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); @@ -391,3 +388,6 @@ int address_pool_new_from_string(Manager *m, AddressPool **ret, int family, cons void address_pool_free(AddressPool *p); int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found); + +const char *address_family_boolean_to_string(AddressFamilyBoolean b) _const_; +AddressFamilyBoolean address_family_boolean_from_string(const char *s) _const_; |