summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/modifiers.go
diff options
context:
space:
mode:
authorXuehao (David) Hu <xuehaohu@google.com>2020-02-04 12:00:29 -0800
committerXuehao (David) Hu <xuehaohu@google.com>2020-02-06 18:15:13 -0800
commit8a245966f316b2f19e13e806a95ef1c4e6806eb5 (patch)
treec077ddd63a2f91cade9c6e14be46c6fef1b9e234 /dhcpv6/modifiers.go
parent5214532ecf392e5a8818355f3fff993aaef42c06 (diff)
hcpv6 fqdn: implements OptionFQDN option
per https://tools.ietf.org/rfc/rfc4704.txt Signed-off-by: Xuehao (David) Hu <xuehaohu@google.com>
Diffstat (limited to 'dhcpv6/modifiers.go')
-rw-r--r--dhcpv6/modifiers.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/dhcpv6/modifiers.go b/dhcpv6/modifiers.go
index efd14a5..06eb9d9 100644
--- a/dhcpv6/modifiers.go
+++ b/dhcpv6/modifiers.go
@@ -43,6 +43,14 @@ func WithNetboot(d DHCPv6) {
msg.UpdateOption(oro)
}
+// WithFQDN adds a fully qualified domain name option to the packet
+func WithFQDN(flags uint8, domainname string) Modifier {
+ return func(d DHCPv6) {
+ ofqdn := OptFQDN{Flags: flags, DomainName: domainname}
+ d.AddOption(&ofqdn)
+ }
+}
+
// WithUserClass adds a user class option to the packet
func WithUserClass(uc []byte) Modifier {
// TODO let the user specify multiple user classes