diff options
Diffstat (limited to 'dhcpv6/option_domainsearchlist.go')
-rw-r--r-- | dhcpv6/option_domainsearchlist.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/dhcpv6/option_domainsearchlist.go b/dhcpv6/option_domainsearchlist.go index e94799d..fd8aa01 100644 --- a/dhcpv6/option_domainsearchlist.go +++ b/dhcpv6/option_domainsearchlist.go @@ -28,14 +28,10 @@ func (op *optDomainSearchList) String() string { return fmt.Sprintf("%s: %s", op.Code(), op.DomainSearchList) } -// ParseOptDomainSearchList builds an OptDomainSearchList structure from a sequence -// of bytes. The input data does not include option code and length bytes. -func parseOptDomainSearchList(data []byte) (*optDomainSearchList, error) { - var opt optDomainSearchList +// FromBytes builds an OptDomainSearchList structure from a sequence of bytes. +// The input data does not include option code and length bytes. +func (op *optDomainSearchList) FromBytes(data []byte) error { var err error - opt.DomainSearchList, err = rfc1035label.FromBytes(data) - if err != nil { - return nil, err - } - return &opt, nil + op.DomainSearchList, err = rfc1035label.FromBytes(data) + return err } |