summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/utils.go
diff options
context:
space:
mode:
authorSean Karlage <skarlage@fb.com>2018-07-29 17:54:30 -0700
committerSean Karlage <skarlage@fb.com>2018-07-30 22:17:49 -0700
commit7319b8f8a1a601b5e69c5bcaa33914c0f85b92e6 (patch)
tree945d12ed3d8a11ebc55dd2f8d6ee1304ecd2b20f /dhcpv6/utils.go
parentc6894ea160d82b4a326ebab94faaebd090192a7b (diff)
DHCPv6: Rename Option constants to CamelCase
To appease linters
Diffstat (limited to 'dhcpv6/utils.go')
-rw-r--r--dhcpv6/utils.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/dhcpv6/utils.go b/dhcpv6/utils.go
index b1c0b93..1681661 100644
--- a/dhcpv6/utils.go
+++ b/dhcpv6/utils.go
@@ -11,14 +11,14 @@ import (
// if the "boot file" option is included in the packet, which is useful for
// ADVERTISE/REPLY packet.
func IsNetboot(msg DHCPv6) bool {
- for _, optoro := range msg.GetOption(OPTION_ORO) {
+ for _, optoro := range msg.GetOption(OptionORO) {
for _, o := range optoro.(*OptRequestedOption).RequestedOptions() {
- if o == OPT_BOOTFILE_URL {
+ if o == OptionBootfileURL {
return true
}
}
}
- if optbf := msg.GetOneOption(OPT_BOOTFILE_URL); optbf != nil {
+ if optbf := msg.GetOneOption(OptionBootfileURL); optbf != nil {
return true
}
return false
@@ -42,14 +42,14 @@ func IsUsingUEFI(msg DHCPv6) bool {
// 7 EFI BC
// 8 EFI Xscale
// 9 EFI x86-64
- if opt := msg.GetOneOption(OPTION_CLIENT_ARCH_TYPE); opt != nil {
+ if opt := msg.GetOneOption(OptionClientArchType); opt != nil {
optat := opt.(*OptClientArchType)
// TODO investigate if other types are appropriate
if optat.ArchType == EFI_BC || optat.ArchType == EFI_X86_64 {
return true
}
}
- if opt := msg.GetOneOption(OPTION_USER_CLASS); opt != nil {
+ if opt := msg.GetOneOption(OptionUserClass); opt != nil {
optuc := opt.(*OptUserClass)
for _, uc := range optuc.UserClasses {
if strings.Contains(string(uc), "EFI") {