blob: 20f99bbb2c9dd31ad5ce39bb228c23b427a4d8e0 [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 = 3
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 Lanec2ee4b82013-04-24 17:12:38 -070014OFP_TCP_PORT = 6633
15OFP_SSL_PORT = 6633
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
Dan Talaycof6202252013-07-02 01:00:29 -070021OFP_NO_BUFFER = 4294967295
22DESC_STR_LEN = 256
23SERIAL_NUM_LEN = 32
24OFPQ_ALL = 4294967295
Rich Lanec2ee4b82013-04-24 17:12:38 -070025OFPQ_MIN_RATE_UNCFG = 65535
26OFPQ_MAX_RATE_UNCFG = 65535
Rich Lanec2ee4b82013-04-24 17:12:38 -070027
28# Identifiers from group ofp_action_type
29OFPAT_OUTPUT = 0
30OFPAT_COPY_TTL_OUT = 11
31OFPAT_COPY_TTL_IN = 12
32OFPAT_SET_MPLS_TTL = 15
33OFPAT_DEC_MPLS_TTL = 16
34OFPAT_PUSH_VLAN = 17
35OFPAT_POP_VLAN = 18
36OFPAT_PUSH_MPLS = 19
37OFPAT_POP_MPLS = 20
38OFPAT_SET_QUEUE = 21
39OFPAT_GROUP = 22
40OFPAT_SET_NW_TTL = 23
41OFPAT_DEC_NW_TTL = 24
42OFPAT_SET_FIELD = 25
43OFPAT_EXPERIMENTER = 65535
44
45ofp_action_type_map = {
46 0: 'OFPAT_OUTPUT',
47 11: 'OFPAT_COPY_TTL_OUT',
48 12: 'OFPAT_COPY_TTL_IN',
49 15: 'OFPAT_SET_MPLS_TTL',
50 16: 'OFPAT_DEC_MPLS_TTL',
51 17: 'OFPAT_PUSH_VLAN',
52 18: 'OFPAT_POP_VLAN',
53 19: 'OFPAT_PUSH_MPLS',
54 20: 'OFPAT_POP_MPLS',
55 21: 'OFPAT_SET_QUEUE',
56 22: 'OFPAT_GROUP',
57 23: 'OFPAT_SET_NW_TTL',
58 24: 'OFPAT_DEC_NW_TTL',
59 25: 'OFPAT_SET_FIELD',
60 65535: 'OFPAT_EXPERIMENTER',
61}
62
63# Identifiers from group ofp_bad_action_code
64OFPBAC_BAD_TYPE = 0
65OFPBAC_BAD_LEN = 1
66OFPBAC_BAD_EXPERIMENTER = 2
67OFPBAC_BAD_EXP_TYPE = 3
68OFPBAC_BAD_OUT_PORT = 4
69OFPBAC_BAD_ARGUMENT = 5
70OFPBAC_EPERM = 6
71OFPBAC_TOO_MANY = 7
72OFPBAC_BAD_QUEUE = 8
73OFPBAC_BAD_OUT_GROUP = 9
74OFPBAC_MATCH_INCONSISTENT = 10
75OFPBAC_UNSUPPORTED_ORDER = 11
76OFPBAC_BAD_TAG = 12
77OFPBAC_BAD_SET_TYPE = 13
78OFPBAC_BAD_SET_LEN = 14
79OFPBAC_BAD_SET_ARGUMENT = 15
80
81ofp_bad_action_code_map = {
82 0: 'OFPBAC_BAD_TYPE',
83 1: 'OFPBAC_BAD_LEN',
84 2: 'OFPBAC_BAD_EXPERIMENTER',
85 3: 'OFPBAC_BAD_EXP_TYPE',
86 4: 'OFPBAC_BAD_OUT_PORT',
87 5: 'OFPBAC_BAD_ARGUMENT',
88 6: 'OFPBAC_EPERM',
89 7: 'OFPBAC_TOO_MANY',
90 8: 'OFPBAC_BAD_QUEUE',
91 9: 'OFPBAC_BAD_OUT_GROUP',
92 10: 'OFPBAC_MATCH_INCONSISTENT',
93 11: 'OFPBAC_UNSUPPORTED_ORDER',
94 12: 'OFPBAC_BAD_TAG',
95 13: 'OFPBAC_BAD_SET_TYPE',
96 14: 'OFPBAC_BAD_SET_LEN',
97 15: 'OFPBAC_BAD_SET_ARGUMENT',
98}
99
100# Identifiers from group ofp_bad_instruction_code
101OFPBIC_UNKNOWN_INST = 0
102OFPBIC_UNSUP_INST = 1
103OFPBIC_BAD_TABLE_ID = 2
104OFPBIC_UNSUP_METADATA = 3
105OFPBIC_UNSUP_METADATA_MASK = 4
106OFPBIC_BAD_EXPERIMENTER = 5
107OFPBIC_BAD_EXP_TYPE = 6
108OFPBIC_BAD_LEN = 7
109OFPBIC_EPERM = 8
110
111ofp_bad_instruction_code_map = {
112 0: 'OFPBIC_UNKNOWN_INST',
113 1: 'OFPBIC_UNSUP_INST',
114 2: 'OFPBIC_BAD_TABLE_ID',
115 3: 'OFPBIC_UNSUP_METADATA',
116 4: 'OFPBIC_UNSUP_METADATA_MASK',
117 5: 'OFPBIC_BAD_EXPERIMENTER',
118 6: 'OFPBIC_BAD_EXP_TYPE',
119 7: 'OFPBIC_BAD_LEN',
120 8: 'OFPBIC_EPERM',
121}
122
123# Identifiers from group ofp_bad_match_code
124OFPBMC_BAD_TYPE = 0
125OFPBMC_BAD_LEN = 1
126OFPBMC_BAD_TAG = 2
127OFPBMC_BAD_DL_ADDR_MASK = 3
128OFPBMC_BAD_NW_ADDR_MASK = 4
129OFPBMC_BAD_WILDCARDS = 5
130OFPBMC_BAD_FIELD = 6
131OFPBMC_BAD_VALUE = 7
132OFPBMC_BAD_MASK = 8
133OFPBMC_BAD_PREREQ = 9
134OFPBMC_DUP_FIELD = 10
135OFPBMC_EPERM = 11
136
137ofp_bad_match_code_map = {
138 0: 'OFPBMC_BAD_TYPE',
139 1: 'OFPBMC_BAD_LEN',
140 2: 'OFPBMC_BAD_TAG',
141 3: 'OFPBMC_BAD_DL_ADDR_MASK',
142 4: 'OFPBMC_BAD_NW_ADDR_MASK',
143 5: 'OFPBMC_BAD_WILDCARDS',
144 6: 'OFPBMC_BAD_FIELD',
145 7: 'OFPBMC_BAD_VALUE',
146 8: 'OFPBMC_BAD_MASK',
147 9: 'OFPBMC_BAD_PREREQ',
148 10: 'OFPBMC_DUP_FIELD',
149 11: 'OFPBMC_EPERM',
150}
151
152# Identifiers from group ofp_bad_request_code
153OFPBRC_BAD_VERSION = 0
154OFPBRC_BAD_TYPE = 1
155OFPBRC_BAD_STAT = 2
156OFPBRC_BAD_EXPERIMENTER = 3
157OFPBRC_BAD_EXP_TYPE = 4
158OFPBRC_EPERM = 5
159OFPBRC_BAD_LEN = 6
160OFPBRC_BUFFER_EMPTY = 7
161OFPBRC_BUFFER_UNKNOWN = 8
162OFPBRC_BAD_TABLE_ID = 9
163OFPBRC_IS_SLAVE = 10
164OFPBRC_BAD_PORT = 11
165OFPBRC_BAD_PACKET = 12
166
167ofp_bad_request_code_map = {
168 0: 'OFPBRC_BAD_VERSION',
169 1: 'OFPBRC_BAD_TYPE',
170 2: 'OFPBRC_BAD_STAT',
171 3: 'OFPBRC_BAD_EXPERIMENTER',
172 4: 'OFPBRC_BAD_EXP_TYPE',
173 5: 'OFPBRC_EPERM',
174 6: 'OFPBRC_BAD_LEN',
175 7: 'OFPBRC_BUFFER_EMPTY',
176 8: 'OFPBRC_BUFFER_UNKNOWN',
177 9: 'OFPBRC_BAD_TABLE_ID',
178 10: 'OFPBRC_IS_SLAVE',
179 11: 'OFPBRC_BAD_PORT',
180 12: 'OFPBRC_BAD_PACKET',
181}
182
Dan Talaycof6202252013-07-02 01:00:29 -0700183# Identifiers from group ofp_bsn_vport_q_in_q_untagged
184OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
185
186ofp_bsn_vport_q_in_q_untagged_map = {
187 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
188}
189
Rich Lanec2ee4b82013-04-24 17:12:38 -0700190# Identifiers from group ofp_capabilities
191OFPC_FLOW_STATS = 1
192OFPC_TABLE_STATS = 2
193OFPC_PORT_STATS = 4
194OFPC_GROUP_STATS = 8
195OFPC_IP_REASM = 32
196OFPC_QUEUE_STATS = 64
197OFPC_PORT_BLOCKED = 256
198
199ofp_capabilities_map = {
200 1: 'OFPC_FLOW_STATS',
201 2: 'OFPC_TABLE_STATS',
202 4: 'OFPC_PORT_STATS',
203 8: 'OFPC_GROUP_STATS',
204 32: 'OFPC_IP_REASM',
205 64: 'OFPC_QUEUE_STATS',
206 256: 'OFPC_PORT_BLOCKED',
207}
208
209# Identifiers from group ofp_config_flags
210OFPC_FRAG_NORMAL = 0
211OFPC_FRAG_DROP = 1
212OFPC_FRAG_REASM = 2
213OFPC_FRAG_MASK = 3
214OFPC_INVALID_TTL_TO_CONTROLLER = 4
215
216ofp_config_flags_map = {
217 0: 'OFPC_FRAG_NORMAL',
218 1: 'OFPC_FRAG_DROP',
219 2: 'OFPC_FRAG_REASM',
220 3: 'OFPC_FRAG_MASK',
221 4: 'OFPC_INVALID_TTL_TO_CONTROLLER',
222}
223
224# Identifiers from group ofp_controller_max_len
225OFPCML_MAX = 65509
226OFPCML_NO_BUFFER = 65535
227
228ofp_controller_max_len_map = {
229 65509: 'OFPCML_MAX',
230 65535: 'OFPCML_NO_BUFFER',
231}
232
233# Identifiers from group ofp_controller_role
234OFPCR_ROLE_NOCHANGE = 0
235OFPCR_ROLE_EQUAL = 1
236OFPCR_ROLE_MASTER = 2
237OFPCR_ROLE_SLAVE = 3
238
239ofp_controller_role_map = {
240 0: 'OFPCR_ROLE_NOCHANGE',
241 1: 'OFPCR_ROLE_EQUAL',
242 2: 'OFPCR_ROLE_MASTER',
243 3: 'OFPCR_ROLE_SLAVE',
244}
245
246# Identifiers from group ofp_error_type
247OFPET_HELLO_FAILED = 0
248OFPET_BAD_REQUEST = 1
249OFPET_BAD_ACTION = 2
250OFPET_BAD_INSTRUCTION = 3
251OFPET_BAD_MATCH = 4
252OFPET_FLOW_MOD_FAILED = 5
253OFPET_GROUP_MOD_FAILED = 6
254OFPET_PORT_MOD_FAILED = 7
255OFPET_TABLE_MOD_FAILED = 8
256OFPET_QUEUE_OP_FAILED = 9
257OFPET_SWITCH_CONFIG_FAILED = 10
258OFPET_ROLE_REQUEST_FAILED = 11
259OFPET_EXPERIMENTER = 65535
260
261ofp_error_type_map = {
262 0: 'OFPET_HELLO_FAILED',
263 1: 'OFPET_BAD_REQUEST',
264 2: 'OFPET_BAD_ACTION',
265 3: 'OFPET_BAD_INSTRUCTION',
266 4: 'OFPET_BAD_MATCH',
267 5: 'OFPET_FLOW_MOD_FAILED',
268 6: 'OFPET_GROUP_MOD_FAILED',
269 7: 'OFPET_PORT_MOD_FAILED',
270 8: 'OFPET_TABLE_MOD_FAILED',
271 9: 'OFPET_QUEUE_OP_FAILED',
272 10: 'OFPET_SWITCH_CONFIG_FAILED',
273 11: 'OFPET_ROLE_REQUEST_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
317
318ofp_flow_mod_flags_map = {
319 1: 'OFPFF_SEND_FLOW_REM',
320 2: 'OFPFF_CHECK_OVERLAP',
321 4: 'OFPFF_RESET_COUNTS',
322}
323
324# Identifiers from group ofp_flow_removed_reason
325OFPRR_IDLE_TIMEOUT = 0
326OFPRR_HARD_TIMEOUT = 1
327OFPRR_DELETE = 2
328OFPRR_GROUP_DELETE = 3
329
330ofp_flow_removed_reason_map = {
331 0: 'OFPRR_IDLE_TIMEOUT',
332 1: 'OFPRR_HARD_TIMEOUT',
333 2: 'OFPRR_DELETE',
334 3: 'OFPRR_GROUP_DELETE',
335}
336
337# Identifiers from group ofp_group
338OFPG_MAX = 4294967040
339OFPG_ALL = 4294967292
340OFPG_ANY = 4294967295
341
342ofp_group_map = {
343 4294967040: 'OFPG_MAX',
344 4294967292: 'OFPG_ALL',
345 4294967295: 'OFPG_ANY',
346}
347
348# Identifiers from group ofp_group_capabilities
349OFPGFC_SELECT_WEIGHT = 1
350OFPGFC_SELECT_LIVENESS = 2
351OFPGFC_CHAINING = 4
352OFPGFC_CHAINING_CHECKS = 8
353
354ofp_group_capabilities_map = {
355 1: 'OFPGFC_SELECT_WEIGHT',
356 2: 'OFPGFC_SELECT_LIVENESS',
357 4: 'OFPGFC_CHAINING',
358 8: 'OFPGFC_CHAINING_CHECKS',
359}
360
361# Identifiers from group ofp_group_mod_command
362OFPGC_ADD = 0
363OFPGC_MODIFY = 1
364OFPGC_DELETE = 2
365
366ofp_group_mod_command_map = {
367 0: 'OFPGC_ADD',
368 1: 'OFPGC_MODIFY',
369 2: 'OFPGC_DELETE',
370}
371
372# Identifiers from group ofp_group_mod_failed_code
373OFPGMFC_GROUP_EXISTS = 0
374OFPGMFC_INVALID_GROUP = 1
375OFPGMFC_WEIGHT_UNSUPPORTED = 2
376OFPGMFC_OUT_OF_GROUPS = 3
377OFPGMFC_OUT_OF_BUCKETS = 4
378OFPGMFC_CHAINING_UNSUPPORTED = 5
379OFPGMFC_WATCH_UNSUPPORTED = 6
380OFPGMFC_LOOP = 7
381OFPGMFC_UNKNOWN_GROUP = 8
382OFPGMFC_CHAINED_GROUP = 9
383OFPGMFC_BAD_TYPE = 10
384OFPGMFC_BAD_COMMAND = 11
385OFPGMFC_BAD_BUCKET = 12
386OFPGMFC_BAD_WATCH = 13
387OFPGMFC_EPERM = 14
388
389ofp_group_mod_failed_code_map = {
390 0: 'OFPGMFC_GROUP_EXISTS',
391 1: 'OFPGMFC_INVALID_GROUP',
392 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
393 3: 'OFPGMFC_OUT_OF_GROUPS',
394 4: 'OFPGMFC_OUT_OF_BUCKETS',
395 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
396 6: 'OFPGMFC_WATCH_UNSUPPORTED',
397 7: 'OFPGMFC_LOOP',
398 8: 'OFPGMFC_UNKNOWN_GROUP',
399 9: 'OFPGMFC_CHAINED_GROUP',
400 10: 'OFPGMFC_BAD_TYPE',
401 11: 'OFPGMFC_BAD_COMMAND',
402 12: 'OFPGMFC_BAD_BUCKET',
403 13: 'OFPGMFC_BAD_WATCH',
404 14: 'OFPGMFC_EPERM',
405}
406
407# Identifiers from group ofp_group_type
408OFPGT_ALL = 0
409OFPGT_SELECT = 1
410OFPGT_INDIRECT = 2
411OFPGT_FF = 3
412
413ofp_group_type_map = {
414 0: 'OFPGT_ALL',
415 1: 'OFPGT_SELECT',
416 2: 'OFPGT_INDIRECT',
417 3: 'OFPGT_FF',
418}
419
420# Identifiers from group ofp_hello_failed_code
421OFPHFC_INCOMPATIBLE = 0
422OFPHFC_EPERM = 1
423
424ofp_hello_failed_code_map = {
425 0: 'OFPHFC_INCOMPATIBLE',
426 1: 'OFPHFC_EPERM',
427}
428
429# Identifiers from group ofp_instruction_type
430OFPIT_GOTO_TABLE = 1
431OFPIT_WRITE_METADATA = 2
432OFPIT_WRITE_ACTIONS = 3
433OFPIT_APPLY_ACTIONS = 4
434OFPIT_CLEAR_ACTIONS = 5
435OFPIT_EXPERIMENTER = 65535
436
437ofp_instruction_type_map = {
438 1: 'OFPIT_GOTO_TABLE',
439 2: 'OFPIT_WRITE_METADATA',
440 3: 'OFPIT_WRITE_ACTIONS',
441 4: 'OFPIT_APPLY_ACTIONS',
442 5: 'OFPIT_CLEAR_ACTIONS',
443 65535: 'OFPIT_EXPERIMENTER',
444}
445
446# Identifiers from group ofp_match_type
447OFPMT_STANDARD = 0
448OFPMT_OXM = 1
449
450ofp_match_type_map = {
451 0: 'OFPMT_STANDARD',
452 1: 'OFPMT_OXM',
453}
454
455# Identifiers from group ofp_oxm_class
456OFPXMC_NXM_0 = 0
457OFPXMC_NXM_1 = 1
458OFPXMC_OPENFLOW_BASIC = 32768
459OFPXMC_EXPERIMENTER = 65535
460
461ofp_oxm_class_map = {
462 0: 'OFPXMC_NXM_0',
463 1: 'OFPXMC_NXM_1',
464 32768: 'OFPXMC_OPENFLOW_BASIC',
465 65535: 'OFPXMC_EXPERIMENTER',
466}
467
468# Identifiers from group ofp_packet_in_reason
469OFPR_NO_MATCH = 0
470OFPR_ACTION = 1
471OFPR_INVALID_TTL = 2
472
473ofp_packet_in_reason_map = {
474 0: 'OFPR_NO_MATCH',
475 1: 'OFPR_ACTION',
476 2: 'OFPR_INVALID_TTL',
477}
478
479# Identifiers from group ofp_port
480OFPP_MAX = 4294967040
481OFPP_IN_PORT = 4294967288
482OFPP_TABLE = 4294967289
483OFPP_NORMAL = 4294967290
484OFPP_FLOOD = 4294967291
485OFPP_ALL = 4294967292
486OFPP_CONTROLLER = 4294967293
487OFPP_LOCAL = 4294967294
488
489ofp_port_map = {
490 4294967040: 'OFPP_MAX',
491 4294967288: 'OFPP_IN_PORT',
492 4294967289: 'OFPP_TABLE',
493 4294967290: 'OFPP_NORMAL',
494 4294967291: 'OFPP_FLOOD',
495 4294967292: 'OFPP_ALL',
496 4294967293: 'OFPP_CONTROLLER',
497 4294967294: 'OFPP_LOCAL',
498}
499
500# Identifiers from group ofp_port_config
501OFPPC_PORT_DOWN = 1
502OFPPC_NO_RECV = 4
503OFPPC_NO_FWD = 32
504OFPPC_NO_PACKET_IN = 64
505
506ofp_port_config_map = {
507 1: 'OFPPC_PORT_DOWN',
508 4: 'OFPPC_NO_RECV',
509 32: 'OFPPC_NO_FWD',
510 64: 'OFPPC_NO_PACKET_IN',
511}
512
513# Identifiers from group ofp_port_features
514OFPPF_10MB_HD = 1
515OFPPF_10MB_FD = 2
516OFPPF_100MB_HD = 4
517OFPPF_100MB_FD = 8
518OFPPF_1GB_HD = 16
519OFPPF_1GB_FD = 32
520OFPPF_10GB_FD = 64
521OFPPF_40GB_FD = 128
522OFPPF_100GB_FD = 256
523OFPPF_1TB_FD = 512
524OFPPF_OTHER = 1024
525OFPPF_COPPER = 2048
526OFPPF_FIBER = 4096
527OFPPF_AUTONEG = 8192
528OFPPF_PAUSE = 16384
529OFPPF_PAUSE_ASYM = 32768
530
531ofp_port_features_map = {
532 1: 'OFPPF_10MB_HD',
533 2: 'OFPPF_10MB_FD',
534 4: 'OFPPF_100MB_HD',
535 8: 'OFPPF_100MB_FD',
536 16: 'OFPPF_1GB_HD',
537 32: 'OFPPF_1GB_FD',
538 64: 'OFPPF_10GB_FD',
539 128: 'OFPPF_40GB_FD',
540 256: 'OFPPF_100GB_FD',
541 512: 'OFPPF_1TB_FD',
542 1024: 'OFPPF_OTHER',
543 2048: 'OFPPF_COPPER',
544 4096: 'OFPPF_FIBER',
545 8192: 'OFPPF_AUTONEG',
546 16384: 'OFPPF_PAUSE',
547 32768: 'OFPPF_PAUSE_ASYM',
548}
549
550# Identifiers from group ofp_port_mod_failed_code
551OFPPMFC_BAD_PORT = 0
552OFPPMFC_BAD_HW_ADDR = 1
553OFPPMFC_BAD_CONFIG = 2
554OFPPMFC_BAD_ADVERTISE = 3
555OFPPMFC_EPERM = 4
556
557ofp_port_mod_failed_code_map = {
558 0: 'OFPPMFC_BAD_PORT',
559 1: 'OFPPMFC_BAD_HW_ADDR',
560 2: 'OFPPMFC_BAD_CONFIG',
561 3: 'OFPPMFC_BAD_ADVERTISE',
562 4: 'OFPPMFC_EPERM',
563}
564
565# Identifiers from group ofp_port_no
566OFPP_ANY = 4294967295
567
568ofp_port_no_map = {
569 4294967295: 'OFPP_ANY',
570}
571
572# Identifiers from group ofp_port_reason
573OFPPR_ADD = 0
574OFPPR_DELETE = 1
575OFPPR_MODIFY = 2
576
577ofp_port_reason_map = {
578 0: 'OFPPR_ADD',
579 1: 'OFPPR_DELETE',
580 2: 'OFPPR_MODIFY',
581}
582
583# Identifiers from group ofp_port_state
584OFPPS_LINK_DOWN = 1
585OFPPS_BLOCKED = 2
586OFPPS_LIVE = 4
587
588ofp_port_state_map = {
589 1: 'OFPPS_LINK_DOWN',
590 2: 'OFPPS_BLOCKED',
591 4: 'OFPPS_LIVE',
592}
593
594# Identifiers from group ofp_queue_op_failed_code
595OFPQOFC_BAD_PORT = 0
596OFPQOFC_BAD_QUEUE = 1
597OFPQOFC_EPERM = 2
598
599ofp_queue_op_failed_code_map = {
600 0: 'OFPQOFC_BAD_PORT',
601 1: 'OFPQOFC_BAD_QUEUE',
602 2: 'OFPQOFC_EPERM',
603}
604
605# Identifiers from group ofp_queue_properties
606OFPQT_MIN_RATE = 1
607OFPQT_MAX_RATE = 2
608OFPQT_EXPERIMENTER = 65535
609
610ofp_queue_properties_map = {
611 1: 'OFPQT_MIN_RATE',
612 2: 'OFPQT_MAX_RATE',
613 65535: 'OFPQT_EXPERIMENTER',
614}
615
616# Identifiers from group ofp_role_request_failed_code
617OFPRRFC_STALE = 0
618OFPRRFC_UNSUP = 1
619OFPRRFC_BAD_ROLE = 2
620
621ofp_role_request_failed_code_map = {
622 0: 'OFPRRFC_STALE',
623 1: 'OFPRRFC_UNSUP',
624 2: 'OFPRRFC_BAD_ROLE',
625}
626
627# Identifiers from group ofp_stats_reply_flags
628OFPSF_REPLY_MORE = 1
629
630ofp_stats_reply_flags_map = {
631 1: 'OFPSF_REPLY_MORE',
632}
633
634# Identifiers from group ofp_stats_types
635OFPST_DESC = 0
636OFPST_FLOW = 1
637OFPST_AGGREGATE = 2
638OFPST_TABLE = 3
639OFPST_PORT = 4
640OFPST_QUEUE = 5
641OFPST_GROUP = 6
642OFPST_GROUP_DESC = 7
643OFPST_GROUP_FEATURES = 8
644OFPST_EXPERIMENTER = 65535
645
646ofp_stats_types_map = {
647 0: 'OFPST_DESC',
648 1: 'OFPST_FLOW',
649 2: 'OFPST_AGGREGATE',
650 3: 'OFPST_TABLE',
651 4: 'OFPST_PORT',
652 5: 'OFPST_QUEUE',
653 6: 'OFPST_GROUP',
654 7: 'OFPST_GROUP_DESC',
655 8: 'OFPST_GROUP_FEATURES',
656 65535: 'OFPST_EXPERIMENTER',
657}
658
659# Identifiers from group ofp_switch_config_failed_code
660OFPSCFC_BAD_FLAGS = 0
661OFPSCFC_BAD_LEN = 1
662OFPSCFC_EPERM = 2
663
664ofp_switch_config_failed_code_map = {
665 0: 'OFPSCFC_BAD_FLAGS',
666 1: 'OFPSCFC_BAD_LEN',
667 2: 'OFPSCFC_EPERM',
668}
669
670# Identifiers from group ofp_table
671OFPTT_MAX = 254
672OFPTT_ALL = 255
673
674ofp_table_map = {
675 254: 'OFPTT_MAX',
676 255: 'OFPTT_ALL',
677}
678
679# Identifiers from group ofp_table_config
680OFPTC_TABLE_MISS_CONTROLLER = 0
681OFPTC_TABLE_MISS_CONTINUE = 1
682OFPTC_TABLE_MISS_DROP = 2
683OFPTC_TABLE_MISS_MASK = 3
684
685ofp_table_config_map = {
686 0: 'OFPTC_TABLE_MISS_CONTROLLER',
687 1: 'OFPTC_TABLE_MISS_CONTINUE',
688 2: 'OFPTC_TABLE_MISS_DROP',
689 3: 'OFPTC_TABLE_MISS_MASK',
690}
691
692# Identifiers from group ofp_table_mod_failed_code
693OFPTMFC_BAD_TABLE = 0
694OFPTMFC_BAD_CONFIG = 1
695OFPTMFC_EPERM = 2
696
697ofp_table_mod_failed_code_map = {
698 0: 'OFPTMFC_BAD_TABLE',
699 1: 'OFPTMFC_BAD_CONFIG',
700 2: 'OFPTMFC_EPERM',
701}
702
703# Identifiers from group ofp_type
704OFPT_HELLO = 0
705OFPT_ERROR = 1
706OFPT_ECHO_REQUEST = 2
707OFPT_ECHO_REPLY = 3
708OFPT_EXPERIMENTER = 4
709OFPT_FEATURES_REQUEST = 5
710OFPT_FEATURES_REPLY = 6
711OFPT_GET_CONFIG_REQUEST = 7
712OFPT_GET_CONFIG_REPLY = 8
713OFPT_SET_CONFIG = 9
714OFPT_PACKET_IN = 10
715OFPT_FLOW_REMOVED = 11
716OFPT_PORT_STATUS = 12
717OFPT_PACKET_OUT = 13
718OFPT_FLOW_MOD = 14
719OFPT_GROUP_MOD = 15
720OFPT_PORT_MOD = 16
721OFPT_TABLE_MOD = 17
722OFPT_STATS_REQUEST = 18
723OFPT_STATS_REPLY = 19
724OFPT_BARRIER_REQUEST = 20
725OFPT_BARRIER_REPLY = 21
726OFPT_QUEUE_GET_CONFIG_REQUEST = 22
727OFPT_QUEUE_GET_CONFIG_REPLY = 23
728OFPT_ROLE_REQUEST = 24
729OFPT_ROLE_REPLY = 25
730
731ofp_type_map = {
732 0: 'OFPT_HELLO',
733 1: 'OFPT_ERROR',
734 2: 'OFPT_ECHO_REQUEST',
735 3: 'OFPT_ECHO_REPLY',
736 4: 'OFPT_EXPERIMENTER',
737 5: 'OFPT_FEATURES_REQUEST',
738 6: 'OFPT_FEATURES_REPLY',
739 7: 'OFPT_GET_CONFIG_REQUEST',
740 8: 'OFPT_GET_CONFIG_REPLY',
741 9: 'OFPT_SET_CONFIG',
742 10: 'OFPT_PACKET_IN',
743 11: 'OFPT_FLOW_REMOVED',
744 12: 'OFPT_PORT_STATUS',
745 13: 'OFPT_PACKET_OUT',
746 14: 'OFPT_FLOW_MOD',
747 15: 'OFPT_GROUP_MOD',
748 16: 'OFPT_PORT_MOD',
749 17: 'OFPT_TABLE_MOD',
750 18: 'OFPT_STATS_REQUEST',
751 19: 'OFPT_STATS_REPLY',
752 20: 'OFPT_BARRIER_REQUEST',
753 21: 'OFPT_BARRIER_REPLY',
754 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
755 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
756 24: 'OFPT_ROLE_REQUEST',
757 25: 'OFPT_ROLE_REPLY',
758}
759
760# Identifiers from group ofp_vlan_id
761OFPVID_NONE = 0
762OFPVID_PRESENT = 4096
763
764ofp_vlan_id_map = {
765 0: 'OFPVID_NONE',
766 4096: 'OFPVID_PRESENT',
767}
768