blob: 4360d370060d6b2b0efa557a8840466098c7749e [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 = 2
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
18OFPFW_ICMP_TYPE = 64
19OFPFW_ICMP_CODE = 128
20OFP_DL_TYPE_ETH2_CUTOFF = 1536
21OFP_DL_TYPE_NOT_ETH_TYPE = 1535
22OFP_VLAN_NONE = 0
23OFPMT_STANDARD_LENGTH = 88
24OFP_FLOW_PERMANENT = 0
Rich Lanec2ee4b82013-04-24 17:12:38 -070025OFP_DEFAULT_PRIORITY = 32768
Dan Talaycof6202252013-07-02 01:00:29 -070026DESC_STR_LEN = 256
27SERIAL_NUM_LEN = 32
Rich Lanec2ee4b82013-04-24 17:12:38 -070028OFPQ_ALL = 4294967295
Dan Talaycof6202252013-07-02 01:00:29 -070029OFPQ_MIN_RATE_UNCFG = 65535
Rich Lanec2ee4b82013-04-24 17:12:38 -070030
31# Identifiers from group ofp_action_type
32OFPAT_OUTPUT = 0
33OFPAT_SET_VLAN_VID = 1
34OFPAT_SET_VLAN_PCP = 2
35OFPAT_SET_DL_SRC = 3
36OFPAT_SET_DL_DST = 4
37OFPAT_SET_NW_SRC = 5
38OFPAT_SET_NW_DST = 6
39OFPAT_SET_NW_TOS = 7
40OFPAT_SET_NW_ECN = 8
41OFPAT_SET_TP_SRC = 9
42OFPAT_SET_TP_DST = 10
43OFPAT_COPY_TTL_OUT = 11
44OFPAT_COPY_TTL_IN = 12
45OFPAT_SET_MPLS_LABEL = 13
46OFPAT_SET_MPLS_TC = 14
47OFPAT_SET_MPLS_TTL = 15
48OFPAT_DEC_MPLS_TTL = 16
49OFPAT_PUSH_VLAN = 17
50OFPAT_POP_VLAN = 18
51OFPAT_PUSH_MPLS = 19
52OFPAT_POP_MPLS = 20
53OFPAT_SET_QUEUE = 21
54OFPAT_GROUP = 22
55OFPAT_SET_NW_TTL = 23
56OFPAT_DEC_NW_TTL = 24
57OFPAT_EXPERIMENTER = 65535
58
59ofp_action_type_map = {
60 0: 'OFPAT_OUTPUT',
61 1: 'OFPAT_SET_VLAN_VID',
62 2: 'OFPAT_SET_VLAN_PCP',
63 3: 'OFPAT_SET_DL_SRC',
64 4: 'OFPAT_SET_DL_DST',
65 5: 'OFPAT_SET_NW_SRC',
66 6: 'OFPAT_SET_NW_DST',
67 7: 'OFPAT_SET_NW_TOS',
68 8: 'OFPAT_SET_NW_ECN',
69 9: 'OFPAT_SET_TP_SRC',
70 10: 'OFPAT_SET_TP_DST',
71 11: 'OFPAT_COPY_TTL_OUT',
72 12: 'OFPAT_COPY_TTL_IN',
73 13: 'OFPAT_SET_MPLS_LABEL',
74 14: 'OFPAT_SET_MPLS_TC',
75 15: 'OFPAT_SET_MPLS_TTL',
76 16: 'OFPAT_DEC_MPLS_TTL',
77 17: 'OFPAT_PUSH_VLAN',
78 18: 'OFPAT_POP_VLAN',
79 19: 'OFPAT_PUSH_MPLS',
80 20: 'OFPAT_POP_MPLS',
81 21: 'OFPAT_SET_QUEUE',
82 22: 'OFPAT_GROUP',
83 23: 'OFPAT_SET_NW_TTL',
84 24: 'OFPAT_DEC_NW_TTL',
85 65535: 'OFPAT_EXPERIMENTER',
86}
87
88# Identifiers from group ofp_bad_action_code
89OFPBAC_BAD_TYPE = 0
90OFPBAC_BAD_LEN = 1
91OFPBAC_BAD_EXPERIMENTER = 2
92OFPBAC_BAD_EXPERIMENTER_TYPE = 3
93OFPBAC_BAD_OUT_PORT = 4
94OFPBAC_BAD_ARGUMENT = 5
95OFPBAC_EPERM = 6
96OFPBAC_TOO_MANY = 7
97OFPBAC_BAD_QUEUE = 8
98OFPBAC_BAD_OUT_GROUP = 9
99OFPBAC_MATCH_INCONSISTENT = 10
100OFPBAC_UNSUPPORTED_ORDER = 11
101OFPBAC_BAD_TAG = 12
102
103ofp_bad_action_code_map = {
104 0: 'OFPBAC_BAD_TYPE',
105 1: 'OFPBAC_BAD_LEN',
106 2: 'OFPBAC_BAD_EXPERIMENTER',
107 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
108 4: 'OFPBAC_BAD_OUT_PORT',
109 5: 'OFPBAC_BAD_ARGUMENT',
110 6: 'OFPBAC_EPERM',
111 7: 'OFPBAC_TOO_MANY',
112 8: 'OFPBAC_BAD_QUEUE',
113 9: 'OFPBAC_BAD_OUT_GROUP',
114 10: 'OFPBAC_MATCH_INCONSISTENT',
115 11: 'OFPBAC_UNSUPPORTED_ORDER',
116 12: 'OFPBAC_BAD_TAG',
117}
118
119# Identifiers from group ofp_bad_instruction_code
120OFPBIC_UNKNOWN_INST = 0
121OFPBIC_UNSUP_INST = 1
122OFPBIC_BAD_TABLE_ID = 2
123OFPBIC_UNSUP_METADATA = 3
124OFPBIC_UNSUP_METADATA_MASK = 4
125OFPBIC_UNSUP_EXP_INST = 5
126
127ofp_bad_instruction_code_map = {
128 0: 'OFPBIC_UNKNOWN_INST',
129 1: 'OFPBIC_UNSUP_INST',
130 2: 'OFPBIC_BAD_TABLE_ID',
131 3: 'OFPBIC_UNSUP_METADATA',
132 4: 'OFPBIC_UNSUP_METADATA_MASK',
133 5: 'OFPBIC_UNSUP_EXP_INST',
134}
135
136# Identifiers from group ofp_bad_match_code
137OFPBMC_BAD_TYPE = 0
138OFPBMC_BAD_LEN = 1
139OFPBMC_BAD_TAG = 2
140OFPBMC_BAD_DL_ADDR_MASK = 3
141OFPBMC_BAD_NW_ADDR_MASK = 4
142OFPBMC_BAD_WILDCARDS = 5
143OFPBMC_BAD_FIELD = 6
144OFPBMC_BAD_VALUE = 7
145
146ofp_bad_match_code_map = {
147 0: 'OFPBMC_BAD_TYPE',
148 1: 'OFPBMC_BAD_LEN',
149 2: 'OFPBMC_BAD_TAG',
150 3: 'OFPBMC_BAD_DL_ADDR_MASK',
151 4: 'OFPBMC_BAD_NW_ADDR_MASK',
152 5: 'OFPBMC_BAD_WILDCARDS',
153 6: 'OFPBMC_BAD_FIELD',
154 7: 'OFPBMC_BAD_VALUE',
155}
156
157# Identifiers from group ofp_bad_request_code
158OFPBRC_BAD_VERSION = 0
159OFPBRC_BAD_TYPE = 1
160OFPBRC_BAD_STAT = 2
161OFPBRC_BAD_EXPERIMENTER = 3
162OFPBRC_BAD_SUBTYPE = 4
163OFPBRC_EPERM = 5
164OFPBRC_BAD_LEN = 6
165OFPBRC_BUFFER_EMPTY = 7
166OFPBRC_BUFFER_UNKNOWN = 8
167OFPBRC_BAD_TABLE_ID = 9
168
169ofp_bad_request_code_map = {
170 0: 'OFPBRC_BAD_VERSION',
171 1: 'OFPBRC_BAD_TYPE',
172 2: 'OFPBRC_BAD_STAT',
173 3: 'OFPBRC_BAD_EXPERIMENTER',
174 4: 'OFPBRC_BAD_SUBTYPE',
175 5: 'OFPBRC_EPERM',
176 6: 'OFPBRC_BAD_LEN',
177 7: 'OFPBRC_BUFFER_EMPTY',
178 8: 'OFPBRC_BUFFER_UNKNOWN',
179 9: 'OFPBRC_BAD_TABLE_ID',
180}
181
Dan Talaycof6202252013-07-02 01:00:29 -0700182# Identifiers from group ofp_bsn_vport_q_in_q_untagged
183OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
184
185ofp_bsn_vport_q_in_q_untagged_map = {
186 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
187}
188
Rich Laned53156a2013-08-05 17:17:33 -0700189# Identifiers from group ofp_bsn_vport_status
190OF_BSN_VPORT_STATUS_OK = 0
191OF_BSN_VPORT_STATUS_FAILED = 1
192
193ofp_bsn_vport_status_map = {
194 0: 'OF_BSN_VPORT_STATUS_OK',
195 1: 'OF_BSN_VPORT_STATUS_FAILED',
196}
197
Rich Lanec2ee4b82013-04-24 17:12:38 -0700198# Identifiers from group ofp_capabilities
199OFPC_FLOW_STATS = 1
200OFPC_TABLE_STATS = 2
201OFPC_PORT_STATS = 4
202OFPC_GROUP_STATS = 8
203OFPC_IP_REASM = 32
204OFPC_QUEUE_STATS = 64
205OFPC_ARP_MATCH_IP = 128
206
207ofp_capabilities_map = {
208 1: 'OFPC_FLOW_STATS',
209 2: 'OFPC_TABLE_STATS',
210 4: 'OFPC_PORT_STATS',
211 8: 'OFPC_GROUP_STATS',
212 32: 'OFPC_IP_REASM',
213 64: 'OFPC_QUEUE_STATS',
214 128: 'OFPC_ARP_MATCH_IP',
215}
216
217# Identifiers from group ofp_config_flags
218OFPC_FRAG_NORMAL = 0
219OFPC_FRAG_DROP = 1
220OFPC_FRAG_REASM = 2
221OFPC_FRAG_MASK = 3
222OFPC_INVALID_TTL_TO_CONTROLLER = 4
223
224ofp_config_flags_map = {
225 0: 'OFPC_FRAG_NORMAL',
226 1: 'OFPC_FRAG_DROP',
227 2: 'OFPC_FRAG_REASM',
228 3: 'OFPC_FRAG_MASK',
229 4: 'OFPC_INVALID_TTL_TO_CONTROLLER',
230}
231
232# Identifiers from group ofp_error_type
233OFPET_HELLO_FAILED = 0
234OFPET_BAD_REQUEST = 1
235OFPET_BAD_ACTION = 2
236OFPET_BAD_INSTRUCTION = 3
237OFPET_BAD_MATCH = 4
238OFPET_FLOW_MOD_FAILED = 5
239OFPET_GROUP_MOD_FAILED = 6
240OFPET_PORT_MOD_FAILED = 7
241OFPET_TABLE_MOD_FAILED = 8
242OFPET_QUEUE_OP_FAILED = 9
243OFPET_SWITCH_CONFIG_FAILED = 10
244
245ofp_error_type_map = {
246 0: 'OFPET_HELLO_FAILED',
247 1: 'OFPET_BAD_REQUEST',
248 2: 'OFPET_BAD_ACTION',
249 3: 'OFPET_BAD_INSTRUCTION',
250 4: 'OFPET_BAD_MATCH',
251 5: 'OFPET_FLOW_MOD_FAILED',
252 6: 'OFPET_GROUP_MOD_FAILED',
253 7: 'OFPET_PORT_MOD_FAILED',
254 8: 'OFPET_TABLE_MOD_FAILED',
255 9: 'OFPET_QUEUE_OP_FAILED',
256 10: 'OFPET_SWITCH_CONFIG_FAILED',
257}
258
259# Identifiers from group ofp_flow_mod_command
260OFPFC_ADD = 0
261OFPFC_MODIFY = 1
262OFPFC_MODIFY_STRICT = 2
263OFPFC_DELETE = 3
264OFPFC_DELETE_STRICT = 4
265
266ofp_flow_mod_command_map = {
267 0: 'OFPFC_ADD',
268 1: 'OFPFC_MODIFY',
269 2: 'OFPFC_MODIFY_STRICT',
270 3: 'OFPFC_DELETE',
271 4: 'OFPFC_DELETE_STRICT',
272}
273
274# Identifiers from group ofp_flow_mod_failed_code
275OFPFMFC_UNKNOWN = 0
276OFPFMFC_TABLE_FULL = 1
277OFPFMFC_BAD_TABLE_ID = 2
278OFPFMFC_OVERLAP = 3
279OFPFMFC_EPERM = 4
280OFPFMFC_BAD_TIMEOUT = 5
281OFPFMFC_BAD_COMMAND = 6
282
283ofp_flow_mod_failed_code_map = {
284 0: 'OFPFMFC_UNKNOWN',
285 1: 'OFPFMFC_TABLE_FULL',
286 2: 'OFPFMFC_BAD_TABLE_ID',
287 3: 'OFPFMFC_OVERLAP',
288 4: 'OFPFMFC_EPERM',
289 5: 'OFPFMFC_BAD_TIMEOUT',
290 6: 'OFPFMFC_BAD_COMMAND',
291}
292
293# Identifiers from group ofp_flow_mod_flags
294OFPFF_SEND_FLOW_REM = 1
295OFPFF_CHECK_OVERLAP = 2
296
297ofp_flow_mod_flags_map = {
298 1: 'OFPFF_SEND_FLOW_REM',
299 2: 'OFPFF_CHECK_OVERLAP',
300}
301
302# Identifiers from group ofp_flow_removed_reason
303OFPRR_IDLE_TIMEOUT = 0
304OFPRR_HARD_TIMEOUT = 1
305OFPRR_DELETE = 2
306OFPRR_GROUP_DELETE = 3
307
308ofp_flow_removed_reason_map = {
309 0: 'OFPRR_IDLE_TIMEOUT',
310 1: 'OFPRR_HARD_TIMEOUT',
311 2: 'OFPRR_DELETE',
312 3: 'OFPRR_GROUP_DELETE',
313}
314
315# Identifiers from group ofp_flow_wildcards
316OFPFW_IN_PORT = 1
317OFPFW_DL_VLAN = 2
318OFPFW_DL_VLAN_PCP = 4
319OFPFW_DL_TYPE = 8
320OFPFW_NW_TOS = 16
321OFPFW_NW_PROTO = 32
322OFPFW_TP_SRC = 64
323OFPFW_TP_DST = 128
324OFPFW_MPLS_LABEL = 256
325OFPFW_MPLS_TC = 512
326OFPFW_ALL = 1023
327
328ofp_flow_wildcards_map = {
329 1: 'OFPFW_IN_PORT',
330 2: 'OFPFW_DL_VLAN',
331 4: 'OFPFW_DL_VLAN_PCP',
332 8: 'OFPFW_DL_TYPE',
333 16: 'OFPFW_NW_TOS',
334 32: 'OFPFW_NW_PROTO',
335 64: 'OFPFW_TP_SRC',
336 128: 'OFPFW_TP_DST',
337 256: 'OFPFW_MPLS_LABEL',
338 512: 'OFPFW_MPLS_TC',
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_mod_command
353OFPGC_ADD = 0
354OFPGC_MODIFY = 1
355OFPGC_DELETE = 2
356
357ofp_group_mod_command_map = {
358 0: 'OFPGC_ADD',
359 1: 'OFPGC_MODIFY',
360 2: 'OFPGC_DELETE',
361}
362
363# Identifiers from group ofp_group_mod_failed_code
364OFPGMFC_GROUP_EXISTS = 0
365OFPGMFC_INVALID_GROUP = 1
366OFPGMFC_WEIGHT_UNSUPPORTED = 2
367OFPGMFC_OUT_OF_GROUPS = 3
368OFPGMFC_OUT_OF_BUCKETS = 4
369OFPGMFC_CHAINING_UNSUPPORTED = 5
370OFPGMFC_WATCH_UNSUPPORTED = 6
371OFPGMFC_LOOP = 7
372OFPGMFC_UNKNOWN_GROUP = 8
373
374ofp_group_mod_failed_code_map = {
375 0: 'OFPGMFC_GROUP_EXISTS',
376 1: 'OFPGMFC_INVALID_GROUP',
377 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
378 3: 'OFPGMFC_OUT_OF_GROUPS',
379 4: 'OFPGMFC_OUT_OF_BUCKETS',
380 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
381 6: 'OFPGMFC_WATCH_UNSUPPORTED',
382 7: 'OFPGMFC_LOOP',
383 8: 'OFPGMFC_UNKNOWN_GROUP',
384}
385
386# Identifiers from group ofp_group_type
387OFPGT_ALL = 0
388OFPGT_SELECT = 1
389OFPGT_INDIRECT = 2
390OFPGT_FF = 3
391
392ofp_group_type_map = {
393 0: 'OFPGT_ALL',
394 1: 'OFPGT_SELECT',
395 2: 'OFPGT_INDIRECT',
396 3: 'OFPGT_FF',
397}
398
399# Identifiers from group ofp_hello_failed_code
400OFPHFC_INCOMPATIBLE = 0
401OFPHFC_EPERM = 1
402
403ofp_hello_failed_code_map = {
404 0: 'OFPHFC_INCOMPATIBLE',
405 1: 'OFPHFC_EPERM',
406}
407
408# Identifiers from group ofp_instruction_type
409OFPIT_GOTO_TABLE = 1
410OFPIT_WRITE_METADATA = 2
411OFPIT_WRITE_ACTIONS = 3
412OFPIT_APPLY_ACTIONS = 4
413OFPIT_CLEAR_ACTIONS = 5
414OFPIT_EXPERIMENTER = 65535
415
416ofp_instruction_type_map = {
417 1: 'OFPIT_GOTO_TABLE',
418 2: 'OFPIT_WRITE_METADATA',
419 3: 'OFPIT_WRITE_ACTIONS',
420 4: 'OFPIT_APPLY_ACTIONS',
421 5: 'OFPIT_CLEAR_ACTIONS',
422 65535: 'OFPIT_EXPERIMENTER',
423}
424
425# Identifiers from group ofp_match_type
426OFPMT_STANDARD = 0
427
428ofp_match_type_map = {
429 0: 'OFPMT_STANDARD',
430}
431
432# Identifiers from group ofp_packet_in_reason
433OFPR_NO_MATCH = 0
434OFPR_ACTION = 1
435
436ofp_packet_in_reason_map = {
437 0: 'OFPR_NO_MATCH',
438 1: 'OFPR_ACTION',
439}
440
441# Identifiers from group ofp_port
442OFPP_MAX = 4294967040
443OFPP_IN_PORT = 4294967288
444OFPP_TABLE = 4294967289
445OFPP_NORMAL = 4294967290
446OFPP_FLOOD = 4294967291
447OFPP_ALL = 4294967292
448OFPP_CONTROLLER = 4294967293
449OFPP_LOCAL = 4294967294
450
451ofp_port_map = {
452 4294967040: 'OFPP_MAX',
453 4294967288: 'OFPP_IN_PORT',
454 4294967289: 'OFPP_TABLE',
455 4294967290: 'OFPP_NORMAL',
456 4294967291: 'OFPP_FLOOD',
457 4294967292: 'OFPP_ALL',
458 4294967293: 'OFPP_CONTROLLER',
459 4294967294: 'OFPP_LOCAL',
460}
461
462# Identifiers from group ofp_port_config
463OFPPC_PORT_DOWN = 1
464OFPPC_NO_RECV = 4
465OFPPC_NO_FWD = 32
466OFPPC_NO_PACKET_IN = 64
467
468ofp_port_config_map = {
469 1: 'OFPPC_PORT_DOWN',
470 4: 'OFPPC_NO_RECV',
471 32: 'OFPPC_NO_FWD',
472 64: 'OFPPC_NO_PACKET_IN',
473}
474
475# Identifiers from group ofp_port_features
476OFPPF_10MB_HD = 1
477OFPPF_10MB_FD = 2
478OFPPF_100MB_HD = 4
479OFPPF_100MB_FD = 8
480OFPPF_1GB_HD = 16
481OFPPF_1GB_FD = 32
482OFPPF_10GB_FD = 64
483OFPPF_40GB_FD = 128
484OFPPF_100GB_FD = 256
485OFPPF_1TB_FD = 512
486OFPPF_OTHER = 1024
487OFPPF_COPPER = 2048
488OFPPF_FIBER = 4096
489OFPPF_AUTONEG = 8192
490OFPPF_PAUSE = 16384
491OFPPF_PAUSE_ASYM = 32768
492
493ofp_port_features_map = {
494 1: 'OFPPF_10MB_HD',
495 2: 'OFPPF_10MB_FD',
496 4: 'OFPPF_100MB_HD',
497 8: 'OFPPF_100MB_FD',
498 16: 'OFPPF_1GB_HD',
499 32: 'OFPPF_1GB_FD',
500 64: 'OFPPF_10GB_FD',
501 128: 'OFPPF_40GB_FD',
502 256: 'OFPPF_100GB_FD',
503 512: 'OFPPF_1TB_FD',
504 1024: 'OFPPF_OTHER',
505 2048: 'OFPPF_COPPER',
506 4096: 'OFPPF_FIBER',
507 8192: 'OFPPF_AUTONEG',
508 16384: 'OFPPF_PAUSE',
509 32768: 'OFPPF_PAUSE_ASYM',
510}
511
512# Identifiers from group ofp_port_mod_failed_code
513OFPPMFC_BAD_PORT = 0
514OFPPMFC_BAD_HW_ADDR = 1
515OFPPMFC_BAD_CONFIG = 2
516OFPPMFC_BAD_ADVERTISE = 3
517
518ofp_port_mod_failed_code_map = {
519 0: 'OFPPMFC_BAD_PORT',
520 1: 'OFPPMFC_BAD_HW_ADDR',
521 2: 'OFPPMFC_BAD_CONFIG',
522 3: 'OFPPMFC_BAD_ADVERTISE',
523}
524
525# Identifiers from group ofp_port_no
526OFPP_ANY = 4294967295
527
528ofp_port_no_map = {
529 4294967295: 'OFPP_ANY',
530}
531
532# Identifiers from group ofp_port_reason
533OFPPR_ADD = 0
534OFPPR_DELETE = 1
535OFPPR_MODIFY = 2
536
537ofp_port_reason_map = {
538 0: 'OFPPR_ADD',
539 1: 'OFPPR_DELETE',
540 2: 'OFPPR_MODIFY',
541}
542
543# Identifiers from group ofp_port_state
544OFPPS_LINK_DOWN = 1
545OFPPS_BLOCKED = 2
546OFPPS_LIVE = 4
547
548ofp_port_state_map = {
549 1: 'OFPPS_LINK_DOWN',
550 2: 'OFPPS_BLOCKED',
551 4: 'OFPPS_LIVE',
552}
553
554# Identifiers from group ofp_queue_op_failed_code
555OFPQOFC_BAD_PORT = 0
556OFPQOFC_BAD_QUEUE = 1
557OFPQOFC_EPERM = 2
558
559ofp_queue_op_failed_code_map = {
560 0: 'OFPQOFC_BAD_PORT',
561 1: 'OFPQOFC_BAD_QUEUE',
562 2: 'OFPQOFC_EPERM',
563}
564
565# Identifiers from group ofp_queue_properties
566OFPQT_NONE = 0
567OFPQT_MIN_RATE = 1
568
569ofp_queue_properties_map = {
570 0: 'OFPQT_NONE',
571 1: 'OFPQT_MIN_RATE',
572}
573
574# Identifiers from group ofp_stats_reply_flags
575OFPSF_REPLY_MORE = 1
576
577ofp_stats_reply_flags_map = {
578 1: 'OFPSF_REPLY_MORE',
579}
580
581# Identifiers from group ofp_stats_types
582OFPST_DESC = 0
583OFPST_FLOW = 1
584OFPST_AGGREGATE = 2
585OFPST_TABLE = 3
586OFPST_PORT = 4
587OFPST_QUEUE = 5
588OFPST_GROUP = 6
589OFPST_GROUP_DESC = 7
590OFPST_EXPERIMENTER = 65535
591
592ofp_stats_types_map = {
593 0: 'OFPST_DESC',
594 1: 'OFPST_FLOW',
595 2: 'OFPST_AGGREGATE',
596 3: 'OFPST_TABLE',
597 4: 'OFPST_PORT',
598 5: 'OFPST_QUEUE',
599 6: 'OFPST_GROUP',
600 7: 'OFPST_GROUP_DESC',
601 65535: 'OFPST_EXPERIMENTER',
602}
603
604# Identifiers from group ofp_switch_config_failed_code
605OFPSCFC_BAD_FLAGS = 0
606OFPSCFC_BAD_LEN = 1
607
608ofp_switch_config_failed_code_map = {
609 0: 'OFPSCFC_BAD_FLAGS',
610 1: 'OFPSCFC_BAD_LEN',
611}
612
613# Identifiers from group ofp_table_config
614OFPTC_TABLE_MISS_CONTROLLER = 0
615OFPTC_TABLE_MISS_CONTINUE = 1
616OFPTC_TABLE_MISS_DROP = 2
617OFPTC_TABLE_MISS_MASK = 3
618
619ofp_table_config_map = {
620 0: 'OFPTC_TABLE_MISS_CONTROLLER',
621 1: 'OFPTC_TABLE_MISS_CONTINUE',
622 2: 'OFPTC_TABLE_MISS_DROP',
623 3: 'OFPTC_TABLE_MISS_MASK',
624}
625
626# Identifiers from group ofp_table_mod_failed_code
627OFPTMFC_BAD_TABLE = 0
628OFPTMFC_BAD_CONFIG = 1
629
630ofp_table_mod_failed_code_map = {
631 0: 'OFPTMFC_BAD_TABLE',
632 1: 'OFPTMFC_BAD_CONFIG',
633}
634
635# Identifiers from group ofp_type
636OFPT_HELLO = 0
637OFPT_ERROR = 1
638OFPT_ECHO_REQUEST = 2
639OFPT_ECHO_REPLY = 3
640OFPT_EXPERIMENTER = 4
641OFPT_FEATURES_REQUEST = 5
642OFPT_FEATURES_REPLY = 6
643OFPT_GET_CONFIG_REQUEST = 7
644OFPT_GET_CONFIG_REPLY = 8
645OFPT_SET_CONFIG = 9
646OFPT_PACKET_IN = 10
647OFPT_FLOW_REMOVED = 11
648OFPT_PORT_STATUS = 12
649OFPT_PACKET_OUT = 13
650OFPT_FLOW_MOD = 14
651OFPT_GROUP_MOD = 15
652OFPT_PORT_MOD = 16
653OFPT_TABLE_MOD = 17
654OFPT_STATS_REQUEST = 18
655OFPT_STATS_REPLY = 19
656OFPT_BARRIER_REQUEST = 20
657OFPT_BARRIER_REPLY = 21
658OFPT_QUEUE_GET_CONFIG_REQUEST = 22
659OFPT_QUEUE_GET_CONFIG_REPLY = 23
660
661ofp_type_map = {
662 0: 'OFPT_HELLO',
663 1: 'OFPT_ERROR',
664 2: 'OFPT_ECHO_REQUEST',
665 3: 'OFPT_ECHO_REPLY',
666 4: 'OFPT_EXPERIMENTER',
667 5: 'OFPT_FEATURES_REQUEST',
668 6: 'OFPT_FEATURES_REPLY',
669 7: 'OFPT_GET_CONFIG_REQUEST',
670 8: 'OFPT_GET_CONFIG_REPLY',
671 9: 'OFPT_SET_CONFIG',
672 10: 'OFPT_PACKET_IN',
673 11: 'OFPT_FLOW_REMOVED',
674 12: 'OFPT_PORT_STATUS',
675 13: 'OFPT_PACKET_OUT',
676 14: 'OFPT_FLOW_MOD',
677 15: 'OFPT_GROUP_MOD',
678 16: 'OFPT_PORT_MOD',
679 17: 'OFPT_TABLE_MOD',
680 18: 'OFPT_STATS_REQUEST',
681 19: 'OFPT_STATS_REPLY',
682 20: 'OFPT_BARRIER_REQUEST',
683 21: 'OFPT_BARRIER_REPLY',
684 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
685 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
686}
687
688# Identifiers from group ofp_vlan_id
689OFPVID_ANY = 65534
690OFPVID_NONE = 65535
691
692ofp_vlan_id_map = {
693 65534: 'OFPVID_ANY',
694 65535: 'OFPVID_NONE',
695}
696