From 4e5c63276c39898c4bb3662ed0f24f1d938ef3a1 Mon Sep 17 00:00:00 2001 From: Andrea Barberio Date: Sun, 10 Dec 2017 10:22:33 +0000 Subject: Added DHCPv6.Option() to interface, and implemented where missing --- dhcpv6/dhcpv6.go | 1 + dhcpv6/dhcpv6message.go | 8 ++++---- dhcpv6/dhcpv6relay.go | 4 ++++ 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 +} -- cgit v1.2.3