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