summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_iaaddress.go
diff options
context:
space:
mode:
authorSean Karlage <skarlage@fb.com>2018-08-11 14:30:48 -0700
committerSean Karlage <skarlage@fb.com>2018-08-11 14:32:26 -0700
commit8ea2525c898436a2a935580de67727bbe7035c85 (patch)
tree69d35d17c238feabb07ef07a907aae5520104911 /dhcpv6/option_iaaddress.go
parent2b05c7d03724d31529886d98f738499ac06ead7e (diff)
parenta6212f1f72e94821a29894fb66656a981bd035d0 (diff)
Merge branch 'master' into dhcpv4-moar-tests
Diffstat (limited to 'dhcpv6/option_iaaddress.go')
-rw-r--r--dhcpv6/option_iaaddress.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/dhcpv6/option_iaaddress.go b/dhcpv6/option_iaaddress.go
index 1a89a25..0500d83 100644
--- a/dhcpv6/option_iaaddress.go
+++ b/dhcpv6/option_iaaddress.go
@@ -9,7 +9,7 @@ import (
"net"
)
-// OptIAAddress represents an OPTION_IAADDR
+// OptIAAddress represents an OptionIAAddr
type OptIAAddress struct {
IPv6Addr net.IP
PreferredLifetime uint32
@@ -19,13 +19,13 @@ type OptIAAddress struct {
// Code returns the option's code
func (op *OptIAAddress) Code() OptionCode {
- return OPTION_IAADDR
+ return OptionIAAddr
}
// ToBytes serializes the option and returns it as a sequence of bytes
func (op *OptIAAddress) ToBytes() []byte {
buf := make([]byte, 28)
- binary.BigEndian.PutUint16(buf[0:2], uint16(OPTION_IAADDR))
+ binary.BigEndian.PutUint16(buf[0:2], uint16(OptionIAAddr))
binary.BigEndian.PutUint16(buf[2:4], uint16(op.Length()))
copy(buf[4:20], op.IPv6Addr[:])
binary.BigEndian.PutUint32(buf[20:24], op.PreferredLifetime)