diff options
author | Susant Sahani <susant@redhat.com> | 2015-07-10 15:42:27 +0530 |
---|---|---|
committer | Susant Sahani <susant@redhat.com> | 2015-07-10 15:42:27 +0530 |
commit | a7d0ef446e5f28b37688743de22052abc8136a94 (patch) | |
tree | e91453eb0cbfd96040092a3f8337cc2b16afff04 /src/network/networkd.h | |
parent | 9b361114f568e839784a3aeba5c1df5a95e86832 (diff) |
networkd: DHCP override hostname
This patch enhances the DHCP client to send the hostname
reference
http://lists.freedesktop.org/archives/systemd-devel/2014-July/021550.html
Tested with
Example conf:
[Match]
Name=eth1
[Network]
DHCP=v4
[DHCP]
SendHostname=true
Hostname=test
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index f98c640822..ccec4cf6b2 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -133,6 +133,7 @@ struct Network { AddressFamilyBoolean dhcp; DCHPClientIdentifier dhcp_client_identifier; char *dhcp_vendor_class_identifier; + char *hostname; bool dhcp_dns; bool dhcp_ntp; bool dhcp_mtu; @@ -473,3 +474,7 @@ const char* ipv6_privacy_extensions_to_string(IPv6PrivacyExtensions i) _const_; IPv6PrivacyExtensions ipv6_privacy_extensions_from_string(const char *s) _pure_; int config_parse_ipv6_privacy_extensions(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); + + +/* Hostname */ +int config_parse_hostname(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); |