blob: bd0fd11ca5a9e6af99e5e8f9bea36bf119f3713d [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 Lanec2ee4b82013-04-24 17:12:38 -0700189# Identifiers from group ofp_capabilities
190OFPC_FLOW_STATS = 1
191OFPC_TABLE_STATS = 2
192OFPC_PORT_STATS = 4
193OFPC_GROUP_STATS = 8
194OFPC_IP_REASM = 32
195OFPC_QUEUE_STATS = 64
196OFPC_ARP_MATCH_IP = 128
197
198ofp_capabilities_map = {
199 1: 'OFPC_FLOW_STATS',
200 2: 'OFPC_TABLE_STATS',
201 4: 'OFPC_PORT_STATS',
202 8: 'OFPC_GROUP_STATS',
203 32: 'OFPC_IP_REASM',
204 64: 'OFPC_QUEUE_STATS',
205 128: 'OFPC_ARP_MATCH_IP',
206}
207
208# Identifiers from group ofp_config_flags
209OFPC_FRAG_NORMAL = 0
210OFPC_FRAG_DROP = 1
211OFPC_FRAG_REASM = 2
212OFPC_FRAG_MASK = 3
213OFPC_INVALID_TTL_TO_CONTROLLER = 4
214
215ofp_config_flags_map = {
216 0: 'OFPC_FRAG_NORMAL',
217 1: 'OFPC_FRAG_DROP',
218 2: 'OFPC_FRAG_REASM',
219 3: 'OFPC_FRAG_MASK',
220 4: 'OFPC_INVALID_TTL_TO_CONTROLLER',
221}
222
223# Identifiers from group ofp_error_type
224OFPET_HELLO_FAILED = 0
225OFPET_BAD_REQUEST = 1
226OFPET_BAD_ACTION = 2
227OFPET_BAD_INSTRUCTION = 3
228OFPET_BAD_MATCH = 4
229OFPET_FLOW_MOD_FAILED = 5
230OFPET_GROUP_MOD_FAILED = 6
231OFPET_PORT_MOD_FAILED = 7
232OFPET_TABLE_MOD_FAILED = 8
233OFPET_QUEUE_OP_FAILED = 9
234OFPET_SWITCH_CONFIG_FAILED = 10
235
236ofp_error_type_map = {
237 0: 'OFPET_HELLO_FAILED',
238 1: 'OFPET_BAD_REQUEST',
239 2: 'OFPET_BAD_ACTION',
240 3: 'OFPET_BAD_INSTRUCTION',
241 4: 'OFPET_BAD_MATCH',
242 5: 'OFPET_FLOW_MOD_FAILED',
243 6: 'OFPET_GROUP_MOD_FAILED',
244 7: 'OFPET_PORT_MOD_FAILED',
245 8: 'OFPET_TABLE_MOD_FAILED',
246 9: 'OFPET_QUEUE_OP_FAILED',
247 10: 'OFPET_SWITCH_CONFIG_FAILED',
248}
249
250# Identifiers from group ofp_flow_mod_command
251OFPFC_ADD = 0
252OFPFC_MODIFY = 1
253OFPFC_MODIFY_STRICT = 2
254OFPFC_DELETE = 3
255OFPFC_DELETE_STRICT = 4
256
257ofp_flow_mod_command_map = {
258 0: 'OFPFC_ADD',
259 1: 'OFPFC_MODIFY',
260 2: 'OFPFC_MODIFY_STRICT',
261 3: 'OFPFC_DELETE',
262 4: 'OFPFC_DELETE_STRICT',
263}
264
265# Identifiers from group ofp_flow_mod_failed_code
266OFPFMFC_UNKNOWN = 0
267OFPFMFC_TABLE_FULL = 1
268OFPFMFC_BAD_TABLE_ID = 2
269OFPFMFC_OVERLAP = 3
270OFPFMFC_EPERM = 4
271OFPFMFC_BAD_TIMEOUT = 5
272OFPFMFC_BAD_COMMAND = 6
273
274ofp_flow_mod_failed_code_map = {
275 0: 'OFPFMFC_UNKNOWN',
276 1: 'OFPFMFC_TABLE_FULL',
277 2: 'OFPFMFC_BAD_TABLE_ID',
278 3: 'OFPFMFC_OVERLAP',
279 4: 'OFPFMFC_EPERM',
280 5: 'OFPFMFC_BAD_TIMEOUT',
281 6: 'OFPFMFC_BAD_COMMAND',
282}
283
284# Identifiers from group ofp_flow_mod_flags
285OFPFF_SEND_FLOW_REM = 1
286OFPFF_CHECK_OVERLAP = 2
287
288ofp_flow_mod_flags_map = {
289 1: 'OFPFF_SEND_FLOW_REM',
290 2: 'OFPFF_CHECK_OVERLAP',
291}
292
293# Identifiers from group ofp_flow_removed_reason
294OFPRR_IDLE_TIMEOUT = 0
295OFPRR_HARD_TIMEOUT = 1
296OFPRR_DELETE = 2
297OFPRR_GROUP_DELETE = 3
298
299ofp_flow_removed_reason_map = {
300 0: 'OFPRR_IDLE_TIMEOUT',
301 1: 'OFPRR_HARD_TIMEOUT',
302 2: 'OFPRR_DELETE',
303 3: 'OFPRR_GROUP_DELETE',
304}
305
306# Identifiers from group ofp_flow_wildcards
307OFPFW_IN_PORT = 1
308OFPFW_DL_VLAN = 2
309OFPFW_DL_VLAN_PCP = 4
310OFPFW_DL_TYPE = 8
311OFPFW_NW_TOS = 16
312OFPFW_NW_PROTO = 32
313OFPFW_TP_SRC = 64
314OFPFW_TP_DST = 128
315OFPFW_MPLS_LABEL = 256
316OFPFW_MPLS_TC = 512
317OFPFW_ALL = 1023
318
319ofp_flow_wildcards_map = {
320 1: 'OFPFW_IN_PORT',
321 2: 'OFPFW_DL_VLAN',
322 4: 'OFPFW_DL_VLAN_PCP',
323 8: 'OFPFW_DL_TYPE',
324 16: 'OFPFW_NW_TOS',
325 32: 'OFPFW_NW_PROTO',
326 64: 'OFPFW_TP_SRC',
327 128: 'OFPFW_TP_DST',
328 256: 'OFPFW_MPLS_LABEL',
329 512: 'OFPFW_MPLS_TC',
330}
331
332# Identifiers from group ofp_group
333OFPG_MAX = 4294967040
334OFPG_ALL = 4294967292
335OFPG_ANY = 4294967295
336
337ofp_group_map = {
338 4294967040: 'OFPG_MAX',
339 4294967292: 'OFPG_ALL',
340 4294967295: 'OFPG_ANY',
341}
342
343# Identifiers from group ofp_group_mod_command
344OFPGC_ADD = 0
345OFPGC_MODIFY = 1
346OFPGC_DELETE = 2
347
348ofp_group_mod_command_map = {
349 0: 'OFPGC_ADD',
350 1: 'OFPGC_MODIFY',
351 2: 'OFPGC_DELETE',
352}
353
354# Identifiers from group ofp_group_mod_failed_code
355OFPGMFC_GROUP_EXISTS = 0
356OFPGMFC_INVALID_GROUP = 1
357OFPGMFC_WEIGHT_UNSUPPORTED = 2
358OFPGMFC_OUT_OF_GROUPS = 3
359OFPGMFC_OUT_OF_BUCKETS = 4
360OFPGMFC_CHAINING_UNSUPPORTED = 5
361OFPGMFC_WATCH_UNSUPPORTED = 6
362OFPGMFC_LOOP = 7
363OFPGMFC_UNKNOWN_GROUP = 8
364
365ofp_group_mod_failed_code_map = {
366 0: 'OFPGMFC_GROUP_EXISTS',
367 1: 'OFPGMFC_INVALID_GROUP',
368 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
369 3: 'OFPGMFC_OUT_OF_GROUPS',
370 4: 'OFPGMFC_OUT_OF_BUCKETS',
371 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
372 6: 'OFPGMFC_WATCH_UNSUPPORTED',
373 7: 'OFPGMFC_LOOP',
374 8: 'OFPGMFC_UNKNOWN_GROUP',
375}
376
377# Identifiers from group ofp_group_type
378OFPGT_ALL = 0
379OFPGT_SELECT = 1
380OFPGT_INDIRECT = 2
381OFPGT_FF = 3
382
383ofp_group_type_map = {
384 0: 'OFPGT_ALL',
385 1: 'OFPGT_SELECT',
386 2: 'OFPGT_INDIRECT',
387 3: 'OFPGT_FF',
388}
389
390# Identifiers from group ofp_hello_failed_code
391OFPHFC_INCOMPATIBLE = 0
392OFPHFC_EPERM = 1
393
394ofp_hello_failed_code_map = {
395 0: 'OFPHFC_INCOMPATIBLE',
396 1: 'OFPHFC_EPERM',
397}
398
399# Identifiers from group ofp_instruction_type
400OFPIT_GOTO_TABLE = 1
401OFPIT_WRITE_METADATA = 2
402OFPIT_WRITE_ACTIONS = 3
403OFPIT_APPLY_ACTIONS = 4
404OFPIT_CLEAR_ACTIONS = 5
405OFPIT_EXPERIMENTER = 65535
406
407ofp_instruction_type_map = {
408 1: 'OFPIT_GOTO_TABLE',
409 2: 'OFPIT_WRITE_METADATA',
410 3: 'OFPIT_WRITE_ACTIONS',
411 4: 'OFPIT_APPLY_ACTIONS',
412 5: 'OFPIT_CLEAR_ACTIONS',
413 65535: 'OFPIT_EXPERIMENTER',
414}
415
416# Identifiers from group ofp_match_type
417OFPMT_STANDARD = 0
418
419ofp_match_type_map = {
420 0: 'OFPMT_STANDARD',
421}
422
423# Identifiers from group ofp_packet_in_reason
424OFPR_NO_MATCH = 0
425OFPR_ACTION = 1
426
427ofp_packet_in_reason_map = {
428 0: 'OFPR_NO_MATCH',
429 1: 'OFPR_ACTION',
430}
431
432# Identifiers from group ofp_port
433OFPP_MAX = 4294967040
434OFPP_IN_PORT = 4294967288
435OFPP_TABLE = 4294967289
436OFPP_NORMAL = 4294967290
437OFPP_FLOOD = 4294967291
438OFPP_ALL = 4294967292
439OFPP_CONTROLLER = 4294967293
440OFPP_LOCAL = 4294967294
441
442ofp_port_map = {
443 4294967040: 'OFPP_MAX',
444 4294967288: 'OFPP_IN_PORT',
445 4294967289: 'OFPP_TABLE',
446 4294967290: 'OFPP_NORMAL',
447 4294967291: 'OFPP_FLOOD',
448 4294967292: 'OFPP_ALL',
449 4294967293: 'OFPP_CONTROLLER',
450 4294967294: 'OFPP_LOCAL',
451}
452
453# Identifiers from group ofp_port_config
454OFPPC_PORT_DOWN = 1
455OFPPC_NO_RECV = 4
456OFPPC_NO_FWD = 32
457OFPPC_NO_PACKET_IN = 64
458
459ofp_port_config_map = {
460 1: 'OFPPC_PORT_DOWN',
461 4: 'OFPPC_NO_RECV',
462 32: 'OFPPC_NO_FWD',
463 64: 'OFPPC_NO_PACKET_IN',
464}
465
466# Identifiers from group ofp_port_features
467OFPPF_10MB_HD = 1
468OFPPF_10MB_FD = 2
469OFPPF_100MB_HD = 4
470OFPPF_100MB_FD = 8
471OFPPF_1GB_HD = 16
472OFPPF_1GB_FD = 32
473OFPPF_10GB_FD = 64
474OFPPF_40GB_FD = 128
475OFPPF_100GB_FD = 256
476OFPPF_1TB_FD = 512
477OFPPF_OTHER = 1024
478OFPPF_COPPER = 2048
479OFPPF_FIBER = 4096
480OFPPF_AUTONEG = 8192
481OFPPF_PAUSE = 16384
482OFPPF_PAUSE_ASYM = 32768
483
484ofp_port_features_map = {
485 1: 'OFPPF_10MB_HD',
486 2: 'OFPPF_10MB_FD',
487 4: 'OFPPF_100MB_HD',
488 8: 'OFPPF_100MB_FD',
489 16: 'OFPPF_1GB_HD',
490 32: 'OFPPF_1GB_FD',
491 64: 'OFPPF_10GB_FD',
492 128: 'OFPPF_40GB_FD',
493 256: 'OFPPF_100GB_FD',
494 512: 'OFPPF_1TB_FD',
495 1024: 'OFPPF_OTHER',
496 2048: 'OFPPF_COPPER',
497 4096: 'OFPPF_FIBER',
498 8192: 'OFPPF_AUTONEG',
499 16384: 'OFPPF_PAUSE',
500 32768: 'OFPPF_PAUSE_ASYM',
501}
502
503# Identifiers from group ofp_port_mod_failed_code
504OFPPMFC_BAD_PORT = 0
505OFPPMFC_BAD_HW_ADDR = 1
506OFPPMFC_BAD_CONFIG = 2
507OFPPMFC_BAD_ADVERTISE = 3
508
509ofp_port_mod_failed_code_map = {
510 0: 'OFPPMFC_BAD_PORT',
511 1: 'OFPPMFC_BAD_HW_ADDR',
512 2: 'OFPPMFC_BAD_CONFIG',
513 3: 'OFPPMFC_BAD_ADVERTISE',
514}
515
516# Identifiers from group ofp_port_no
517OFPP_ANY = 4294967295
518
519ofp_port_no_map = {
520 4294967295: 'OFPP_ANY',
521}
522
523# Identifiers from group ofp_port_reason
524OFPPR_ADD = 0
525OFPPR_DELETE = 1
526OFPPR_MODIFY = 2
527
528ofp_port_reason_map = {
529 0: 'OFPPR_ADD',
530 1: 'OFPPR_DELETE',
531 2: 'OFPPR_MODIFY',
532}
533
534# Identifiers from group ofp_port_state
535OFPPS_LINK_DOWN = 1
536OFPPS_BLOCKED = 2
537OFPPS_LIVE = 4
538
539ofp_port_state_map = {
540 1: 'OFPPS_LINK_DOWN',
541 2: 'OFPPS_BLOCKED',
542 4: 'OFPPS_LIVE',
543}
544
545# Identifiers from group ofp_queue_op_failed_code
546OFPQOFC_BAD_PORT = 0
547OFPQOFC_BAD_QUEUE = 1
548OFPQOFC_EPERM = 2
549
550ofp_queue_op_failed_code_map = {
551 0: 'OFPQOFC_BAD_PORT',
552 1: 'OFPQOFC_BAD_QUEUE',
553 2: 'OFPQOFC_EPERM',
554}
555
556# Identifiers from group ofp_queue_properties
557OFPQT_NONE = 0
558OFPQT_MIN_RATE = 1
559
560ofp_queue_properties_map = {
561 0: 'OFPQT_NONE',
562 1: 'OFPQT_MIN_RATE',
563}
564
565# Identifiers from group ofp_stats_reply_flags
566OFPSF_REPLY_MORE = 1
567
568ofp_stats_reply_flags_map = {
569 1: 'OFPSF_REPLY_MORE',
570}
571
572# Identifiers from group ofp_stats_types
573OFPST_DESC = 0
574OFPST_FLOW = 1
575OFPST_AGGREGATE = 2
576OFPST_TABLE = 3
577OFPST_PORT = 4
578OFPST_QUEUE = 5
579OFPST_GROUP = 6
580OFPST_GROUP_DESC = 7
581OFPST_EXPERIMENTER = 65535
582
583ofp_stats_types_map = {
584 0: 'OFPST_DESC',
585 1: 'OFPST_FLOW',
586 2: 'OFPST_AGGREGATE',
587 3: 'OFPST_TABLE',
588 4: 'OFPST_PORT',
589 5: 'OFPST_QUEUE',
590 6: 'OFPST_GROUP',
591 7: 'OFPST_GROUP_DESC',
592 65535: 'OFPST_EXPERIMENTER',
593}
594
595# Identifiers from group ofp_switch_config_failed_code
596OFPSCFC_BAD_FLAGS = 0
597OFPSCFC_BAD_LEN = 1
598
599ofp_switch_config_failed_code_map = {
600 0: 'OFPSCFC_BAD_FLAGS',
601 1: 'OFPSCFC_BAD_LEN',
602}
603
604# Identifiers from group ofp_table_config
605OFPTC_TABLE_MISS_CONTROLLER = 0
606OFPTC_TABLE_MISS_CONTINUE = 1
607OFPTC_TABLE_MISS_DROP = 2
608OFPTC_TABLE_MISS_MASK = 3
609
610ofp_table_config_map = {
611 0: 'OFPTC_TABLE_MISS_CONTROLLER',
612 1: 'OFPTC_TABLE_MISS_CONTINUE',
613 2: 'OFPTC_TABLE_MISS_DROP',
614 3: 'OFPTC_TABLE_MISS_MASK',
615}
616
617# Identifiers from group ofp_table_mod_failed_code
618OFPTMFC_BAD_TABLE = 0
619OFPTMFC_BAD_CONFIG = 1
620
621ofp_table_mod_failed_code_map = {
622 0: 'OFPTMFC_BAD_TABLE',
623 1: 'OFPTMFC_BAD_CONFIG',
624}
625
626# Identifiers from group ofp_type
627OFPT_HELLO = 0
628OFPT_ERROR = 1
629OFPT_ECHO_REQUEST = 2
630OFPT_ECHO_REPLY = 3
631OFPT_EXPERIMENTER = 4
632OFPT_FEATURES_REQUEST = 5
633OFPT_FEATURES_REPLY = 6
634OFPT_GET_CONFIG_REQUEST = 7
635OFPT_GET_CONFIG_REPLY = 8
636OFPT_SET_CONFIG = 9
637OFPT_PACKET_IN = 10
638OFPT_FLOW_REMOVED = 11
639OFPT_PORT_STATUS = 12
640OFPT_PACKET_OUT = 13
641OFPT_FLOW_MOD = 14
642OFPT_GROUP_MOD = 15
643OFPT_PORT_MOD = 16
644OFPT_TABLE_MOD = 17
645OFPT_STATS_REQUEST = 18
646OFPT_STATS_REPLY = 19
647OFPT_BARRIER_REQUEST = 20
648OFPT_BARRIER_REPLY = 21
649OFPT_QUEUE_GET_CONFIG_REQUEST = 22
650OFPT_QUEUE_GET_CONFIG_REPLY = 23
651
652ofp_type_map = {
653 0: 'OFPT_HELLO',
654 1: 'OFPT_ERROR',
655 2: 'OFPT_ECHO_REQUEST',
656 3: 'OFPT_ECHO_REPLY',
657 4: 'OFPT_EXPERIMENTER',
658 5: 'OFPT_FEATURES_REQUEST',
659 6: 'OFPT_FEATURES_REPLY',
660 7: 'OFPT_GET_CONFIG_REQUEST',
661 8: 'OFPT_GET_CONFIG_REPLY',
662 9: 'OFPT_SET_CONFIG',
663 10: 'OFPT_PACKET_IN',
664 11: 'OFPT_FLOW_REMOVED',
665 12: 'OFPT_PORT_STATUS',
666 13: 'OFPT_PACKET_OUT',
667 14: 'OFPT_FLOW_MOD',
668 15: 'OFPT_GROUP_MOD',
669 16: 'OFPT_PORT_MOD',
670 17: 'OFPT_TABLE_MOD',
671 18: 'OFPT_STATS_REQUEST',
672 19: 'OFPT_STATS_REPLY',
673 20: 'OFPT_BARRIER_REQUEST',
674 21: 'OFPT_BARRIER_REPLY',
675 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
676 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
677}
678
679# Identifiers from group ofp_vlan_id
680OFPVID_ANY = 65534
681OFPVID_NONE = 65535
682
683ofp_vlan_id_map = {
684 65534: 'OFPVID_ANY',
685 65535: 'OFPVID_NONE',
686}
687