summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2017-12-10 10:22:33 +0000
committerAndrea Barberio <insomniac@slackware.it>2017-12-10 10:22:33 +0000
commit4e5c63276c39898c4bb3662ed0f24f1d938ef3a1 (patch)
tree66e61b054f1bef2341abee61475b37e886071fd8
parent8ffda0b0505a1f89886bc1664478b73bcd1571c8 (diff)
Added DHCPv6.Option() to interface, and implemented where missing
-rw-r--r--dhcpv6/dhcpv6.go1
-rw-r--r--dhcpv6/dhcpv6message.go8
-rw-r--r--dhcpv6/dhcpv6relay.go4
3 files changed, 9 insertions, 4 deletions
diff --git a/dhcpv6/dhcpv6.go b/dhcpv6/dhcpv6.go
index 9e24322..9b6ef5c 100644
--- a/dhcpv6/dhcpv6.go
+++ b/dhcpv6/dhcpv6.go
@@ -7,6 +7,7 @@ import (
type DHCPv6 interface {
Type() MessageType
ToBytes() []byte
+ Options() []Option
String() string
Summary() string
Length() int
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index b781d6e..93966f7 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -132,10 +132,6 @@ func (d *DHCPv6Message) SetTransactionID(tid uint32) {
d.transactionID = ttid
}
-func (d *DHCPv6Message) Options() []Option {
- return d.options
-}
-
func (d *DHCPv6Message) SetOptions(options []Option) {
d.options = options
}
@@ -190,3 +186,7 @@ func (d *DHCPv6Message) Length() int {
}
return mLen
}
+
+func (d *DHCPv6Message) Options() []Option {
+ return d.options
+}
diff --git a/dhcpv6/dhcpv6relay.go b/dhcpv6/dhcpv6relay.go
index 4255d02..716c24f 100644
--- a/dhcpv6/dhcpv6relay.go
+++ b/dhcpv6/dhcpv6relay.go
@@ -68,3 +68,7 @@ func (r *DHCPv6Relay) Length() int {
}
return mLen
}
+
+func (r *DHCPv6Relay) Options() []Option {
+ return r.options
+}