blob: 6d4902a01ffee88a40a974e37c374a7fc1db75e2 [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
611
612ofp_packet_in_reason_map = {
613 0: 'OFPR_NO_MATCH',
614 1: 'OFPR_ACTION',
615 2: 'OFPR_INVALID_TTL',
616}
617
618# Identifiers from group ofp_port
619OFPP_MAX = 4294967040
620OFPP_IN_PORT = 4294967288
621OFPP_TABLE = 4294967289
622OFPP_NORMAL = 4294967290
623OFPP_FLOOD = 4294967291
624OFPP_ALL = 4294967292
625OFPP_CONTROLLER = 4294967293
626OFPP_LOCAL = 4294967294
627
628ofp_port_map = {
629 4294967040: 'OFPP_MAX',
630 4294967288: 'OFPP_IN_PORT',
631 4294967289: 'OFPP_TABLE',
632 4294967290: 'OFPP_NORMAL',
633 4294967291: 'OFPP_FLOOD',
634 4294967292: 'OFPP_ALL',
635 4294967293: 'OFPP_CONTROLLER',
636 4294967294: 'OFPP_LOCAL',
637}
638
639# Identifiers from group ofp_port_config
640OFPPC_PORT_DOWN = 1
641OFPPC_NO_RECV = 4
642OFPPC_NO_FWD = 32
643OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700644OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700645
646ofp_port_config_map = {
647 1: 'OFPPC_PORT_DOWN',
648 4: 'OFPPC_NO_RECV',
649 32: 'OFPPC_NO_FWD',
650 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700651 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700652}
653
654# Identifiers from group ofp_port_features
655OFPPF_10MB_HD = 1
656OFPPF_10MB_FD = 2
657OFPPF_100MB_HD = 4
658OFPPF_100MB_FD = 8
659OFPPF_1GB_HD = 16
660OFPPF_1GB_FD = 32
661OFPPF_10GB_FD = 64
662OFPPF_40GB_FD = 128
663OFPPF_100GB_FD = 256
664OFPPF_1TB_FD = 512
665OFPPF_OTHER = 1024
666OFPPF_COPPER = 2048
667OFPPF_FIBER = 4096
668OFPPF_AUTONEG = 8192
669OFPPF_PAUSE = 16384
670OFPPF_PAUSE_ASYM = 32768
671
672ofp_port_features_map = {
673 1: 'OFPPF_10MB_HD',
674 2: 'OFPPF_10MB_FD',
675 4: 'OFPPF_100MB_HD',
676 8: 'OFPPF_100MB_FD',
677 16: 'OFPPF_1GB_HD',
678 32: 'OFPPF_1GB_FD',
679 64: 'OFPPF_10GB_FD',
680 128: 'OFPPF_40GB_FD',
681 256: 'OFPPF_100GB_FD',
682 512: 'OFPPF_1TB_FD',
683 1024: 'OFPPF_OTHER',
684 2048: 'OFPPF_COPPER',
685 4096: 'OFPPF_FIBER',
686 8192: 'OFPPF_AUTONEG',
687 16384: 'OFPPF_PAUSE',
688 32768: 'OFPPF_PAUSE_ASYM',
689}
690
691# Identifiers from group ofp_port_mod_failed_code
692OFPPMFC_BAD_PORT = 0
693OFPPMFC_BAD_HW_ADDR = 1
694OFPPMFC_BAD_CONFIG = 2
695OFPPMFC_BAD_ADVERTISE = 3
696OFPPMFC_EPERM = 4
697
698ofp_port_mod_failed_code_map = {
699 0: 'OFPPMFC_BAD_PORT',
700 1: 'OFPPMFC_BAD_HW_ADDR',
701 2: 'OFPPMFC_BAD_CONFIG',
702 3: 'OFPPMFC_BAD_ADVERTISE',
703 4: 'OFPPMFC_EPERM',
704}
705
706# Identifiers from group ofp_port_no
707OFPP_ANY = 4294967295
708
709ofp_port_no_map = {
710 4294967295: 'OFPP_ANY',
711}
712
713# Identifiers from group ofp_port_reason
714OFPPR_ADD = 0
715OFPPR_DELETE = 1
716OFPPR_MODIFY = 2
717
718ofp_port_reason_map = {
719 0: 'OFPPR_ADD',
720 1: 'OFPPR_DELETE',
721 2: 'OFPPR_MODIFY',
722}
723
724# Identifiers from group ofp_port_state
725OFPPS_LINK_DOWN = 1
726OFPPS_BLOCKED = 2
727OFPPS_LIVE = 4
728
729ofp_port_state_map = {
730 1: 'OFPPS_LINK_DOWN',
731 2: 'OFPPS_BLOCKED',
732 4: 'OFPPS_LIVE',
733}
734
735# Identifiers from group ofp_queue_op_failed_code
736OFPQOFC_BAD_PORT = 0
737OFPQOFC_BAD_QUEUE = 1
738OFPQOFC_EPERM = 2
739
740ofp_queue_op_failed_code_map = {
741 0: 'OFPQOFC_BAD_PORT',
742 1: 'OFPQOFC_BAD_QUEUE',
743 2: 'OFPQOFC_EPERM',
744}
745
746# Identifiers from group ofp_queue_properties
747OFPQT_MIN_RATE = 1
748OFPQT_MAX_RATE = 2
749OFPQT_EXPERIMENTER = 65535
750
751ofp_queue_properties_map = {
752 1: 'OFPQT_MIN_RATE',
753 2: 'OFPQT_MAX_RATE',
754 65535: 'OFPQT_EXPERIMENTER',
755}
756
757# Identifiers from group ofp_role_request_failed_code
758OFPRRFC_STALE = 0
759OFPRRFC_UNSUP = 1
760OFPRRFC_BAD_ROLE = 2
761
762ofp_role_request_failed_code_map = {
763 0: 'OFPRRFC_STALE',
764 1: 'OFPRRFC_UNSUP',
765 2: 'OFPRRFC_BAD_ROLE',
766}
767
Rich Lane6f4978c2013-10-20 21:33:52 -0700768# Identifiers from group ofp_stats_reply_flags
769OFPSF_REPLY_MORE = 1
770
771ofp_stats_reply_flags_map = {
772 1: 'OFPSF_REPLY_MORE',
773}
774
775# Identifiers from group ofp_stats_request_flags
776OFPSF_REQ_MORE = 1
777
778ofp_stats_request_flags_map = {
779 1: 'OFPSF_REQ_MORE',
780}
781
782# Identifiers from group ofp_stats_type
783OFPST_DESC = 0
784OFPST_FLOW = 1
785OFPST_AGGREGATE = 2
786OFPST_TABLE = 3
787OFPST_PORT = 4
788OFPST_QUEUE = 5
789OFPST_GROUP = 6
790OFPST_GROUP_DESC = 7
791OFPST_GROUP_FEATURES = 8
792OFPST_METER = 9
793OFPST_METER_CONFIG = 10
794OFPST_METER_FEATURES = 11
795OFPST_TABLE_FEATURES = 12
796OFPST_PORT_DESC = 13
797OFPST_EXPERIMENTER = 65535
798
799ofp_stats_type_map = {
800 0: 'OFPST_DESC',
801 1: 'OFPST_FLOW',
802 2: 'OFPST_AGGREGATE',
803 3: 'OFPST_TABLE',
804 4: 'OFPST_PORT',
805 5: 'OFPST_QUEUE',
806 6: 'OFPST_GROUP',
807 7: 'OFPST_GROUP_DESC',
808 8: 'OFPST_GROUP_FEATURES',
809 9: 'OFPST_METER',
810 10: 'OFPST_METER_CONFIG',
811 11: 'OFPST_METER_FEATURES',
812 12: 'OFPST_TABLE_FEATURES',
813 13: 'OFPST_PORT_DESC',
814 65535: 'OFPST_EXPERIMENTER',
815}
816
Rich Lanec2ee4b82013-04-24 17:12:38 -0700817# Identifiers from group ofp_switch_config_failed_code
818OFPSCFC_BAD_FLAGS = 0
819OFPSCFC_BAD_LEN = 1
820OFPSCFC_EPERM = 2
821
822ofp_switch_config_failed_code_map = {
823 0: 'OFPSCFC_BAD_FLAGS',
824 1: 'OFPSCFC_BAD_LEN',
825 2: 'OFPSCFC_EPERM',
826}
827
828# Identifiers from group ofp_table
829OFPTT_MAX = 254
830OFPTT_ALL = 255
831
832ofp_table_map = {
833 254: 'OFPTT_MAX',
834 255: 'OFPTT_ALL',
835}
836
837# Identifiers from group ofp_table_config
838OFPTC_DEPRECATED_MASK = 3
839
840ofp_table_config_map = {
841 3: 'OFPTC_DEPRECATED_MASK',
842}
843
844# Identifiers from group ofp_table_feature_prop_type
845OFPTFPT_INSTRUCTIONS = 0
846OFPTFPT_INSTRUCTIONS_MISS = 1
847OFPTFPT_NEXT_TABLES = 2
848OFPTFPT_NEXT_TABLES_MISS = 3
849OFPTFPT_WRITE_ACTIONS = 4
850OFPTFPT_WRITE_ACTIONS_MISS = 5
851OFPTFPT_APPLY_ACTIONS = 6
852OFPTFPT_APPLY_ACTIONS_MISS = 7
853OFPTFPT_MATCH = 8
854OFPTFPT_WILDCARDS = 10
855OFPTFPT_WRITE_SETFIELD = 12
856OFPTFPT_WRITE_SETFIELD_MISS = 13
857OFPTFPT_APPLY_SETFIELD = 14
858OFPTFPT_APPLY_SETFIELD_MISS = 15
859OFPTFPT_EXPERIMENTER = 65534
860OFPTFPT_EXPERIMENTER_MISS = 65535
861
862ofp_table_feature_prop_type_map = {
863 0: 'OFPTFPT_INSTRUCTIONS',
864 1: 'OFPTFPT_INSTRUCTIONS_MISS',
865 2: 'OFPTFPT_NEXT_TABLES',
866 3: 'OFPTFPT_NEXT_TABLES_MISS',
867 4: 'OFPTFPT_WRITE_ACTIONS',
868 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
869 6: 'OFPTFPT_APPLY_ACTIONS',
870 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
871 8: 'OFPTFPT_MATCH',
872 10: 'OFPTFPT_WILDCARDS',
873 12: 'OFPTFPT_WRITE_SETFIELD',
874 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
875 14: 'OFPTFPT_APPLY_SETFIELD',
876 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
877 65534: 'OFPTFPT_EXPERIMENTER',
878 65535: 'OFPTFPT_EXPERIMENTER_MISS',
879}
880
881# Identifiers from group ofp_table_features_failed_code
882OFPTFFC_BAD_TABLE = 0
883OFPTFFC_BAD_METADATA = 1
884OFPTFFC_BAD_TYPE = 2
885OFPTFFC_BAD_LEN = 3
886OFPTFFC_BAD_ARGUMENT = 4
887OFPTFFC_EPERM = 5
888
889ofp_table_features_failed_code_map = {
890 0: 'OFPTFFC_BAD_TABLE',
891 1: 'OFPTFFC_BAD_METADATA',
892 2: 'OFPTFFC_BAD_TYPE',
893 3: 'OFPTFFC_BAD_LEN',
894 4: 'OFPTFFC_BAD_ARGUMENT',
895 5: 'OFPTFFC_EPERM',
896}
897
898# Identifiers from group ofp_table_mod_failed_code
899OFPTMFC_BAD_TABLE = 0
900OFPTMFC_BAD_CONFIG = 1
901OFPTMFC_EPERM = 2
902
903ofp_table_mod_failed_code_map = {
904 0: 'OFPTMFC_BAD_TABLE',
905 1: 'OFPTMFC_BAD_CONFIG',
906 2: 'OFPTMFC_EPERM',
907}
908
909# Identifiers from group ofp_type
910OFPT_HELLO = 0
911OFPT_ERROR = 1
912OFPT_ECHO_REQUEST = 2
913OFPT_ECHO_REPLY = 3
914OFPT_EXPERIMENTER = 4
915OFPT_FEATURES_REQUEST = 5
916OFPT_FEATURES_REPLY = 6
917OFPT_GET_CONFIG_REQUEST = 7
918OFPT_GET_CONFIG_REPLY = 8
919OFPT_SET_CONFIG = 9
920OFPT_PACKET_IN = 10
921OFPT_FLOW_REMOVED = 11
922OFPT_PORT_STATUS = 12
923OFPT_PACKET_OUT = 13
924OFPT_FLOW_MOD = 14
925OFPT_GROUP_MOD = 15
926OFPT_PORT_MOD = 16
927OFPT_TABLE_MOD = 17
Rich Lane6f4978c2013-10-20 21:33:52 -0700928OFPT_STATS_REQUEST = 18
929OFPT_STATS_REPLY = 19
Rich Lanec2ee4b82013-04-24 17:12:38 -0700930OFPT_BARRIER_REQUEST = 20
931OFPT_BARRIER_REPLY = 21
932OFPT_QUEUE_GET_CONFIG_REQUEST = 22
933OFPT_QUEUE_GET_CONFIG_REPLY = 23
934OFPT_ROLE_REQUEST = 24
935OFPT_ROLE_REPLY = 25
936OFPT_GET_ASYNC_REQUEST = 26
937OFPT_GET_ASYNC_REPLY = 27
938OFPT_SET_ASYNC = 28
939OFPT_METER_MOD = 29
940
941ofp_type_map = {
942 0: 'OFPT_HELLO',
943 1: 'OFPT_ERROR',
944 2: 'OFPT_ECHO_REQUEST',
945 3: 'OFPT_ECHO_REPLY',
946 4: 'OFPT_EXPERIMENTER',
947 5: 'OFPT_FEATURES_REQUEST',
948 6: 'OFPT_FEATURES_REPLY',
949 7: 'OFPT_GET_CONFIG_REQUEST',
950 8: 'OFPT_GET_CONFIG_REPLY',
951 9: 'OFPT_SET_CONFIG',
952 10: 'OFPT_PACKET_IN',
953 11: 'OFPT_FLOW_REMOVED',
954 12: 'OFPT_PORT_STATUS',
955 13: 'OFPT_PACKET_OUT',
956 14: 'OFPT_FLOW_MOD',
957 15: 'OFPT_GROUP_MOD',
958 16: 'OFPT_PORT_MOD',
959 17: 'OFPT_TABLE_MOD',
Rich Lane6f4978c2013-10-20 21:33:52 -0700960 18: 'OFPT_STATS_REQUEST',
961 19: 'OFPT_STATS_REPLY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700962 20: 'OFPT_BARRIER_REQUEST',
963 21: 'OFPT_BARRIER_REPLY',
964 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
965 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
966 24: 'OFPT_ROLE_REQUEST',
967 25: 'OFPT_ROLE_REPLY',
968 26: 'OFPT_GET_ASYNC_REQUEST',
969 27: 'OFPT_GET_ASYNC_REPLY',
970 28: 'OFPT_SET_ASYNC',
971 29: 'OFPT_METER_MOD',
972}
973
974# Identifiers from group ofp_vlan_id
975OFPVID_NONE = 0
976OFPVID_PRESENT = 4096
977
978ofp_vlan_id_map = {
979 0: 'OFPVID_NONE',
980 4096: 'OFPVID_PRESENT',
981}
982