summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/dhcpv6.go')
-rw-r--r--dhcpv6/dhcpv6.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv6/dhcpv6.go b/dhcpv6/dhcpv6.go
index b424101..0dabca5 100644
--- a/dhcpv6/dhcpv6.go
+++ b/dhcpv6/dhcpv6.go
@@ -30,7 +30,7 @@ func FromBytes(data []byte) (DHCPv6, error) {
headerSize int
messageType = MessageType(data[0])
)
- if messageType == RELAY_FORW || messageType == RELAY_REPL {
+ if messageType == MessageTypeRelayForward || messageType == MessageTypeRelayReply {
isRelay = true
}
if isRelay {
@@ -85,7 +85,7 @@ func NewMessage(modifiers ...Modifier) (DHCPv6, error) {
return nil, err
}
msg := DHCPv6Message{
- messageType: SOLICIT,
+ messageType: MessageTypeSolicit,
transactionID: *tid,
}
// apply modifiers
@@ -134,7 +134,7 @@ func DecapsulateRelay(l DHCPv6) (DHCPv6, error) {
if !l.IsRelay() {
return l, nil
}
- opt := l.GetOneOption(OPTION_RELAY_MSG)
+ opt := l.GetOneOption(OptionRelayMsg)
if opt == nil {
return nil, fmt.Errorf("No OptRelayMsg found")
}
@@ -181,7 +181,7 @@ func DecapsulateRelayIndex(l DHCPv6, index int) (DHCPv6, error) {
// message as payload. The passed message type must be either RELAY_FORW or
// RELAY_REPL
func EncapsulateRelay(d DHCPv6, mType MessageType, linkAddr, peerAddr net.IP) (DHCPv6, error) {
- if mType != RELAY_FORW && mType != RELAY_REPL {
+ if mType != MessageTypeRelayForward && mType != MessageTypeRelayReply {
return nil, fmt.Errorf("Message type must be either RELAY_FORW or RELAY_REPL")
}
outer := DHCPv6Relay{