summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6message.go
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2020-03-09 18:18:25 +0000
committerGitHub <noreply@github.com>2020-03-09 18:18:25 +0000
commit34e3d10db3f3eda7b4c484d4c674537fb83a769e (patch)
tree208b013067fd3fcb1c1de071f128697eed065b17 /dhcpv6/dhcpv6message.go
parent0ef7af55f53d22f97650f2d4a299567977da57fb (diff)
parentbd34b7c6963c8c124b45759423d41987d428668e (diff)
Merge branch 'master' into vendors
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r--dhcpv6/dhcpv6message.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index 0927038..2067fcc 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -241,6 +241,19 @@ func (mo MessageOptions) FQDN() *OptFQDN {
return nil
}
+// DHCP4oDHCP6Server returns the DHCP 4o6 Server Address option as
+// defined by RFC 7341.
+func (mo MessageOptions) DHCP4oDHCP6Server() *OptDHCP4oDHCP6Server {
+ opt := mo.Options.GetOne(OptionDHCP4oDHCP6Server)
+ if opt == nil {
+ return nil
+ }
+ if server, ok := opt.(*OptDHCP4oDHCP6Server); ok {
+ return server
+ }
+ return nil
+}
+
// Message represents a DHCPv6 Message as defined by RFC 3315 Section 6.
type Message struct {
MessageType MessageType