github.com/transparency-dev/armored-witness-applet@v0.1.1/third_party/dhcp/dhcp_string.go (about)

     1  // 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.
     2  
     3  //go:build !lint
     4  // +build !lint
     5  
     6  package dhcp
     7  
     8  import "strconv"
     9  
    10  func _() {
    11  	// An "invalid array index" compiler error signifies that the constant values have changed.
    12  	// Re-run the stringer command to generate them again.
    13  	var x [1]struct{}
    14  	_ = x[initSelecting-0]
    15  	_ = x[bound-1]
    16  	_ = x[renewing-2]
    17  	_ = x[rebinding-3]
    18  }
    19  
    20  const _dhcpClientState_name = "initSelectingboundrenewingrebinding"
    21  
    22  var _dhcpClientState_index = [...]uint8{0, 13, 18, 26, 35}
    23  
    24  func (i dhcpClientState) String() string {
    25  	if i >= dhcpClientState(len(_dhcpClientState_index)-1) {
    26  		return "dhcpClientState(" + strconv.FormatInt(int64(i), 10) + ")"
    27  	}
    28  	return _dhcpClientState_name[_dhcpClientState_index[i]:_dhcpClientState_index[i+1]]
    29  }
    30  func _() {
    31  	// An "invalid array index" compiler error signifies that the constant values have changed.
    32  	// Re-run the stringer command to generate them again.
    33  	var x [1]struct{}
    34  	_ = x[dhcpDISCOVER-1]
    35  	_ = x[dhcpOFFER-2]
    36  	_ = x[dhcpREQUEST-3]
    37  	_ = x[dhcpDECLINE-4]
    38  	_ = x[dhcpACK-5]
    39  	_ = x[dhcpNAK-6]
    40  	_ = x[dhcpRELEASE-7]
    41  }
    42  
    43  const _dhcpMsgType_name = "dhcpDISCOVERdhcpOFFERdhcpREQUESTdhcpDECLINEdhcpACKdhcpNAKdhcpRELEASE"
    44  
    45  var _dhcpMsgType_index = [...]uint8{0, 12, 21, 32, 43, 50, 57, 68}
    46  
    47  func (i dhcpMsgType) String() string {
    48  	i -= 1
    49  	if i >= dhcpMsgType(len(_dhcpMsgType_index)-1) {
    50  		return "dhcpMsgType(" + strconv.FormatInt(int64(i+1), 10) + ")"
    51  	}
    52  	return _dhcpMsgType_name[_dhcpMsgType_index[i]:_dhcpMsgType_index[i+1]]
    53  }
    54  func _() {
    55  	// An "invalid array index" compiler error signifies that the constant values have changed.
    56  	// Re-run the stringer command to generate them again.
    57  	var x [1]struct{}
    58  	_ = x[opRequest-1]
    59  	_ = x[opReply-2]
    60  }
    61  
    62  const _op_name = "opRequestopReply"
    63  
    64  var _op_index = [...]uint8{0, 9, 16}
    65  
    66  func (i op) String() string {
    67  	i -= 1
    68  	if i >= op(len(_op_index)-1) {
    69  		return "op(" + strconv.FormatInt(int64(i+1), 10) + ")"
    70  	}
    71  	return _op_name[_op_index[i]:_op_index[i+1]]
    72  }
    73  func _() {
    74  	// An "invalid array index" compiler error signifies that the constant values have changed.
    75  	// Re-run the stringer command to generate them again.
    76  	var x [1]struct{}
    77  	_ = x[optSubnetMask-1]
    78  	_ = x[optRouter-3]
    79  	_ = x[optDomainNameServer-6]
    80  	_ = x[optHostname-12]
    81  	_ = x[optDomainName-15]
    82  	_ = x[optReqIPAddr-50]
    83  	_ = x[optLeaseTime-51]
    84  	_ = x[optDHCPMsgType-53]
    85  	_ = x[optDHCPServer-54]
    86  	_ = x[optParamReq-55]
    87  	_ = x[optMessage-56]
    88  	_ = x[optRenewalTime-58]
    89  	_ = x[optRebindingTime-59]
    90  	_ = x[optClientID-61]
    91  }
    92  
    93  const (
    94  	_optionCode_name_0 = "optSubnetMask"
    95  	_optionCode_name_1 = "optRouter"
    96  	_optionCode_name_2 = "optDomainNameServer"
    97  	_optionCode_name_3 = "optDomainName"
    98  	_optionCode_name_4 = "optReqIPAddroptLeaseTime"
    99  	_optionCode_name_5 = "optDHCPMsgTypeoptDHCPServeroptParamReqoptMessage"
   100  	_optionCode_name_6 = "optRenewalTimeoptRebindingTime"
   101  	_optionCode_name_7 = "optClientID"
   102  	_optionCode_name_8 = "optHostname"
   103  )
   104  
   105  var (
   106  	_optionCode_index_4 = [...]uint8{0, 12, 24}
   107  	_optionCode_index_5 = [...]uint8{0, 14, 27, 38, 48}
   108  	_optionCode_index_6 = [...]uint8{0, 14, 30}
   109  )
   110  
   111  func (i optionCode) String() string {
   112  	switch {
   113  	case i == 1:
   114  		return _optionCode_name_0
   115  	case i == 3:
   116  		return _optionCode_name_1
   117  	case i == 6:
   118  		return _optionCode_name_2
   119  	case i == 15:
   120  		return _optionCode_name_3
   121  	case 50 <= i && i <= 51:
   122  		i -= 50
   123  		return _optionCode_name_4[_optionCode_index_4[i]:_optionCode_index_4[i+1]]
   124  	case 53 <= i && i <= 56:
   125  		i -= 53
   126  		return _optionCode_name_5[_optionCode_index_5[i]:_optionCode_index_5[i+1]]
   127  	case 58 <= i && i <= 59:
   128  		i -= 58
   129  		return _optionCode_name_6[_optionCode_index_6[i]:_optionCode_index_6[i+1]]
   130  	case i == 61:
   131  		return _optionCode_name_7
   132  	case i == 12:
   133  		return _optionCode_name_8
   134  	default:
   135  		return "optionCode(" + strconv.FormatInt(int64(i), 10) + ")"
   136  	}
   137  }