diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-28 15:00:59 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-08-25 14:26:01 +0200 |
commit | a7e5da6e33de9ad9b5bc594fdc74e3e4098a5751 (patch) | |
tree | 207471516b4d097da6a84784a4512f1701b84c6f /src/network/networkd.h | |
parent | 9c56a6f3e2b1fc193cf49f622b57f7ee17766cac (diff) |
sd-network: make LLMNR specific config parser generic
Rename the enum, the lookup functions and the parser for LLMNRSupport so
the type can be reused for mDNS.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index a285a4b08f..5340922bf1 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -64,13 +64,13 @@ typedef enum AddressFamilyBoolean { _ADDRESS_FAMILY_BOOLEAN_INVALID = -1, } AddressFamilyBoolean; -typedef enum LLMNRSupport { - LLMNR_SUPPORT_NO, - LLMNR_SUPPORT_YES, - LLMNR_SUPPORT_RESOLVE, - _LLMNR_SUPPORT_MAX, - _LLMNR_SUPPORT_INVALID = -1, -} LLMNRSupport; +typedef enum ResolveSupport { + RESOLVE_SUPPORT_NO, + RESOLVE_SUPPORT_YES, + RESOLVE_SUPPORT_RESOLVE, + _RESOLVE_SUPPORT_MAX, + _RESOLVE_SUPPORT_INVALID = -1, +} ResolveSupport; typedef enum LinkOperationalState { LINK_OPERSTATE_OFF, @@ -178,7 +178,7 @@ struct Network { bool wildcard_domain; char **domains, **dns, **ntp, **bind_carrier; - LLMNRSupport llmnr; + ResolveSupport llmnr; LIST_FIELDS(Network, networks); }; @@ -421,14 +421,14 @@ int config_parse_ipv6token(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); -/* LLMNR support */ +/* Resolve protocols support */ -const char* llmnr_support_to_string(LLMNRSupport i) _const_; -LLMNRSupport llmnr_support_from_string(const char *s) _pure_; +const char* resolve_support_to_string(ResolveSupport i) _const_; +ResolveSupport resolve_support_from_string(const char *s) _pure_; -int config_parse_llmnr(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); +int config_parse_resolve(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); /* Address Pool */ |