blob: 8bc8d23cb6ea35c3fdfc42246632934c6610d24f [file] [log] [blame]
Nathan Knuth418fdc82016-09-16 22:51:15 -07001# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
2# Copyright (c) 2011, 2012 Open Networking Foundation
3# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
4# See the file LICENSE.pyloxi which should have been included in the source distribution
5
6# Automatically generated by LOXI from template const.py
7# Do not modify
8
9OFP_VERSION = 5
10
11# Identifiers from group macro_definitions
12OFP_MAX_TABLE_NAME_LEN = 32
13OFP_MAX_PORT_NAME_LEN = 16
14OFP_TCP_PORT = 6653
15OFP_SSL_PORT = 6653
16OFP_ETH_ALEN = 6
17OFP_DEFAULT_MISS_SEND_LEN = 128
18OFP_VLAN_NONE = 0
19OFP_FLOW_PERMANENT = 0
20OFP_DEFAULT_PRIORITY = 32768
21OFP_NO_BUFFER = 4294967295
22DESC_STR_LEN = 256
23SERIAL_NUM_LEN = 32
24OFPQ_ALL = 4294967295
25OFPQ_MAX_RATE_UNCFG = 65535
26OFPQ_MIN_RATE_UNCFG = 65535
27
28# Identifiers from group of_bsn_hash_packet_field
29OFP_BSN_HASH_FIELD_DISABLE = 1
30OFP_BSN_HASH_FIELD_DST_MAC = 2
31OFP_BSN_HASH_FIELD_SRC_MAC = 4
32OFP_BSN_HASH_FIELD_ETH_TYPE = 8
33OFP_BSN_HASH_FIELD_VLAN_ID = 16
34OFP_BSN_HASH_FIELD_INNER_L2 = 32
35OFP_BSN_HASH_FIELD_INNER_L3 = 64
36OFP_BSN_HASH_FIELD_SRC_IP = 128
37OFP_BSN_HASH_FIELD_DST_IP = 256
38OFP_BSN_HASH_FIELD_IP_PROTO = 512
39OFP_BSN_HASH_FIELD_SRC_L4_PORT = 1024
40OFP_BSN_HASH_FIELD_DST_L4_PORT = 2048
41OFP_BSN_HASH_FIELD_MPLS_LABEL1 = 4096
42OFP_BSN_HASH_FIELD_MPLS_LABEL2 = 8192
43OFP_BSN_HASH_FIELD_MPLS_LABEL3 = 16384
44OFP_BSN_HASH_FIELD_MPLS_LABEL_HI_BITS = 32768
45OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_SRC_IP = 65536
46OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_DST_IP = 131072
47OFP_BSN_HASH_FIELD_SYMMETRIC = 262144
48
49of_bsn_hash_packet_field_map = {
50 1: 'OFP_BSN_HASH_FIELD_DISABLE',
51 2: 'OFP_BSN_HASH_FIELD_DST_MAC',
52 4: 'OFP_BSN_HASH_FIELD_SRC_MAC',
53 8: 'OFP_BSN_HASH_FIELD_ETH_TYPE',
54 16: 'OFP_BSN_HASH_FIELD_VLAN_ID',
55 32: 'OFP_BSN_HASH_FIELD_INNER_L2',
56 64: 'OFP_BSN_HASH_FIELD_INNER_L3',
57 128: 'OFP_BSN_HASH_FIELD_SRC_IP',
58 256: 'OFP_BSN_HASH_FIELD_DST_IP',
59 512: 'OFP_BSN_HASH_FIELD_IP_PROTO',
60 1024: 'OFP_BSN_HASH_FIELD_SRC_L4_PORT',
61 2048: 'OFP_BSN_HASH_FIELD_DST_L4_PORT',
62 4096: 'OFP_BSN_HASH_FIELD_MPLS_LABEL1',
63 8192: 'OFP_BSN_HASH_FIELD_MPLS_LABEL2',
64 16384: 'OFP_BSN_HASH_FIELD_MPLS_LABEL3',
65 32768: 'OFP_BSN_HASH_FIELD_MPLS_LABEL_HI_BITS',
66 65536: 'OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_SRC_IP',
67 131072: 'OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_DST_IP',
68 262144: 'OFP_BSN_HASH_FIELD_SYMMETRIC',
69}
70
71# Identifiers from group of_bsn_hash_packet_type
72OF_BSN_HASH_PACKET_L2 = 0
73OF_BSN_HASH_PACKET_L2GRE = 1
74OF_BSN_HASH_PACKET_IPV4 = 3
75OF_BSN_HASH_PACKET_IPV6 = 4
76OF_BSN_HASH_PACKET_GTP = 5
77OF_BSN_HASH_PACKET_MPLS = 6
78OF_BSN_HASH_PACKET_SYMMETRIC = 7
79
80of_bsn_hash_packet_type_map = {
81 0: 'OF_BSN_HASH_PACKET_L2',
82 1: 'OF_BSN_HASH_PACKET_L2GRE',
83 3: 'OF_BSN_HASH_PACKET_IPV4',
84 4: 'OF_BSN_HASH_PACKET_IPV6',
85 5: 'OF_BSN_HASH_PACKET_GTP',
86 6: 'OF_BSN_HASH_PACKET_MPLS',
87 7: 'OF_BSN_HASH_PACKET_SYMMETRIC',
88}
89
90# Identifiers from group of_bsn_hash_type
91OFP_BSN_HASH_TYPE_L2 = 0
92OFP_BSN_HASH_TYPE_L3 = 1
93OFP_BSN_HASH_TYPE_ENHANCED = 2
94
95of_bsn_hash_type_map = {
96 0: 'OFP_BSN_HASH_TYPE_L2',
97 1: 'OFP_BSN_HASH_TYPE_L3',
98 2: 'OFP_BSN_HASH_TYPE_ENHANCED',
99}
100
101# Identifiers from group of_bsn_lacp_convergence_status
102LACP_SUCCESS = 0
103LACP_TIMEDOUT = 1
104LACP_OUT_OF_SYNC = 2
105
106of_bsn_lacp_convergence_status_map = {
107 0: 'LACP_SUCCESS',
108 1: 'LACP_TIMEDOUT',
109 2: 'LACP_OUT_OF_SYNC',
110}
111
112# Identifiers from group of_bsn_pdu_slot_num
113BSN_PDU_SLOT_NUM_ANY = 255
114
115of_bsn_pdu_slot_num_map = {
116 255: 'BSN_PDU_SLOT_NUM_ANY',
117}
118
119# Identifiers from group of_bsn_vlan_counter
120OFP_BSN_VLAN_COUNTER_RX_BYTES = 0
121OFP_BSN_VLAN_COUNTER_RX_PACKETS = 1
122OFP_BSN_VLAN_COUNTER_TX_BYTES = 2
123OFP_BSN_VLAN_COUNTER_TX_PACKETS = 3
124
125of_bsn_vlan_counter_map = {
126 0: 'OFP_BSN_VLAN_COUNTER_RX_BYTES',
127 1: 'OFP_BSN_VLAN_COUNTER_RX_PACKETS',
128 2: 'OFP_BSN_VLAN_COUNTER_TX_BYTES',
129 3: 'OFP_BSN_VLAN_COUNTER_TX_PACKETS',
130}
131
132# Identifiers from group of_bsn_vrf_counter
133OFP_BSN_VRF_COUNTER_BYTES = 0
134OFP_BSN_VRF_COUNTER_PACKETS = 1
135
136of_bsn_vrf_counter_map = {
137 0: 'OFP_BSN_VRF_COUNTER_BYTES',
138 1: 'OFP_BSN_VRF_COUNTER_PACKETS',
139}
140
141# Identifiers from group ofp_action_type
142OFPAT_OUTPUT = 0
143OFPAT_COPY_TTL_OUT = 11
144OFPAT_COPY_TTL_IN = 12
145OFPAT_SET_MPLS_TTL = 15
146OFPAT_DEC_MPLS_TTL = 16
147OFPAT_PUSH_VLAN = 17
148OFPAT_POP_VLAN = 18
149OFPAT_PUSH_MPLS = 19
150OFPAT_POP_MPLS = 20
151OFPAT_SET_QUEUE = 21
152OFPAT_GROUP = 22
153OFPAT_SET_NW_TTL = 23
154OFPAT_DEC_NW_TTL = 24
155OFPAT_SET_FIELD = 25
156OFPAT_PUSH_PBB = 26
157OFPAT_POP_PBB = 27
158OFPAT_EXPERIMENTER = 65535
159
160ofp_action_type_map = {
161 0: 'OFPAT_OUTPUT',
162 11: 'OFPAT_COPY_TTL_OUT',
163 12: 'OFPAT_COPY_TTL_IN',
164 15: 'OFPAT_SET_MPLS_TTL',
165 16: 'OFPAT_DEC_MPLS_TTL',
166 17: 'OFPAT_PUSH_VLAN',
167 18: 'OFPAT_POP_VLAN',
168 19: 'OFPAT_PUSH_MPLS',
169 20: 'OFPAT_POP_MPLS',
170 21: 'OFPAT_SET_QUEUE',
171 22: 'OFPAT_GROUP',
172 23: 'OFPAT_SET_NW_TTL',
173 24: 'OFPAT_DEC_NW_TTL',
174 25: 'OFPAT_SET_FIELD',
175 26: 'OFPAT_PUSH_PBB',
176 27: 'OFPAT_POP_PBB',
177 65535: 'OFPAT_EXPERIMENTER',
178}
179
180# Identifiers from group ofp_async_config_failed_code
181OFPACFC_INVALID = 0
182OFPACFC_UNSUPPORTED = 1
183OFPACFC_EPERM = 2
184
185ofp_async_config_failed_code_map = {
186 0: 'OFPACFC_INVALID',
187 1: 'OFPACFC_UNSUPPORTED',
188 2: 'OFPACFC_EPERM',
189}
190
191# Identifiers from group ofp_bad_action_code
192OFPBAC_BAD_TYPE = 0
193OFPBAC_BAD_LEN = 1
194OFPBAC_BAD_EXPERIMENTER = 2
195OFPBAC_BAD_EXPERIMENTER_TYPE = 3
196OFPBAC_BAD_OUT_PORT = 4
197OFPBAC_BAD_ARGUMENT = 5
198OFPBAC_EPERM = 6
199OFPBAC_TOO_MANY = 7
200OFPBAC_BAD_QUEUE = 8
201OFPBAC_BAD_OUT_GROUP = 9
202OFPBAC_MATCH_INCONSISTENT = 10
203OFPBAC_UNSUPPORTED_ORDER = 11
204OFPBAC_BAD_TAG = 12
205OFPBAC_BAD_SET_TYPE = 13
206OFPBAC_BAD_SET_LEN = 14
207OFPBAC_BAD_SET_ARGUMENT = 15
208
209ofp_bad_action_code_map = {
210 0: 'OFPBAC_BAD_TYPE',
211 1: 'OFPBAC_BAD_LEN',
212 2: 'OFPBAC_BAD_EXPERIMENTER',
213 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
214 4: 'OFPBAC_BAD_OUT_PORT',
215 5: 'OFPBAC_BAD_ARGUMENT',
216 6: 'OFPBAC_EPERM',
217 7: 'OFPBAC_TOO_MANY',
218 8: 'OFPBAC_BAD_QUEUE',
219 9: 'OFPBAC_BAD_OUT_GROUP',
220 10: 'OFPBAC_MATCH_INCONSISTENT',
221 11: 'OFPBAC_UNSUPPORTED_ORDER',
222 12: 'OFPBAC_BAD_TAG',
223 13: 'OFPBAC_BAD_SET_TYPE',
224 14: 'OFPBAC_BAD_SET_LEN',
225 15: 'OFPBAC_BAD_SET_ARGUMENT',
226}
227
228# Identifiers from group ofp_bad_instruction_code
229OFPBIC_UNKNOWN_INST = 0
230OFPBIC_UNSUP_INST = 1
231OFPBIC_BAD_TABLE_ID = 2
232OFPBIC_UNSUP_METADATA = 3
233OFPBIC_UNSUP_METADATA_MASK = 4
234OFPBIC_BAD_EXPERIMENTER = 5
235OFPBIC_BAD_EXPERIMENTER_TYPE = 6
236OFPBIC_BAD_LEN = 7
237OFPBIC_EPERM = 8
238OFPBIC_DUP_INST = 9
239
240ofp_bad_instruction_code_map = {
241 0: 'OFPBIC_UNKNOWN_INST',
242 1: 'OFPBIC_UNSUP_INST',
243 2: 'OFPBIC_BAD_TABLE_ID',
244 3: 'OFPBIC_UNSUP_METADATA',
245 4: 'OFPBIC_UNSUP_METADATA_MASK',
246 5: 'OFPBIC_BAD_EXPERIMENTER',
247 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
248 7: 'OFPBIC_BAD_LEN',
249 8: 'OFPBIC_EPERM',
250 9: 'OFPBIC_DUP_INST',
251}
252
253# Identifiers from group ofp_bad_match_code
254OFPBMC_BAD_TYPE = 0
255OFPBMC_BAD_LEN = 1
256OFPBMC_BAD_TAG = 2
257OFPBMC_BAD_DL_ADDR_MASK = 3
258OFPBMC_BAD_NW_ADDR_MASK = 4
259OFPBMC_BAD_WILDCARDS = 5
260OFPBMC_BAD_FIELD = 6
261OFPBMC_BAD_VALUE = 7
262OFPBMC_BAD_MASK = 8
263OFPBMC_BAD_PREREQ = 9
264OFPBMC_DUP_FIELD = 10
265OFPBMC_EPERM = 11
266
267ofp_bad_match_code_map = {
268 0: 'OFPBMC_BAD_TYPE',
269 1: 'OFPBMC_BAD_LEN',
270 2: 'OFPBMC_BAD_TAG',
271 3: 'OFPBMC_BAD_DL_ADDR_MASK',
272 4: 'OFPBMC_BAD_NW_ADDR_MASK',
273 5: 'OFPBMC_BAD_WILDCARDS',
274 6: 'OFPBMC_BAD_FIELD',
275 7: 'OFPBMC_BAD_VALUE',
276 8: 'OFPBMC_BAD_MASK',
277 9: 'OFPBMC_BAD_PREREQ',
278 10: 'OFPBMC_DUP_FIELD',
279 11: 'OFPBMC_EPERM',
280}
281
282# Identifiers from group ofp_bad_property_code
283OFPBPC_BAD_TYPE = 0
284OFPBPC_BAD_LEN = 1
285OFPBPC_BAD_VALUE = 2
286OFPBPC_TOO_MANY = 3
287OFPBPC_DUP_TYPE = 4
288OFPBPC_BAD_EXPERIMENTER = 5
289OFPBPC_BAD_EXP_TYPE = 6
290OFPBPC_BAD_EXP_VALUE = 7
291OFPBPC_EPERM = 8
292
293ofp_bad_property_code_map = {
294 0: 'OFPBPC_BAD_TYPE',
295 1: 'OFPBPC_BAD_LEN',
296 2: 'OFPBPC_BAD_VALUE',
297 3: 'OFPBPC_TOO_MANY',
298 4: 'OFPBPC_DUP_TYPE',
299 5: 'OFPBPC_BAD_EXPERIMENTER',
300 6: 'OFPBPC_BAD_EXP_TYPE',
301 7: 'OFPBPC_BAD_EXP_VALUE',
302 8: 'OFPBPC_EPERM',
303}
304
305# Identifiers from group ofp_bad_request_code
306OFPBRC_BAD_VERSION = 0
307OFPBRC_BAD_TYPE = 1
308OFPBRC_BAD_STAT = 2
309OFPBRC_BAD_EXPERIMENTER = 3
310OFPBRC_BAD_EXPERIMENTER_TYPE = 4
311OFPBRC_EPERM = 5
312OFPBRC_BAD_LEN = 6
313OFPBRC_BUFFER_EMPTY = 7
314OFPBRC_BUFFER_UNKNOWN = 8
315OFPBRC_BAD_TABLE_ID = 9
316OFPBRC_IS_SLAVE = 10
317OFPBRC_BAD_PORT = 11
318OFPBRC_BAD_PACKET = 12
319OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
320OFPBRC_MULTIPART_REQUEST_TIMEOUT = 14
321OFPBRC_MULTIPART_REPLY_TIMEOUT = 15
322
323ofp_bad_request_code_map = {
324 0: 'OFPBRC_BAD_VERSION',
325 1: 'OFPBRC_BAD_TYPE',
326 2: 'OFPBRC_BAD_STAT',
327 3: 'OFPBRC_BAD_EXPERIMENTER',
328 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
329 5: 'OFPBRC_EPERM',
330 6: 'OFPBRC_BAD_LEN',
331 7: 'OFPBRC_BUFFER_EMPTY',
332 8: 'OFPBRC_BUFFER_UNKNOWN',
333 9: 'OFPBRC_BAD_TABLE_ID',
334 10: 'OFPBRC_IS_SLAVE',
335 11: 'OFPBRC_BAD_PORT',
336 12: 'OFPBRC_BAD_PACKET',
337 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
338 14: 'OFPBRC_MULTIPART_REQUEST_TIMEOUT',
339 15: 'OFPBRC_MULTIPART_REPLY_TIMEOUT',
340}
341
342# Identifiers from group ofp_bsn_anchor
343OFP_BSN_ANCHOR_PACKET_START = 0
344OFP_BSN_ANCHOR_L3_HEADER_START = 1
345OFP_BSN_ANCHOR_L4_HEADER_START = 2
346OFP_BSN_ANCHOR_L4_PAYLOAD_START = 3
347
348ofp_bsn_anchor_map = {
349 0: 'OFP_BSN_ANCHOR_PACKET_START',
350 1: 'OFP_BSN_ANCHOR_L3_HEADER_START',
351 2: 'OFP_BSN_ANCHOR_L4_HEADER_START',
352 3: 'OFP_BSN_ANCHOR_L4_PAYLOAD_START',
353}
354
355# Identifiers from group ofp_bsn_controller_connection_state
356OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0
357OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1
358
359ofp_bsn_controller_connection_state_map = {
360 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED',
361 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED',
362}
363
364# Identifiers from group ofp_bsn_decap
365OFP_BSN_DECAP_VXLAN = 0
366OFP_BSN_DECAP_ERSPAN = 1
367OFP_BSN_DECAP_L2_GRE = 2
368OFP_BSN_DECAP_NVGRE = 3
369OFP_BSN_DECAP_CAPWAP = 4
370OFP_BSN_DECAP_L2_MPLS = 5
371OFP_BSN_DECAP_L3_GRE = 6
372OFP_BSN_DECAP_GTP = 7
373OFP_BSN_DECAP_L3_MPLS = 8
374
375ofp_bsn_decap_map = {
376 0: 'OFP_BSN_DECAP_VXLAN',
377 1: 'OFP_BSN_DECAP_ERSPAN',
378 2: 'OFP_BSN_DECAP_L2_GRE',
379 3: 'OFP_BSN_DECAP_NVGRE',
380 4: 'OFP_BSN_DECAP_CAPWAP',
381 5: 'OFP_BSN_DECAP_L2_MPLS',
382 6: 'OFP_BSN_DECAP_L3_GRE',
383 7: 'OFP_BSN_DECAP_GTP',
384 8: 'OFP_BSN_DECAP_L3_MPLS',
385}
386
387# Identifiers from group ofp_bsn_lacp_state
388OFP_BSN_LACP_STATE_ACTIVITY = 1
389OFP_BSN_LACP_STATE_TIMEOUT = 2
390OFP_BSN_LACP_STATE_AGGREGATION = 4
391OFP_BSN_LACP_STATE_SYNCHRONIZATION = 8
392OFP_BSN_LACP_STATE_COLLECTING = 16
393OFP_BSN_LACP_STATE_DISTRIBUTING = 32
394OFP_BSN_LACP_STATE_DEFAULTED = 64
395OFP_BSN_LACP_STATE_EXPIRED = 128
396
397ofp_bsn_lacp_state_map = {
398 1: 'OFP_BSN_LACP_STATE_ACTIVITY',
399 2: 'OFP_BSN_LACP_STATE_TIMEOUT',
400 4: 'OFP_BSN_LACP_STATE_AGGREGATION',
401 8: 'OFP_BSN_LACP_STATE_SYNCHRONIZATION',
402 16: 'OFP_BSN_LACP_STATE_COLLECTING',
403 32: 'OFP_BSN_LACP_STATE_DISTRIBUTING',
404 64: 'OFP_BSN_LACP_STATE_DEFAULTED',
405 128: 'OFP_BSN_LACP_STATE_EXPIRED',
406}
407
408# Identifiers from group ofp_bsn_loglevel
409OFP_BSN_LOGLEVEL_MSG = 0
410OFP_BSN_LOGLEVEL_ERROR = 1
411OFP_BSN_LOGLEVEL_WARN = 2
412OFP_BSN_LOGLEVEL_INFO = 3
413OFP_BSN_LOGLEVEL_VERBOSE = 4
414OFP_BSN_LOGLEVEL_TRACE = 5
415
416ofp_bsn_loglevel_map = {
417 0: 'OFP_BSN_LOGLEVEL_MSG',
418 1: 'OFP_BSN_LOGLEVEL_ERROR',
419 2: 'OFP_BSN_LOGLEVEL_WARN',
420 3: 'OFP_BSN_LOGLEVEL_INFO',
421 4: 'OFP_BSN_LOGLEVEL_VERBOSE',
422 5: 'OFP_BSN_LOGLEVEL_TRACE',
423}
424
425# Identifiers from group ofp_bsn_lua_upload_flags
426OFP_BSN_LUA_UPLOAD_MORE = 1
427OFP_BSN_LUA_UPLOAD_FORCE = 2
428
429ofp_bsn_lua_upload_flags_map = {
430 1: 'OFP_BSN_LUA_UPLOAD_MORE',
431 2: 'OFP_BSN_LUA_UPLOAD_FORCE',
432}
433
434# Identifiers from group ofp_bsn_pktin_flag
435OFP_BSN_PKTIN_FLAG_PDU = 1
436OFP_BSN_PKTIN_FLAG_NEW_HOST = 2
437OFP_BSN_PKTIN_FLAG_STATION_MOVE = 4
438OFP_BSN_PKTIN_FLAG_ARP = 8
439OFP_BSN_PKTIN_FLAG_DHCP = 16
440OFP_BSN_PKTIN_FLAG_L2_CPU = 32
441OFP_BSN_PKTIN_FLAG_DEBUG = 64
442OFP_BSN_PKTIN_FLAG_TTL_EXPIRED = 128
443OFP_BSN_PKTIN_FLAG_L3_MISS = 256
444OFP_BSN_PKTIN_FLAG_L3_CPU = 512
445OFP_BSN_PKTIN_FLAG_INGRESS_ACL = 1024
446OFP_BSN_PKTIN_FLAG_SFLOW = 2048
447OFP_BSN_PKTIN_FLAG_ARP_CACHE = 4096
448OFP_BSN_PKTIN_FLAG_ARP_TARGET = 8192
449OFP_BSN_PKTIN_FLAG_IGMP = 16384
450OFP_BSN_PKTIN_FLAG_PIM = 32768
451OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS = 65536
452OFP_BSN_PKTIN_FLAG_MC_RESERVED = 131072
453
454ofp_bsn_pktin_flag_map = {
455 1: 'OFP_BSN_PKTIN_FLAG_PDU',
456 2: 'OFP_BSN_PKTIN_FLAG_NEW_HOST',
457 4: 'OFP_BSN_PKTIN_FLAG_STATION_MOVE',
458 8: 'OFP_BSN_PKTIN_FLAG_ARP',
459 16: 'OFP_BSN_PKTIN_FLAG_DHCP',
460 32: 'OFP_BSN_PKTIN_FLAG_L2_CPU',
461 64: 'OFP_BSN_PKTIN_FLAG_DEBUG',
462 128: 'OFP_BSN_PKTIN_FLAG_TTL_EXPIRED',
463 256: 'OFP_BSN_PKTIN_FLAG_L3_MISS',
464 512: 'OFP_BSN_PKTIN_FLAG_L3_CPU',
465 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL',
466 2048: 'OFP_BSN_PKTIN_FLAG_SFLOW',
467 4096: 'OFP_BSN_PKTIN_FLAG_ARP_CACHE',
468 8192: 'OFP_BSN_PKTIN_FLAG_ARP_TARGET',
469 16384: 'OFP_BSN_PKTIN_FLAG_IGMP',
470 32768: 'OFP_BSN_PKTIN_FLAG_PIM',
471 65536: 'OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS',
472 131072: 'OFP_BSN_PKTIN_FLAG_MC_RESERVED',
473}
474
475# Identifiers from group ofp_bsn_port_counter
476OFP_BSN_PORT_COUNTER_RX_BYTES = 0
477OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1
478OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2
479OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3
480OFP_BSN_PORT_COUNTER_RX_DROPPED = 4
481OFP_BSN_PORT_COUNTER_RX_ERRORS = 5
482OFP_BSN_PORT_COUNTER_TX_BYTES = 6
483OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7
484OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8
485OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9
486OFP_BSN_PORT_COUNTER_TX_DROPPED = 10
487OFP_BSN_PORT_COUNTER_TX_ERRORS = 11
488OFP_BSN_PORT_COUNTER_RX_RUNTS = 12
489OFP_BSN_PORT_COUNTER_RX_GIANTS = 13
490OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS = 14
491OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS = 15
492OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS = 16
493OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT = 17
494OFP_BSN_PORT_COUNTER_TX_COLLISIONS = 18
495OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS = 19
496OFP_BSN_PORT_COUNTER_TX_DEFERRED = 20
497OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT = 21
498OFP_BSN_PORT_COUNTER_RX_PACKETS = 22
499OFP_BSN_PORT_COUNTER_TX_PACKETS = 23
500OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS = 24
501OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
502OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
503OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27
504OFP_BSN_PORT_COUNTER_LINK_UP = 28
505OFP_BSN_PORT_COUNTER_LINK_DOWN = 29
506
507ofp_bsn_port_counter_map = {
508 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
509 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST',
510 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST',
511 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST',
512 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED',
513 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS',
514 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES',
515 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST',
516 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST',
517 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST',
518 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED',
519 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS',
520 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS',
521 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS',
522 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS',
523 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS',
524 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS',
525 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT',
526 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS',
527 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS',
528 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED',
529 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT',
530 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS',
531 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS',
532 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS',
533 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
534 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
535 27: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN',
536 28: 'OFP_BSN_PORT_COUNTER_LINK_UP',
537 29: 'OFP_BSN_PORT_COUNTER_LINK_DOWN',
538}
539
540# Identifiers from group ofp_bsn_port_vxlan_mode
541OFP_BSN_PORT_VXLAN_RECIRCULATION_ENABLE = 0
542OFP_BSN_PORT_VXLAN_TERMINATION_ENABLE = 1
543
544ofp_bsn_port_vxlan_mode_map = {
545 0: 'OFP_BSN_PORT_VXLAN_RECIRCULATION_ENABLE',
546 1: 'OFP_BSN_PORT_VXLAN_TERMINATION_ENABLE',
547}
548
549# Identifiers from group ofp_bsn_rate_unit
550OFP_BSN_RATE_UNIT_PPS = 0
551OFP_BSN_RATE_UNIT_KBITPS = 1
552
553ofp_bsn_rate_unit_map = {
554 0: 'OFP_BSN_RATE_UNIT_PPS',
555 1: 'OFP_BSN_RATE_UNIT_KBITPS',
556}
557
558# Identifiers from group ofp_bsn_status
559OFP_BSN_STATUS_DISABLE = 0
560OFP_BSN_STATUS_ENABLE = 1
561
562ofp_bsn_status_map = {
563 0: 'OFP_BSN_STATUS_DISABLE',
564 1: 'OFP_BSN_STATUS_ENABLE',
565}
566
567# Identifiers from group ofp_bsn_tcp_flag
568OFP_BSN_TCP_FLAG_FIN = 1
569OFP_BSN_TCP_FLAG_SYN = 2
570OFP_BSN_TCP_FLAG_RST = 4
571OFP_BSN_TCP_FLAG_PSH = 8
572OFP_BSN_TCP_FLAG_ACK = 16
573OFP_BSN_TCP_FLAG_URG = 32
574OFP_BSN_TCP_FLAG_ECE = 64
575OFP_BSN_TCP_FLAG_CWR = 128
576OFP_BSN_TCP_FLAG_NS = 256
577
578ofp_bsn_tcp_flag_map = {
579 1: 'OFP_BSN_TCP_FLAG_FIN',
580 2: 'OFP_BSN_TCP_FLAG_SYN',
581 4: 'OFP_BSN_TCP_FLAG_RST',
582 8: 'OFP_BSN_TCP_FLAG_PSH',
583 16: 'OFP_BSN_TCP_FLAG_ACK',
584 32: 'OFP_BSN_TCP_FLAG_URG',
585 64: 'OFP_BSN_TCP_FLAG_ECE',
586 128: 'OFP_BSN_TCP_FLAG_CWR',
587 256: 'OFP_BSN_TCP_FLAG_NS',
588}
589
590# Identifiers from group ofp_bsn_udf_anchor
591OFP_BSN_UDF_ANCHOR_PACKET_START = 0
592OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1
593OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2
594
595ofp_bsn_udf_anchor_map = {
596 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START',
597 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START',
598 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START',
599}
600
601# Identifiers from group ofp_bsn_vlan_counter_constants
602OFP_BSN_VLAN_ALL = 65535
603
604ofp_bsn_vlan_counter_constants_map = {
605 65535: 'OFP_BSN_VLAN_ALL',
606}
607
608# Identifiers from group ofp_bsn_vport_l2gre_flags
609OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
610OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
611OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
612OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
613OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
614
615ofp_bsn_vport_l2gre_flags_map = {
616 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
617 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
618 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
619 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
620 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
621}
622
623# Identifiers from group ofp_bsn_vport_q_in_q_untagged
624OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
625
626ofp_bsn_vport_q_in_q_untagged_map = {
627 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
628}
629
630# Identifiers from group ofp_bsn_vport_status
631OF_BSN_VPORT_STATUS_OK = 0
632OF_BSN_VPORT_STATUS_FAILED = 1
633
634ofp_bsn_vport_status_map = {
635 0: 'OF_BSN_VPORT_STATUS_OK',
636 1: 'OF_BSN_VPORT_STATUS_FAILED',
637}
638
639# Identifiers from group ofp_bsn_vrf_counter_constants
640OFP_BSN_VRF_ALL = 4294967295
641
642ofp_bsn_vrf_counter_constants_map = {
643 4294967295: 'OFP_BSN_VRF_ALL',
644}
645
646# Identifiers from group ofp_bundle_ctrl_type
647OFPBCT_OPEN_REQUEST = 0
648OFPBCT_OPEN_REPLY = 1
649OFPBCT_CLOSE_REQUEST = 2
650OFPBCT_CLOSE_REPLY = 3
651OFPBCT_COMMIT_REQUEST = 4
652OFPBCT_COMMIT_REPLY = 5
653OFPBCT_DISCARD_REQUEST = 6
654OFPBCT_DISCARD_REPLY = 7
655
656ofp_bundle_ctrl_type_map = {
657 0: 'OFPBCT_OPEN_REQUEST',
658 1: 'OFPBCT_OPEN_REPLY',
659 2: 'OFPBCT_CLOSE_REQUEST',
660 3: 'OFPBCT_CLOSE_REPLY',
661 4: 'OFPBCT_COMMIT_REQUEST',
662 5: 'OFPBCT_COMMIT_REPLY',
663 6: 'OFPBCT_DISCARD_REQUEST',
664 7: 'OFPBCT_DISCARD_REPLY',
665}
666
667# Identifiers from group ofp_bundle_failed_code
668OFPBFC_UNKNOWN = 0
669OFPBFC_EPERM = 1
670OFPBFC_BAD_ID = 2
671OFPBFC_BUNDLE_EXIST = 3
672OFPBFC_BUNDLE_CLOSED = 4
673OFPBFC_OUT_OF_BUNDLES = 5
674OFPBFC_BAD_TYPE = 6
675OFPBFC_BAD_FLAGS = 7
676OFPBFC_MSG_BAD_LEN = 8
677OFPBFC_MSG_BAD_XID = 9
678OFPBFC_MSG_UNSUP = 10
679OFPBFC_MSG_CONFLICT = 11
680OFPBFC_MSG_TOO_MANY = 12
681OFPBFC_MSG_FAILED = 13
682OFPBFC_TIMEOUT = 14
683OFPBFC_BUNDLE_IN_PROGRESS = 15
684
685ofp_bundle_failed_code_map = {
686 0: 'OFPBFC_UNKNOWN',
687 1: 'OFPBFC_EPERM',
688 2: 'OFPBFC_BAD_ID',
689 3: 'OFPBFC_BUNDLE_EXIST',
690 4: 'OFPBFC_BUNDLE_CLOSED',
691 5: 'OFPBFC_OUT_OF_BUNDLES',
692 6: 'OFPBFC_BAD_TYPE',
693 7: 'OFPBFC_BAD_FLAGS',
694 8: 'OFPBFC_MSG_BAD_LEN',
695 9: 'OFPBFC_MSG_BAD_XID',
696 10: 'OFPBFC_MSG_UNSUP',
697 11: 'OFPBFC_MSG_CONFLICT',
698 12: 'OFPBFC_MSG_TOO_MANY',
699 13: 'OFPBFC_MSG_FAILED',
700 14: 'OFPBFC_TIMEOUT',
701 15: 'OFPBFC_BUNDLE_IN_PROGRESS',
702}
703
704# Identifiers from group ofp_bundle_flags
705OFPBF_ATOMIC = 1
706OFPBF_ORDERED = 2
707
708ofp_bundle_flags_map = {
709 1: 'OFPBF_ATOMIC',
710 2: 'OFPBF_ORDERED',
711}
712
713# Identifiers from group ofp_capabilities
714OFPC_FLOW_STATS = 1
715OFPC_TABLE_STATS = 2
716OFPC_PORT_STATS = 4
717OFPC_GROUP_STATS = 8
718OFPC_IP_REASM = 32
719OFPC_QUEUE_STATS = 64
720OFPC_PORT_BLOCKED = 256
721
722ofp_capabilities_map = {
723 1: 'OFPC_FLOW_STATS',
724 2: 'OFPC_TABLE_STATS',
725 4: 'OFPC_PORT_STATS',
726 8: 'OFPC_GROUP_STATS',
727 32: 'OFPC_IP_REASM',
728 64: 'OFPC_QUEUE_STATS',
729 256: 'OFPC_PORT_BLOCKED',
730}
731
732# Identifiers from group ofp_config_flags
733OFPC_FRAG_NORMAL = 0
734OFPC_FRAG_DROP = 1
735OFPC_FRAG_REASM = 2
736OFPC_FRAG_MASK = 3
737
738ofp_config_flags_map = {
739 0: 'OFPC_FRAG_NORMAL',
740 1: 'OFPC_FRAG_DROP',
741 2: 'OFPC_FRAG_REASM',
742 3: 'OFPC_FRAG_MASK',
743}
744
745# Identifiers from group ofp_controller_max_len
746OFPCML_MAX = 65509
747OFPCML_NO_BUFFER = 65535
748
749ofp_controller_max_len_map = {
750 65509: 'OFPCML_MAX',
751 65535: 'OFPCML_NO_BUFFER',
752}
753
754# Identifiers from group ofp_controller_role
755OFPCR_ROLE_NOCHANGE = 0
756OFPCR_ROLE_EQUAL = 1
757OFPCR_ROLE_MASTER = 2
758OFPCR_ROLE_SLAVE = 3
759
760ofp_controller_role_map = {
761 0: 'OFPCR_ROLE_NOCHANGE',
762 1: 'OFPCR_ROLE_EQUAL',
763 2: 'OFPCR_ROLE_MASTER',
764 3: 'OFPCR_ROLE_SLAVE',
765}
766
767# Identifiers from group ofp_controller_role_reason
768OFPCRR_MASTER_REQUEST = 0
769OFPCRR_CONFIG = 1
770OFPCRR_EXPERIMENTER = 2
771
772ofp_controller_role_reason_map = {
773 0: 'OFPCRR_MASTER_REQUEST',
774 1: 'OFPCRR_CONFIG',
775 2: 'OFPCRR_EXPERIMENTER',
776}
777
778# Identifiers from group ofp_error_type
779OFPET_HELLO_FAILED = 0
780OFPET_BAD_REQUEST = 1
781OFPET_BAD_ACTION = 2
782OFPET_BAD_INSTRUCTION = 3
783OFPET_BAD_MATCH = 4
784OFPET_FLOW_MOD_FAILED = 5
785OFPET_GROUP_MOD_FAILED = 6
786OFPET_PORT_MOD_FAILED = 7
787OFPET_TABLE_MOD_FAILED = 8
788OFPET_QUEUE_OP_FAILED = 9
789OFPET_SWITCH_CONFIG_FAILED = 10
790OFPET_ROLE_REQUEST_FAILED = 11
791OFPET_METER_MOD_FAILED = 12
792OFPET_TABLE_FEATURES_FAILED = 13
793OFPET_BAD_PROPERTY = 14
794OFPET_ASYNC_CONFIG_FAILED = 15
795OFPET_FLOW_MONITOR_FAILED = 16
796OFPET_BUNDLE_FAILED = 17
797OFPET_EXPERIMENTER = 65535
798
799ofp_error_type_map = {
800 0: 'OFPET_HELLO_FAILED',
801 1: 'OFPET_BAD_REQUEST',
802 2: 'OFPET_BAD_ACTION',
803 3: 'OFPET_BAD_INSTRUCTION',
804 4: 'OFPET_BAD_MATCH',
805 5: 'OFPET_FLOW_MOD_FAILED',
806 6: 'OFPET_GROUP_MOD_FAILED',
807 7: 'OFPET_PORT_MOD_FAILED',
808 8: 'OFPET_TABLE_MOD_FAILED',
809 9: 'OFPET_QUEUE_OP_FAILED',
810 10: 'OFPET_SWITCH_CONFIG_FAILED',
811 11: 'OFPET_ROLE_REQUEST_FAILED',
812 12: 'OFPET_METER_MOD_FAILED',
813 13: 'OFPET_TABLE_FEATURES_FAILED',
814 14: 'OFPET_BAD_PROPERTY',
815 15: 'OFPET_ASYNC_CONFIG_FAILED',
816 16: 'OFPET_FLOW_MONITOR_FAILED',
817 17: 'OFPET_BUNDLE_FAILED',
818 65535: 'OFPET_EXPERIMENTER',
819}
820
821# Identifiers from group ofp_flow_mod_command
822OFPFC_ADD = 0
823OFPFC_MODIFY = 1
824OFPFC_MODIFY_STRICT = 2
825OFPFC_DELETE = 3
826OFPFC_DELETE_STRICT = 4
827
828ofp_flow_mod_command_map = {
829 0: 'OFPFC_ADD',
830 1: 'OFPFC_MODIFY',
831 2: 'OFPFC_MODIFY_STRICT',
832 3: 'OFPFC_DELETE',
833 4: 'OFPFC_DELETE_STRICT',
834}
835
836# Identifiers from group ofp_flow_mod_failed_code
837OFPFMFC_UNKNOWN = 0
838OFPFMFC_TABLE_FULL = 1
839OFPFMFC_BAD_TABLE_ID = 2
840OFPFMFC_OVERLAP = 3
841OFPFMFC_EPERM = 4
842OFPFMFC_BAD_TIMEOUT = 5
843OFPFMFC_BAD_COMMAND = 6
844OFPFMFC_BAD_FLAGS = 7
845OFPFMFC_CANT_SYNC = 8
846OFPFMFC_BAD_PRIORITY = 9
847
848ofp_flow_mod_failed_code_map = {
849 0: 'OFPFMFC_UNKNOWN',
850 1: 'OFPFMFC_TABLE_FULL',
851 2: 'OFPFMFC_BAD_TABLE_ID',
852 3: 'OFPFMFC_OVERLAP',
853 4: 'OFPFMFC_EPERM',
854 5: 'OFPFMFC_BAD_TIMEOUT',
855 6: 'OFPFMFC_BAD_COMMAND',
856 7: 'OFPFMFC_BAD_FLAGS',
857 8: 'OFPFMFC_CANT_SYNC',
858 9: 'OFPFMFC_BAD_PRIORITY',
859}
860
861# Identifiers from group ofp_flow_mod_flags
862OFPFF_SEND_FLOW_REM = 1
863OFPFF_CHECK_OVERLAP = 2
864OFPFF_RESET_COUNTS = 4
865OFPFF_NO_PKT_COUNTS = 8
866OFPFF_NO_BYT_COUNTS = 16
867OFPFF_BSN_SEND_IDLE = 128
868
869ofp_flow_mod_flags_map = {
870 1: 'OFPFF_SEND_FLOW_REM',
871 2: 'OFPFF_CHECK_OVERLAP',
872 4: 'OFPFF_RESET_COUNTS',
873 8: 'OFPFF_NO_PKT_COUNTS',
874 16: 'OFPFF_NO_BYT_COUNTS',
875 128: 'OFPFF_BSN_SEND_IDLE',
876}
877
878# Identifiers from group ofp_flow_monitor_failed_code
879OFPMOFC_UNKNOWN = 0
880OFPMOFC_MONITOR_EXISTS = 1
881OFPMOFC_INVALID_MONITOR = 2
882OFPMOFC_UNKNOWN_MONITOR = 3
883OFPMOFC_BAD_COMMAND = 4
884OFPMOFC_BAD_FLAGS = 5
885OFPMOFC_BAD_TABLE_ID = 6
886OFPMOFC_BAD_OUT = 7
887
888ofp_flow_monitor_failed_code_map = {
889 0: 'OFPMOFC_UNKNOWN',
890 1: 'OFPMOFC_MONITOR_EXISTS',
891 2: 'OFPMOFC_INVALID_MONITOR',
892 3: 'OFPMOFC_UNKNOWN_MONITOR',
893 4: 'OFPMOFC_BAD_COMMAND',
894 5: 'OFPMOFC_BAD_FLAGS',
895 6: 'OFPMOFC_BAD_TABLE_ID',
896 7: 'OFPMOFC_BAD_OUT',
897}
898
899# Identifiers from group ofp_flow_removed_reason
900OFPRR_IDLE_TIMEOUT = 0
901OFPRR_HARD_TIMEOUT = 1
902OFPRR_DELETE = 2
903OFPRR_GROUP_DELETE = 3
904OFPRR_METER_DELETE = 4
905OFPRR_EVICTION = 5
906
907ofp_flow_removed_reason_map = {
908 0: 'OFPRR_IDLE_TIMEOUT',
909 1: 'OFPRR_HARD_TIMEOUT',
910 2: 'OFPRR_DELETE',
911 3: 'OFPRR_GROUP_DELETE',
912 4: 'OFPRR_METER_DELETE',
913 5: 'OFPRR_EVICTION',
914}
915
916# Identifiers from group ofp_group
917OFPG_MAX = 4294967040
918OFPG_ALL = 4294967292
919OFPG_ANY = 4294967295
920
921ofp_group_map = {
922 4294967040: 'OFPG_MAX',
923 4294967292: 'OFPG_ALL',
924 4294967295: 'OFPG_ANY',
925}
926
927# Identifiers from group ofp_group_capabilities
928OFPGFC_SELECT_WEIGHT = 1
929OFPGFC_SELECT_LIVENESS = 2
930OFPGFC_CHAINING = 4
931OFPGFC_CHAINING_CHECKS = 8
932
933ofp_group_capabilities_map = {
934 1: 'OFPGFC_SELECT_WEIGHT',
935 2: 'OFPGFC_SELECT_LIVENESS',
936 4: 'OFPGFC_CHAINING',
937 8: 'OFPGFC_CHAINING_CHECKS',
938}
939
940# Identifiers from group ofp_group_mod_command
941OFPGC_ADD = 0
942OFPGC_MODIFY = 1
943OFPGC_DELETE = 2
944
945ofp_group_mod_command_map = {
946 0: 'OFPGC_ADD',
947 1: 'OFPGC_MODIFY',
948 2: 'OFPGC_DELETE',
949}
950
951# Identifiers from group ofp_group_mod_failed_code
952OFPGMFC_GROUP_EXISTS = 0
953OFPGMFC_INVALID_GROUP = 1
954OFPGMFC_WEIGHT_UNSUPPORTED = 2
955OFPGMFC_OUT_OF_GROUPS = 3
956OFPGMFC_OUT_OF_BUCKETS = 4
957OFPGMFC_CHAINING_UNSUPPORTED = 5
958OFPGMFC_WATCH_UNSUPPORTED = 6
959OFPGMFC_LOOP = 7
960OFPGMFC_UNKNOWN_GROUP = 8
961OFPGMFC_CHAINED_GROUP = 9
962OFPGMFC_BAD_TYPE = 10
963OFPGMFC_BAD_COMMAND = 11
964OFPGMFC_BAD_BUCKET = 12
965OFPGMFC_BAD_WATCH = 13
966OFPGMFC_EPERM = 14
967
968ofp_group_mod_failed_code_map = {
969 0: 'OFPGMFC_GROUP_EXISTS',
970 1: 'OFPGMFC_INVALID_GROUP',
971 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
972 3: 'OFPGMFC_OUT_OF_GROUPS',
973 4: 'OFPGMFC_OUT_OF_BUCKETS',
974 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
975 6: 'OFPGMFC_WATCH_UNSUPPORTED',
976 7: 'OFPGMFC_LOOP',
977 8: 'OFPGMFC_UNKNOWN_GROUP',
978 9: 'OFPGMFC_CHAINED_GROUP',
979 10: 'OFPGMFC_BAD_TYPE',
980 11: 'OFPGMFC_BAD_COMMAND',
981 12: 'OFPGMFC_BAD_BUCKET',
982 13: 'OFPGMFC_BAD_WATCH',
983 14: 'OFPGMFC_EPERM',
984}
985
986# Identifiers from group ofp_group_type
987OFPGT_ALL = 0
988OFPGT_SELECT = 1
989OFPGT_INDIRECT = 2
990OFPGT_FF = 3
991
992ofp_group_type_map = {
993 0: 'OFPGT_ALL',
994 1: 'OFPGT_SELECT',
995 2: 'OFPGT_INDIRECT',
996 3: 'OFPGT_FF',
997}
998
999# Identifiers from group ofp_hello_elem_type
1000OFPHET_VERSIONBITMAP = 1
1001
1002ofp_hello_elem_type_map = {
1003 1: 'OFPHET_VERSIONBITMAP',
1004}
1005
1006# Identifiers from group ofp_hello_failed_code
1007OFPHFC_INCOMPATIBLE = 0
1008OFPHFC_EPERM = 1
1009
1010ofp_hello_failed_code_map = {
1011 0: 'OFPHFC_INCOMPATIBLE',
1012 1: 'OFPHFC_EPERM',
1013}
1014
1015# Identifiers from group ofp_instruction_type
1016OFPIT_GOTO_TABLE = 1
1017OFPIT_WRITE_METADATA = 2
1018OFPIT_WRITE_ACTIONS = 3
1019OFPIT_APPLY_ACTIONS = 4
1020OFPIT_CLEAR_ACTIONS = 5
1021OFPIT_METER = 6
1022OFPIT_EXPERIMENTER = 65535
1023
1024ofp_instruction_type_map = {
1025 1: 'OFPIT_GOTO_TABLE',
1026 2: 'OFPIT_WRITE_METADATA',
1027 3: 'OFPIT_WRITE_ACTIONS',
1028 4: 'OFPIT_APPLY_ACTIONS',
1029 5: 'OFPIT_CLEAR_ACTIONS',
1030 6: 'OFPIT_METER',
1031 65535: 'OFPIT_EXPERIMENTER',
1032}
1033
1034# Identifiers from group ofp_ipv6exthdr_flags
1035OFPIEH_NONEXT = 1
1036OFPIEH_ESP = 2
1037OFPIEH_AUTH = 4
1038OFPIEH_DEST = 8
1039OFPIEH_FRAG = 16
1040OFPIEH_ROUTER = 32
1041OFPIEH_HOP = 64
1042OFPIEH_UNREP = 128
1043OFPIEH_UNSEQ = 256
1044
1045ofp_ipv6exthdr_flags_map = {
1046 1: 'OFPIEH_NONEXT',
1047 2: 'OFPIEH_ESP',
1048 4: 'OFPIEH_AUTH',
1049 8: 'OFPIEH_DEST',
1050 16: 'OFPIEH_FRAG',
1051 32: 'OFPIEH_ROUTER',
1052 64: 'OFPIEH_HOP',
1053 128: 'OFPIEH_UNREP',
1054 256: 'OFPIEH_UNSEQ',
1055}
1056
1057# Identifiers from group ofp_match_type
1058OFPMT_STANDARD = 0
1059OFPMT_OXM = 1
1060
1061ofp_match_type_map = {
1062 0: 'OFPMT_STANDARD',
1063 1: 'OFPMT_OXM',
1064}
1065
1066# Identifiers from group ofp_meter
1067OFPM_MAX = 4294901760
1068OFPM_SLOWPATH = 4294967293
1069OFPM_CONTROLLER = 4294967294
1070OFPM_ALL = 4294967295
1071
1072ofp_meter_map = {
1073 4294901760: 'OFPM_MAX',
1074 4294967293: 'OFPM_SLOWPATH',
1075 4294967294: 'OFPM_CONTROLLER',
1076 4294967295: 'OFPM_ALL',
1077}
1078
1079# Identifiers from group ofp_meter_band_type
1080OFPMBT_DROP = 1
1081OFPMBT_DSCP_REMARK = 2
1082OFPMBT_EXPERIMENTER = 65535
1083
1084ofp_meter_band_type_map = {
1085 1: 'OFPMBT_DROP',
1086 2: 'OFPMBT_DSCP_REMARK',
1087 65535: 'OFPMBT_EXPERIMENTER',
1088}
1089
1090# Identifiers from group ofp_meter_flags
1091OFPMF_KBPS = 1
1092OFPMF_PKTPS = 2
1093OFPMF_BURST = 4
1094OFPMF_STATS = 8
1095
1096ofp_meter_flags_map = {
1097 1: 'OFPMF_KBPS',
1098 2: 'OFPMF_PKTPS',
1099 4: 'OFPMF_BURST',
1100 8: 'OFPMF_STATS',
1101}
1102
1103# Identifiers from group ofp_meter_mod_command
1104OFPMC_ADD = 0
1105OFPMC_MODIFY = 1
1106OFPMC_DELETE = 2
1107
1108ofp_meter_mod_command_map = {
1109 0: 'OFPMC_ADD',
1110 1: 'OFPMC_MODIFY',
1111 2: 'OFPMC_DELETE',
1112}
1113
1114# Identifiers from group ofp_meter_mod_failed_code
1115OFPMMFC_UNKNOWN = 0
1116OFPMMFC_METER_EXISTS = 1
1117OFPMMFC_INVALID_METER = 2
1118OFPMMFC_UNKNOWN_METER = 3
1119OFPMMFC_BAD_COMMAND = 4
1120OFPMMFC_BAD_FLAGS = 5
1121OFPMMFC_BAD_RATE = 6
1122OFPMMFC_BAD_BURST = 7
1123OFPMMFC_BAD_BAND = 8
1124OFPMMFC_BAD_BAND_VALUE = 9
1125OFPMMFC_OUT_OF_METERS = 10
1126OFPMMFC_OUT_OF_BANDS = 11
1127
1128ofp_meter_mod_failed_code_map = {
1129 0: 'OFPMMFC_UNKNOWN',
1130 1: 'OFPMMFC_METER_EXISTS',
1131 2: 'OFPMMFC_INVALID_METER',
1132 3: 'OFPMMFC_UNKNOWN_METER',
1133 4: 'OFPMMFC_BAD_COMMAND',
1134 5: 'OFPMMFC_BAD_FLAGS',
1135 6: 'OFPMMFC_BAD_RATE',
1136 7: 'OFPMMFC_BAD_BURST',
1137 8: 'OFPMMFC_BAD_BAND',
1138 9: 'OFPMMFC_BAD_BAND_VALUE',
1139 10: 'OFPMMFC_OUT_OF_METERS',
1140 11: 'OFPMMFC_OUT_OF_BANDS',
1141}
1142
1143# Identifiers from group ofp_optical_port_features
1144OFPOPF_RX_TUNE = 1
1145OFPOPF_TX_TUNE = 2
1146OFPOPF_TX_PWR = 4
1147OFPOPF_USE_FREQ = 8
1148
1149ofp_optical_port_features_map = {
1150 1: 'OFPOPF_RX_TUNE',
1151 2: 'OFPOPF_TX_TUNE',
1152 4: 'OFPOPF_TX_PWR',
1153 8: 'OFPOPF_USE_FREQ',
1154}
1155
1156# Identifiers from group ofp_oxm_class
1157OFPXMC_NXM_0 = 0
1158OFPXMC_NXM_1 = 1
1159OFPXMC_OPENFLOW_BASIC = 32768
1160OFPXMC_EXPERIMENTER = 65535
1161
1162ofp_oxm_class_map = {
1163 0: 'OFPXMC_NXM_0',
1164 1: 'OFPXMC_NXM_1',
1165 32768: 'OFPXMC_OPENFLOW_BASIC',
1166 65535: 'OFPXMC_EXPERIMENTER',
1167}
1168
1169# Identifiers from group ofp_packet_in_reason
1170OFPR_NO_MATCH = 0
1171OFPR_ACTION = 1
1172OFPR_INVALID_TTL = 2
1173OFPR_ACTION_SET = 3
1174OFPR_GROUP = 4
1175OFPR_PACKET_OUT = 5
1176OFPR_BSN_NEW_HOST = 128
1177OFPR_BSN_STATION_MOVE = 129
1178OFPR_BSN_BAD_VLAN = 130
1179OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
1180OFPR_BSN_NO_ROUTE = 132
1181OFPR_BSN_ICMP_ECHO_REQUEST = 133
1182OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
1183OFPR_BSN_DEST_HOST_UNREACHABLE = 135
1184OFPR_BSN_DEST_PORT_UNREACHABLE = 136
1185OFPR_BSN_FRAGMENTATION_REQUIRED = 137
1186OFPR_BSN_ARP = 139
1187OFPR_BSN_DHCP = 140
1188OFPR_BSN_DEBUG = 141
1189OFPR_BSN_PACKET_OF_DEATH = 142
1190
1191ofp_packet_in_reason_map = {
1192 0: 'OFPR_NO_MATCH',
1193 1: 'OFPR_ACTION',
1194 2: 'OFPR_INVALID_TTL',
1195 3: 'OFPR_ACTION_SET',
1196 4: 'OFPR_GROUP',
1197 5: 'OFPR_PACKET_OUT',
1198 128: 'OFPR_BSN_NEW_HOST',
1199 129: 'OFPR_BSN_STATION_MOVE',
1200 130: 'OFPR_BSN_BAD_VLAN',
1201 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
1202 132: 'OFPR_BSN_NO_ROUTE',
1203 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
1204 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
1205 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
1206 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
1207 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
1208 139: 'OFPR_BSN_ARP',
1209 140: 'OFPR_BSN_DHCP',
1210 141: 'OFPR_BSN_DEBUG',
1211 142: 'OFPR_BSN_PACKET_OF_DEATH',
1212}
1213
1214# Identifiers from group ofp_port
1215OFPP_MAX = 4294967040
1216OFPP_IN_PORT = 4294967288
1217OFPP_TABLE = 4294967289
1218OFPP_NORMAL = 4294967290
1219OFPP_FLOOD = 4294967291
1220OFPP_ALL = 4294967292
1221OFPP_CONTROLLER = 4294967293
1222OFPP_LOCAL = 4294967294
1223OFPP_ANY = 4294967295
1224
1225ofp_port_map = {
1226 4294967040: 'OFPP_MAX',
1227 4294967288: 'OFPP_IN_PORT',
1228 4294967289: 'OFPP_TABLE',
1229 4294967290: 'OFPP_NORMAL',
1230 4294967291: 'OFPP_FLOOD',
1231 4294967292: 'OFPP_ALL',
1232 4294967293: 'OFPP_CONTROLLER',
1233 4294967294: 'OFPP_LOCAL',
1234 4294967295: 'OFPP_ANY',
1235}
1236
1237# Identifiers from group ofp_port_config
1238OFPPC_PORT_DOWN = 1
1239OFPPC_NO_RECV = 4
1240OFPPC_NO_FWD = 32
1241OFPPC_NO_PACKET_IN = 64
1242OFPPC_BSN_MIRROR_DEST = 2147483648
1243
1244ofp_port_config_map = {
1245 1: 'OFPPC_PORT_DOWN',
1246 4: 'OFPPC_NO_RECV',
1247 32: 'OFPPC_NO_FWD',
1248 64: 'OFPPC_NO_PACKET_IN',
1249 2147483648: 'OFPPC_BSN_MIRROR_DEST',
1250}
1251
1252# Identifiers from group ofp_port_features
1253OFPPF_10MB_HD = 1
1254OFPPF_10MB_FD = 2
1255OFPPF_100MB_HD = 4
1256OFPPF_100MB_FD = 8
1257OFPPF_1GB_HD = 16
1258OFPPF_1GB_FD = 32
1259OFPPF_10GB_FD = 64
1260OFPPF_40GB_FD = 128
1261OFPPF_100GB_FD = 256
1262OFPPF_1TB_FD = 512
1263OFPPF_OTHER = 1024
1264OFPPF_COPPER = 2048
1265OFPPF_FIBER = 4096
1266OFPPF_AUTONEG = 8192
1267OFPPF_PAUSE = 16384
1268OFPPF_PAUSE_ASYM = 32768
1269OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648
1270
1271ofp_port_features_map = {
1272 1: 'OFPPF_10MB_HD',
1273 2: 'OFPPF_10MB_FD',
1274 4: 'OFPPF_100MB_HD',
1275 8: 'OFPPF_100MB_FD',
1276 16: 'OFPPF_1GB_HD',
1277 32: 'OFPPF_1GB_FD',
1278 64: 'OFPPF_10GB_FD',
1279 128: 'OFPPF_40GB_FD',
1280 256: 'OFPPF_100GB_FD',
1281 512: 'OFPPF_1TB_FD',
1282 1024: 'OFPPF_OTHER',
1283 2048: 'OFPPF_COPPER',
1284 4096: 'OFPPF_FIBER',
1285 8192: 'OFPPF_AUTONEG',
1286 16384: 'OFPPF_PAUSE',
1287 32768: 'OFPPF_PAUSE_ASYM',
1288 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE',
1289}
1290
1291# Identifiers from group ofp_port_mod_failed_code
1292OFPPMFC_BAD_PORT = 0
1293OFPPMFC_BAD_HW_ADDR = 1
1294OFPPMFC_BAD_CONFIG = 2
1295OFPPMFC_BAD_ADVERTISE = 3
1296OFPPMFC_EPERM = 4
1297
1298ofp_port_mod_failed_code_map = {
1299 0: 'OFPPMFC_BAD_PORT',
1300 1: 'OFPPMFC_BAD_HW_ADDR',
1301 2: 'OFPPMFC_BAD_CONFIG',
1302 3: 'OFPPMFC_BAD_ADVERTISE',
1303 4: 'OFPPMFC_EPERM',
1304}
1305
1306# Identifiers from group ofp_port_reason
1307OFPPR_ADD = 0
1308OFPPR_DELETE = 1
1309OFPPR_MODIFY = 2
1310
1311ofp_port_reason_map = {
1312 0: 'OFPPR_ADD',
1313 1: 'OFPPR_DELETE',
1314 2: 'OFPPR_MODIFY',
1315}
1316
1317# Identifiers from group ofp_port_state
1318OFPPS_LINK_DOWN = 1
1319OFPPS_BLOCKED = 2
1320OFPPS_LIVE = 4
1321
1322ofp_port_state_map = {
1323 1: 'OFPPS_LINK_DOWN',
1324 2: 'OFPPS_BLOCKED',
1325 4: 'OFPPS_LIVE',
1326}
1327
1328# Identifiers from group ofp_port_stats_optical_flags
1329OFPOSF_RX_TUNE = 1
1330OFPOSF_TX_TUNE = 2
1331OFPOSF_TX_PWR = 4
1332OFPOSF_RX_PWR = 16
1333OFPOSF_TX_BIAS = 32
1334OFPOSF_TX_TEMP = 64
1335
1336ofp_port_stats_optical_flags_map = {
1337 1: 'OFPOSF_RX_TUNE',
1338 2: 'OFPOSF_TX_TUNE',
1339 4: 'OFPOSF_TX_PWR',
1340 16: 'OFPOSF_RX_PWR',
1341 32: 'OFPOSF_TX_BIAS',
1342 64: 'OFPOSF_TX_TEMP',
1343}
1344
1345# Identifiers from group ofp_port_stats_prop_type
1346OFPPSPT_ETHERNET = 0
1347OFPPSPT_OPTICAL = 1
1348OFPPSPT_EXPERIMENTER = 65535
1349
1350ofp_port_stats_prop_type_map = {
1351 0: 'OFPPSPT_ETHERNET',
1352 1: 'OFPPSPT_OPTICAL',
1353 65535: 'OFPPSPT_EXPERIMENTER',
1354}
1355
1356# Identifiers from group ofp_queue_op_failed_code
1357OFPQOFC_BAD_PORT = 0
1358OFPQOFC_BAD_QUEUE = 1
1359OFPQOFC_EPERM = 2
1360
1361ofp_queue_op_failed_code_map = {
1362 0: 'OFPQOFC_BAD_PORT',
1363 1: 'OFPQOFC_BAD_QUEUE',
1364 2: 'OFPQOFC_EPERM',
1365}
1366
1367# Identifiers from group ofp_requestforward_reason
1368OFPRFR_GROUP_MOD = 0
1369OFPRFR_METER_MOD = 1
1370
1371ofp_requestforward_reason_map = {
1372 0: 'OFPRFR_GROUP_MOD',
1373 1: 'OFPRFR_METER_MOD',
1374}
1375
1376# Identifiers from group ofp_role_request_failed_code
1377OFPRRFC_STALE = 0
1378OFPRRFC_UNSUP = 1
1379OFPRRFC_BAD_ROLE = 2
1380
1381ofp_role_request_failed_code_map = {
1382 0: 'OFPRRFC_STALE',
1383 1: 'OFPRRFC_UNSUP',
1384 2: 'OFPRRFC_BAD_ROLE',
1385}
1386
1387# Identifiers from group ofp_stats_reply_flags
1388OFPSF_REPLY_MORE = 1
1389
1390ofp_stats_reply_flags_map = {
1391 1: 'OFPSF_REPLY_MORE',
1392}
1393
1394# Identifiers from group ofp_stats_request_flags
1395OFPSF_REQ_MORE = 1
1396
1397ofp_stats_request_flags_map = {
1398 1: 'OFPSF_REQ_MORE',
1399}
1400
1401# Identifiers from group ofp_stats_type
1402OFPST_DESC = 0
1403OFPST_FLOW = 1
1404OFPST_AGGREGATE = 2
1405OFPST_TABLE = 3
1406OFPST_PORT = 4
1407OFPST_QUEUE = 5
1408OFPST_GROUP = 6
1409OFPST_GROUP_DESC = 7
1410OFPST_GROUP_FEATURES = 8
1411OFPST_METER = 9
1412OFPST_METER_CONFIG = 10
1413OFPST_METER_FEATURES = 11
1414OFPST_TABLE_FEATURES = 12
1415OFPST_PORT_DESC = 13
1416OFPMP_TABLE_DESC = 14
1417OFPMP_QUEUE_DESC = 15
1418OFPMP_FLOW_MONITOR = 16
1419OFPST_EXPERIMENTER = 65535
1420
1421ofp_stats_type_map = {
1422 0: 'OFPST_DESC',
1423 1: 'OFPST_FLOW',
1424 2: 'OFPST_AGGREGATE',
1425 3: 'OFPST_TABLE',
1426 4: 'OFPST_PORT',
1427 5: 'OFPST_QUEUE',
1428 6: 'OFPST_GROUP',
1429 7: 'OFPST_GROUP_DESC',
1430 8: 'OFPST_GROUP_FEATURES',
1431 9: 'OFPST_METER',
1432 10: 'OFPST_METER_CONFIG',
1433 11: 'OFPST_METER_FEATURES',
1434 12: 'OFPST_TABLE_FEATURES',
1435 13: 'OFPST_PORT_DESC',
1436 14: 'OFPMP_TABLE_DESC',
1437 15: 'OFPMP_QUEUE_DESC',
1438 16: 'OFPMP_FLOW_MONITOR',
1439 65535: 'OFPST_EXPERIMENTER',
1440}
1441
1442# Identifiers from group ofp_switch_config_failed_code
1443OFPSCFC_BAD_FLAGS = 0
1444OFPSCFC_BAD_LEN = 1
1445OFPSCFC_EPERM = 2
1446
1447ofp_switch_config_failed_code_map = {
1448 0: 'OFPSCFC_BAD_FLAGS',
1449 1: 'OFPSCFC_BAD_LEN',
1450 2: 'OFPSCFC_EPERM',
1451}
1452
1453# Identifiers from group ofp_table
1454OFPTT_MAX = 254
1455OFPTT_ALL = 255
1456
1457ofp_table_map = {
1458 254: 'OFPTT_MAX',
1459 255: 'OFPTT_ALL',
1460}
1461
1462# Identifiers from group ofp_table_config
1463OFPTC_DEPRECATED_MASK = 3
1464OFPTC_EVICTION = 4
1465OFPTC_VACANCY_EVENTS = 8
1466
1467ofp_table_config_map = {
1468 3: 'OFPTC_DEPRECATED_MASK',
1469 4: 'OFPTC_EVICTION',
1470 8: 'OFPTC_VACANCY_EVENTS',
1471}
1472
1473# Identifiers from group ofp_table_feature_prop_type
1474OFPTFPT_INSTRUCTIONS = 0
1475OFPTFPT_INSTRUCTIONS_MISS = 1
1476OFPTFPT_NEXT_TABLES = 2
1477OFPTFPT_NEXT_TABLES_MISS = 3
1478OFPTFPT_WRITE_ACTIONS = 4
1479OFPTFPT_WRITE_ACTIONS_MISS = 5
1480OFPTFPT_APPLY_ACTIONS = 6
1481OFPTFPT_APPLY_ACTIONS_MISS = 7
1482OFPTFPT_MATCH = 8
1483OFPTFPT_WILDCARDS = 10
1484OFPTFPT_WRITE_SETFIELD = 12
1485OFPTFPT_WRITE_SETFIELD_MISS = 13
1486OFPTFPT_APPLY_SETFIELD = 14
1487OFPTFPT_APPLY_SETFIELD_MISS = 15
1488OFPTFPT_TABLE_SYNC_FROM = 16
1489OFPTFPT_EXPERIMENTER = 65534
1490OFPTFPT_EXPERIMENTER_MISS = 65535
1491
1492ofp_table_feature_prop_type_map = {
1493 0: 'OFPTFPT_INSTRUCTIONS',
1494 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1495 2: 'OFPTFPT_NEXT_TABLES',
1496 3: 'OFPTFPT_NEXT_TABLES_MISS',
1497 4: 'OFPTFPT_WRITE_ACTIONS',
1498 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1499 6: 'OFPTFPT_APPLY_ACTIONS',
1500 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1501 8: 'OFPTFPT_MATCH',
1502 10: 'OFPTFPT_WILDCARDS',
1503 12: 'OFPTFPT_WRITE_SETFIELD',
1504 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1505 14: 'OFPTFPT_APPLY_SETFIELD',
1506 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1507 16: 'OFPTFPT_TABLE_SYNC_FROM',
1508 65534: 'OFPTFPT_EXPERIMENTER',
1509 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1510}
1511
1512# Identifiers from group ofp_table_features_failed_code
1513OFPTFFC_BAD_TABLE = 0
1514OFPTFFC_BAD_METADATA = 1
1515OFPTFFC_EPERM = 5
1516
1517ofp_table_features_failed_code_map = {
1518 0: 'OFPTFFC_BAD_TABLE',
1519 1: 'OFPTFFC_BAD_METADATA',
1520 5: 'OFPTFFC_EPERM',
1521}
1522
1523# Identifiers from group ofp_table_mod_failed_code
1524OFPTMFC_BAD_TABLE = 0
1525OFPTMFC_BAD_CONFIG = 1
1526OFPTMFC_EPERM = 2
1527
1528ofp_table_mod_failed_code_map = {
1529 0: 'OFPTMFC_BAD_TABLE',
1530 1: 'OFPTMFC_BAD_CONFIG',
1531 2: 'OFPTMFC_EPERM',
1532}
1533
1534# Identifiers from group ofp_table_mod_prop_eviction_flag
1535OFPTMPEF_OTHER = 1
1536OFPTMPEF_IMPORTANCE = 2
1537OFPTMPEF_LIFETIME = 4
1538
1539ofp_table_mod_prop_eviction_flag_map = {
1540 1: 'OFPTMPEF_OTHER',
1541 2: 'OFPTMPEF_IMPORTANCE',
1542 4: 'OFPTMPEF_LIFETIME',
1543}
1544
1545# Identifiers from group ofp_table_reason
1546OFPTR_VACANCY_DOWN = 3
1547OFPTR_VACANCY_UP = 4
1548
1549ofp_table_reason_map = {
1550 3: 'OFPTR_VACANCY_DOWN',
1551 4: 'OFPTR_VACANCY_UP',
1552}
1553
1554# Identifiers from group ofp_type
1555OFPT_HELLO = 0
1556OFPT_ERROR = 1
1557OFPT_ECHO_REQUEST = 2
1558OFPT_ECHO_REPLY = 3
1559OFPT_EXPERIMENTER = 4
1560OFPT_FEATURES_REQUEST = 5
1561OFPT_FEATURES_REPLY = 6
1562OFPT_GET_CONFIG_REQUEST = 7
1563OFPT_GET_CONFIG_REPLY = 8
1564OFPT_SET_CONFIG = 9
1565OFPT_PACKET_IN = 10
1566OFPT_FLOW_REMOVED = 11
1567OFPT_PORT_STATUS = 12
1568OFPT_PACKET_OUT = 13
1569OFPT_FLOW_MOD = 14
1570OFPT_GROUP_MOD = 15
1571OFPT_PORT_MOD = 16
1572OFPT_TABLE_MOD = 17
1573OFPT_STATS_REQUEST = 18
1574OFPT_STATS_REPLY = 19
1575OFPT_BARRIER_REQUEST = 20
1576OFPT_BARRIER_REPLY = 21
1577OFPT_ROLE_REQUEST = 24
1578OFPT_ROLE_REPLY = 25
1579OFPT_GET_ASYNC_REQUEST = 26
1580OFPT_GET_ASYNC_REPLY = 27
1581OFPT_SET_ASYNC = 28
1582OFPT_METER_MOD = 29
1583OFPT_ROLE_STATUS = 30
1584OFPT_TABLE_STATUS = 31
1585OFPT_REQUESTFORWARD = 32
1586OFPT_BUNDLE_CONTROL = 33
1587OFPT_BUNDLE_ADD_MESSAGE = 34
1588
1589ofp_type_map = {
1590 0: 'OFPT_HELLO',
1591 1: 'OFPT_ERROR',
1592 2: 'OFPT_ECHO_REQUEST',
1593 3: 'OFPT_ECHO_REPLY',
1594 4: 'OFPT_EXPERIMENTER',
1595 5: 'OFPT_FEATURES_REQUEST',
1596 6: 'OFPT_FEATURES_REPLY',
1597 7: 'OFPT_GET_CONFIG_REQUEST',
1598 8: 'OFPT_GET_CONFIG_REPLY',
1599 9: 'OFPT_SET_CONFIG',
1600 10: 'OFPT_PACKET_IN',
1601 11: 'OFPT_FLOW_REMOVED',
1602 12: 'OFPT_PORT_STATUS',
1603 13: 'OFPT_PACKET_OUT',
1604 14: 'OFPT_FLOW_MOD',
1605 15: 'OFPT_GROUP_MOD',
1606 16: 'OFPT_PORT_MOD',
1607 17: 'OFPT_TABLE_MOD',
1608 18: 'OFPT_STATS_REQUEST',
1609 19: 'OFPT_STATS_REPLY',
1610 20: 'OFPT_BARRIER_REQUEST',
1611 21: 'OFPT_BARRIER_REPLY',
1612 24: 'OFPT_ROLE_REQUEST',
1613 25: 'OFPT_ROLE_REPLY',
1614 26: 'OFPT_GET_ASYNC_REQUEST',
1615 27: 'OFPT_GET_ASYNC_REPLY',
1616 28: 'OFPT_SET_ASYNC',
1617 29: 'OFPT_METER_MOD',
1618 30: 'OFPT_ROLE_STATUS',
1619 31: 'OFPT_TABLE_STATUS',
1620 32: 'OFPT_REQUESTFORWARD',
1621 33: 'OFPT_BUNDLE_CONTROL',
1622 34: 'OFPT_BUNDLE_ADD_MESSAGE',
1623}
1624
1625# Identifiers from group ofp_vlan_id
1626OFPVID_NONE = 0
1627OFPVID_PRESENT = 4096
1628
1629ofp_vlan_id_map = {
1630 0: 'OFPVID_NONE',
1631 4096: 'OFPVID_PRESENT',
1632}
1633