summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/modifiers.go
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2020-02-10 09:54:18 +0000
committerGitHub <noreply@github.com>2020-02-10 09:54:18 +0000
commit45e5f320b2f0f87515ac27f1a04bbd24f494ac90 (patch)
treec077ddd63a2f91cade9c6e14be46c6fef1b9e234 /dhcpv6/modifiers.go
parent5214532ecf392e5a8818355f3fff993aaef42c06 (diff)
parent8a245966f316b2f19e13e806a95ef1c4e6806eb5 (diff)
Merge pull request #355 from 10000TB/davidhu-dhcpv6-fqdn
dhcpv6 fqdn: implements OptionFQDN option
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