blob: 0dc70a870808fb8bede043c906f0f04ec104d06a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// generated by stringer -type=BGPCapabilityCode; DO NOT EDIT
package bgp
import "fmt"
const (
_BGPCapabilityCode_name_0 = "BGP_CAP_MULTIPROTOCOLBGP_CAP_ROUTE_REFRESH"
_BGPCapabilityCode_name_1 = "BGP_CAP_CARRYING_LABEL_INFO"
_BGPCapabilityCode_name_2 = "BGP_CAP_GRACEFUL_RESTARTBGP_CAP_FOUR_OCTET_AS_NUMBER"
_BGPCapabilityCode_name_3 = "BGP_CAP_ENHANCED_ROUTE_REFRESH"
_BGPCapabilityCode_name_4 = "BGP_CAP_ROUTE_REFRESH_CISCO"
)
var (
_BGPCapabilityCode_index_0 = [...]uint8{0, 21, 42}
_BGPCapabilityCode_index_1 = [...]uint8{0, 27}
_BGPCapabilityCode_index_2 = [...]uint8{0, 24, 52}
_BGPCapabilityCode_index_3 = [...]uint8{0, 30}
_BGPCapabilityCode_index_4 = [...]uint8{0, 27}
)
func (i BGPCapabilityCode) String() string {
switch {
case 1 <= i && i <= 2:
i -= 1
return _BGPCapabilityCode_name_0[_BGPCapabilityCode_index_0[i]:_BGPCapabilityCode_index_0[i+1]]
case i == 4:
return _BGPCapabilityCode_name_1
case 64 <= i && i <= 65:
i -= 64
return _BGPCapabilityCode_name_2[_BGPCapabilityCode_index_2[i]:_BGPCapabilityCode_index_2[i+1]]
case i == 70:
return _BGPCapabilityCode_name_3
case i == 128:
return _BGPCapabilityCode_name_4
default:
return fmt.Sprintf("BGPCapabilityCode(%d)", i)
}
}
|