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