blob: 2aa89b34256c62e1bf10f6e69ce06b837c1bd638 [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Code generated by "stringer -output ./src/connectivity/network/netstack/dhcp/dhcp_string.go -type=dhcpClientState,dhcpMsgType,op,optionCode ./src/connectivity/network/netstack/dhcp"; DO NOT EDIT.
package dhcp
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[initSelecting-0]
_ = x[bound-1]
_ = x[renewing-2]
_ = x[rebinding-3]
}
const _dhcpClientState_name = "initSelectingboundrenewingrebinding"
var _dhcpClientState_index = [...]uint8{0, 13, 18, 26, 35}
func (i dhcpClientState) String() string {
if i >= dhcpClientState(len(_dhcpClientState_index)-1) {
return "dhcpClientState(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _dhcpClientState_name[_dhcpClientState_index[i]:_dhcpClientState_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[dhcpDISCOVER-1]
_ = x[dhcpOFFER-2]
_ = x[dhcpREQUEST-3]
_ = x[dhcpDECLINE-4]
_ = x[dhcpACK-5]
_ = x[dhcpNAK-6]
_ = x[dhcpRELEASE-7]
}
const _dhcpMsgType_name = "dhcpDISCOVERdhcpOFFERdhcpREQUESTdhcpDECLINEdhcpACKdhcpNAKdhcpRELEASE"
var _dhcpMsgType_index = [...]uint8{0, 12, 21, 32, 43, 50, 57, 68}
func (i dhcpMsgType) String() string {
i -= 1
if i >= dhcpMsgType(len(_dhcpMsgType_index)-1) {
return "dhcpMsgType(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _dhcpMsgType_name[_dhcpMsgType_index[i]:_dhcpMsgType_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[opRequest-1]
_ = x[opReply-2]
}
const _op_name = "opRequestopReply"
var _op_index = [...]uint8{0, 9, 16}
func (i op) String() string {
i -= 1
if i >= op(len(_op_index)-1) {
return "op(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _op_name[_op_index[i]:_op_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[optSubnetMask-1]
_ = x[optRouter-3]
_ = x[optDomainNameServer-6]
_ = x[optDomainName-15]
_ = x[optReqIPAddr-50]
_ = x[optLeaseTime-51]
_ = x[optDHCPMsgType-53]
_ = x[optDHCPServer-54]
_ = x[optParamReq-55]
_ = x[optMessage-56]
_ = x[optRenewalTime-58]
_ = x[optRebindingTime-59]
_ = x[optClientID-61]
}
const (
_optionCode_name_0 = "optSubnetMask"
_optionCode_name_1 = "optRouter"
_optionCode_name_2 = "optDomainNameServer"
_optionCode_name_3 = "optDomainName"
_optionCode_name_4 = "optReqIPAddroptLeaseTime"
_optionCode_name_5 = "optDHCPMsgTypeoptDHCPServeroptParamReqoptMessage"
_optionCode_name_6 = "optRenewalTimeoptRebindingTime"
_optionCode_name_7 = "optClientID"
)
var (
_optionCode_index_4 = [...]uint8{0, 12, 24}
_optionCode_index_5 = [...]uint8{0, 14, 27, 38, 48}
_optionCode_index_6 = [...]uint8{0, 14, 30}
)
func (i optionCode) String() string {
switch {
case i == 1:
return _optionCode_name_0
case i == 3:
return _optionCode_name_1
case i == 6:
return _optionCode_name_2
case i == 15:
return _optionCode_name_3
case 50 <= i && i <= 51:
i -= 50
return _optionCode_name_4[_optionCode_index_4[i]:_optionCode_index_4[i+1]]
case 53 <= i && i <= 56:
i -= 53
return _optionCode_name_5[_optionCode_index_5[i]:_optionCode_index_5[i+1]]
case 58 <= i && i <= 59:
i -= 58
return _optionCode_name_6[_optionCode_index_6[i]:_optionCode_index_6[i+1]]
case i == 61:
return _optionCode_name_7
default:
return "optionCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}