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