blob: c04b1db3957a91e050517344c3eca27d286dc70e [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.
4
5# Automatically generated by LOXI from template const.py
6# Do not modify
7
8OFP_VERSION = 4
9
10# Identifiers from group macro_definitions
11OFP_VLAN_NONE = 0
12OFP_FLOW_PERMANENT = 0
13OFP_ETH_ALEN = 6
14OFP_MAX_PORT_NAME_LEN = 16
15OFP_MAX_TABLE_NAME_LEN = 32
16SERIAL_NUM_LEN = 32
17OFP_DEFAULT_MISS_SEND_LEN = 128
18DESC_STR_LEN = 256
19OFP_TCP_PORT = 6633
20OFP_SSL_PORT = 6633
21OFP_DEFAULT_PRIORITY = 32768
22OFPQ_MIN_RATE_UNCFG = 65535
23OFPQ_MAX_RATE_UNCFG = 65535
24OFPQ_ALL = 4294967295
25OFP_NO_BUFFER = 4294967295
26
27# Identifiers from group ofp_action_type
28OFPAT_OUTPUT = 0
29OFPAT_COPY_TTL_OUT = 11
30OFPAT_COPY_TTL_IN = 12
31OFPAT_SET_MPLS_TTL = 15
32OFPAT_DEC_MPLS_TTL = 16
33OFPAT_PUSH_VLAN = 17
34OFPAT_POP_VLAN = 18
35OFPAT_PUSH_MPLS = 19
36OFPAT_POP_MPLS = 20
37OFPAT_SET_QUEUE = 21
38OFPAT_GROUP = 22
39OFPAT_SET_NW_TTL = 23
40OFPAT_DEC_NW_TTL = 24
41OFPAT_SET_FIELD = 25
42OFPAT_PUSH_PBB = 26
43OFPAT_POP_PBB = 27
44OFPAT_EXPERIMENTER = 65535
45
46ofp_action_type_map = {
47 0: 'OFPAT_OUTPUT',
48 11: 'OFPAT_COPY_TTL_OUT',
49 12: 'OFPAT_COPY_TTL_IN',
50 15: 'OFPAT_SET_MPLS_TTL',
51 16: 'OFPAT_DEC_MPLS_TTL',
52 17: 'OFPAT_PUSH_VLAN',
53 18: 'OFPAT_POP_VLAN',
54 19: 'OFPAT_PUSH_MPLS',
55 20: 'OFPAT_POP_MPLS',
56 21: 'OFPAT_SET_QUEUE',
57 22: 'OFPAT_GROUP',
58 23: 'OFPAT_SET_NW_TTL',
59 24: 'OFPAT_DEC_NW_TTL',
60 25: 'OFPAT_SET_FIELD',
61 26: 'OFPAT_PUSH_PBB',
62 27: 'OFPAT_POP_PBB',
63 65535: 'OFPAT_EXPERIMENTER',
64}
65
66# Identifiers from group ofp_bad_action_code
67OFPBAC_BAD_TYPE = 0
68OFPBAC_BAD_LEN = 1
69OFPBAC_BAD_EXPERIMENTER = 2
70OFPBAC_BAD_EXP_TYPE = 3
71OFPBAC_BAD_OUT_PORT = 4
72OFPBAC_BAD_ARGUMENT = 5
73OFPBAC_EPERM = 6
74OFPBAC_TOO_MANY = 7
75OFPBAC_BAD_QUEUE = 8
76OFPBAC_BAD_OUT_GROUP = 9
77OFPBAC_MATCH_INCONSISTENT = 10
78OFPBAC_UNSUPPORTED_ORDER = 11
79OFPBAC_BAD_TAG = 12
80OFPBAC_BAD_SET_TYPE = 13
81OFPBAC_BAD_SET_LEN = 14
82OFPBAC_BAD_SET_ARGUMENT = 15
83
84ofp_bad_action_code_map = {
85 0: 'OFPBAC_BAD_TYPE',
86 1: 'OFPBAC_BAD_LEN',
87 2: 'OFPBAC_BAD_EXPERIMENTER',
88 3: 'OFPBAC_BAD_EXP_TYPE',
89 4: 'OFPBAC_BAD_OUT_PORT',
90 5: 'OFPBAC_BAD_ARGUMENT',
91 6: 'OFPBAC_EPERM',
92 7: 'OFPBAC_TOO_MANY',
93 8: 'OFPBAC_BAD_QUEUE',
94 9: 'OFPBAC_BAD_OUT_GROUP',
95 10: 'OFPBAC_MATCH_INCONSISTENT',
96 11: 'OFPBAC_UNSUPPORTED_ORDER',
97 12: 'OFPBAC_BAD_TAG',
98 13: 'OFPBAC_BAD_SET_TYPE',
99 14: 'OFPBAC_BAD_SET_LEN',
100 15: 'OFPBAC_BAD_SET_ARGUMENT',
101}
102
103# Identifiers from group ofp_bad_instruction_code
104OFPBIC_UNKNOWN_INST = 0
105OFPBIC_UNSUP_INST = 1
106OFPBIC_BAD_TABLE_ID = 2
107OFPBIC_UNSUP_METADATA = 3
108OFPBIC_UNSUP_METADATA_MASK = 4
109OFPBIC_BAD_EXPERIMENTER = 5
110OFPBIC_BAD_EXP_TYPE = 6
111OFPBIC_BAD_LEN = 7
112OFPBIC_EPERM = 8
113
114ofp_bad_instruction_code_map = {
115 0: 'OFPBIC_UNKNOWN_INST',
116 1: 'OFPBIC_UNSUP_INST',
117 2: 'OFPBIC_BAD_TABLE_ID',
118 3: 'OFPBIC_UNSUP_METADATA',
119 4: 'OFPBIC_UNSUP_METADATA_MASK',
120 5: 'OFPBIC_BAD_EXPERIMENTER',
121 6: 'OFPBIC_BAD_EXP_TYPE',
122 7: 'OFPBIC_BAD_LEN',
123 8: 'OFPBIC_EPERM',
124}
125
126# Identifiers from group ofp_bad_match_code
127OFPBMC_BAD_TYPE = 0
128OFPBMC_BAD_LEN = 1
129OFPBMC_BAD_TAG = 2
130OFPBMC_BAD_DL_ADDR_MASK = 3
131OFPBMC_BAD_NW_ADDR_MASK = 4
132OFPBMC_BAD_WILDCARDS = 5
133OFPBMC_BAD_FIELD = 6
134OFPBMC_BAD_VALUE = 7
135OFPBMC_BAD_MASK = 8
136OFPBMC_BAD_PREREQ = 9
137OFPBMC_DUP_FIELD = 10
138OFPBMC_EPERM = 11
139
140ofp_bad_match_code_map = {
141 0: 'OFPBMC_BAD_TYPE',
142 1: 'OFPBMC_BAD_LEN',
143 2: 'OFPBMC_BAD_TAG',
144 3: 'OFPBMC_BAD_DL_ADDR_MASK',
145 4: 'OFPBMC_BAD_NW_ADDR_MASK',
146 5: 'OFPBMC_BAD_WILDCARDS',
147 6: 'OFPBMC_BAD_FIELD',
148 7: 'OFPBMC_BAD_VALUE',
149 8: 'OFPBMC_BAD_MASK',
150 9: 'OFPBMC_BAD_PREREQ',
151 10: 'OFPBMC_DUP_FIELD',
152 11: 'OFPBMC_EPERM',
153}
154
155# Identifiers from group ofp_bad_request_code
156OFPBRC_BAD_VERSION = 0
157OFPBRC_BAD_TYPE = 1
158OFPBRC_BAD_MULTIPART = 2
159OFPBRC_BAD_EXPERIMENTER = 3
160OFPBRC_BAD_EXP_TYPE = 4
161OFPBRC_EPERM = 5
162OFPBRC_BAD_LEN = 6
163OFPBRC_BUFFER_EMPTY = 7
164OFPBRC_BUFFER_UNKNOWN = 8
165OFPBRC_BAD_TABLE_ID = 9
166OFPBRC_IS_SLAVE = 10
167OFPBRC_BAD_PORT = 11
168OFPBRC_BAD_PACKET = 12
169OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
170
171ofp_bad_request_code_map = {
172 0: 'OFPBRC_BAD_VERSION',
173 1: 'OFPBRC_BAD_TYPE',
174 2: 'OFPBRC_BAD_MULTIPART',
175 3: 'OFPBRC_BAD_EXPERIMENTER',
176 4: 'OFPBRC_BAD_EXP_TYPE',
177 5: 'OFPBRC_EPERM',
178 6: 'OFPBRC_BAD_LEN',
179 7: 'OFPBRC_BUFFER_EMPTY',
180 8: 'OFPBRC_BUFFER_UNKNOWN',
181 9: 'OFPBRC_BAD_TABLE_ID',
182 10: 'OFPBRC_IS_SLAVE',
183 11: 'OFPBRC_BAD_PORT',
184 12: 'OFPBRC_BAD_PACKET',
185 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
186}
187
188# Identifiers from group ofp_capabilities
189OFPC_FLOW_STATS = 1
190OFPC_TABLE_STATS = 2
191OFPC_PORT_STATS = 4
192OFPC_GROUP_STATS = 8
193OFPC_IP_REASM = 32
194OFPC_QUEUE_STATS = 64
195OFPC_PORT_BLOCKED = 256
196
197ofp_capabilities_map = {
198 1: 'OFPC_FLOW_STATS',
199 2: 'OFPC_TABLE_STATS',
200 4: 'OFPC_PORT_STATS',
201 8: 'OFPC_GROUP_STATS',
202 32: 'OFPC_IP_REASM',
203 64: 'OFPC_QUEUE_STATS',
204 256: 'OFPC_PORT_BLOCKED',
205}
206
207# Identifiers from group ofp_config_flags
208OFPC_FRAG_NORMAL = 0
209OFPC_FRAG_DROP = 1
210OFPC_FRAG_REASM = 2
211OFPC_FRAG_MASK = 3
212
213ofp_config_flags_map = {
214 0: 'OFPC_FRAG_NORMAL',
215 1: 'OFPC_FRAG_DROP',
216 2: 'OFPC_FRAG_REASM',
217 3: 'OFPC_FRAG_MASK',
218}
219
220# Identifiers from group ofp_controller_max_len
221OFPCML_MAX = 65509
222OFPCML_NO_BUFFER = 65535
223
224ofp_controller_max_len_map = {
225 65509: 'OFPCML_MAX',
226 65535: 'OFPCML_NO_BUFFER',
227}
228
229# Identifiers from group ofp_controller_role
230OFPCR_ROLE_NOCHANGE = 0
231OFPCR_ROLE_EQUAL = 1
232OFPCR_ROLE_MASTER = 2
233OFPCR_ROLE_SLAVE = 3
234
235ofp_controller_role_map = {
236 0: 'OFPCR_ROLE_NOCHANGE',
237 1: 'OFPCR_ROLE_EQUAL',
238 2: 'OFPCR_ROLE_MASTER',
239 3: 'OFPCR_ROLE_SLAVE',
240}
241
242# Identifiers from group ofp_error_type
243OFPET_HELLO_FAILED = 0
244OFPET_BAD_REQUEST = 1
245OFPET_BAD_ACTION = 2
246OFPET_BAD_INSTRUCTION = 3
247OFPET_BAD_MATCH = 4
248OFPET_FLOW_MOD_FAILED = 5
249OFPET_GROUP_MOD_FAILED = 6
250OFPET_PORT_MOD_FAILED = 7
251OFPET_TABLE_MOD_FAILED = 8
252OFPET_QUEUE_OP_FAILED = 9
253OFPET_SWITCH_CONFIG_FAILED = 10
254OFPET_ROLE_REQUEST_FAILED = 11
255OFPET_METER_MOD_FAILED = 12
256OFPET_TABLE_FEATURES_FAILED = 13
257OFPET_EXPERIMENTER = 65535
258
259ofp_error_type_map = {
260 0: 'OFPET_HELLO_FAILED',
261 1: 'OFPET_BAD_REQUEST',
262 2: 'OFPET_BAD_ACTION',
263 3: 'OFPET_BAD_INSTRUCTION',
264 4: 'OFPET_BAD_MATCH',
265 5: 'OFPET_FLOW_MOD_FAILED',
266 6: 'OFPET_GROUP_MOD_FAILED',
267 7: 'OFPET_PORT_MOD_FAILED',
268 8: 'OFPET_TABLE_MOD_FAILED',
269 9: 'OFPET_QUEUE_OP_FAILED',
270 10: 'OFPET_SWITCH_CONFIG_FAILED',
271 11: 'OFPET_ROLE_REQUEST_FAILED',
272 12: 'OFPET_METER_MOD_FAILED',
273 13: 'OFPET_TABLE_FEATURES_FAILED',
274 65535: 'OFPET_EXPERIMENTER',
275}
276
277# Identifiers from group ofp_flow_mod_command
278OFPFC_ADD = 0
279OFPFC_MODIFY = 1
280OFPFC_MODIFY_STRICT = 2
281OFPFC_DELETE = 3
282OFPFC_DELETE_STRICT = 4
283
284ofp_flow_mod_command_map = {
285 0: 'OFPFC_ADD',
286 1: 'OFPFC_MODIFY',
287 2: 'OFPFC_MODIFY_STRICT',
288 3: 'OFPFC_DELETE',
289 4: 'OFPFC_DELETE_STRICT',
290}
291
292# Identifiers from group ofp_flow_mod_failed_code
293OFPFMFC_UNKNOWN = 0
294OFPFMFC_TABLE_FULL = 1
295OFPFMFC_BAD_TABLE_ID = 2
296OFPFMFC_OVERLAP = 3
297OFPFMFC_EPERM = 4
298OFPFMFC_BAD_TIMEOUT = 5
299OFPFMFC_BAD_COMMAND = 6
300OFPFMFC_BAD_FLAGS = 7
301
302ofp_flow_mod_failed_code_map = {
303 0: 'OFPFMFC_UNKNOWN',
304 1: 'OFPFMFC_TABLE_FULL',
305 2: 'OFPFMFC_BAD_TABLE_ID',
306 3: 'OFPFMFC_OVERLAP',
307 4: 'OFPFMFC_EPERM',
308 5: 'OFPFMFC_BAD_TIMEOUT',
309 6: 'OFPFMFC_BAD_COMMAND',
310 7: 'OFPFMFC_BAD_FLAGS',
311}
312
313# Identifiers from group ofp_flow_mod_flags
314OFPFF_SEND_FLOW_REM = 1
315OFPFF_CHECK_OVERLAP = 2
316OFPFF_RESET_COUNTS = 4
317OFPFF_NO_PKT_COUNTS = 8
318OFPFF_NO_BYT_COUNTS = 16
319
320ofp_flow_mod_flags_map = {
321 1: 'OFPFF_SEND_FLOW_REM',
322 2: 'OFPFF_CHECK_OVERLAP',
323 4: 'OFPFF_RESET_COUNTS',
324 8: 'OFPFF_NO_PKT_COUNTS',
325 16: 'OFPFF_NO_BYT_COUNTS',
326}
327
328# Identifiers from group ofp_flow_removed_reason
329OFPRR_IDLE_TIMEOUT = 0
330OFPRR_HARD_TIMEOUT = 1
331OFPRR_DELETE = 2
332OFPRR_GROUP_DELETE = 3
333
334ofp_flow_removed_reason_map = {
335 0: 'OFPRR_IDLE_TIMEOUT',
336 1: 'OFPRR_HARD_TIMEOUT',
337 2: 'OFPRR_DELETE',
338 3: 'OFPRR_GROUP_DELETE',
339}
340
341# Identifiers from group ofp_group
342OFPG_MAX = 4294967040
343OFPG_ALL = 4294967292
344OFPG_ANY = 4294967295
345
346ofp_group_map = {
347 4294967040: 'OFPG_MAX',
348 4294967292: 'OFPG_ALL',
349 4294967295: 'OFPG_ANY',
350}
351
352# Identifiers from group ofp_group_capabilities
353OFPGFC_SELECT_WEIGHT = 1
354OFPGFC_SELECT_LIVENESS = 2
355OFPGFC_CHAINING = 4
356OFPGFC_CHAINING_CHECKS = 8
357
358ofp_group_capabilities_map = {
359 1: 'OFPGFC_SELECT_WEIGHT',
360 2: 'OFPGFC_SELECT_LIVENESS',
361 4: 'OFPGFC_CHAINING',
362 8: 'OFPGFC_CHAINING_CHECKS',
363}
364
365# Identifiers from group ofp_group_mod_command
366OFPGC_ADD = 0
367OFPGC_MODIFY = 1
368OFPGC_DELETE = 2
369
370ofp_group_mod_command_map = {
371 0: 'OFPGC_ADD',
372 1: 'OFPGC_MODIFY',
373 2: 'OFPGC_DELETE',
374}
375
376# Identifiers from group ofp_group_mod_failed_code
377OFPGMFC_GROUP_EXISTS = 0
378OFPGMFC_INVALID_GROUP = 1
379OFPGMFC_WEIGHT_UNSUPPORTED = 2
380OFPGMFC_OUT_OF_GROUPS = 3
381OFPGMFC_OUT_OF_BUCKETS = 4
382OFPGMFC_CHAINING_UNSUPPORTED = 5
383OFPGMFC_WATCH_UNSUPPORTED = 6
384OFPGMFC_LOOP = 7
385OFPGMFC_UNKNOWN_GROUP = 8
386OFPGMFC_CHAINED_GROUP = 9
387OFPGMFC_BAD_TYPE = 10
388OFPGMFC_BAD_COMMAND = 11
389OFPGMFC_BAD_BUCKET = 12
390OFPGMFC_BAD_WATCH = 13
391OFPGMFC_EPERM = 14
392
393ofp_group_mod_failed_code_map = {
394 0: 'OFPGMFC_GROUP_EXISTS',
395 1: 'OFPGMFC_INVALID_GROUP',
396 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
397 3: 'OFPGMFC_OUT_OF_GROUPS',
398 4: 'OFPGMFC_OUT_OF_BUCKETS',
399 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
400 6: 'OFPGMFC_WATCH_UNSUPPORTED',
401 7: 'OFPGMFC_LOOP',
402 8: 'OFPGMFC_UNKNOWN_GROUP',
403 9: 'OFPGMFC_CHAINED_GROUP',
404 10: 'OFPGMFC_BAD_TYPE',
405 11: 'OFPGMFC_BAD_COMMAND',
406 12: 'OFPGMFC_BAD_BUCKET',
407 13: 'OFPGMFC_BAD_WATCH',
408 14: 'OFPGMFC_EPERM',
409}
410
411# Identifiers from group ofp_group_type
412OFPGT_ALL = 0
413OFPGT_SELECT = 1
414OFPGT_INDIRECT = 2
415OFPGT_FF = 3
416
417ofp_group_type_map = {
418 0: 'OFPGT_ALL',
419 1: 'OFPGT_SELECT',
420 2: 'OFPGT_INDIRECT',
421 3: 'OFPGT_FF',
422}
423
424# Identifiers from group ofp_hello_elem_type
425OFPHET_VERSIONBITMAP = 1
426
427ofp_hello_elem_type_map = {
428 1: 'OFPHET_VERSIONBITMAP',
429}
430
431# Identifiers from group ofp_hello_failed_code
432OFPHFC_INCOMPATIBLE = 0
433OFPHFC_EPERM = 1
434
435ofp_hello_failed_code_map = {
436 0: 'OFPHFC_INCOMPATIBLE',
437 1: 'OFPHFC_EPERM',
438}
439
440# Identifiers from group ofp_instruction_type
441OFPIT_GOTO_TABLE = 1
442OFPIT_WRITE_METADATA = 2
443OFPIT_WRITE_ACTIONS = 3
444OFPIT_APPLY_ACTIONS = 4
445OFPIT_CLEAR_ACTIONS = 5
446OFPIT_METER = 6
447OFPIT_EXPERIMENTER = 65535
448
449ofp_instruction_type_map = {
450 1: 'OFPIT_GOTO_TABLE',
451 2: 'OFPIT_WRITE_METADATA',
452 3: 'OFPIT_WRITE_ACTIONS',
453 4: 'OFPIT_APPLY_ACTIONS',
454 5: 'OFPIT_CLEAR_ACTIONS',
455 6: 'OFPIT_METER',
456 65535: 'OFPIT_EXPERIMENTER',
457}
458
459# Identifiers from group ofp_ipv6exthdr_flags
460OFPIEH_NONEXT = 1
461OFPIEH_ESP = 2
462OFPIEH_AUTH = 4
463OFPIEH_DEST = 8
464OFPIEH_FRAG = 16
465OFPIEH_ROUTER = 32
466OFPIEH_HOP = 64
467OFPIEH_UNREP = 128
468OFPIEH_UNSEQ = 256
469
470ofp_ipv6exthdr_flags_map = {
471 1: 'OFPIEH_NONEXT',
472 2: 'OFPIEH_ESP',
473 4: 'OFPIEH_AUTH',
474 8: 'OFPIEH_DEST',
475 16: 'OFPIEH_FRAG',
476 32: 'OFPIEH_ROUTER',
477 64: 'OFPIEH_HOP',
478 128: 'OFPIEH_UNREP',
479 256: 'OFPIEH_UNSEQ',
480}
481
482# Identifiers from group ofp_match_type
483OFPMT_STANDARD = 0
484OFPMT_OXM = 1
485
486ofp_match_type_map = {
487 0: 'OFPMT_STANDARD',
488 1: 'OFPMT_OXM',
489}
490
491# Identifiers from group ofp_meter
492OFPM_MAX = 4294901760
493OFPM_SLOWPATH = 4294967293
494OFPM_CONTROLLER = 4294967294
495OFPM_ALL = 4294967295
496
497ofp_meter_map = {
498 4294901760: 'OFPM_MAX',
499 4294967293: 'OFPM_SLOWPATH',
500 4294967294: 'OFPM_CONTROLLER',
501 4294967295: 'OFPM_ALL',
502}
503
504# Identifiers from group ofp_meter_band_type
505OFPMBT_DROP = 1
506OFPMBT_DSCP_REMARK = 2
507OFPMBT_EXPERIMENTER = 65535
508
509ofp_meter_band_type_map = {
510 1: 'OFPMBT_DROP',
511 2: 'OFPMBT_DSCP_REMARK',
512 65535: 'OFPMBT_EXPERIMENTER',
513}
514
515# Identifiers from group ofp_meter_flags
516OFPMF_KBPS = 1
517OFPMF_PKTPS = 2
518OFPMF_BURST = 4
519OFPMF_STATS = 8
520
521ofp_meter_flags_map = {
522 1: 'OFPMF_KBPS',
523 2: 'OFPMF_PKTPS',
524 4: 'OFPMF_BURST',
525 8: 'OFPMF_STATS',
526}
527
528# Identifiers from group ofp_meter_mod_command
529OFPMC_ADD = 0
530OFPMC_MODIFY = 1
531OFPMC_DELETE = 2
532
533ofp_meter_mod_command_map = {
534 0: 'OFPMC_ADD',
535 1: 'OFPMC_MODIFY',
536 2: 'OFPMC_DELETE',
537}
538
539# Identifiers from group ofp_meter_mod_failed_code
540OFPMMFC_UNKNOWN = 0
541OFPMMFC_METER_EXISTS = 1
542OFPMMFC_INVALID_METER = 2
543OFPMMFC_UNKNOWN_METER = 3
544OFPMMFC_BAD_COMMAND = 4
545OFPMMFC_BAD_FLAGS = 5
546OFPMMFC_BAD_RATE = 6
547OFPMMFC_BAD_BURST = 7
548OFPMMFC_BAD_BAND = 8
549OFPMMFC_BAD_BAND_VALUE = 9
550OFPMMFC_OUT_OF_METERS = 10
551OFPMMFC_OUT_OF_BANDS = 11
552
553ofp_meter_mod_failed_code_map = {
554 0: 'OFPMMFC_UNKNOWN',
555 1: 'OFPMMFC_METER_EXISTS',
556 2: 'OFPMMFC_INVALID_METER',
557 3: 'OFPMMFC_UNKNOWN_METER',
558 4: 'OFPMMFC_BAD_COMMAND',
559 5: 'OFPMMFC_BAD_FLAGS',
560 6: 'OFPMMFC_BAD_RATE',
561 7: 'OFPMMFC_BAD_BURST',
562 8: 'OFPMMFC_BAD_BAND',
563 9: 'OFPMMFC_BAD_BAND_VALUE',
564 10: 'OFPMMFC_OUT_OF_METERS',
565 11: 'OFPMMFC_OUT_OF_BANDS',
566}
567
568# Identifiers from group ofp_multipart_reply_flags
569OFPMPF_REPLY_MORE = 1
570
571ofp_multipart_reply_flags_map = {
572 1: 'OFPMPF_REPLY_MORE',
573}
574
575# Identifiers from group ofp_multipart_request_flags
576OFPMPF_REQ_MORE = 1
577
578ofp_multipart_request_flags_map = {
579 1: 'OFPMPF_REQ_MORE',
580}
581
582# Identifiers from group ofp_multipart_types
583OFPMP_DESC = 0
584OFPMP_FLOW = 1
585OFPMP_AGGREGATE = 2
586OFPMP_TABLE = 3
587OFPMP_PORT_STATS = 4
588OFPMP_QUEUE = 5
589OFPMP_GROUP = 6
590OFPMP_GROUP_DESC = 7
591OFPMP_GROUP_FEATURES = 8
592OFPMP_METER = 9
593OFPMP_METER_CONFIG = 10
594OFPMP_METER_FEATURES = 11
595OFPMP_TABLE_FEATURES = 12
596OFPMP_PORT_DESC = 13
597OFPMP_EXPERIMENTER = 65535
598
599ofp_multipart_types_map = {
600 0: 'OFPMP_DESC',
601 1: 'OFPMP_FLOW',
602 2: 'OFPMP_AGGREGATE',
603 3: 'OFPMP_TABLE',
604 4: 'OFPMP_PORT_STATS',
605 5: 'OFPMP_QUEUE',
606 6: 'OFPMP_GROUP',
607 7: 'OFPMP_GROUP_DESC',
608 8: 'OFPMP_GROUP_FEATURES',
609 9: 'OFPMP_METER',
610 10: 'OFPMP_METER_CONFIG',
611 11: 'OFPMP_METER_FEATURES',
612 12: 'OFPMP_TABLE_FEATURES',
613 13: 'OFPMP_PORT_DESC',
614 65535: 'OFPMP_EXPERIMENTER',
615}
616
617# Identifiers from group ofp_oxm_class
618OFPXMC_NXM_0 = 0
619OFPXMC_NXM_1 = 1
620OFPXMC_OPENFLOW_BASIC = 32768
621OFPXMC_EXPERIMENTER = 65535
622
623ofp_oxm_class_map = {
624 0: 'OFPXMC_NXM_0',
625 1: 'OFPXMC_NXM_1',
626 32768: 'OFPXMC_OPENFLOW_BASIC',
627 65535: 'OFPXMC_EXPERIMENTER',
628}
629
630# Identifiers from group ofp_packet_in_reason
631OFPR_NO_MATCH = 0
632OFPR_ACTION = 1
633OFPR_INVALID_TTL = 2
634
635ofp_packet_in_reason_map = {
636 0: 'OFPR_NO_MATCH',
637 1: 'OFPR_ACTION',
638 2: 'OFPR_INVALID_TTL',
639}
640
641# Identifiers from group ofp_port
642OFPP_MAX = 4294967040
643OFPP_IN_PORT = 4294967288
644OFPP_TABLE = 4294967289
645OFPP_NORMAL = 4294967290
646OFPP_FLOOD = 4294967291
647OFPP_ALL = 4294967292
648OFPP_CONTROLLER = 4294967293
649OFPP_LOCAL = 4294967294
650
651ofp_port_map = {
652 4294967040: 'OFPP_MAX',
653 4294967288: 'OFPP_IN_PORT',
654 4294967289: 'OFPP_TABLE',
655 4294967290: 'OFPP_NORMAL',
656 4294967291: 'OFPP_FLOOD',
657 4294967292: 'OFPP_ALL',
658 4294967293: 'OFPP_CONTROLLER',
659 4294967294: 'OFPP_LOCAL',
660}
661
662# Identifiers from group ofp_port_config
663OFPPC_PORT_DOWN = 1
664OFPPC_NO_RECV = 4
665OFPPC_NO_FWD = 32
666OFPPC_NO_PACKET_IN = 64
667
668ofp_port_config_map = {
669 1: 'OFPPC_PORT_DOWN',
670 4: 'OFPPC_NO_RECV',
671 32: 'OFPPC_NO_FWD',
672 64: 'OFPPC_NO_PACKET_IN',
673}
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
727# Identifiers from group ofp_port_no
728OFPP_ANY = 4294967295
729
730ofp_port_no_map = {
731 4294967295: 'OFPP_ANY',
732}
733
734# Identifiers from group ofp_port_reason
735OFPPR_ADD = 0
736OFPPR_DELETE = 1
737OFPPR_MODIFY = 2
738
739ofp_port_reason_map = {
740 0: 'OFPPR_ADD',
741 1: 'OFPPR_DELETE',
742 2: 'OFPPR_MODIFY',
743}
744
745# Identifiers from group ofp_port_state
746OFPPS_LINK_DOWN = 1
747OFPPS_BLOCKED = 2
748OFPPS_LIVE = 4
749
750ofp_port_state_map = {
751 1: 'OFPPS_LINK_DOWN',
752 2: 'OFPPS_BLOCKED',
753 4: 'OFPPS_LIVE',
754}
755
756# Identifiers from group ofp_queue_op_failed_code
757OFPQOFC_BAD_PORT = 0
758OFPQOFC_BAD_QUEUE = 1
759OFPQOFC_EPERM = 2
760
761ofp_queue_op_failed_code_map = {
762 0: 'OFPQOFC_BAD_PORT',
763 1: 'OFPQOFC_BAD_QUEUE',
764 2: 'OFPQOFC_EPERM',
765}
766
767# Identifiers from group ofp_queue_properties
768OFPQT_MIN_RATE = 1
769OFPQT_MAX_RATE = 2
770OFPQT_EXPERIMENTER = 65535
771
772ofp_queue_properties_map = {
773 1: 'OFPQT_MIN_RATE',
774 2: 'OFPQT_MAX_RATE',
775 65535: 'OFPQT_EXPERIMENTER',
776}
777
778# Identifiers from group ofp_role_request_failed_code
779OFPRRFC_STALE = 0
780OFPRRFC_UNSUP = 1
781OFPRRFC_BAD_ROLE = 2
782
783ofp_role_request_failed_code_map = {
784 0: 'OFPRRFC_STALE',
785 1: 'OFPRRFC_UNSUP',
786 2: 'OFPRRFC_BAD_ROLE',
787}
788
789# Identifiers from group ofp_switch_config_failed_code
790OFPSCFC_BAD_FLAGS = 0
791OFPSCFC_BAD_LEN = 1
792OFPSCFC_EPERM = 2
793
794ofp_switch_config_failed_code_map = {
795 0: 'OFPSCFC_BAD_FLAGS',
796 1: 'OFPSCFC_BAD_LEN',
797 2: 'OFPSCFC_EPERM',
798}
799
800# Identifiers from group ofp_table
801OFPTT_MAX = 254
802OFPTT_ALL = 255
803
804ofp_table_map = {
805 254: 'OFPTT_MAX',
806 255: 'OFPTT_ALL',
807}
808
809# Identifiers from group ofp_table_config
810OFPTC_DEPRECATED_MASK = 3
811
812ofp_table_config_map = {
813 3: 'OFPTC_DEPRECATED_MASK',
814}
815
816# Identifiers from group ofp_table_feature_prop_type
817OFPTFPT_INSTRUCTIONS = 0
818OFPTFPT_INSTRUCTIONS_MISS = 1
819OFPTFPT_NEXT_TABLES = 2
820OFPTFPT_NEXT_TABLES_MISS = 3
821OFPTFPT_WRITE_ACTIONS = 4
822OFPTFPT_WRITE_ACTIONS_MISS = 5
823OFPTFPT_APPLY_ACTIONS = 6
824OFPTFPT_APPLY_ACTIONS_MISS = 7
825OFPTFPT_MATCH = 8
826OFPTFPT_WILDCARDS = 10
827OFPTFPT_WRITE_SETFIELD = 12
828OFPTFPT_WRITE_SETFIELD_MISS = 13
829OFPTFPT_APPLY_SETFIELD = 14
830OFPTFPT_APPLY_SETFIELD_MISS = 15
831OFPTFPT_EXPERIMENTER = 65534
832OFPTFPT_EXPERIMENTER_MISS = 65535
833
834ofp_table_feature_prop_type_map = {
835 0: 'OFPTFPT_INSTRUCTIONS',
836 1: 'OFPTFPT_INSTRUCTIONS_MISS',
837 2: 'OFPTFPT_NEXT_TABLES',
838 3: 'OFPTFPT_NEXT_TABLES_MISS',
839 4: 'OFPTFPT_WRITE_ACTIONS',
840 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
841 6: 'OFPTFPT_APPLY_ACTIONS',
842 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
843 8: 'OFPTFPT_MATCH',
844 10: 'OFPTFPT_WILDCARDS',
845 12: 'OFPTFPT_WRITE_SETFIELD',
846 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
847 14: 'OFPTFPT_APPLY_SETFIELD',
848 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
849 65534: 'OFPTFPT_EXPERIMENTER',
850 65535: 'OFPTFPT_EXPERIMENTER_MISS',
851}
852
853# Identifiers from group ofp_table_features_failed_code
854OFPTFFC_BAD_TABLE = 0
855OFPTFFC_BAD_METADATA = 1
856OFPTFFC_BAD_TYPE = 2
857OFPTFFC_BAD_LEN = 3
858OFPTFFC_BAD_ARGUMENT = 4
859OFPTFFC_EPERM = 5
860
861ofp_table_features_failed_code_map = {
862 0: 'OFPTFFC_BAD_TABLE',
863 1: 'OFPTFFC_BAD_METADATA',
864 2: 'OFPTFFC_BAD_TYPE',
865 3: 'OFPTFFC_BAD_LEN',
866 4: 'OFPTFFC_BAD_ARGUMENT',
867 5: 'OFPTFFC_EPERM',
868}
869
870# Identifiers from group ofp_table_mod_failed_code
871OFPTMFC_BAD_TABLE = 0
872OFPTMFC_BAD_CONFIG = 1
873OFPTMFC_EPERM = 2
874
875ofp_table_mod_failed_code_map = {
876 0: 'OFPTMFC_BAD_TABLE',
877 1: 'OFPTMFC_BAD_CONFIG',
878 2: 'OFPTMFC_EPERM',
879}
880
881# Identifiers from group ofp_type
882OFPT_HELLO = 0
883OFPT_ERROR = 1
884OFPT_ECHO_REQUEST = 2
885OFPT_ECHO_REPLY = 3
886OFPT_EXPERIMENTER = 4
887OFPT_FEATURES_REQUEST = 5
888OFPT_FEATURES_REPLY = 6
889OFPT_GET_CONFIG_REQUEST = 7
890OFPT_GET_CONFIG_REPLY = 8
891OFPT_SET_CONFIG = 9
892OFPT_PACKET_IN = 10
893OFPT_FLOW_REMOVED = 11
894OFPT_PORT_STATUS = 12
895OFPT_PACKET_OUT = 13
896OFPT_FLOW_MOD = 14
897OFPT_GROUP_MOD = 15
898OFPT_PORT_MOD = 16
899OFPT_TABLE_MOD = 17
900OFPT_MULTIPART_REQUEST = 18
901OFPT_MULTIPART_REPLY = 19
902OFPT_BARRIER_REQUEST = 20
903OFPT_BARRIER_REPLY = 21
904OFPT_QUEUE_GET_CONFIG_REQUEST = 22
905OFPT_QUEUE_GET_CONFIG_REPLY = 23
906OFPT_ROLE_REQUEST = 24
907OFPT_ROLE_REPLY = 25
908OFPT_GET_ASYNC_REQUEST = 26
909OFPT_GET_ASYNC_REPLY = 27
910OFPT_SET_ASYNC = 28
911OFPT_METER_MOD = 29
912
913ofp_type_map = {
914 0: 'OFPT_HELLO',
915 1: 'OFPT_ERROR',
916 2: 'OFPT_ECHO_REQUEST',
917 3: 'OFPT_ECHO_REPLY',
918 4: 'OFPT_EXPERIMENTER',
919 5: 'OFPT_FEATURES_REQUEST',
920 6: 'OFPT_FEATURES_REPLY',
921 7: 'OFPT_GET_CONFIG_REQUEST',
922 8: 'OFPT_GET_CONFIG_REPLY',
923 9: 'OFPT_SET_CONFIG',
924 10: 'OFPT_PACKET_IN',
925 11: 'OFPT_FLOW_REMOVED',
926 12: 'OFPT_PORT_STATUS',
927 13: 'OFPT_PACKET_OUT',
928 14: 'OFPT_FLOW_MOD',
929 15: 'OFPT_GROUP_MOD',
930 16: 'OFPT_PORT_MOD',
931 17: 'OFPT_TABLE_MOD',
932 18: 'OFPT_MULTIPART_REQUEST',
933 19: 'OFPT_MULTIPART_REPLY',
934 20: 'OFPT_BARRIER_REQUEST',
935 21: 'OFPT_BARRIER_REPLY',
936 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
937 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
938 24: 'OFPT_ROLE_REQUEST',
939 25: 'OFPT_ROLE_REPLY',
940 26: 'OFPT_GET_ASYNC_REQUEST',
941 27: 'OFPT_GET_ASYNC_REPLY',
942 28: 'OFPT_SET_ASYNC',
943 29: 'OFPT_METER_MOD',
944}
945
946# Identifiers from group ofp_vlan_id
947OFPVID_NONE = 0
948OFPVID_PRESENT = 4096
949
950ofp_vlan_id_map = {
951 0: 'OFPVID_NONE',
952 4096: 'OFPVID_PRESENT',
953}
954