blob: b6130f816048f4ed731b3622df134ba4fe33dbe0 [file] [log] [blame]
Rich Lane2e079da2014-10-29 15:30:24 -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_pdu_slot_num
29BSN_PDU_SLOT_NUM_ANY = 255
30
31of_bsn_pdu_slot_num_map = {
32 255: 'BSN_PDU_SLOT_NUM_ANY',
33}
34
35# Identifiers from group ofp_action_type
36OFPAT_OUTPUT = 0
37OFPAT_COPY_TTL_OUT = 11
38OFPAT_COPY_TTL_IN = 12
39OFPAT_SET_MPLS_TTL = 15
40OFPAT_DEC_MPLS_TTL = 16
41OFPAT_PUSH_VLAN = 17
42OFPAT_POP_VLAN = 18
43OFPAT_PUSH_MPLS = 19
44OFPAT_POP_MPLS = 20
45OFPAT_SET_QUEUE = 21
46OFPAT_GROUP = 22
47OFPAT_SET_NW_TTL = 23
48OFPAT_DEC_NW_TTL = 24
49OFPAT_SET_FIELD = 25
50OFPAT_PUSH_PBB = 26
51OFPAT_POP_PBB = 27
52OFPAT_EXPERIMENTER = 65535
53
54ofp_action_type_map = {
55 0: 'OFPAT_OUTPUT',
56 11: 'OFPAT_COPY_TTL_OUT',
57 12: 'OFPAT_COPY_TTL_IN',
58 15: 'OFPAT_SET_MPLS_TTL',
59 16: 'OFPAT_DEC_MPLS_TTL',
60 17: 'OFPAT_PUSH_VLAN',
61 18: 'OFPAT_POP_VLAN',
62 19: 'OFPAT_PUSH_MPLS',
63 20: 'OFPAT_POP_MPLS',
64 21: 'OFPAT_SET_QUEUE',
65 22: 'OFPAT_GROUP',
66 23: 'OFPAT_SET_NW_TTL',
67 24: 'OFPAT_DEC_NW_TTL',
68 25: 'OFPAT_SET_FIELD',
69 26: 'OFPAT_PUSH_PBB',
70 27: 'OFPAT_POP_PBB',
71 65535: 'OFPAT_EXPERIMENTER',
72}
73
74# Identifiers from group ofp_async_config_failed_code
75OFPACFC_INVALID = 0
76OFPACFC_UNSUPPORTED = 1
77OFPACFC_EPERM = 2
78
79ofp_async_config_failed_code_map = {
80 0: 'OFPACFC_INVALID',
81 1: 'OFPACFC_UNSUPPORTED',
82 2: 'OFPACFC_EPERM',
83}
84
85# Identifiers from group ofp_bad_action_code
86OFPBAC_BAD_TYPE = 0
87OFPBAC_BAD_LEN = 1
88OFPBAC_BAD_EXPERIMENTER = 2
89OFPBAC_BAD_EXPERIMENTER_TYPE = 3
90OFPBAC_BAD_OUT_PORT = 4
91OFPBAC_BAD_ARGUMENT = 5
92OFPBAC_EPERM = 6
93OFPBAC_TOO_MANY = 7
94OFPBAC_BAD_QUEUE = 8
95OFPBAC_BAD_OUT_GROUP = 9
96OFPBAC_MATCH_INCONSISTENT = 10
97OFPBAC_UNSUPPORTED_ORDER = 11
98OFPBAC_BAD_TAG = 12
99OFPBAC_BAD_SET_TYPE = 13
100OFPBAC_BAD_SET_LEN = 14
101OFPBAC_BAD_SET_ARGUMENT = 15
102
103ofp_bad_action_code_map = {
104 0: 'OFPBAC_BAD_TYPE',
105 1: 'OFPBAC_BAD_LEN',
106 2: 'OFPBAC_BAD_EXPERIMENTER',
107 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
108 4: 'OFPBAC_BAD_OUT_PORT',
109 5: 'OFPBAC_BAD_ARGUMENT',
110 6: 'OFPBAC_EPERM',
111 7: 'OFPBAC_TOO_MANY',
112 8: 'OFPBAC_BAD_QUEUE',
113 9: 'OFPBAC_BAD_OUT_GROUP',
114 10: 'OFPBAC_MATCH_INCONSISTENT',
115 11: 'OFPBAC_UNSUPPORTED_ORDER',
116 12: 'OFPBAC_BAD_TAG',
117 13: 'OFPBAC_BAD_SET_TYPE',
118 14: 'OFPBAC_BAD_SET_LEN',
119 15: 'OFPBAC_BAD_SET_ARGUMENT',
120}
121
122# Identifiers from group ofp_bad_instruction_code
123OFPBIC_UNKNOWN_INST = 0
124OFPBIC_UNSUP_INST = 1
125OFPBIC_BAD_TABLE_ID = 2
126OFPBIC_UNSUP_METADATA = 3
127OFPBIC_UNSUP_METADATA_MASK = 4
128OFPBIC_BAD_EXPERIMENTER = 5
129OFPBIC_BAD_EXPERIMENTER_TYPE = 6
130OFPBIC_BAD_LEN = 7
131OFPBIC_EPERM = 8
132OFPBIC_DUP_INST = 9
133
134ofp_bad_instruction_code_map = {
135 0: 'OFPBIC_UNKNOWN_INST',
136 1: 'OFPBIC_UNSUP_INST',
137 2: 'OFPBIC_BAD_TABLE_ID',
138 3: 'OFPBIC_UNSUP_METADATA',
139 4: 'OFPBIC_UNSUP_METADATA_MASK',
140 5: 'OFPBIC_BAD_EXPERIMENTER',
141 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
142 7: 'OFPBIC_BAD_LEN',
143 8: 'OFPBIC_EPERM',
144 9: 'OFPBIC_DUP_INST',
145}
146
147# Identifiers from group ofp_bad_match_code
148OFPBMC_BAD_TYPE = 0
149OFPBMC_BAD_LEN = 1
150OFPBMC_BAD_TAG = 2
151OFPBMC_BAD_DL_ADDR_MASK = 3
152OFPBMC_BAD_NW_ADDR_MASK = 4
153OFPBMC_BAD_WILDCARDS = 5
154OFPBMC_BAD_FIELD = 6
155OFPBMC_BAD_VALUE = 7
156OFPBMC_BAD_MASK = 8
157OFPBMC_BAD_PREREQ = 9
158OFPBMC_DUP_FIELD = 10
159OFPBMC_EPERM = 11
160
161ofp_bad_match_code_map = {
162 0: 'OFPBMC_BAD_TYPE',
163 1: 'OFPBMC_BAD_LEN',
164 2: 'OFPBMC_BAD_TAG',
165 3: 'OFPBMC_BAD_DL_ADDR_MASK',
166 4: 'OFPBMC_BAD_NW_ADDR_MASK',
167 5: 'OFPBMC_BAD_WILDCARDS',
168 6: 'OFPBMC_BAD_FIELD',
169 7: 'OFPBMC_BAD_VALUE',
170 8: 'OFPBMC_BAD_MASK',
171 9: 'OFPBMC_BAD_PREREQ',
172 10: 'OFPBMC_DUP_FIELD',
173 11: 'OFPBMC_EPERM',
174}
175
176# Identifiers from group ofp_bad_property_code
177OFPBPC_BAD_TYPE = 0
178OFPBPC_BAD_LEN = 1
179OFPBPC_BAD_VALUE = 2
180OFPBPC_TOO_MANY = 3
181OFPBPC_DUP_TYPE = 4
182OFPBPC_BAD_EXPERIMENTER = 5
183OFPBPC_BAD_EXP_TYPE = 6
184OFPBPC_BAD_EXP_VALUE = 7
185OFPBPC_EPERM = 8
186
187ofp_bad_property_code_map = {
188 0: 'OFPBPC_BAD_TYPE',
189 1: 'OFPBPC_BAD_LEN',
190 2: 'OFPBPC_BAD_VALUE',
191 3: 'OFPBPC_TOO_MANY',
192 4: 'OFPBPC_DUP_TYPE',
193 5: 'OFPBPC_BAD_EXPERIMENTER',
194 6: 'OFPBPC_BAD_EXP_TYPE',
195 7: 'OFPBPC_BAD_EXP_VALUE',
196 8: 'OFPBPC_EPERM',
197}
198
199# Identifiers from group ofp_bad_request_code
200OFPBRC_BAD_VERSION = 0
201OFPBRC_BAD_TYPE = 1
202OFPBRC_BAD_STAT = 2
203OFPBRC_BAD_EXPERIMENTER = 3
204OFPBRC_BAD_EXPERIMENTER_TYPE = 4
205OFPBRC_EPERM = 5
206OFPBRC_BAD_LEN = 6
207OFPBRC_BUFFER_EMPTY = 7
208OFPBRC_BUFFER_UNKNOWN = 8
209OFPBRC_BAD_TABLE_ID = 9
210OFPBRC_IS_SLAVE = 10
211OFPBRC_BAD_PORT = 11
212OFPBRC_BAD_PACKET = 12
213OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
214OFPBRC_MULTIPART_REQUEST_TIMEOUT = 14
215OFPBRC_MULTIPART_REPLY_TIMEOUT = 15
216
217ofp_bad_request_code_map = {
218 0: 'OFPBRC_BAD_VERSION',
219 1: 'OFPBRC_BAD_TYPE',
220 2: 'OFPBRC_BAD_STAT',
221 3: 'OFPBRC_BAD_EXPERIMENTER',
222 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
223 5: 'OFPBRC_EPERM',
224 6: 'OFPBRC_BAD_LEN',
225 7: 'OFPBRC_BUFFER_EMPTY',
226 8: 'OFPBRC_BUFFER_UNKNOWN',
227 9: 'OFPBRC_BAD_TABLE_ID',
228 10: 'OFPBRC_IS_SLAVE',
229 11: 'OFPBRC_BAD_PORT',
230 12: 'OFPBRC_BAD_PACKET',
231 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
232 14: 'OFPBRC_MULTIPART_REQUEST_TIMEOUT',
233 15: 'OFPBRC_MULTIPART_REPLY_TIMEOUT',
234}
235
236# Identifiers from group ofp_bsn_vport_l2gre_flags
237OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
238OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
239OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
240OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
241OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
242
243ofp_bsn_vport_l2gre_flags_map = {
244 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
245 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
246 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
247 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
248 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
249}
250
251# Identifiers from group ofp_bsn_vport_q_in_q_untagged
252OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
253
254ofp_bsn_vport_q_in_q_untagged_map = {
255 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
256}
257
258# Identifiers from group ofp_bsn_vport_status
259OF_BSN_VPORT_STATUS_OK = 0
260OF_BSN_VPORT_STATUS_FAILED = 1
261
262ofp_bsn_vport_status_map = {
263 0: 'OF_BSN_VPORT_STATUS_OK',
264 1: 'OF_BSN_VPORT_STATUS_FAILED',
265}
266
267# Identifiers from group ofp_bundle_ctrl_type
268OFPBCT_OPEN_REQUEST = 0
269OFPBCT_OPEN_REPLY = 1
270OFPBCT_CLOSE_REQUEST = 2
271OFPBCT_CLOSE_REPLY = 3
272OFPBCT_COMMIT_REQUEST = 4
273OFPBCT_COMMIT_REPLY = 5
274OFPBCT_DISCARD_REQUEST = 6
275OFPBCT_DISCARD_REPLY = 7
276
277ofp_bundle_ctrl_type_map = {
278 0: 'OFPBCT_OPEN_REQUEST',
279 1: 'OFPBCT_OPEN_REPLY',
280 2: 'OFPBCT_CLOSE_REQUEST',
281 3: 'OFPBCT_CLOSE_REPLY',
282 4: 'OFPBCT_COMMIT_REQUEST',
283 5: 'OFPBCT_COMMIT_REPLY',
284 6: 'OFPBCT_DISCARD_REQUEST',
285 7: 'OFPBCT_DISCARD_REPLY',
286}
287
288# Identifiers from group ofp_bundle_failed_code
289OFPBFC_UNKNOWN = 0
290OFPBFC_EPERM = 1
291OFPBFC_BAD_ID = 2
292OFPBFC_BUNDLE_EXIST = 3
293OFPBFC_BUNDLE_CLOSED = 4
294OFPBFC_OUT_OF_BUNDLES = 5
295OFPBFC_BAD_TYPE = 6
296OFPBFC_BAD_FLAGS = 7
297OFPBFC_MSG_BAD_LEN = 8
298OFPBFC_MSG_BAD_XID = 9
299OFPBFC_MSG_UNSUP = 10
300OFPBFC_MSG_CONFLICT = 11
301OFPBFC_MSG_TOO_MANY = 12
302OFPBFC_MSG_FAILED = 13
303OFPBFC_TIMEOUT = 14
304OFPBFC_BUNDLE_IN_PROGRESS = 15
305
306ofp_bundle_failed_code_map = {
307 0: 'OFPBFC_UNKNOWN',
308 1: 'OFPBFC_EPERM',
309 2: 'OFPBFC_BAD_ID',
310 3: 'OFPBFC_BUNDLE_EXIST',
311 4: 'OFPBFC_BUNDLE_CLOSED',
312 5: 'OFPBFC_OUT_OF_BUNDLES',
313 6: 'OFPBFC_BAD_TYPE',
314 7: 'OFPBFC_BAD_FLAGS',
315 8: 'OFPBFC_MSG_BAD_LEN',
316 9: 'OFPBFC_MSG_BAD_XID',
317 10: 'OFPBFC_MSG_UNSUP',
318 11: 'OFPBFC_MSG_CONFLICT',
319 12: 'OFPBFC_MSG_TOO_MANY',
320 13: 'OFPBFC_MSG_FAILED',
321 14: 'OFPBFC_TIMEOUT',
322 15: 'OFPBFC_BUNDLE_IN_PROGRESS',
323}
324
325# Identifiers from group ofp_bundle_flags
326OFPBF_ATOMIC = 1
327OFPBF_ORDERED = 2
328
329ofp_bundle_flags_map = {
330 1: 'OFPBF_ATOMIC',
331 2: 'OFPBF_ORDERED',
332}
333
334# Identifiers from group ofp_capabilities
335OFPC_FLOW_STATS = 1
336OFPC_TABLE_STATS = 2
337OFPC_PORT_STATS = 4
338OFPC_GROUP_STATS = 8
339OFPC_IP_REASM = 32
340OFPC_QUEUE_STATS = 64
341OFPC_PORT_BLOCKED = 256
342
343ofp_capabilities_map = {
344 1: 'OFPC_FLOW_STATS',
345 2: 'OFPC_TABLE_STATS',
346 4: 'OFPC_PORT_STATS',
347 8: 'OFPC_GROUP_STATS',
348 32: 'OFPC_IP_REASM',
349 64: 'OFPC_QUEUE_STATS',
350 256: 'OFPC_PORT_BLOCKED',
351}
352
353# Identifiers from group ofp_config_flags
354OFPC_FRAG_NORMAL = 0
355OFPC_FRAG_DROP = 1
356OFPC_FRAG_REASM = 2
357OFPC_FRAG_MASK = 3
358
359ofp_config_flags_map = {
360 0: 'OFPC_FRAG_NORMAL',
361 1: 'OFPC_FRAG_DROP',
362 2: 'OFPC_FRAG_REASM',
363 3: 'OFPC_FRAG_MASK',
364}
365
366# Identifiers from group ofp_controller_max_len
367OFPCML_MAX = 65509
368OFPCML_NO_BUFFER = 65535
369
370ofp_controller_max_len_map = {
371 65509: 'OFPCML_MAX',
372 65535: 'OFPCML_NO_BUFFER',
373}
374
375# Identifiers from group ofp_controller_role
376OFPCR_ROLE_NOCHANGE = 0
377OFPCR_ROLE_EQUAL = 1
378OFPCR_ROLE_MASTER = 2
379OFPCR_ROLE_SLAVE = 3
380
381ofp_controller_role_map = {
382 0: 'OFPCR_ROLE_NOCHANGE',
383 1: 'OFPCR_ROLE_EQUAL',
384 2: 'OFPCR_ROLE_MASTER',
385 3: 'OFPCR_ROLE_SLAVE',
386}
387
388# Identifiers from group ofp_controller_role_reason
389OFPCRR_MASTER_REQUEST = 0
390OFPCRR_CONFIG = 1
391OFPCRR_EXPERIMENTER = 2
392
393ofp_controller_role_reason_map = {
394 0: 'OFPCRR_MASTER_REQUEST',
395 1: 'OFPCRR_CONFIG',
396 2: 'OFPCRR_EXPERIMENTER',
397}
398
399# Identifiers from group ofp_error_type
400OFPET_HELLO_FAILED = 0
401OFPET_BAD_REQUEST = 1
402OFPET_BAD_ACTION = 2
403OFPET_BAD_INSTRUCTION = 3
404OFPET_BAD_MATCH = 4
405OFPET_FLOW_MOD_FAILED = 5
406OFPET_GROUP_MOD_FAILED = 6
407OFPET_PORT_MOD_FAILED = 7
408OFPET_TABLE_MOD_FAILED = 8
409OFPET_QUEUE_OP_FAILED = 9
410OFPET_SWITCH_CONFIG_FAILED = 10
411OFPET_ROLE_REQUEST_FAILED = 11
412OFPET_METER_MOD_FAILED = 12
413OFPET_TABLE_FEATURES_FAILED = 13
414OFPET_BAD_PROPERTY = 14
415OFPET_ASYNC_CONFIG_FAILED = 15
416OFPET_FLOW_MONITOR_FAILED = 16
417OFPET_BUNDLE_FAILED = 17
418OFPET_EXPERIMENTER = 65535
419
420ofp_error_type_map = {
421 0: 'OFPET_HELLO_FAILED',
422 1: 'OFPET_BAD_REQUEST',
423 2: 'OFPET_BAD_ACTION',
424 3: 'OFPET_BAD_INSTRUCTION',
425 4: 'OFPET_BAD_MATCH',
426 5: 'OFPET_FLOW_MOD_FAILED',
427 6: 'OFPET_GROUP_MOD_FAILED',
428 7: 'OFPET_PORT_MOD_FAILED',
429 8: 'OFPET_TABLE_MOD_FAILED',
430 9: 'OFPET_QUEUE_OP_FAILED',
431 10: 'OFPET_SWITCH_CONFIG_FAILED',
432 11: 'OFPET_ROLE_REQUEST_FAILED',
433 12: 'OFPET_METER_MOD_FAILED',
434 13: 'OFPET_TABLE_FEATURES_FAILED',
435 14: 'OFPET_BAD_PROPERTY',
436 15: 'OFPET_ASYNC_CONFIG_FAILED',
437 16: 'OFPET_FLOW_MONITOR_FAILED',
438 17: 'OFPET_BUNDLE_FAILED',
439 65535: 'OFPET_EXPERIMENTER',
440}
441
442# Identifiers from group ofp_flow_mod_command
443OFPFC_ADD = 0
444OFPFC_MODIFY = 1
445OFPFC_MODIFY_STRICT = 2
446OFPFC_DELETE = 3
447OFPFC_DELETE_STRICT = 4
448
449ofp_flow_mod_command_map = {
450 0: 'OFPFC_ADD',
451 1: 'OFPFC_MODIFY',
452 2: 'OFPFC_MODIFY_STRICT',
453 3: 'OFPFC_DELETE',
454 4: 'OFPFC_DELETE_STRICT',
455}
456
457# Identifiers from group ofp_flow_mod_failed_code
458OFPFMFC_UNKNOWN = 0
459OFPFMFC_TABLE_FULL = 1
460OFPFMFC_BAD_TABLE_ID = 2
461OFPFMFC_OVERLAP = 3
462OFPFMFC_EPERM = 4
463OFPFMFC_BAD_TIMEOUT = 5
464OFPFMFC_BAD_COMMAND = 6
465OFPFMFC_BAD_FLAGS = 7
466OFPFMFC_CANT_SYNC = 8
467OFPFMFC_BAD_PRIORITY = 9
468
469ofp_flow_mod_failed_code_map = {
470 0: 'OFPFMFC_UNKNOWN',
471 1: 'OFPFMFC_TABLE_FULL',
472 2: 'OFPFMFC_BAD_TABLE_ID',
473 3: 'OFPFMFC_OVERLAP',
474 4: 'OFPFMFC_EPERM',
475 5: 'OFPFMFC_BAD_TIMEOUT',
476 6: 'OFPFMFC_BAD_COMMAND',
477 7: 'OFPFMFC_BAD_FLAGS',
478 8: 'OFPFMFC_CANT_SYNC',
479 9: 'OFPFMFC_BAD_PRIORITY',
480}
481
482# Identifiers from group ofp_flow_mod_flags
483OFPFF_SEND_FLOW_REM = 1
484OFPFF_CHECK_OVERLAP = 2
485OFPFF_RESET_COUNTS = 4
486OFPFF_NO_PKT_COUNTS = 8
487OFPFF_NO_BYT_COUNTS = 16
488OFPFF_BSN_SEND_IDLE = 128
489
490ofp_flow_mod_flags_map = {
491 1: 'OFPFF_SEND_FLOW_REM',
492 2: 'OFPFF_CHECK_OVERLAP',
493 4: 'OFPFF_RESET_COUNTS',
494 8: 'OFPFF_NO_PKT_COUNTS',
495 16: 'OFPFF_NO_BYT_COUNTS',
496 128: 'OFPFF_BSN_SEND_IDLE',
497}
498
499# Identifiers from group ofp_flow_monitor_failed_code
500OFPMOFC_UNKNOWN = 0
501OFPMOFC_MONITOR_EXISTS = 1
502OFPMOFC_INVALID_MONITOR = 2
503OFPMOFC_UNKNOWN_MONITOR = 3
504OFPMOFC_BAD_COMMAND = 4
505OFPMOFC_BAD_FLAGS = 5
506OFPMOFC_BAD_TABLE_ID = 6
507OFPMOFC_BAD_OUT = 7
508
509ofp_flow_monitor_failed_code_map = {
510 0: 'OFPMOFC_UNKNOWN',
511 1: 'OFPMOFC_MONITOR_EXISTS',
512 2: 'OFPMOFC_INVALID_MONITOR',
513 3: 'OFPMOFC_UNKNOWN_MONITOR',
514 4: 'OFPMOFC_BAD_COMMAND',
515 5: 'OFPMOFC_BAD_FLAGS',
516 6: 'OFPMOFC_BAD_TABLE_ID',
517 7: 'OFPMOFC_BAD_OUT',
518}
519
520# Identifiers from group ofp_flow_removed_reason
521OFPRR_IDLE_TIMEOUT = 0
522OFPRR_HARD_TIMEOUT = 1
523OFPRR_DELETE = 2
524OFPRR_GROUP_DELETE = 3
525OFPRR_METER_DELETE = 4
526OFPRR_EVICTION = 5
527
528ofp_flow_removed_reason_map = {
529 0: 'OFPRR_IDLE_TIMEOUT',
530 1: 'OFPRR_HARD_TIMEOUT',
531 2: 'OFPRR_DELETE',
532 3: 'OFPRR_GROUP_DELETE',
533 4: 'OFPRR_METER_DELETE',
534 5: 'OFPRR_EVICTION',
535}
536
537# Identifiers from group ofp_group
538OFPG_MAX = 4294967040
539OFPG_ALL = 4294967292
540OFPG_ANY = 4294967295
541
542ofp_group_map = {
543 4294967040: 'OFPG_MAX',
544 4294967292: 'OFPG_ALL',
545 4294967295: 'OFPG_ANY',
546}
547
548# Identifiers from group ofp_group_capabilities
549OFPGFC_SELECT_WEIGHT = 1
550OFPGFC_SELECT_LIVENESS = 2
551OFPGFC_CHAINING = 4
552OFPGFC_CHAINING_CHECKS = 8
553
554ofp_group_capabilities_map = {
555 1: 'OFPGFC_SELECT_WEIGHT',
556 2: 'OFPGFC_SELECT_LIVENESS',
557 4: 'OFPGFC_CHAINING',
558 8: 'OFPGFC_CHAINING_CHECKS',
559}
560
561# Identifiers from group ofp_group_mod_command
562OFPGC_ADD = 0
563OFPGC_MODIFY = 1
564OFPGC_DELETE = 2
565
566ofp_group_mod_command_map = {
567 0: 'OFPGC_ADD',
568 1: 'OFPGC_MODIFY',
569 2: 'OFPGC_DELETE',
570}
571
572# Identifiers from group ofp_group_mod_failed_code
573OFPGMFC_GROUP_EXISTS = 0
574OFPGMFC_INVALID_GROUP = 1
575OFPGMFC_WEIGHT_UNSUPPORTED = 2
576OFPGMFC_OUT_OF_GROUPS = 3
577OFPGMFC_OUT_OF_BUCKETS = 4
578OFPGMFC_CHAINING_UNSUPPORTED = 5
579OFPGMFC_WATCH_UNSUPPORTED = 6
580OFPGMFC_LOOP = 7
581OFPGMFC_UNKNOWN_GROUP = 8
582OFPGMFC_CHAINED_GROUP = 9
583OFPGMFC_BAD_TYPE = 10
584OFPGMFC_BAD_COMMAND = 11
585OFPGMFC_BAD_BUCKET = 12
586OFPGMFC_BAD_WATCH = 13
587OFPGMFC_EPERM = 14
588
589ofp_group_mod_failed_code_map = {
590 0: 'OFPGMFC_GROUP_EXISTS',
591 1: 'OFPGMFC_INVALID_GROUP',
592 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
593 3: 'OFPGMFC_OUT_OF_GROUPS',
594 4: 'OFPGMFC_OUT_OF_BUCKETS',
595 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
596 6: 'OFPGMFC_WATCH_UNSUPPORTED',
597 7: 'OFPGMFC_LOOP',
598 8: 'OFPGMFC_UNKNOWN_GROUP',
599 9: 'OFPGMFC_CHAINED_GROUP',
600 10: 'OFPGMFC_BAD_TYPE',
601 11: 'OFPGMFC_BAD_COMMAND',
602 12: 'OFPGMFC_BAD_BUCKET',
603 13: 'OFPGMFC_BAD_WATCH',
604 14: 'OFPGMFC_EPERM',
605}
606
607# Identifiers from group ofp_group_type
608OFPGT_ALL = 0
609OFPGT_SELECT = 1
610OFPGT_INDIRECT = 2
611OFPGT_FF = 3
612
613ofp_group_type_map = {
614 0: 'OFPGT_ALL',
615 1: 'OFPGT_SELECT',
616 2: 'OFPGT_INDIRECT',
617 3: 'OFPGT_FF',
618}
619
620# Identifiers from group ofp_hello_elem_type
621OFPHET_VERSIONBITMAP = 1
622
623ofp_hello_elem_type_map = {
624 1: 'OFPHET_VERSIONBITMAP',
625}
626
627# Identifiers from group ofp_hello_failed_code
628OFPHFC_INCOMPATIBLE = 0
629OFPHFC_EPERM = 1
630
631ofp_hello_failed_code_map = {
632 0: 'OFPHFC_INCOMPATIBLE',
633 1: 'OFPHFC_EPERM',
634}
635
636# Identifiers from group ofp_instruction_type
637OFPIT_GOTO_TABLE = 1
638OFPIT_WRITE_METADATA = 2
639OFPIT_WRITE_ACTIONS = 3
640OFPIT_APPLY_ACTIONS = 4
641OFPIT_CLEAR_ACTIONS = 5
642OFPIT_METER = 6
643OFPIT_EXPERIMENTER = 65535
644
645ofp_instruction_type_map = {
646 1: 'OFPIT_GOTO_TABLE',
647 2: 'OFPIT_WRITE_METADATA',
648 3: 'OFPIT_WRITE_ACTIONS',
649 4: 'OFPIT_APPLY_ACTIONS',
650 5: 'OFPIT_CLEAR_ACTIONS',
651 6: 'OFPIT_METER',
652 65535: 'OFPIT_EXPERIMENTER',
653}
654
655# Identifiers from group ofp_ipv6exthdr_flags
656OFPIEH_NONEXT = 1
657OFPIEH_ESP = 2
658OFPIEH_AUTH = 4
659OFPIEH_DEST = 8
660OFPIEH_FRAG = 16
661OFPIEH_ROUTER = 32
662OFPIEH_HOP = 64
663OFPIEH_UNREP = 128
664OFPIEH_UNSEQ = 256
665
666ofp_ipv6exthdr_flags_map = {
667 1: 'OFPIEH_NONEXT',
668 2: 'OFPIEH_ESP',
669 4: 'OFPIEH_AUTH',
670 8: 'OFPIEH_DEST',
671 16: 'OFPIEH_FRAG',
672 32: 'OFPIEH_ROUTER',
673 64: 'OFPIEH_HOP',
674 128: 'OFPIEH_UNREP',
675 256: 'OFPIEH_UNSEQ',
676}
677
678# Identifiers from group ofp_match_type
679OFPMT_STANDARD = 0
680OFPMT_OXM = 1
681
682ofp_match_type_map = {
683 0: 'OFPMT_STANDARD',
684 1: 'OFPMT_OXM',
685}
686
687# Identifiers from group ofp_meter
688OFPM_MAX = 4294901760
689OFPM_SLOWPATH = 4294967293
690OFPM_CONTROLLER = 4294967294
691OFPM_ALL = 4294967295
692
693ofp_meter_map = {
694 4294901760: 'OFPM_MAX',
695 4294967293: 'OFPM_SLOWPATH',
696 4294967294: 'OFPM_CONTROLLER',
697 4294967295: 'OFPM_ALL',
698}
699
700# Identifiers from group ofp_meter_band_type
701OFPMBT_DROP = 1
702OFPMBT_DSCP_REMARK = 2
703OFPMBT_EXPERIMENTER = 65535
704
705ofp_meter_band_type_map = {
706 1: 'OFPMBT_DROP',
707 2: 'OFPMBT_DSCP_REMARK',
708 65535: 'OFPMBT_EXPERIMENTER',
709}
710
711# Identifiers from group ofp_meter_flags
712OFPMF_KBPS = 1
713OFPMF_PKTPS = 2
714OFPMF_BURST = 4
715OFPMF_STATS = 8
716
717ofp_meter_flags_map = {
718 1: 'OFPMF_KBPS',
719 2: 'OFPMF_PKTPS',
720 4: 'OFPMF_BURST',
721 8: 'OFPMF_STATS',
722}
723
724# Identifiers from group ofp_meter_mod_command
725OFPMC_ADD = 0
726OFPMC_MODIFY = 1
727OFPMC_DELETE = 2
728
729ofp_meter_mod_command_map = {
730 0: 'OFPMC_ADD',
731 1: 'OFPMC_MODIFY',
732 2: 'OFPMC_DELETE',
733}
734
735# Identifiers from group ofp_meter_mod_failed_code
736OFPMMFC_UNKNOWN = 0
737OFPMMFC_METER_EXISTS = 1
738OFPMMFC_INVALID_METER = 2
739OFPMMFC_UNKNOWN_METER = 3
740OFPMMFC_BAD_COMMAND = 4
741OFPMMFC_BAD_FLAGS = 5
742OFPMMFC_BAD_RATE = 6
743OFPMMFC_BAD_BURST = 7
744OFPMMFC_BAD_BAND = 8
745OFPMMFC_BAD_BAND_VALUE = 9
746OFPMMFC_OUT_OF_METERS = 10
747OFPMMFC_OUT_OF_BANDS = 11
748
749ofp_meter_mod_failed_code_map = {
750 0: 'OFPMMFC_UNKNOWN',
751 1: 'OFPMMFC_METER_EXISTS',
752 2: 'OFPMMFC_INVALID_METER',
753 3: 'OFPMMFC_UNKNOWN_METER',
754 4: 'OFPMMFC_BAD_COMMAND',
755 5: 'OFPMMFC_BAD_FLAGS',
756 6: 'OFPMMFC_BAD_RATE',
757 7: 'OFPMMFC_BAD_BURST',
758 8: 'OFPMMFC_BAD_BAND',
759 9: 'OFPMMFC_BAD_BAND_VALUE',
760 10: 'OFPMMFC_OUT_OF_METERS',
761 11: 'OFPMMFC_OUT_OF_BANDS',
762}
763
764# Identifiers from group ofp_optical_port_features
765OFPOPF_RX_TUNE = 1
766OFPOPF_TX_TUNE = 2
767OFPOPF_TX_PWR = 4
768OFPOPF_USE_FREQ = 8
769
770ofp_optical_port_features_map = {
771 1: 'OFPOPF_RX_TUNE',
772 2: 'OFPOPF_TX_TUNE',
773 4: 'OFPOPF_TX_PWR',
774 8: 'OFPOPF_USE_FREQ',
775}
776
777# Identifiers from group ofp_oxm_class
778OFPXMC_NXM_0 = 0
779OFPXMC_NXM_1 = 1
780OFPXMC_OPENFLOW_BASIC = 32768
781OFPXMC_EXPERIMENTER = 65535
782
783ofp_oxm_class_map = {
784 0: 'OFPXMC_NXM_0',
785 1: 'OFPXMC_NXM_1',
786 32768: 'OFPXMC_OPENFLOW_BASIC',
787 65535: 'OFPXMC_EXPERIMENTER',
788}
789
790# Identifiers from group ofp_packet_in_reason
791OFPR_NO_MATCH = 0
792OFPR_ACTION = 1
793OFPR_INVALID_TTL = 2
794OFPR_ACTION_SET = 3
795OFPR_GROUP = 4
796OFPR_PACKET_OUT = 5
797OFPR_BSN_NEW_HOST = 128
798OFPR_BSN_STATION_MOVE = 129
799OFPR_BSN_BAD_VLAN = 130
800OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
801OFPR_BSN_NO_ROUTE = 132
802OFPR_BSN_ICMP_ECHO_REQUEST = 133
803OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
804OFPR_BSN_DEST_HOST_UNREACHABLE = 135
805OFPR_BSN_DEST_PORT_UNREACHABLE = 136
806OFPR_BSN_FRAGMENTATION_REQUIRED = 137
807OFPR_BSN_ARP = 139
808OFPR_BSN_DHCP = 140
809OFPR_BSN_DEBUG = 141
810OFPR_BSN_PACKET_OF_DEATH = 142
811
812ofp_packet_in_reason_map = {
813 0: 'OFPR_NO_MATCH',
814 1: 'OFPR_ACTION',
815 2: 'OFPR_INVALID_TTL',
816 3: 'OFPR_ACTION_SET',
817 4: 'OFPR_GROUP',
818 5: 'OFPR_PACKET_OUT',
819 128: 'OFPR_BSN_NEW_HOST',
820 129: 'OFPR_BSN_STATION_MOVE',
821 130: 'OFPR_BSN_BAD_VLAN',
822 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
823 132: 'OFPR_BSN_NO_ROUTE',
824 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
825 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
826 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
827 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
828 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
829 139: 'OFPR_BSN_ARP',
830 140: 'OFPR_BSN_DHCP',
831 141: 'OFPR_BSN_DEBUG',
832 142: 'OFPR_BSN_PACKET_OF_DEATH',
833}
834
835# Identifiers from group ofp_port
836OFPP_MAX = 4294967040
837OFPP_IN_PORT = 4294967288
838OFPP_TABLE = 4294967289
839OFPP_NORMAL = 4294967290
840OFPP_FLOOD = 4294967291
841OFPP_ALL = 4294967292
842OFPP_CONTROLLER = 4294967293
843OFPP_LOCAL = 4294967294
844OFPP_ANY = 4294967295
845
846ofp_port_map = {
847 4294967040: 'OFPP_MAX',
848 4294967288: 'OFPP_IN_PORT',
849 4294967289: 'OFPP_TABLE',
850 4294967290: 'OFPP_NORMAL',
851 4294967291: 'OFPP_FLOOD',
852 4294967292: 'OFPP_ALL',
853 4294967293: 'OFPP_CONTROLLER',
854 4294967294: 'OFPP_LOCAL',
855 4294967295: 'OFPP_ANY',
856}
857
858# Identifiers from group ofp_port_config
859OFPPC_PORT_DOWN = 1
860OFPPC_NO_RECV = 4
861OFPPC_NO_FWD = 32
862OFPPC_NO_PACKET_IN = 64
863OFPPC_BSN_MIRROR_DEST = 2147483648
864
865ofp_port_config_map = {
866 1: 'OFPPC_PORT_DOWN',
867 4: 'OFPPC_NO_RECV',
868 32: 'OFPPC_NO_FWD',
869 64: 'OFPPC_NO_PACKET_IN',
870 2147483648: 'OFPPC_BSN_MIRROR_DEST',
871}
872
873# Identifiers from group ofp_port_features
874OFPPF_10MB_HD = 1
875OFPPF_10MB_FD = 2
876OFPPF_100MB_HD = 4
877OFPPF_100MB_FD = 8
878OFPPF_1GB_HD = 16
879OFPPF_1GB_FD = 32
880OFPPF_10GB_FD = 64
881OFPPF_40GB_FD = 128
882OFPPF_100GB_FD = 256
883OFPPF_1TB_FD = 512
884OFPPF_OTHER = 1024
885OFPPF_COPPER = 2048
886OFPPF_FIBER = 4096
887OFPPF_AUTONEG = 8192
888OFPPF_PAUSE = 16384
889OFPPF_PAUSE_ASYM = 32768
890
891ofp_port_features_map = {
892 1: 'OFPPF_10MB_HD',
893 2: 'OFPPF_10MB_FD',
894 4: 'OFPPF_100MB_HD',
895 8: 'OFPPF_100MB_FD',
896 16: 'OFPPF_1GB_HD',
897 32: 'OFPPF_1GB_FD',
898 64: 'OFPPF_10GB_FD',
899 128: 'OFPPF_40GB_FD',
900 256: 'OFPPF_100GB_FD',
901 512: 'OFPPF_1TB_FD',
902 1024: 'OFPPF_OTHER',
903 2048: 'OFPPF_COPPER',
904 4096: 'OFPPF_FIBER',
905 8192: 'OFPPF_AUTONEG',
906 16384: 'OFPPF_PAUSE',
907 32768: 'OFPPF_PAUSE_ASYM',
908}
909
910# Identifiers from group ofp_port_mod_failed_code
911OFPPMFC_BAD_PORT = 0
912OFPPMFC_BAD_HW_ADDR = 1
913OFPPMFC_BAD_CONFIG = 2
914OFPPMFC_BAD_ADVERTISE = 3
915OFPPMFC_EPERM = 4
916
917ofp_port_mod_failed_code_map = {
918 0: 'OFPPMFC_BAD_PORT',
919 1: 'OFPPMFC_BAD_HW_ADDR',
920 2: 'OFPPMFC_BAD_CONFIG',
921 3: 'OFPPMFC_BAD_ADVERTISE',
922 4: 'OFPPMFC_EPERM',
923}
924
925# Identifiers from group ofp_port_reason
926OFPPR_ADD = 0
927OFPPR_DELETE = 1
928OFPPR_MODIFY = 2
929
930ofp_port_reason_map = {
931 0: 'OFPPR_ADD',
932 1: 'OFPPR_DELETE',
933 2: 'OFPPR_MODIFY',
934}
935
936# Identifiers from group ofp_port_state
937OFPPS_LINK_DOWN = 1
938OFPPS_BLOCKED = 2
939OFPPS_LIVE = 4
940
941ofp_port_state_map = {
942 1: 'OFPPS_LINK_DOWN',
943 2: 'OFPPS_BLOCKED',
944 4: 'OFPPS_LIVE',
945}
946
947# Identifiers from group ofp_port_stats_optical_flags
948OFPOSF_RX_TUNE = 1
949OFPOSF_TX_TUNE = 2
950OFPOSF_TX_PWR = 4
951OFPOSF_RX_PWR = 16
952OFPOSF_TX_BIAS = 32
953OFPOSF_TX_TEMP = 64
954
955ofp_port_stats_optical_flags_map = {
956 1: 'OFPOSF_RX_TUNE',
957 2: 'OFPOSF_TX_TUNE',
958 4: 'OFPOSF_TX_PWR',
959 16: 'OFPOSF_RX_PWR',
960 32: 'OFPOSF_TX_BIAS',
961 64: 'OFPOSF_TX_TEMP',
962}
963
964# Identifiers from group ofp_port_stats_prop_type
965OFPPSPT_ETHERNET = 0
966OFPPSPT_OPTICAL = 1
967OFPPSPT_EXPERIMENTER = 65535
968
969ofp_port_stats_prop_type_map = {
970 0: 'OFPPSPT_ETHERNET',
971 1: 'OFPPSPT_OPTICAL',
972 65535: 'OFPPSPT_EXPERIMENTER',
973}
974
975# Identifiers from group ofp_queue_op_failed_code
976OFPQOFC_BAD_PORT = 0
977OFPQOFC_BAD_QUEUE = 1
978OFPQOFC_EPERM = 2
979
980ofp_queue_op_failed_code_map = {
981 0: 'OFPQOFC_BAD_PORT',
982 1: 'OFPQOFC_BAD_QUEUE',
983 2: 'OFPQOFC_EPERM',
984}
985
986# Identifiers from group ofp_requestforward_reason
987OFPRFR_GROUP_MOD = 0
988OFPRFR_METER_MOD = 1
989
990ofp_requestforward_reason_map = {
991 0: 'OFPRFR_GROUP_MOD',
992 1: 'OFPRFR_METER_MOD',
993}
994
995# Identifiers from group ofp_role_request_failed_code
996OFPRRFC_STALE = 0
997OFPRRFC_UNSUP = 1
998OFPRRFC_BAD_ROLE = 2
999
1000ofp_role_request_failed_code_map = {
1001 0: 'OFPRRFC_STALE',
1002 1: 'OFPRRFC_UNSUP',
1003 2: 'OFPRRFC_BAD_ROLE',
1004}
1005
1006# Identifiers from group ofp_stats_reply_flags
1007OFPSF_REPLY_MORE = 1
1008
1009ofp_stats_reply_flags_map = {
1010 1: 'OFPSF_REPLY_MORE',
1011}
1012
1013# Identifiers from group ofp_stats_request_flags
1014OFPSF_REQ_MORE = 1
1015
1016ofp_stats_request_flags_map = {
1017 1: 'OFPSF_REQ_MORE',
1018}
1019
1020# Identifiers from group ofp_stats_type
1021OFPST_DESC = 0
1022OFPST_FLOW = 1
1023OFPST_AGGREGATE = 2
1024OFPST_TABLE = 3
1025OFPST_PORT = 4
1026OFPST_QUEUE = 5
1027OFPST_GROUP = 6
1028OFPST_GROUP_DESC = 7
1029OFPST_GROUP_FEATURES = 8
1030OFPST_METER = 9
1031OFPST_METER_CONFIG = 10
1032OFPST_METER_FEATURES = 11
1033OFPST_TABLE_FEATURES = 12
1034OFPST_PORT_DESC = 13
1035OFPMP_TABLE_DESC = 14
1036OFPMP_QUEUE_DESC = 15
1037OFPMP_FLOW_MONITOR = 16
1038OFPST_EXPERIMENTER = 65535
1039
1040ofp_stats_type_map = {
1041 0: 'OFPST_DESC',
1042 1: 'OFPST_FLOW',
1043 2: 'OFPST_AGGREGATE',
1044 3: 'OFPST_TABLE',
1045 4: 'OFPST_PORT',
1046 5: 'OFPST_QUEUE',
1047 6: 'OFPST_GROUP',
1048 7: 'OFPST_GROUP_DESC',
1049 8: 'OFPST_GROUP_FEATURES',
1050 9: 'OFPST_METER',
1051 10: 'OFPST_METER_CONFIG',
1052 11: 'OFPST_METER_FEATURES',
1053 12: 'OFPST_TABLE_FEATURES',
1054 13: 'OFPST_PORT_DESC',
1055 14: 'OFPMP_TABLE_DESC',
1056 15: 'OFPMP_QUEUE_DESC',
1057 16: 'OFPMP_FLOW_MONITOR',
1058 65535: 'OFPST_EXPERIMENTER',
1059}
1060
1061# Identifiers from group ofp_switch_config_failed_code
1062OFPSCFC_BAD_FLAGS = 0
1063OFPSCFC_BAD_LEN = 1
1064OFPSCFC_EPERM = 2
1065
1066ofp_switch_config_failed_code_map = {
1067 0: 'OFPSCFC_BAD_FLAGS',
1068 1: 'OFPSCFC_BAD_LEN',
1069 2: 'OFPSCFC_EPERM',
1070}
1071
1072# Identifiers from group ofp_table
1073OFPTT_MAX = 254
1074OFPTT_ALL = 255
1075
1076ofp_table_map = {
1077 254: 'OFPTT_MAX',
1078 255: 'OFPTT_ALL',
1079}
1080
1081# Identifiers from group ofp_table_config
1082OFPTC_DEPRECATED_MASK = 3
1083OFPTC_EVICTION = 4
1084OFPTC_VACANCY_EVENTS = 8
1085
1086ofp_table_config_map = {
1087 3: 'OFPTC_DEPRECATED_MASK',
1088 4: 'OFPTC_EVICTION',
1089 8: 'OFPTC_VACANCY_EVENTS',
1090}
1091
1092# Identifiers from group ofp_table_feature_prop_type
1093OFPTFPT_INSTRUCTIONS = 0
1094OFPTFPT_INSTRUCTIONS_MISS = 1
1095OFPTFPT_NEXT_TABLES = 2
1096OFPTFPT_NEXT_TABLES_MISS = 3
1097OFPTFPT_WRITE_ACTIONS = 4
1098OFPTFPT_WRITE_ACTIONS_MISS = 5
1099OFPTFPT_APPLY_ACTIONS = 6
1100OFPTFPT_APPLY_ACTIONS_MISS = 7
1101OFPTFPT_MATCH = 8
1102OFPTFPT_WILDCARDS = 10
1103OFPTFPT_WRITE_SETFIELD = 12
1104OFPTFPT_WRITE_SETFIELD_MISS = 13
1105OFPTFPT_APPLY_SETFIELD = 14
1106OFPTFPT_APPLY_SETFIELD_MISS = 15
1107OFPTFPT_TABLE_SYNC_FROM = 16
1108OFPTFPT_EXPERIMENTER = 65534
1109OFPTFPT_EXPERIMENTER_MISS = 65535
1110
1111ofp_table_feature_prop_type_map = {
1112 0: 'OFPTFPT_INSTRUCTIONS',
1113 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1114 2: 'OFPTFPT_NEXT_TABLES',
1115 3: 'OFPTFPT_NEXT_TABLES_MISS',
1116 4: 'OFPTFPT_WRITE_ACTIONS',
1117 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1118 6: 'OFPTFPT_APPLY_ACTIONS',
1119 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1120 8: 'OFPTFPT_MATCH',
1121 10: 'OFPTFPT_WILDCARDS',
1122 12: 'OFPTFPT_WRITE_SETFIELD',
1123 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1124 14: 'OFPTFPT_APPLY_SETFIELD',
1125 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1126 16: 'OFPTFPT_TABLE_SYNC_FROM',
1127 65534: 'OFPTFPT_EXPERIMENTER',
1128 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1129}
1130
1131# Identifiers from group ofp_table_features_failed_code
1132OFPTFFC_BAD_TABLE = 0
1133OFPTFFC_BAD_METADATA = 1
1134OFPTFFC_EPERM = 5
1135
1136ofp_table_features_failed_code_map = {
1137 0: 'OFPTFFC_BAD_TABLE',
1138 1: 'OFPTFFC_BAD_METADATA',
1139 5: 'OFPTFFC_EPERM',
1140}
1141
1142# Identifiers from group ofp_table_mod_failed_code
1143OFPTMFC_BAD_TABLE = 0
1144OFPTMFC_BAD_CONFIG = 1
1145OFPTMFC_EPERM = 2
1146
1147ofp_table_mod_failed_code_map = {
1148 0: 'OFPTMFC_BAD_TABLE',
1149 1: 'OFPTMFC_BAD_CONFIG',
1150 2: 'OFPTMFC_EPERM',
1151}
1152
1153# Identifiers from group ofp_table_mod_prop_eviction_flag
1154OFPTMPEF_OTHER = 1
1155OFPTMPEF_IMPORTANCE = 2
1156OFPTMPEF_LIFETIME = 4
1157
1158ofp_table_mod_prop_eviction_flag_map = {
1159 1: 'OFPTMPEF_OTHER',
1160 2: 'OFPTMPEF_IMPORTANCE',
1161 4: 'OFPTMPEF_LIFETIME',
1162}
1163
1164# Identifiers from group ofp_table_reason
1165OFPTR_VACANCY_DOWN = 3
1166OFPTR_VACANCY_UP = 4
1167
1168ofp_table_reason_map = {
1169 3: 'OFPTR_VACANCY_DOWN',
1170 4: 'OFPTR_VACANCY_UP',
1171}
1172
1173# Identifiers from group ofp_type
1174OFPT_HELLO = 0
1175OFPT_ERROR = 1
1176OFPT_ECHO_REQUEST = 2
1177OFPT_ECHO_REPLY = 3
1178OFPT_EXPERIMENTER = 4
1179OFPT_FEATURES_REQUEST = 5
1180OFPT_FEATURES_REPLY = 6
1181OFPT_GET_CONFIG_REQUEST = 7
1182OFPT_GET_CONFIG_REPLY = 8
1183OFPT_SET_CONFIG = 9
1184OFPT_PACKET_IN = 10
1185OFPT_FLOW_REMOVED = 11
1186OFPT_PORT_STATUS = 12
1187OFPT_PACKET_OUT = 13
1188OFPT_FLOW_MOD = 14
1189OFPT_GROUP_MOD = 15
1190OFPT_PORT_MOD = 16
1191OFPT_TABLE_MOD = 17
1192OFPT_STATS_REQUEST = 18
1193OFPT_STATS_REPLY = 19
1194OFPT_BARRIER_REQUEST = 20
1195OFPT_BARRIER_REPLY = 21
1196OFPT_ROLE_REQUEST = 24
1197OFPT_ROLE_REPLY = 25
1198OFPT_GET_ASYNC_REQUEST = 26
1199OFPT_GET_ASYNC_REPLY = 27
1200OFPT_SET_ASYNC = 28
1201OFPT_METER_MOD = 29
1202OFPT_ROLE_STATUS = 30
1203OFPT_TABLE_STATUS = 31
1204OFPT_REQUESTFORWARD = 32
1205OFPT_BUNDLE_CONTROL = 33
1206OFPT_BUNDLE_ADD_MESSAGE = 34
1207
1208ofp_type_map = {
1209 0: 'OFPT_HELLO',
1210 1: 'OFPT_ERROR',
1211 2: 'OFPT_ECHO_REQUEST',
1212 3: 'OFPT_ECHO_REPLY',
1213 4: 'OFPT_EXPERIMENTER',
1214 5: 'OFPT_FEATURES_REQUEST',
1215 6: 'OFPT_FEATURES_REPLY',
1216 7: 'OFPT_GET_CONFIG_REQUEST',
1217 8: 'OFPT_GET_CONFIG_REPLY',
1218 9: 'OFPT_SET_CONFIG',
1219 10: 'OFPT_PACKET_IN',
1220 11: 'OFPT_FLOW_REMOVED',
1221 12: 'OFPT_PORT_STATUS',
1222 13: 'OFPT_PACKET_OUT',
1223 14: 'OFPT_FLOW_MOD',
1224 15: 'OFPT_GROUP_MOD',
1225 16: 'OFPT_PORT_MOD',
1226 17: 'OFPT_TABLE_MOD',
1227 18: 'OFPT_STATS_REQUEST',
1228 19: 'OFPT_STATS_REPLY',
1229 20: 'OFPT_BARRIER_REQUEST',
1230 21: 'OFPT_BARRIER_REPLY',
1231 24: 'OFPT_ROLE_REQUEST',
1232 25: 'OFPT_ROLE_REPLY',
1233 26: 'OFPT_GET_ASYNC_REQUEST',
1234 27: 'OFPT_GET_ASYNC_REPLY',
1235 28: 'OFPT_SET_ASYNC',
1236 29: 'OFPT_METER_MOD',
1237 30: 'OFPT_ROLE_STATUS',
1238 31: 'OFPT_TABLE_STATUS',
1239 32: 'OFPT_REQUESTFORWARD',
1240 33: 'OFPT_BUNDLE_CONTROL',
1241 34: 'OFPT_BUNDLE_ADD_MESSAGE',
1242}
1243
1244# Identifiers from group ofp_vlan_id
1245OFPVID_NONE = 0
1246OFPVID_PRESENT = 4096
1247
1248ofp_vlan_id_map = {
1249 0: 'OFPVID_NONE',
1250 4096: 'OFPVID_PRESENT',
1251}
1252