diff options
author | Daniel Wang <wonderfly@users.noreply.github.com> | 2017-05-13 07:19:32 -0700 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-13 10:19:32 -0400 |
commit | b85bc551c3cbd26b03c79c8d416389e7ac501760 (patch) | |
tree | a5b129384f9606bc612d5d23c91a59cf5f8b6350 /src/libsystemd-network/dhcp-lease-internal.h | |
parent | 6e4177315f632e03afea43b6d99100bd434f3403 (diff) | |
download | systemd-b85bc551c3cbd26b03c79c8d416389e7ac501760.tar.gz systemd-b85bc551c3cbd26b03c79c8d416389e7ac501760.tar.bz2 systemd-b85bc551c3cbd26b03c79c8d416389e7ac501760.zip |
network: Implement DHCP Option 119 (Domain Search List) (#5932)
This adds a modified version of dhcp6_option_parse_domainname() that is
able to parse compressed domain names, borrowing the idea from
dns_packet_read_name(). It also adds pieces in networkd-link and
networkd-manager to properly save/load the added option field.
Resolves #2710.
Diffstat (limited to 'src/libsystemd-network/dhcp-lease-internal.h')
-rw-r--r-- | src/libsystemd-network/dhcp-lease-internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp-lease-internal.h b/src/libsystemd-network/dhcp-lease-internal.h index 82cae2300a..7847ce0709 100644 --- a/src/libsystemd-network/dhcp-lease-internal.h +++ b/src/libsystemd-network/dhcp-lease-internal.h @@ -75,6 +75,7 @@ struct sd_dhcp_lease { uint16_t mtu; /* 0 if unset */ char *domainname; + char **search_domains; char *hostname; char *root_path; @@ -92,6 +93,7 @@ struct sd_dhcp_lease { int dhcp_lease_new(sd_dhcp_lease **ret); int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void *userdata); +int dhcp_lease_parse_search_domains(const uint8_t *option, size_t len, char ***domains); int dhcp_lease_insert_private_option(sd_dhcp_lease *lease, uint8_t tag, const void *data, uint8_t len); int dhcp_lease_set_default_subnet_mask(sd_dhcp_lease *lease); |