diff options
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r-- | dhcpv6/dhcpv6message.go | 13 |
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 |