diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-29 20:57:47 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-29 21:45:56 +0200 |
commit | ca5ad760a5ab5d8e281ef675dd703db30620d5a6 (patch) | |
tree | e1da39ebaa08302eb309f631fdb4af19feddd295 /src/network/networkd-dhcp-common.h | |
parent | Merge pull request #12903 from keszybz/condition-quoting (diff) | |
download | systemd-ca5ad760a5ab5d8e281ef675dd703db30620d5a6.tar.xz systemd-ca5ad760a5ab5d8e281ef675dd703db30620d5a6.zip |
network: move conf parsers and function prototypes
Diffstat (limited to 'src/network/networkd-dhcp-common.h')
-rw-r--r-- | src/network/networkd-dhcp-common.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp-common.h b/src/network/networkd-dhcp-common.h new file mode 100644 index 0000000000..0e6e051599 --- /dev/null +++ b/src/network/networkd-dhcp-common.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#include "conf-parser.h" +#include "dhcp-identifier.h" +#include "time-util.h" + +#define DHCP_ROUTE_METRIC 1024 + +typedef enum DHCPUseDomains { + DHCP_USE_DOMAINS_NO, + DHCP_USE_DOMAINS_YES, + DHCP_USE_DOMAINS_ROUTE, + _DHCP_USE_DOMAINS_MAX, + _DHCP_USE_DOMAINS_INVALID = -1, +} DHCPUseDomains; + +typedef struct DUID { + /* Value of Type in [DHCP] section */ + DUIDType type; + + uint8_t raw_data_len; + uint8_t raw_data[MAX_DUID_LEN]; + usec_t llt_time; +} DUID; + +const char* dhcp_use_domains_to_string(DHCPUseDomains p) _const_; +DHCPUseDomains dhcp_use_domains_from_string(const char *s) _pure_; + +CONFIG_PARSER_PROTOTYPE(config_parse_dhcp); +CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_use_domains); +CONFIG_PARSER_PROTOTYPE(config_parse_iaid); +CONFIG_PARSER_PROTOTYPE(config_parse_section_route_table); |