diff options
Diffstat (limited to 'dhcpv6')
-rw-r--r-- | dhcpv6/dhcpv6_test.go | 4 | ||||
-rw-r--r-- | dhcpv6/modifiers.go | 4 | ||||
-rw-r--r-- | dhcpv6/option_archtype.go | 4 | ||||
-rw-r--r-- | dhcpv6/option_archtype_test.go | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/dhcpv6/dhcpv6_test.go b/dhcpv6/dhcpv6_test.go index 84cdb50..b1da1d8 100644 --- a/dhcpv6/dhcpv6_test.go +++ b/dhcpv6/dhcpv6_test.go @@ -293,14 +293,14 @@ func TestNewMessageTypeSolicitWithCID(t *testing.T) { func TestIsUsingUEFIArchTypeTrue(t *testing.T) { msg := DHCPv6Message{} - opt := OptClientArchType{ArchTypes: []iana.ArchType{iana.EFI_BC}} + opt := OptClientArchType{ArchTypes: []iana.Arch{iana.EFI_BC}} msg.AddOption(&opt) require.True(t, IsUsingUEFI(&msg)) } func TestIsUsingUEFIArchTypeFalse(t *testing.T) { msg := DHCPv6Message{} - opt := OptClientArchType{ArchTypes: []iana.ArchType{iana.INTEL_X86PC}} + opt := OptClientArchType{ArchTypes: []iana.Arch{iana.INTEL_X86PC}} msg.AddOption(&opt) require.False(t, IsUsingUEFI(&msg)) } diff --git a/dhcpv6/modifiers.go b/dhcpv6/modifiers.go index 16c71a3..a3d7986 100644 --- a/dhcpv6/modifiers.go +++ b/dhcpv6/modifiers.go @@ -57,9 +57,9 @@ func WithUserClass(uc []byte) Modifier { } // WithArchType adds an arch type option to the packet -func WithArchType(at iana.ArchType) Modifier { +func WithArchType(at iana.Arch) Modifier { return func(d DHCPv6) DHCPv6 { - ao := OptClientArchType{ArchTypes: []iana.ArchType{at}} + ao := OptClientArchType{ArchTypes: []iana.Arch{at}} d.AddOption(&ao) return d } diff --git a/dhcpv6/option_archtype.go b/dhcpv6/option_archtype.go index 636d10f..058754a 100644 --- a/dhcpv6/option_archtype.go +++ b/dhcpv6/option_archtype.go @@ -13,7 +13,7 @@ import ( // OptClientArchType represents an option CLIENT_ARCH_TYPE type OptClientArchType struct { - ArchTypes []iana.ArchType + ArchTypes []iana.Arch } func (op *OptClientArchType) Code() OptionCode { @@ -54,7 +54,7 @@ func ParseOptClientArchType(data []byte) (*OptClientArchType, error) { } for idx := 0; idx < len(data); idx += 2 { b := data[idx : idx+2] - opt.ArchTypes = append(opt.ArchTypes, iana.ArchType(binary.BigEndian.Uint16(b))) + opt.ArchTypes = append(opt.ArchTypes, iana.Arch(binary.BigEndian.Uint16(b))) } return &opt, nil } diff --git a/dhcpv6/option_archtype_test.go b/dhcpv6/option_archtype_test.go index d5b2b99..abf872d 100644 --- a/dhcpv6/option_archtype_test.go +++ b/dhcpv6/option_archtype_test.go @@ -38,7 +38,7 @@ func TestOptClientArchTypeParseAndToBytes(t *testing.T) { func TestOptClientArchType(t *testing.T) { opt := OptClientArchType{ - ArchTypes: []iana.ArchType{iana.EFI_ITANIUM}, + ArchTypes: []iana.Arch{iana.EFI_ITANIUM}, } require.Equal(t, 2, opt.Length()) require.Equal(t, OptionClientArchType, opt.Code()) |