blob: 08fcf2b20b9300a27566120efee38664bcb678de [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -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.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
6# Automatically generated by LOXI from template const.py
7# Do not modify
8
9OFP_VERSION = 4
10
11# Identifiers from group macro_definitions
Rich Lanec2ee4b82013-04-24 17:12:38 -070012OFP_MAX_TABLE_NAME_LEN = 32
Dan Talaycof6202252013-07-02 01:00:29 -070013OFP_MAX_PORT_NAME_LEN = 16
Rich Lane6f4978c2013-10-20 21:33:52 -070014OFP_TCP_PORT = 6653
15OFP_SSL_PORT = 6653
Dan Talaycof6202252013-07-02 01:00:29 -070016OFP_ETH_ALEN = 6
17OFP_DEFAULT_MISS_SEND_LEN = 128
18OFP_VLAN_NONE = 0
19OFP_FLOW_PERMANENT = 0
Rich Lanec2ee4b82013-04-24 17:12:38 -070020OFP_DEFAULT_PRIORITY = 32768
Rich Lanec2ee4b82013-04-24 17:12:38 -070021OFP_NO_BUFFER = 4294967295
Dan Talaycof6202252013-07-02 01:00:29 -070022DESC_STR_LEN = 256
23SERIAL_NUM_LEN = 32
24OFPQ_ALL = 4294967295
25OFPQ_MAX_RATE_UNCFG = 65535
26OFPQ_MIN_RATE_UNCFG = 65535
Rich Lanec2ee4b82013-04-24 17:12:38 -070027
Rich Lane7b0f2012013-11-22 14:15:26 -080028# Identifiers from group of_bsn_lacp_convergence_status_t
29LACP_SUCCESS = 0
30LACP_TIMEDOUT = 1
31LACP_OUT_OF_SYNC = 2
32
33of_bsn_lacp_convergence_status_t_map = {
34 0: 'LACP_SUCCESS',
35 1: 'LACP_TIMEDOUT',
36 2: 'LACP_OUT_OF_SYNC',
37}
38
Rich Lane6f4978c2013-10-20 21:33:52 -070039# Identifiers from group of_bsn_pdu_slot_num_t
40BSN_PDU_SLOT_NUM_ANY = 255
41
42of_bsn_pdu_slot_num_t_map = {
43 255: 'BSN_PDU_SLOT_NUM_ANY',
44}
45
Rich Lanec2ee4b82013-04-24 17:12:38 -070046# Identifiers from group ofp_action_type
47OFPAT_OUTPUT = 0
48OFPAT_COPY_TTL_OUT = 11
49OFPAT_COPY_TTL_IN = 12
50OFPAT_SET_MPLS_TTL = 15
51OFPAT_DEC_MPLS_TTL = 16
52OFPAT_PUSH_VLAN = 17
53OFPAT_POP_VLAN = 18
54OFPAT_PUSH_MPLS = 19
55OFPAT_POP_MPLS = 20
56OFPAT_SET_QUEUE = 21
57OFPAT_GROUP = 22
58OFPAT_SET_NW_TTL = 23
59OFPAT_DEC_NW_TTL = 24
60OFPAT_SET_FIELD = 25
61OFPAT_PUSH_PBB = 26
62OFPAT_POP_PBB = 27
63OFPAT_EXPERIMENTER = 65535
64
65ofp_action_type_map = {
66 0: 'OFPAT_OUTPUT',
67 11: 'OFPAT_COPY_TTL_OUT',
68 12: 'OFPAT_COPY_TTL_IN',
69 15: 'OFPAT_SET_MPLS_TTL',
70 16: 'OFPAT_DEC_MPLS_TTL',
71 17: 'OFPAT_PUSH_VLAN',
72 18: 'OFPAT_POP_VLAN',
73 19: 'OFPAT_PUSH_MPLS',
74 20: 'OFPAT_POP_MPLS',
75 21: 'OFPAT_SET_QUEUE',
76 22: 'OFPAT_GROUP',
77 23: 'OFPAT_SET_NW_TTL',
78 24: 'OFPAT_DEC_NW_TTL',
79 25: 'OFPAT_SET_FIELD',
80 26: 'OFPAT_PUSH_PBB',
81 27: 'OFPAT_POP_PBB',
82 65535: 'OFPAT_EXPERIMENTER',
83}
84
85# Identifiers from group ofp_bad_action_code
86OFPBAC_BAD_TYPE = 0
87OFPBAC_BAD_LEN = 1
88OFPBAC_BAD_EXPERIMENTER = 2
Rich Lane6f4978c2013-10-20 21:33:52 -070089OFPBAC_BAD_EXPERIMENTER_TYPE = 3
Rich Lanec2ee4b82013-04-24 17:12:38 -070090OFPBAC_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',
Rich Lane6f4978c2013-10-20 21:33:52 -0700107 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700108 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
Rich Lane6f4978c2013-10-20 21:33:52 -0700129OFPBIC_BAD_EXPERIMENTER_TYPE = 6
Rich Lanec2ee4b82013-04-24 17:12:38 -0700130OFPBIC_BAD_LEN = 7
131OFPBIC_EPERM = 8
132
133ofp_bad_instruction_code_map = {
134 0: 'OFPBIC_UNKNOWN_INST',
135 1: 'OFPBIC_UNSUP_INST',
136 2: 'OFPBIC_BAD_TABLE_ID',
137 3: 'OFPBIC_UNSUP_METADATA',
138 4: 'OFPBIC_UNSUP_METADATA_MASK',
139 5: 'OFPBIC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700140 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700141 7: 'OFPBIC_BAD_LEN',
142 8: 'OFPBIC_EPERM',
143}
144
145# Identifiers from group ofp_bad_match_code
146OFPBMC_BAD_TYPE = 0
147OFPBMC_BAD_LEN = 1
148OFPBMC_BAD_TAG = 2
149OFPBMC_BAD_DL_ADDR_MASK = 3
150OFPBMC_BAD_NW_ADDR_MASK = 4
151OFPBMC_BAD_WILDCARDS = 5
152OFPBMC_BAD_FIELD = 6
153OFPBMC_BAD_VALUE = 7
154OFPBMC_BAD_MASK = 8
155OFPBMC_BAD_PREREQ = 9
156OFPBMC_DUP_FIELD = 10
157OFPBMC_EPERM = 11
158
159ofp_bad_match_code_map = {
160 0: 'OFPBMC_BAD_TYPE',
161 1: 'OFPBMC_BAD_LEN',
162 2: 'OFPBMC_BAD_TAG',
163 3: 'OFPBMC_BAD_DL_ADDR_MASK',
164 4: 'OFPBMC_BAD_NW_ADDR_MASK',
165 5: 'OFPBMC_BAD_WILDCARDS',
166 6: 'OFPBMC_BAD_FIELD',
167 7: 'OFPBMC_BAD_VALUE',
168 8: 'OFPBMC_BAD_MASK',
169 9: 'OFPBMC_BAD_PREREQ',
170 10: 'OFPBMC_DUP_FIELD',
171 11: 'OFPBMC_EPERM',
172}
173
174# Identifiers from group ofp_bad_request_code
175OFPBRC_BAD_VERSION = 0
176OFPBRC_BAD_TYPE = 1
Rich Lane6f4978c2013-10-20 21:33:52 -0700177OFPBRC_BAD_STAT = 2
Rich Lanec2ee4b82013-04-24 17:12:38 -0700178OFPBRC_BAD_EXPERIMENTER = 3
Rich Lane6f4978c2013-10-20 21:33:52 -0700179OFPBRC_BAD_EXPERIMENTER_TYPE = 4
Rich Lanec2ee4b82013-04-24 17:12:38 -0700180OFPBRC_EPERM = 5
181OFPBRC_BAD_LEN = 6
182OFPBRC_BUFFER_EMPTY = 7
183OFPBRC_BUFFER_UNKNOWN = 8
184OFPBRC_BAD_TABLE_ID = 9
185OFPBRC_IS_SLAVE = 10
186OFPBRC_BAD_PORT = 11
187OFPBRC_BAD_PACKET = 12
188OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
189
190ofp_bad_request_code_map = {
191 0: 'OFPBRC_BAD_VERSION',
192 1: 'OFPBRC_BAD_TYPE',
Rich Lane6f4978c2013-10-20 21:33:52 -0700193 2: 'OFPBRC_BAD_STAT',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700194 3: 'OFPBRC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700195 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700196 5: 'OFPBRC_EPERM',
197 6: 'OFPBRC_BAD_LEN',
198 7: 'OFPBRC_BUFFER_EMPTY',
199 8: 'OFPBRC_BUFFER_UNKNOWN',
200 9: 'OFPBRC_BAD_TABLE_ID',
201 10: 'OFPBRC_IS_SLAVE',
202 11: 'OFPBRC_BAD_PORT',
203 12: 'OFPBRC_BAD_PACKET',
204 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
205}
206
Dan Talaycof6202252013-07-02 01:00:29 -0700207# Identifiers from group ofp_bsn_vport_q_in_q_untagged
208OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
209
210ofp_bsn_vport_q_in_q_untagged_map = {
211 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
212}
213
Rich Laned53156a2013-08-05 17:17:33 -0700214# Identifiers from group ofp_bsn_vport_status
215OF_BSN_VPORT_STATUS_OK = 0
216OF_BSN_VPORT_STATUS_FAILED = 1
217
218ofp_bsn_vport_status_map = {
219 0: 'OF_BSN_VPORT_STATUS_OK',
220 1: 'OF_BSN_VPORT_STATUS_FAILED',
221}
222
Rich Lanec2ee4b82013-04-24 17:12:38 -0700223# Identifiers from group ofp_capabilities
224OFPC_FLOW_STATS = 1
225OFPC_TABLE_STATS = 2
226OFPC_PORT_STATS = 4
227OFPC_GROUP_STATS = 8
228OFPC_IP_REASM = 32
229OFPC_QUEUE_STATS = 64
230OFPC_PORT_BLOCKED = 256
231
232ofp_capabilities_map = {
233 1: 'OFPC_FLOW_STATS',
234 2: 'OFPC_TABLE_STATS',
235 4: 'OFPC_PORT_STATS',
236 8: 'OFPC_GROUP_STATS',
237 32: 'OFPC_IP_REASM',
238 64: 'OFPC_QUEUE_STATS',
239 256: 'OFPC_PORT_BLOCKED',
240}
241
242# Identifiers from group ofp_config_flags
243OFPC_FRAG_NORMAL = 0
244OFPC_FRAG_DROP = 1
245OFPC_FRAG_REASM = 2
246OFPC_FRAG_MASK = 3
247
248ofp_config_flags_map = {
249 0: 'OFPC_FRAG_NORMAL',
250 1: 'OFPC_FRAG_DROP',
251 2: 'OFPC_FRAG_REASM',
252 3: 'OFPC_FRAG_MASK',
253}
254
255# Identifiers from group ofp_controller_max_len
256OFPCML_MAX = 65509
257OFPCML_NO_BUFFER = 65535
258
259ofp_controller_max_len_map = {
260 65509: 'OFPCML_MAX',
261 65535: 'OFPCML_NO_BUFFER',
262}
263
264# Identifiers from group ofp_controller_role
265OFPCR_ROLE_NOCHANGE = 0
266OFPCR_ROLE_EQUAL = 1
267OFPCR_ROLE_MASTER = 2
268OFPCR_ROLE_SLAVE = 3
269
270ofp_controller_role_map = {
271 0: 'OFPCR_ROLE_NOCHANGE',
272 1: 'OFPCR_ROLE_EQUAL',
273 2: 'OFPCR_ROLE_MASTER',
274 3: 'OFPCR_ROLE_SLAVE',
275}
276
277# Identifiers from group ofp_error_type
278OFPET_HELLO_FAILED = 0
279OFPET_BAD_REQUEST = 1
280OFPET_BAD_ACTION = 2
281OFPET_BAD_INSTRUCTION = 3
282OFPET_BAD_MATCH = 4
283OFPET_FLOW_MOD_FAILED = 5
284OFPET_GROUP_MOD_FAILED = 6
285OFPET_PORT_MOD_FAILED = 7
286OFPET_TABLE_MOD_FAILED = 8
287OFPET_QUEUE_OP_FAILED = 9
288OFPET_SWITCH_CONFIG_FAILED = 10
289OFPET_ROLE_REQUEST_FAILED = 11
290OFPET_METER_MOD_FAILED = 12
291OFPET_TABLE_FEATURES_FAILED = 13
292OFPET_EXPERIMENTER = 65535
293
294ofp_error_type_map = {
295 0: 'OFPET_HELLO_FAILED',
296 1: 'OFPET_BAD_REQUEST',
297 2: 'OFPET_BAD_ACTION',
298 3: 'OFPET_BAD_INSTRUCTION',
299 4: 'OFPET_BAD_MATCH',
300 5: 'OFPET_FLOW_MOD_FAILED',
301 6: 'OFPET_GROUP_MOD_FAILED',
302 7: 'OFPET_PORT_MOD_FAILED',
303 8: 'OFPET_TABLE_MOD_FAILED',
304 9: 'OFPET_QUEUE_OP_FAILED',
305 10: 'OFPET_SWITCH_CONFIG_FAILED',
306 11: 'OFPET_ROLE_REQUEST_FAILED',
307 12: 'OFPET_METER_MOD_FAILED',
308 13: 'OFPET_TABLE_FEATURES_FAILED',
309 65535: 'OFPET_EXPERIMENTER',
310}
311
312# Identifiers from group ofp_flow_mod_command
313OFPFC_ADD = 0
314OFPFC_MODIFY = 1
315OFPFC_MODIFY_STRICT = 2
316OFPFC_DELETE = 3
317OFPFC_DELETE_STRICT = 4
318
319ofp_flow_mod_command_map = {
320 0: 'OFPFC_ADD',
321 1: 'OFPFC_MODIFY',
322 2: 'OFPFC_MODIFY_STRICT',
323 3: 'OFPFC_DELETE',
324 4: 'OFPFC_DELETE_STRICT',
325}
326
327# Identifiers from group ofp_flow_mod_failed_code
328OFPFMFC_UNKNOWN = 0
329OFPFMFC_TABLE_FULL = 1
330OFPFMFC_BAD_TABLE_ID = 2
331OFPFMFC_OVERLAP = 3
332OFPFMFC_EPERM = 4
333OFPFMFC_BAD_TIMEOUT = 5
334OFPFMFC_BAD_COMMAND = 6
335OFPFMFC_BAD_FLAGS = 7
336
337ofp_flow_mod_failed_code_map = {
338 0: 'OFPFMFC_UNKNOWN',
339 1: 'OFPFMFC_TABLE_FULL',
340 2: 'OFPFMFC_BAD_TABLE_ID',
341 3: 'OFPFMFC_OVERLAP',
342 4: 'OFPFMFC_EPERM',
343 5: 'OFPFMFC_BAD_TIMEOUT',
344 6: 'OFPFMFC_BAD_COMMAND',
345 7: 'OFPFMFC_BAD_FLAGS',
346}
347
348# Identifiers from group ofp_flow_mod_flags
349OFPFF_SEND_FLOW_REM = 1
350OFPFF_CHECK_OVERLAP = 2
351OFPFF_RESET_COUNTS = 4
352OFPFF_NO_PKT_COUNTS = 8
353OFPFF_NO_BYT_COUNTS = 16
Rich Lane6f4978c2013-10-20 21:33:52 -0700354OFPFF_BSN_SEND_IDLE = 128
Rich Lanec2ee4b82013-04-24 17:12:38 -0700355
356ofp_flow_mod_flags_map = {
357 1: 'OFPFF_SEND_FLOW_REM',
358 2: 'OFPFF_CHECK_OVERLAP',
359 4: 'OFPFF_RESET_COUNTS',
360 8: 'OFPFF_NO_PKT_COUNTS',
361 16: 'OFPFF_NO_BYT_COUNTS',
Rich Lane6f4978c2013-10-20 21:33:52 -0700362 128: 'OFPFF_BSN_SEND_IDLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700363}
364
365# Identifiers from group ofp_flow_removed_reason
366OFPRR_IDLE_TIMEOUT = 0
367OFPRR_HARD_TIMEOUT = 1
368OFPRR_DELETE = 2
369OFPRR_GROUP_DELETE = 3
370
371ofp_flow_removed_reason_map = {
372 0: 'OFPRR_IDLE_TIMEOUT',
373 1: 'OFPRR_HARD_TIMEOUT',
374 2: 'OFPRR_DELETE',
375 3: 'OFPRR_GROUP_DELETE',
376}
377
378# Identifiers from group ofp_group
379OFPG_MAX = 4294967040
380OFPG_ALL = 4294967292
381OFPG_ANY = 4294967295
382
383ofp_group_map = {
384 4294967040: 'OFPG_MAX',
385 4294967292: 'OFPG_ALL',
386 4294967295: 'OFPG_ANY',
387}
388
389# Identifiers from group ofp_group_capabilities
390OFPGFC_SELECT_WEIGHT = 1
391OFPGFC_SELECT_LIVENESS = 2
392OFPGFC_CHAINING = 4
393OFPGFC_CHAINING_CHECKS = 8
394
395ofp_group_capabilities_map = {
396 1: 'OFPGFC_SELECT_WEIGHT',
397 2: 'OFPGFC_SELECT_LIVENESS',
398 4: 'OFPGFC_CHAINING',
399 8: 'OFPGFC_CHAINING_CHECKS',
400}
401
402# Identifiers from group ofp_group_mod_command
403OFPGC_ADD = 0
404OFPGC_MODIFY = 1
405OFPGC_DELETE = 2
406
407ofp_group_mod_command_map = {
408 0: 'OFPGC_ADD',
409 1: 'OFPGC_MODIFY',
410 2: 'OFPGC_DELETE',
411}
412
413# Identifiers from group ofp_group_mod_failed_code
414OFPGMFC_GROUP_EXISTS = 0
415OFPGMFC_INVALID_GROUP = 1
416OFPGMFC_WEIGHT_UNSUPPORTED = 2
417OFPGMFC_OUT_OF_GROUPS = 3
418OFPGMFC_OUT_OF_BUCKETS = 4
419OFPGMFC_CHAINING_UNSUPPORTED = 5
420OFPGMFC_WATCH_UNSUPPORTED = 6
421OFPGMFC_LOOP = 7
422OFPGMFC_UNKNOWN_GROUP = 8
423OFPGMFC_CHAINED_GROUP = 9
424OFPGMFC_BAD_TYPE = 10
425OFPGMFC_BAD_COMMAND = 11
426OFPGMFC_BAD_BUCKET = 12
427OFPGMFC_BAD_WATCH = 13
428OFPGMFC_EPERM = 14
429
430ofp_group_mod_failed_code_map = {
431 0: 'OFPGMFC_GROUP_EXISTS',
432 1: 'OFPGMFC_INVALID_GROUP',
433 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
434 3: 'OFPGMFC_OUT_OF_GROUPS',
435 4: 'OFPGMFC_OUT_OF_BUCKETS',
436 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
437 6: 'OFPGMFC_WATCH_UNSUPPORTED',
438 7: 'OFPGMFC_LOOP',
439 8: 'OFPGMFC_UNKNOWN_GROUP',
440 9: 'OFPGMFC_CHAINED_GROUP',
441 10: 'OFPGMFC_BAD_TYPE',
442 11: 'OFPGMFC_BAD_COMMAND',
443 12: 'OFPGMFC_BAD_BUCKET',
444 13: 'OFPGMFC_BAD_WATCH',
445 14: 'OFPGMFC_EPERM',
446}
447
448# Identifiers from group ofp_group_type
449OFPGT_ALL = 0
450OFPGT_SELECT = 1
451OFPGT_INDIRECT = 2
452OFPGT_FF = 3
453
454ofp_group_type_map = {
455 0: 'OFPGT_ALL',
456 1: 'OFPGT_SELECT',
457 2: 'OFPGT_INDIRECT',
458 3: 'OFPGT_FF',
459}
460
461# Identifiers from group ofp_hello_elem_type
462OFPHET_VERSIONBITMAP = 1
463
464ofp_hello_elem_type_map = {
465 1: 'OFPHET_VERSIONBITMAP',
466}
467
468# Identifiers from group ofp_hello_failed_code
469OFPHFC_INCOMPATIBLE = 0
470OFPHFC_EPERM = 1
471
472ofp_hello_failed_code_map = {
473 0: 'OFPHFC_INCOMPATIBLE',
474 1: 'OFPHFC_EPERM',
475}
476
477# Identifiers from group ofp_instruction_type
478OFPIT_GOTO_TABLE = 1
479OFPIT_WRITE_METADATA = 2
480OFPIT_WRITE_ACTIONS = 3
481OFPIT_APPLY_ACTIONS = 4
482OFPIT_CLEAR_ACTIONS = 5
483OFPIT_METER = 6
484OFPIT_EXPERIMENTER = 65535
485
486ofp_instruction_type_map = {
487 1: 'OFPIT_GOTO_TABLE',
488 2: 'OFPIT_WRITE_METADATA',
489 3: 'OFPIT_WRITE_ACTIONS',
490 4: 'OFPIT_APPLY_ACTIONS',
491 5: 'OFPIT_CLEAR_ACTIONS',
492 6: 'OFPIT_METER',
493 65535: 'OFPIT_EXPERIMENTER',
494}
495
496# Identifiers from group ofp_ipv6exthdr_flags
497OFPIEH_NONEXT = 1
498OFPIEH_ESP = 2
499OFPIEH_AUTH = 4
500OFPIEH_DEST = 8
501OFPIEH_FRAG = 16
502OFPIEH_ROUTER = 32
503OFPIEH_HOP = 64
504OFPIEH_UNREP = 128
505OFPIEH_UNSEQ = 256
506
507ofp_ipv6exthdr_flags_map = {
508 1: 'OFPIEH_NONEXT',
509 2: 'OFPIEH_ESP',
510 4: 'OFPIEH_AUTH',
511 8: 'OFPIEH_DEST',
512 16: 'OFPIEH_FRAG',
513 32: 'OFPIEH_ROUTER',
514 64: 'OFPIEH_HOP',
515 128: 'OFPIEH_UNREP',
516 256: 'OFPIEH_UNSEQ',
517}
518
519# Identifiers from group ofp_match_type
520OFPMT_STANDARD = 0
521OFPMT_OXM = 1
522
523ofp_match_type_map = {
524 0: 'OFPMT_STANDARD',
525 1: 'OFPMT_OXM',
526}
527
528# Identifiers from group ofp_meter
529OFPM_MAX = 4294901760
530OFPM_SLOWPATH = 4294967293
531OFPM_CONTROLLER = 4294967294
532OFPM_ALL = 4294967295
533
534ofp_meter_map = {
535 4294901760: 'OFPM_MAX',
536 4294967293: 'OFPM_SLOWPATH',
537 4294967294: 'OFPM_CONTROLLER',
538 4294967295: 'OFPM_ALL',
539}
540
541# Identifiers from group ofp_meter_band_type
542OFPMBT_DROP = 1
543OFPMBT_DSCP_REMARK = 2
544OFPMBT_EXPERIMENTER = 65535
545
546ofp_meter_band_type_map = {
547 1: 'OFPMBT_DROP',
548 2: 'OFPMBT_DSCP_REMARK',
549 65535: 'OFPMBT_EXPERIMENTER',
550}
551
552# Identifiers from group ofp_meter_flags
553OFPMF_KBPS = 1
554OFPMF_PKTPS = 2
555OFPMF_BURST = 4
556OFPMF_STATS = 8
557
558ofp_meter_flags_map = {
559 1: 'OFPMF_KBPS',
560 2: 'OFPMF_PKTPS',
561 4: 'OFPMF_BURST',
562 8: 'OFPMF_STATS',
563}
564
565# Identifiers from group ofp_meter_mod_command
566OFPMC_ADD = 0
567OFPMC_MODIFY = 1
568OFPMC_DELETE = 2
569
570ofp_meter_mod_command_map = {
571 0: 'OFPMC_ADD',
572 1: 'OFPMC_MODIFY',
573 2: 'OFPMC_DELETE',
574}
575
576# Identifiers from group ofp_meter_mod_failed_code
577OFPMMFC_UNKNOWN = 0
578OFPMMFC_METER_EXISTS = 1
579OFPMMFC_INVALID_METER = 2
580OFPMMFC_UNKNOWN_METER = 3
581OFPMMFC_BAD_COMMAND = 4
582OFPMMFC_BAD_FLAGS = 5
583OFPMMFC_BAD_RATE = 6
584OFPMMFC_BAD_BURST = 7
585OFPMMFC_BAD_BAND = 8
586OFPMMFC_BAD_BAND_VALUE = 9
587OFPMMFC_OUT_OF_METERS = 10
588OFPMMFC_OUT_OF_BANDS = 11
589
590ofp_meter_mod_failed_code_map = {
591 0: 'OFPMMFC_UNKNOWN',
592 1: 'OFPMMFC_METER_EXISTS',
593 2: 'OFPMMFC_INVALID_METER',
594 3: 'OFPMMFC_UNKNOWN_METER',
595 4: 'OFPMMFC_BAD_COMMAND',
596 5: 'OFPMMFC_BAD_FLAGS',
597 6: 'OFPMMFC_BAD_RATE',
598 7: 'OFPMMFC_BAD_BURST',
599 8: 'OFPMMFC_BAD_BAND',
600 9: 'OFPMMFC_BAD_BAND_VALUE',
601 10: 'OFPMMFC_OUT_OF_METERS',
602 11: 'OFPMMFC_OUT_OF_BANDS',
603}
604
Rich Lanec2ee4b82013-04-24 17:12:38 -0700605# Identifiers from group ofp_oxm_class
606OFPXMC_NXM_0 = 0
607OFPXMC_NXM_1 = 1
608OFPXMC_OPENFLOW_BASIC = 32768
609OFPXMC_EXPERIMENTER = 65535
610
611ofp_oxm_class_map = {
612 0: 'OFPXMC_NXM_0',
613 1: 'OFPXMC_NXM_1',
614 32768: 'OFPXMC_OPENFLOW_BASIC',
615 65535: 'OFPXMC_EXPERIMENTER',
616}
617
618# Identifiers from group ofp_packet_in_reason
619OFPR_NO_MATCH = 0
620OFPR_ACTION = 1
621OFPR_INVALID_TTL = 2
Rich Laned9e3f7b2013-11-04 11:40:43 -0800622OFPR_BSN_NEW_HOST = 128
623OFPR_BSN_STATION_MOVE = 129
624OFPR_BSN_BAD_VLAN = 130
625OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
Rich Lanec2ee4b82013-04-24 17:12:38 -0700626
627ofp_packet_in_reason_map = {
628 0: 'OFPR_NO_MATCH',
629 1: 'OFPR_ACTION',
630 2: 'OFPR_INVALID_TTL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800631 128: 'OFPR_BSN_NEW_HOST',
632 129: 'OFPR_BSN_STATION_MOVE',
633 130: 'OFPR_BSN_BAD_VLAN',
634 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700635}
636
637# Identifiers from group ofp_port
638OFPP_MAX = 4294967040
639OFPP_IN_PORT = 4294967288
640OFPP_TABLE = 4294967289
641OFPP_NORMAL = 4294967290
642OFPP_FLOOD = 4294967291
643OFPP_ALL = 4294967292
644OFPP_CONTROLLER = 4294967293
645OFPP_LOCAL = 4294967294
Rich Laned9e3f7b2013-11-04 11:40:43 -0800646OFPP_ANY = 4294967295
Rich Lanec2ee4b82013-04-24 17:12:38 -0700647
648ofp_port_map = {
649 4294967040: 'OFPP_MAX',
650 4294967288: 'OFPP_IN_PORT',
651 4294967289: 'OFPP_TABLE',
652 4294967290: 'OFPP_NORMAL',
653 4294967291: 'OFPP_FLOOD',
654 4294967292: 'OFPP_ALL',
655 4294967293: 'OFPP_CONTROLLER',
656 4294967294: 'OFPP_LOCAL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800657 4294967295: 'OFPP_ANY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700658}
659
660# Identifiers from group ofp_port_config
661OFPPC_PORT_DOWN = 1
662OFPPC_NO_RECV = 4
663OFPPC_NO_FWD = 32
664OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700665OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700666
667ofp_port_config_map = {
668 1: 'OFPPC_PORT_DOWN',
669 4: 'OFPPC_NO_RECV',
670 32: 'OFPPC_NO_FWD',
671 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700672 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700673}
674
675# Identifiers from group ofp_port_features
676OFPPF_10MB_HD = 1
677OFPPF_10MB_FD = 2
678OFPPF_100MB_HD = 4
679OFPPF_100MB_FD = 8
680OFPPF_1GB_HD = 16
681OFPPF_1GB_FD = 32
682OFPPF_10GB_FD = 64
683OFPPF_40GB_FD = 128
684OFPPF_100GB_FD = 256
685OFPPF_1TB_FD = 512
686OFPPF_OTHER = 1024
687OFPPF_COPPER = 2048
688OFPPF_FIBER = 4096
689OFPPF_AUTONEG = 8192
690OFPPF_PAUSE = 16384
691OFPPF_PAUSE_ASYM = 32768
692
693ofp_port_features_map = {
694 1: 'OFPPF_10MB_HD',
695 2: 'OFPPF_10MB_FD',
696 4: 'OFPPF_100MB_HD',
697 8: 'OFPPF_100MB_FD',
698 16: 'OFPPF_1GB_HD',
699 32: 'OFPPF_1GB_FD',
700 64: 'OFPPF_10GB_FD',
701 128: 'OFPPF_40GB_FD',
702 256: 'OFPPF_100GB_FD',
703 512: 'OFPPF_1TB_FD',
704 1024: 'OFPPF_OTHER',
705 2048: 'OFPPF_COPPER',
706 4096: 'OFPPF_FIBER',
707 8192: 'OFPPF_AUTONEG',
708 16384: 'OFPPF_PAUSE',
709 32768: 'OFPPF_PAUSE_ASYM',
710}
711
712# Identifiers from group ofp_port_mod_failed_code
713OFPPMFC_BAD_PORT = 0
714OFPPMFC_BAD_HW_ADDR = 1
715OFPPMFC_BAD_CONFIG = 2
716OFPPMFC_BAD_ADVERTISE = 3
717OFPPMFC_EPERM = 4
718
719ofp_port_mod_failed_code_map = {
720 0: 'OFPPMFC_BAD_PORT',
721 1: 'OFPPMFC_BAD_HW_ADDR',
722 2: 'OFPPMFC_BAD_CONFIG',
723 3: 'OFPPMFC_BAD_ADVERTISE',
724 4: 'OFPPMFC_EPERM',
725}
726
Rich Lanec2ee4b82013-04-24 17:12:38 -0700727# Identifiers from group ofp_port_reason
728OFPPR_ADD = 0
729OFPPR_DELETE = 1
730OFPPR_MODIFY = 2
731
732ofp_port_reason_map = {
733 0: 'OFPPR_ADD',
734 1: 'OFPPR_DELETE',
735 2: 'OFPPR_MODIFY',
736}
737
738# Identifiers from group ofp_port_state
739OFPPS_LINK_DOWN = 1
740OFPPS_BLOCKED = 2
741OFPPS_LIVE = 4
742
743ofp_port_state_map = {
744 1: 'OFPPS_LINK_DOWN',
745 2: 'OFPPS_BLOCKED',
746 4: 'OFPPS_LIVE',
747}
748
749# Identifiers from group ofp_queue_op_failed_code
750OFPQOFC_BAD_PORT = 0
751OFPQOFC_BAD_QUEUE = 1
752OFPQOFC_EPERM = 2
753
754ofp_queue_op_failed_code_map = {
755 0: 'OFPQOFC_BAD_PORT',
756 1: 'OFPQOFC_BAD_QUEUE',
757 2: 'OFPQOFC_EPERM',
758}
759
760# Identifiers from group ofp_queue_properties
761OFPQT_MIN_RATE = 1
762OFPQT_MAX_RATE = 2
763OFPQT_EXPERIMENTER = 65535
764
765ofp_queue_properties_map = {
766 1: 'OFPQT_MIN_RATE',
767 2: 'OFPQT_MAX_RATE',
768 65535: 'OFPQT_EXPERIMENTER',
769}
770
771# Identifiers from group ofp_role_request_failed_code
772OFPRRFC_STALE = 0
773OFPRRFC_UNSUP = 1
774OFPRRFC_BAD_ROLE = 2
775
776ofp_role_request_failed_code_map = {
777 0: 'OFPRRFC_STALE',
778 1: 'OFPRRFC_UNSUP',
779 2: 'OFPRRFC_BAD_ROLE',
780}
781
Rich Lane6f4978c2013-10-20 21:33:52 -0700782# Identifiers from group ofp_stats_reply_flags
783OFPSF_REPLY_MORE = 1
784
785ofp_stats_reply_flags_map = {
786 1: 'OFPSF_REPLY_MORE',
787}
788
789# Identifiers from group ofp_stats_request_flags
790OFPSF_REQ_MORE = 1
791
792ofp_stats_request_flags_map = {
793 1: 'OFPSF_REQ_MORE',
794}
795
796# Identifiers from group ofp_stats_type
797OFPST_DESC = 0
798OFPST_FLOW = 1
799OFPST_AGGREGATE = 2
800OFPST_TABLE = 3
801OFPST_PORT = 4
802OFPST_QUEUE = 5
803OFPST_GROUP = 6
804OFPST_GROUP_DESC = 7
805OFPST_GROUP_FEATURES = 8
806OFPST_METER = 9
807OFPST_METER_CONFIG = 10
808OFPST_METER_FEATURES = 11
809OFPST_TABLE_FEATURES = 12
810OFPST_PORT_DESC = 13
811OFPST_EXPERIMENTER = 65535
812
813ofp_stats_type_map = {
814 0: 'OFPST_DESC',
815 1: 'OFPST_FLOW',
816 2: 'OFPST_AGGREGATE',
817 3: 'OFPST_TABLE',
818 4: 'OFPST_PORT',
819 5: 'OFPST_QUEUE',
820 6: 'OFPST_GROUP',
821 7: 'OFPST_GROUP_DESC',
822 8: 'OFPST_GROUP_FEATURES',
823 9: 'OFPST_METER',
824 10: 'OFPST_METER_CONFIG',
825 11: 'OFPST_METER_FEATURES',
826 12: 'OFPST_TABLE_FEATURES',
827 13: 'OFPST_PORT_DESC',
828 65535: 'OFPST_EXPERIMENTER',
829}
830
Rich Lanec2ee4b82013-04-24 17:12:38 -0700831# Identifiers from group ofp_switch_config_failed_code
832OFPSCFC_BAD_FLAGS = 0
833OFPSCFC_BAD_LEN = 1
834OFPSCFC_EPERM = 2
835
836ofp_switch_config_failed_code_map = {
837 0: 'OFPSCFC_BAD_FLAGS',
838 1: 'OFPSCFC_BAD_LEN',
839 2: 'OFPSCFC_EPERM',
840}
841
842# Identifiers from group ofp_table
843OFPTT_MAX = 254
844OFPTT_ALL = 255
845
846ofp_table_map = {
847 254: 'OFPTT_MAX',
848 255: 'OFPTT_ALL',
849}
850
851# Identifiers from group ofp_table_config
852OFPTC_DEPRECATED_MASK = 3
853
854ofp_table_config_map = {
855 3: 'OFPTC_DEPRECATED_MASK',
856}
857
858# Identifiers from group ofp_table_feature_prop_type
859OFPTFPT_INSTRUCTIONS = 0
860OFPTFPT_INSTRUCTIONS_MISS = 1
861OFPTFPT_NEXT_TABLES = 2
862OFPTFPT_NEXT_TABLES_MISS = 3
863OFPTFPT_WRITE_ACTIONS = 4
864OFPTFPT_WRITE_ACTIONS_MISS = 5
865OFPTFPT_APPLY_ACTIONS = 6
866OFPTFPT_APPLY_ACTIONS_MISS = 7
867OFPTFPT_MATCH = 8
868OFPTFPT_WILDCARDS = 10
869OFPTFPT_WRITE_SETFIELD = 12
870OFPTFPT_WRITE_SETFIELD_MISS = 13
871OFPTFPT_APPLY_SETFIELD = 14
872OFPTFPT_APPLY_SETFIELD_MISS = 15
873OFPTFPT_EXPERIMENTER = 65534
874OFPTFPT_EXPERIMENTER_MISS = 65535
875
876ofp_table_feature_prop_type_map = {
877 0: 'OFPTFPT_INSTRUCTIONS',
878 1: 'OFPTFPT_INSTRUCTIONS_MISS',
879 2: 'OFPTFPT_NEXT_TABLES',
880 3: 'OFPTFPT_NEXT_TABLES_MISS',
881 4: 'OFPTFPT_WRITE_ACTIONS',
882 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
883 6: 'OFPTFPT_APPLY_ACTIONS',
884 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
885 8: 'OFPTFPT_MATCH',
886 10: 'OFPTFPT_WILDCARDS',
887 12: 'OFPTFPT_WRITE_SETFIELD',
888 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
889 14: 'OFPTFPT_APPLY_SETFIELD',
890 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
891 65534: 'OFPTFPT_EXPERIMENTER',
892 65535: 'OFPTFPT_EXPERIMENTER_MISS',
893}
894
895# Identifiers from group ofp_table_features_failed_code
896OFPTFFC_BAD_TABLE = 0
897OFPTFFC_BAD_METADATA = 1
898OFPTFFC_BAD_TYPE = 2
899OFPTFFC_BAD_LEN = 3
900OFPTFFC_BAD_ARGUMENT = 4
901OFPTFFC_EPERM = 5
902
903ofp_table_features_failed_code_map = {
904 0: 'OFPTFFC_BAD_TABLE',
905 1: 'OFPTFFC_BAD_METADATA',
906 2: 'OFPTFFC_BAD_TYPE',
907 3: 'OFPTFFC_BAD_LEN',
908 4: 'OFPTFFC_BAD_ARGUMENT',
909 5: 'OFPTFFC_EPERM',
910}
911
912# Identifiers from group ofp_table_mod_failed_code
913OFPTMFC_BAD_TABLE = 0
914OFPTMFC_BAD_CONFIG = 1
915OFPTMFC_EPERM = 2
916
917ofp_table_mod_failed_code_map = {
918 0: 'OFPTMFC_BAD_TABLE',
919 1: 'OFPTMFC_BAD_CONFIG',
920 2: 'OFPTMFC_EPERM',
921}
922
923# Identifiers from group ofp_type
924OFPT_HELLO = 0
925OFPT_ERROR = 1
926OFPT_ECHO_REQUEST = 2
927OFPT_ECHO_REPLY = 3
928OFPT_EXPERIMENTER = 4
929OFPT_FEATURES_REQUEST = 5
930OFPT_FEATURES_REPLY = 6
931OFPT_GET_CONFIG_REQUEST = 7
932OFPT_GET_CONFIG_REPLY = 8
933OFPT_SET_CONFIG = 9
934OFPT_PACKET_IN = 10
935OFPT_FLOW_REMOVED = 11
936OFPT_PORT_STATUS = 12
937OFPT_PACKET_OUT = 13
938OFPT_FLOW_MOD = 14
939OFPT_GROUP_MOD = 15
940OFPT_PORT_MOD = 16
941OFPT_TABLE_MOD = 17
Rich Lane6f4978c2013-10-20 21:33:52 -0700942OFPT_STATS_REQUEST = 18
943OFPT_STATS_REPLY = 19
Rich Lanec2ee4b82013-04-24 17:12:38 -0700944OFPT_BARRIER_REQUEST = 20
945OFPT_BARRIER_REPLY = 21
946OFPT_QUEUE_GET_CONFIG_REQUEST = 22
947OFPT_QUEUE_GET_CONFIG_REPLY = 23
948OFPT_ROLE_REQUEST = 24
949OFPT_ROLE_REPLY = 25
950OFPT_GET_ASYNC_REQUEST = 26
951OFPT_GET_ASYNC_REPLY = 27
952OFPT_SET_ASYNC = 28
953OFPT_METER_MOD = 29
954
955ofp_type_map = {
956 0: 'OFPT_HELLO',
957 1: 'OFPT_ERROR',
958 2: 'OFPT_ECHO_REQUEST',
959 3: 'OFPT_ECHO_REPLY',
960 4: 'OFPT_EXPERIMENTER',
961 5: 'OFPT_FEATURES_REQUEST',
962 6: 'OFPT_FEATURES_REPLY',
963 7: 'OFPT_GET_CONFIG_REQUEST',
964 8: 'OFPT_GET_CONFIG_REPLY',
965 9: 'OFPT_SET_CONFIG',
966 10: 'OFPT_PACKET_IN',
967 11: 'OFPT_FLOW_REMOVED',
968 12: 'OFPT_PORT_STATUS',
969 13: 'OFPT_PACKET_OUT',
970 14: 'OFPT_FLOW_MOD',
971 15: 'OFPT_GROUP_MOD',
972 16: 'OFPT_PORT_MOD',
973 17: 'OFPT_TABLE_MOD',
Rich Lane6f4978c2013-10-20 21:33:52 -0700974 18: 'OFPT_STATS_REQUEST',
975 19: 'OFPT_STATS_REPLY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700976 20: 'OFPT_BARRIER_REQUEST',
977 21: 'OFPT_BARRIER_REPLY',
978 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
979 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
980 24: 'OFPT_ROLE_REQUEST',
981 25: 'OFPT_ROLE_REPLY',
982 26: 'OFPT_GET_ASYNC_REQUEST',
983 27: 'OFPT_GET_ASYNC_REPLY',
984 28: 'OFPT_SET_ASYNC',
985 29: 'OFPT_METER_MOD',
986}
987
988# Identifiers from group ofp_vlan_id
989OFPVID_NONE = 0
990OFPVID_PRESENT = 4096
991
992ofp_vlan_id_map = {
993 0: 'OFPVID_NONE',
994 4096: 'OFPVID_PRESENT',
995}
996