summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6message.go
diff options
context:
space:
mode:
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 76404f2..3b850fb 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -217,6 +217,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