-
Notifications
You must be signed in to change notification settings - Fork 11
/
iana_const.go
295 lines (281 loc) · 17.2 KB
/
iana_const.go
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
// go generate iana_gen.go
// Code generated by the command above; DO NOT EDIT.
package corebgp
// Capability Codes, Updated: 2023-01-23
const (
CAP_MP_EXTENSIONS uint8 = 1 // Multiprotocol Extensions for BGP-4
CAP_ROUTE_REFRESH uint8 = 2 // Route Refresh Capability for BGP-4
CAP_OUTBOUND_ROUTE_FILTERING uint8 = 3 // Outbound Route Filtering Capability
CAP_EXTENDED_NEXT_HOP_ENCODING uint8 = 5 // Extended Next Hop Encoding
CAP_EXTENDED_MESSSAGE uint8 = 6 // BGP Extended Message
CAP_BGPSEC uint8 = 7 // BGPsec Capability
CAP_MULTIPLE_LABELS uint8 = 8 // Multiple Labels Capability
CAP_ROLE uint8 = 9 // BGP Role
CAP_GRACEFUL_RESTART uint8 = 64 // Graceful Restart Capability
CAP_FOUR_OCTET_AS uint8 = 65 // Support for 4-octet AS number capability
CAP_DYNAMIC uint8 = 67 // Support for Dynamic Capability (capability specific)
CAP_MULTISESSION uint8 = 68 // Multisession BGP Capability
CAP_ADD_PATH uint8 = 69 // ADD-PATH Capability
CAP_ENHANCED_ROUTE_REFRESH uint8 = 70 // Enhanced Route Refresh Capability
CAP_LLGR uint8 = 71 // Long-Lived Graceful Restart (LLGR) Capability
CAP_ROUTING_POLICY_DIST uint8 = 72 // Routing Policy Distribution
CAP_FQDN uint8 = 73 // FQDN Capability
CAP_BFD uint8 = 74 // BFD Capability
CAP_SOFTWARE_VERSION uint8 = 75 // Software Version Capability
)
// Address Family Numbers, Updated: 2021-10-19
const (
AFI_IPV4 uint16 = 1 // IP (IP version 4)
AFI_IPV6 uint16 = 2 // IP6 (IP version 6)
AFI_NSAP uint16 = 3 // NSAP
AFI_HDLC uint16 = 4 // HDLC (8-bit multidrop)
AFI_BBN_1822 uint16 = 5 // BBN 1822
AFI_802 uint16 = 6 // 802 (includes all 802 media plus Ethernet "canonical format")
AFI_E163 uint16 = 7 // E.163
AFI_E164 uint16 = 8 // E.164 (SMDS, Frame Relay, ATM)
AFI_F69 uint16 = 9 // F.69 (Telex)
AFI_X121 uint16 = 10 // X.121 (X.25, Frame Relay)
AFI_IPX uint16 = 11 // IPX
AFI_APPLETALK uint16 = 12 // Appletalk
AFI_DECNET_IV uint16 = 13 // Decnet IV
AFI_BANYAN_VINES uint16 = 14 // Banyan Vines
AFI_E164_WITH_NSAP_SUBADDR uint16 = 15 // E.164 with NSAP format subaddress
AFI_DNS uint16 = 16 // DNS (Domain Name System)
AFI_DISTINGUISHED_NAME uint16 = 17 // Distinguished Name
AFI_AS_NUMBER uint16 = 18 // AS Number
AFI_XTP_OVER_IPV4 uint16 = 19 // XTP over IP version 4
AFI_XTP_OVER_IPV6 uint16 = 20 // XTP over IP version 6
AFI_XTP_NATIVE uint16 = 21 // XTP native mode XTP
AFI_FIBRE_CHANNEL_WWPN uint16 = 22 // Fibre Channel World-Wide Port Name
AFI_FIBRE_CHANNEL_WWNN uint16 = 23 // Fibre Channel World-Wide Node Name
AFI_GWID uint16 = 24 // GWID
AFI_L2VPN_INFO uint16 = 25 // AFI for L2VPN information
AFI_MPLS_TP_SECTION_ENDPOINT_ID uint16 = 26 // MPLS-TP Section Endpoint Identifier
AFI_MPLS_TP_LSP_ENDPOINT_ID uint16 = 27 // MPLS-TP LSP Endpoint Identifier
AFI_MPLS_TP_PSEUDOWIRE_ENDPOINT_ID uint16 = 28 // MPLS-TP Pseudowire Endpoint Identifier
AFI_MT_IPV4 uint16 = 29 // MT IP: Multi-Topology IP version 4
AFI_MT_IPV6 uint16 = 30 // MT IPv6: Multi-Topology IP version 6
AFI_BGP_SFC uint16 = 31 // BGP SFC
AFI_EIGRP_COMMON_SERVICE_FAMILY uint16 = 16384 // EIGRP Common Service Family
AFI_EIGRP_IPV4_SERVICE_FAMILY uint16 = 16385 // EIGRP IPv4 Service Family
AFI_EIGRP_IPV6_SERVICE_FAMILY uint16 = 16386 // EIGRP IPv6 Service Family
AFI_LCAF uint16 = 16387 // LISP Canonical Address Format (LCAF)
AFI_BGP_LS uint16 = 16388 // BGP-LS
AFI_48_BIT_MAC uint16 = 16389 // 48-bit MAC
AFI_64_BIT_MAC uint16 = 16390 // 64-bit MAC
AFI_OUI uint16 = 16391 // OUI
AFI_MAC_FINAL_24_BITS uint16 = 16392 // MAC/24
AFI_MAC_FINAL_40_BITS uint16 = 16393 // MAC/40
AFI_IPV6_INITIAL_64_BITS uint16 = 16394 // IPv6/64
AFI_RBRIDGE_PORT_ID uint16 = 16395 // RBridge Port ID
AFI_TRILL_NICKNAME uint16 = 16396 // TRILL Nickname
AFI_UUID uint16 = 16397 // Universally Unique Identifier (UUID)
AFI_ROUTING_POLICY uint16 = 16398 // Routing Policy AFI
AFI_MPLS_NAMESPACES uint16 = 16399 // MPLS Namespaces
)
// Subsequent Address Family Identifiers (SAFI) Parameters, Updated: 2022-08-19
const (
SAFI_UNICAST uint8 = 1 // Network Layer Reachability Information used for unicast forwarding
SAFI_MULTICAST uint8 = 2 // Network Layer Reachability Information used for multicast forwarding
SAFI_MPLS uint8 = 4 // Network Layer Reachability Information (NLRI) with MPLS Labels
SAFI_MCAST_VPN uint8 = 5 // MCAST-VPN
SAFI_DYN_PLACEMENT_MULTI_SEGMENT_PW uint8 = 6 // Network Layer Reachability Information used for Dynamic Placement of Multi-Segment Pseudowires
SAFI_MCAST_VPLS uint8 = 8 // MCAST-VPLS
SAFI_BGP_SFC uint8 = 9 // BGP SFC
SAFI_TUNNEL uint8 = 64 // Tunnel SAFI
SAFI_VPLS uint8 = 65 // Virtual Private LAN Service (VPLS)
SAFI_BGP_MDT uint8 = 66 // BGP MDT SAFI
SAFI_BGP_4OVER6 uint8 = 67 // BGP 4over6 SAFI
SAFI_BGP_6OVER4 uint8 = 68 // BGP 6over4 SAFI
SAFI_LAYER_1_VPN_AUTO_DISCOVERY_INFO uint8 = 69 // Layer-1 VPN auto-discovery information
SAFI_BGP_EVPNS uint8 = 70 // BGP EVPNs
SAFI_BGP_LS uint8 = 71 // BGP-LS
SAFI_BGP_LS_VPN uint8 = 72 // BGP-LS-VPN
SAFI_SR_TE_POLICY uint8 = 73 // SR TE Policy SAFI
SAFI_SD_WAN_CAPABILITIES uint8 = 74 // SD-WAN Capabilities
SAFI_ROUTING_POLICY uint8 = 75 // Routing Policy SAFI
SAFI_CLASSFUL_TRANSPORT uint8 = 76 // Classful-Transport SAFI
SAFI_TUNNELED_TRAFFIC_FLOWSPEC uint8 = 77 // Tunneled Traffic Flowspec
SAFI_MCAST_TREE uint8 = 78 // MCAST-TREE
SAFI_BGP_DPS uint8 = 79 // BGP-DPS (Dynamic Path Selection)
SAFI_BGP_LS_SPF uint8 = 80 // BGP-LS-SPF
SAFI_BGP_CAR uint8 = 83 // BGP CAR
SAFI_BGP_VPN_CAR uint8 = 84 // BGP VPN CAR
SAFI_BGP_MUP uint8 = 85 // BGP-MUP SAFI
SAFI_MPLS_LABELED_VPN_ADDR uint8 = 128 // MPLS-labeled VPN address
SAFI_MULTICAST_BGP_MPLS_IP_VPNS uint8 = 129 // Multicast for BGP/MPLS IP Virtual Private Networks (VPNs)
SAFI_ROUTE_TARGET_CONSTRAINS uint8 = 132 // Route Target constrains
SAFI_DISSEMINATION_OF_FLOWSPEC_RULES uint8 = 133 // Dissemination of Flow Specification rules
SAFI_L3VPN_DISSEMINATION_OF_FLOWSPEC_RULES uint8 = 134 // L3VPN Dissemination of Flow Specification rules
SAFI_VPN_AUTO_DISCOVERY uint8 = 140 // VPN auto-discovery
)
// BGP Path Attributes, Updated: 2023-01-18
const (
PATH_ATTR_ORIGIN uint8 = 1 // ORIGIN
PATH_ATTR_AS_PATH uint8 = 2 // AS_PATH
PATH_ATTR_NEXT_HOP uint8 = 3 // NEXT_HOP
PATH_ATTR_MED uint8 = 4 // MULTI_EXIT_DISC
PATH_ATTR_LOCAL_PREF uint8 = 5 // LOCAL_PREF
PATH_ATTR_ATOMIC_AGGREGATE uint8 = 6 // ATOMIC_AGGREGATE
PATH_ATTR_AGGREGATOR uint8 = 7 // AGGREGATOR
PATH_ATTR_COMMUNITY uint8 = 8 // COMMUNITY
PATH_ATTR_ORIGINATOR_ID uint8 = 9 // ORIGINATOR_ID
PATH_ATTR_CLUSTER_LIST uint8 = 10 // CLUSTER_LIST
PATH_ATTR_MP_REACH_NLRI uint8 = 14 // MP_REACH_NLRI
PATH_ATTR_MP_UNREACH_NLRI uint8 = 15 // MP_UNREACH_NLRI
PATH_ATTR_EXTENDED_COMMUNITIES uint8 = 16 // EXTENDED COMMUNITIES
PATH_ATTR_AS4_PATH uint8 = 17 // AS4_PATH
PATH_ATTR_AS4_AGGREGATOR uint8 = 18 // AS4_AGGREGATOR
PATH_ATTR_PMSI_TUNNEL uint8 = 22 // PMSI_TUNNEL
PATH_ATTR_TUNNEL_ENCAPSULATION uint8 = 23 // Tunnel Encapsulation
PATH_ATTR_TRAFFIC_ENGINEERING uint8 = 24 // Traffic Engineering
PATH_ATTR_IPV6_ADDR_SPECIFIC_EXTENDED_COMMUNITY uint8 = 25 // IPv6 Address Specific Extended Community
PATH_ATTR_AIGP uint8 = 26 // AIGP
PATH_ATTR_PE_DISTINGUISHER_LABELS uint8 = 27 // PE Distinguisher Labels
PATH_ATTR_BGP_LS uint8 = 29 // BGP-LS Attribute
PATH_ATTR_LARGE_COMMUNITY uint8 = 32 // LARGE_COMMUNITY
PATH_ATTR_BGPSEC_PATH uint8 = 33 // BGPsec_Path
PATH_ATTR_OTC uint8 = 35 // Only to Customer (OTC)
PATH_ATTR_SFP_ATTR uint8 = 37 // SFP attribute
PATH_ATTR_BFD_DISCRIMINATOR uint8 = 38 // BFD Discriminator
PATH_ATTR_BGP_PREFIX_SID uint8 = 40 // BGP Prefix-SID
PATH_ATTR_ATTR_SET uint8 = 128 // ATTR_SET
)
// BGP Error (Notification) Codes, Updated: 2023-01-18
const (
NOTIF_CODE_MESSAGE_HEADER_ERR uint8 = 1 // Message Header Error
NOTIF_CODE_OPEN_MESSAGE_ERR uint8 = 2 // OPEN Message Error
NOTIF_CODE_UPDATE_MESSAGE_ERR uint8 = 3 // UPDATE Message Error
NOTIF_CODE_HOLD_TIMER_EXPIRED uint8 = 4 // Hold Timer Expired
NOTIF_CODE_FSM_ERR uint8 = 5 // Finite State Machine Error
NOTIF_CODE_CEASE uint8 = 6 // Cease
NOTIF_CODE_ROUTE_REFRESH_MESSAGE_ERR uint8 = 7 // ROUTE-REFRESH Message Error
)
// Message Header Error subcodes, Updated: 2023-01-18
const (
NOTIF_SUBCODE_CONN_NOT_SYNCHRONIZED uint8 = 1 // Connection Not Synchronized
NOTIF_SUBCODE_BAD_MESSAGE_LEN uint8 = 2 // Bad Message Length
NOTIF_SUBCODE_BAD_MESSAGE_TYPE uint8 = 3 // Bad Message Type
)
// OPEN Message Error subcodes, Updated: 2023-01-18
const (
NOTIF_SUBCODE_UNSUPPORTED_VERSION_NUM uint8 = 1 // Unsupported Version Number
NOTIF_SUBCODE_BAD_PEER_AS uint8 = 2 // Bad Peer AS
NOTIF_SUBCODE_BAD_BGP_ID uint8 = 3 // Bad BGP Identifier
NOTIF_SUBCODE_UNSUPPORTED_OPTIONAL_PARAM uint8 = 4 // Unsupported Optional Parameter
NOTIF_SUBCODE_UNACCEPTABLE_HOLD_TIME uint8 = 6 // Unacceptable Hold Time
NOTIF_SUBCODE_UNSUPPORTED_CAPABILITY uint8 = 7 // Unsupported Capability
NOTIF_SUBCODE_ROLE_MISMATCH uint8 = 11 // Role Mismatch
)
// UPDATE Message Error subcodes, Updated: 2023-01-18
const (
NOTIF_SUBCODE_MALFORMED_ATTR_LIST uint8 = 1 // Malformed Attribute List
NOTIF_SUBCODE_UNRECOGNIZED_WELL_KNOWN_ATTR uint8 = 2 // Unrecognized Well-known Attribute
NOTIF_SUBCODE_MISSING_WELL_KNOWN_ATTR uint8 = 3 // Missing Well-known Attribute
NOTIF_SUBCODE_ATTR_FLAGS_ERR uint8 = 4 // Attribute Flags Error
NOTIF_SUBCODE_ATTR_LEN_ERR uint8 = 5 // Attribute Length Error
NOTIF_SUBCODE_INVALID_ORIGIN_ATTR uint8 = 6 // Invalid ORIGIN Attribute
NOTIF_SUBCODE_INVALID_NEXT_HOP_ATTR uint8 = 8 // Invalid NEXT_HOP Attribute
NOTIF_SUBCODE_OPTIONAL_ATTR_ERR uint8 = 9 // Optional Attribute Error
NOTIF_SUBCODE_INVALID_NETWORK_FIELD uint8 = 10 // Invalid Network Field
NOTIF_SUBCODE_MALFORMED_AS_PATH uint8 = 11 // Malformed AS_PATH
)
// BGP Finite State Machine Error Subcodes, Updated: 2023-01-18
const (
NOTIF_SUBCODE_RX_UNEXPECTED_MESSAGE_OPENSENT uint8 = 1 // Receive Unexpected Message in OpenSent State
NOTIF_SUBCODE_RX_UNEXPECTED_MESSAGE_OPENCONFIRM uint8 = 2 // Receive Unexpected Message in OpenConfirm State
NOTIF_SUBCODE_RX_UNEXPECTED_MESSAGE_ESTABLISHED uint8 = 3 // Receive Unexpected Message in Established State
)
// BGP Cease NOTIFICATION message subcodes, Updated: 2023-01-18
const (
NOTIF_SUBCODE_MAX_NUM_OF_PREFIXES_REACHED uint8 = 1 // Maximum Number of Prefixes Reached
NOTIF_SUBCODE_ADMIN_SHUTDOWN uint8 = 2 // Administrative Shutdown
NOTIF_SUBCODE_PEER_DECONFIGURED uint8 = 3 // Peer De-configured
NOTIF_SUBCODE_ADMIN_RESET uint8 = 4 // Administrative Reset
NOTIF_SUBCODE_CONN_REJECTED uint8 = 5 // Connection Rejected
NOTIF_SUBCODE_OTHER_CONFIG_CHANGE uint8 = 6 // Other Configuration Change
NOTIF_SUBCODE_CONN_COLLISION_RESOLUTION uint8 = 7 // Connection Collision Resolution
NOTIF_SUBCODE_OUT_OF_RESOURCES uint8 = 8 // Out of Resources
NOTIF_SUBCODE_HARD_RESET uint8 = 9 // Hard Reset
NOTIF_SUBCODE_BFD_DOWN uint8 = 10 // BFD Down
)
// BGP ROUTE-REFRESH Message Error subcodes, Updated: 2023-01-18
const (
NOTIF_SUBCODE_INVALID_MESSAGE_LEN uint8 = 1 // Invalid Message Length
)
type notifCodeDescAndSubcodes struct {
desc string
subcodes map[uint8]string
}
var (
notifCodesMap = map[uint8]notifCodeDescAndSubcodes{
NOTIF_CODE_MESSAGE_HEADER_ERR: {
desc: "Message Header Error",
subcodes: map[uint8]string{
NOTIF_SUBCODE_CONN_NOT_SYNCHRONIZED: "Connection Not Synchronized",
NOTIF_SUBCODE_BAD_MESSAGE_LEN: "Bad Message Length",
NOTIF_SUBCODE_BAD_MESSAGE_TYPE: "Bad Message Type",
},
},
NOTIF_CODE_OPEN_MESSAGE_ERR: {
desc: "OPEN Message Error",
subcodes: map[uint8]string{
NOTIF_SUBCODE_UNSUPPORTED_VERSION_NUM: "Unsupported Version Number",
NOTIF_SUBCODE_BAD_PEER_AS: "Bad Peer AS",
NOTIF_SUBCODE_BAD_BGP_ID: "Bad BGP Identifier",
NOTIF_SUBCODE_UNSUPPORTED_OPTIONAL_PARAM: "Unsupported Optional Parameter",
NOTIF_SUBCODE_UNACCEPTABLE_HOLD_TIME: "Unacceptable Hold Time",
NOTIF_SUBCODE_UNSUPPORTED_CAPABILITY: "Unsupported Capability",
NOTIF_SUBCODE_ROLE_MISMATCH: "Role Mismatch",
},
},
NOTIF_CODE_UPDATE_MESSAGE_ERR: {
desc: "UPDATE Message Error",
subcodes: map[uint8]string{
NOTIF_SUBCODE_MALFORMED_ATTR_LIST: "Malformed Attribute List",
NOTIF_SUBCODE_UNRECOGNIZED_WELL_KNOWN_ATTR: "Unrecognized Well-known Attribute",
NOTIF_SUBCODE_MISSING_WELL_KNOWN_ATTR: "Missing Well-known Attribute",
NOTIF_SUBCODE_ATTR_FLAGS_ERR: "Attribute Flags Error",
NOTIF_SUBCODE_ATTR_LEN_ERR: "Attribute Length Error",
NOTIF_SUBCODE_INVALID_ORIGIN_ATTR: "Invalid ORIGIN Attribute",
NOTIF_SUBCODE_INVALID_NEXT_HOP_ATTR: "Invalid NEXT_HOP Attribute",
NOTIF_SUBCODE_OPTIONAL_ATTR_ERR: "Optional Attribute Error",
NOTIF_SUBCODE_INVALID_NETWORK_FIELD: "Invalid Network Field",
NOTIF_SUBCODE_MALFORMED_AS_PATH: "Malformed AS_PATH",
},
},
NOTIF_CODE_HOLD_TIMER_EXPIRED: {
desc: "Hold Timer Expired",
subcodes: map[uint8]string{},
},
NOTIF_CODE_FSM_ERR: {
desc: "Finite State Machine Error",
subcodes: map[uint8]string{
NOTIF_SUBCODE_RX_UNEXPECTED_MESSAGE_OPENSENT: "Receive Unexpected Message in OpenSent State",
NOTIF_SUBCODE_RX_UNEXPECTED_MESSAGE_OPENCONFIRM: "Receive Unexpected Message in OpenConfirm State",
NOTIF_SUBCODE_RX_UNEXPECTED_MESSAGE_ESTABLISHED: "Receive Unexpected Message in Established State",
},
},
NOTIF_CODE_CEASE: {
desc: "Cease",
subcodes: map[uint8]string{
NOTIF_SUBCODE_MAX_NUM_OF_PREFIXES_REACHED: "Maximum Number of Prefixes Reached",
NOTIF_SUBCODE_ADMIN_SHUTDOWN: "Administrative Shutdown",
NOTIF_SUBCODE_PEER_DECONFIGURED: "Peer De-configured",
NOTIF_SUBCODE_ADMIN_RESET: "Administrative Reset",
NOTIF_SUBCODE_CONN_REJECTED: "Connection Rejected",
NOTIF_SUBCODE_OTHER_CONFIG_CHANGE: "Other Configuration Change",
NOTIF_SUBCODE_CONN_COLLISION_RESOLUTION: "Connection Collision Resolution",
NOTIF_SUBCODE_OUT_OF_RESOURCES: "Out of Resources",
NOTIF_SUBCODE_HARD_RESET: "Hard Reset",
NOTIF_SUBCODE_BFD_DOWN: "BFD Down",
},
},
NOTIF_CODE_ROUTE_REFRESH_MESSAGE_ERR: {
desc: "ROUTE-REFRESH Message Error",
subcodes: map[uint8]string{
NOTIF_SUBCODE_INVALID_MESSAGE_LEN: "Invalid Message Length",
},
},
}
)