summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorChristopher Koch <chrisko@google.com>2018-12-29 11:26:27 -0800
committerinsomniac <insomniacslk@users.noreply.github.com>2019-01-14 23:19:04 +0000
commit75d26a6410980df90d3a9d224956cfe5ed35a07f (patch)
treea98dbe3358f013b3146b26ffca3225b70cc194fd /dhcpv4
parent158ad8e79b2e644da7dfbfceb9191e6587ede81e (diff)
Rename iana.ArchType to iana.Arch.
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/option_archtype.go6
-rw-r--r--dhcpv4/option_archtype_test.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv4/option_archtype.go b/dhcpv4/option_archtype.go
index 2977d8a..c475174 100644
--- a/dhcpv4/option_archtype.go
+++ b/dhcpv4/option_archtype.go
@@ -13,7 +13,7 @@ import (
// OptClientArchType represents an option encapsulating the Client System
// Architecture Type option Definition.
type OptClientArchType struct {
- ArchTypes []iana.ArchType
+ ArchTypes []iana.Arch
}
// Code returns the option code.
@@ -50,9 +50,9 @@ func ParseOptClientArchType(data []byte) (*OptClientArchType, error) {
return nil, fmt.Errorf("must have at least one archtype if option is present")
}
- archTypes := make([]iana.ArchType, 0, buf.Len()/2)
+ archTypes := make([]iana.Arch, 0, buf.Len()/2)
for buf.Has(2) {
- archTypes = append(archTypes, iana.ArchType(buf.Read16()))
+ archTypes = append(archTypes, iana.Arch(buf.Read16()))
}
return &OptClientArchType{ArchTypes: archTypes}, buf.FinError()
}
diff --git a/dhcpv4/option_archtype_test.go b/dhcpv4/option_archtype_test.go
index 7be896e..60f8864 100644
--- a/dhcpv4/option_archtype_test.go
+++ b/dhcpv4/option_archtype_test.go
@@ -54,7 +54,7 @@ func TestOptClientArchTypeParseAndToBytesMultiple(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, opt.Code(), OptionClientSystemArchitectureType)
}