summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/options.go')
-rw-r--r--dhcpv6/options.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/dhcpv6/options.go b/dhcpv6/options.go
index 33f0d20..23ad589 100644
--- a/dhcpv6/options.go
+++ b/dhcpv6/options.go
@@ -5,9 +5,6 @@ import (
"fmt"
)
-// OptionCode is a single byte representing the code for a given Option.
-type OptionCode uint16
-
// Option is an interface that all DHCPv6 options adhere to.
type Option interface {
Code() OptionCode
@@ -38,11 +35,7 @@ func (og *OptionGeneric) ToBytes() []byte {
}
func (og *OptionGeneric) String() string {
- code, ok := OptionCodeToString[og.OptionCode]
- if !ok {
- code = "UnknownOption"
- }
- return fmt.Sprintf("%v -> %v", code, og.OptionData)
+ return fmt.Sprintf("%s -> %v", og.OptionCode, og.OptionData)
}
func (og *OptionGeneric) Length() int {