summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6message.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r--dhcpv6/dhcpv6message.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index 45fa5f1..72332c5 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -106,6 +106,18 @@ func (mo MessageOptions) OneIAPD() *OptIAPD {
return iapds[0]
}
+// FourRD returns all 4RD options.
+func (mo MessageOptions) FourRD() []*Opt4RD {
+ opts := mo.Get(Option4RD)
+ var frds []*Opt4RD
+ for _, o := range opts {
+ if m, ok := o.(*Opt4RD); ok {
+ frds = append(frds, m)
+ }
+ }
+ return frds
+}
+
// Status returns the status code associated with this option.
func (mo MessageOptions) Status() *OptStatusCode {
opt := mo.Options.GetOne(OptionStatusCode)