summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6message.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r--dhcpv6/dhcpv6message.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index 00452dc..bc87f9b 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -38,6 +38,15 @@ func (mo MessageOptions) ClientID() *Duid {
return &opt.(*optClientID).Duid
}
+// ServerID returns the server identifier option.
+func (mo MessageOptions) ServerID() *Duid {
+ opt := mo.GetOne(OptionServerID)
+ if opt == nil {
+ return nil
+ }
+ return &opt.(*optServerID).Duid
+}
+
// Message represents a DHCPv6 Message as defined by RFC 3315 Section 6.
type Message struct {
MessageType MessageType