summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_dhcpv4_msg.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/option_dhcpv4_msg.go')
-rw-r--r--dhcpv6/option_dhcpv4_msg.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/dhcpv6/option_dhcpv4_msg.go b/dhcpv6/option_dhcpv4_msg.go
index ad29353..825ea8a 100644
--- a/dhcpv6/option_dhcpv4_msg.go
+++ b/dhcpv6/option_dhcpv4_msg.go
@@ -40,12 +40,10 @@ func (op *OptDHCPv4Msg) LongString(indent int) string {
return fmt.Sprintf("%s: {%v%s}", op.Code(), summary, ind)
}
-// ParseOptDHCPv4Msg builds an OptDHCPv4Msg structure
-// from a sequence of bytes. The input data does not include option code and length
-// bytes.
-func ParseOptDHCPv4Msg(data []byte) (*OptDHCPv4Msg, error) {
- var opt OptDHCPv4Msg
+// FromBytes builds an OptDHCPv4Msg structure from a sequence of bytes. The
+// input data does not include option code and length bytes.
+func (op *OptDHCPv4Msg) FromBytes(data []byte) error {
var err error
- opt.Msg, err = dhcpv4.FromBytes(data)
- return &opt, err
+ op.Msg, err = dhcpv4.FromBytes(data)
+ return err
}