blob: cae3396e6b4c839a7ab48d6fb519abc4ad8a6227 [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 Lane6f4978c2013-10-20 21:33:52 -070014OFP_TCP_PORT = 6653
15OFP_SSL_PORT = 6653
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
Rich Lane7b0f2012013-11-22 14:15:26 -080028# Identifiers from group of_bsn_lacp_convergence_status_t
29LACP_SUCCESS = 0
30LACP_TIMEDOUT = 1
31LACP_OUT_OF_SYNC = 2
32
33of_bsn_lacp_convergence_status_t_map = {
34 0: 'LACP_SUCCESS',
35 1: 'LACP_TIMEDOUT',
36 2: 'LACP_OUT_OF_SYNC',
37}
38
Rich Lane6f4978c2013-10-20 21:33:52 -070039# Identifiers from group of_bsn_pdu_slot_num_t
40BSN_PDU_SLOT_NUM_ANY = 255
41
42of_bsn_pdu_slot_num_t_map = {
43 255: 'BSN_PDU_SLOT_NUM_ANY',
44}
45
Rich Lane7dcdf022013-12-11 14:45:27 -080046# Identifiers from group of_bsn_vlan_counter_t
47OFP_BSN_VLAN_COUNTER_RX_BYTES = 0
48OFP_BSN_VLAN_COUNTER_RX_PACKETS = 1
49OFP_BSN_VLAN_COUNTER_TX_BYTES = 2
50OFP_BSN_VLAN_COUNTER_TX_PACKETS = 3
51
52of_bsn_vlan_counter_t_map = {
53 0: 'OFP_BSN_VLAN_COUNTER_RX_BYTES',
54 1: 'OFP_BSN_VLAN_COUNTER_RX_PACKETS',
55 2: 'OFP_BSN_VLAN_COUNTER_TX_BYTES',
56 3: 'OFP_BSN_VLAN_COUNTER_TX_PACKETS',
57}
58
Rich Lanec2ee4b82013-04-24 17:12:38 -070059# Identifiers from group ofp_action_type
60OFPAT_OUTPUT = 0
61OFPAT_COPY_TTL_OUT = 11
62OFPAT_COPY_TTL_IN = 12
63OFPAT_SET_MPLS_TTL = 15
64OFPAT_DEC_MPLS_TTL = 16
65OFPAT_PUSH_VLAN = 17
66OFPAT_POP_VLAN = 18
67OFPAT_PUSH_MPLS = 19
68OFPAT_POP_MPLS = 20
69OFPAT_SET_QUEUE = 21
70OFPAT_GROUP = 22
71OFPAT_SET_NW_TTL = 23
72OFPAT_DEC_NW_TTL = 24
73OFPAT_SET_FIELD = 25
74OFPAT_PUSH_PBB = 26
75OFPAT_POP_PBB = 27
76OFPAT_EXPERIMENTER = 65535
77
78ofp_action_type_map = {
79 0: 'OFPAT_OUTPUT',
80 11: 'OFPAT_COPY_TTL_OUT',
81 12: 'OFPAT_COPY_TTL_IN',
82 15: 'OFPAT_SET_MPLS_TTL',
83 16: 'OFPAT_DEC_MPLS_TTL',
84 17: 'OFPAT_PUSH_VLAN',
85 18: 'OFPAT_POP_VLAN',
86 19: 'OFPAT_PUSH_MPLS',
87 20: 'OFPAT_POP_MPLS',
88 21: 'OFPAT_SET_QUEUE',
89 22: 'OFPAT_GROUP',
90 23: 'OFPAT_SET_NW_TTL',
91 24: 'OFPAT_DEC_NW_TTL',
92 25: 'OFPAT_SET_FIELD',
93 26: 'OFPAT_PUSH_PBB',
94 27: 'OFPAT_POP_PBB',
95 65535: 'OFPAT_EXPERIMENTER',
96}
97
98# Identifiers from group ofp_bad_action_code
99OFPBAC_BAD_TYPE = 0
100OFPBAC_BAD_LEN = 1
101OFPBAC_BAD_EXPERIMENTER = 2
Rich Lane6f4978c2013-10-20 21:33:52 -0700102OFPBAC_BAD_EXPERIMENTER_TYPE = 3
Rich Lanec2ee4b82013-04-24 17:12:38 -0700103OFPBAC_BAD_OUT_PORT = 4
104OFPBAC_BAD_ARGUMENT = 5
105OFPBAC_EPERM = 6
106OFPBAC_TOO_MANY = 7
107OFPBAC_BAD_QUEUE = 8
108OFPBAC_BAD_OUT_GROUP = 9
109OFPBAC_MATCH_INCONSISTENT = 10
110OFPBAC_UNSUPPORTED_ORDER = 11
111OFPBAC_BAD_TAG = 12
112OFPBAC_BAD_SET_TYPE = 13
113OFPBAC_BAD_SET_LEN = 14
114OFPBAC_BAD_SET_ARGUMENT = 15
115
116ofp_bad_action_code_map = {
117 0: 'OFPBAC_BAD_TYPE',
118 1: 'OFPBAC_BAD_LEN',
119 2: 'OFPBAC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700120 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700121 4: 'OFPBAC_BAD_OUT_PORT',
122 5: 'OFPBAC_BAD_ARGUMENT',
123 6: 'OFPBAC_EPERM',
124 7: 'OFPBAC_TOO_MANY',
125 8: 'OFPBAC_BAD_QUEUE',
126 9: 'OFPBAC_BAD_OUT_GROUP',
127 10: 'OFPBAC_MATCH_INCONSISTENT',
128 11: 'OFPBAC_UNSUPPORTED_ORDER',
129 12: 'OFPBAC_BAD_TAG',
130 13: 'OFPBAC_BAD_SET_TYPE',
131 14: 'OFPBAC_BAD_SET_LEN',
132 15: 'OFPBAC_BAD_SET_ARGUMENT',
133}
134
135# Identifiers from group ofp_bad_instruction_code
136OFPBIC_UNKNOWN_INST = 0
137OFPBIC_UNSUP_INST = 1
138OFPBIC_BAD_TABLE_ID = 2
139OFPBIC_UNSUP_METADATA = 3
140OFPBIC_UNSUP_METADATA_MASK = 4
141OFPBIC_BAD_EXPERIMENTER = 5
Rich Lane6f4978c2013-10-20 21:33:52 -0700142OFPBIC_BAD_EXPERIMENTER_TYPE = 6
Rich Lanec2ee4b82013-04-24 17:12:38 -0700143OFPBIC_BAD_LEN = 7
144OFPBIC_EPERM = 8
145
146ofp_bad_instruction_code_map = {
147 0: 'OFPBIC_UNKNOWN_INST',
148 1: 'OFPBIC_UNSUP_INST',
149 2: 'OFPBIC_BAD_TABLE_ID',
150 3: 'OFPBIC_UNSUP_METADATA',
151 4: 'OFPBIC_UNSUP_METADATA_MASK',
152 5: 'OFPBIC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700153 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700154 7: 'OFPBIC_BAD_LEN',
155 8: 'OFPBIC_EPERM',
156}
157
158# Identifiers from group ofp_bad_match_code
159OFPBMC_BAD_TYPE = 0
160OFPBMC_BAD_LEN = 1
161OFPBMC_BAD_TAG = 2
162OFPBMC_BAD_DL_ADDR_MASK = 3
163OFPBMC_BAD_NW_ADDR_MASK = 4
164OFPBMC_BAD_WILDCARDS = 5
165OFPBMC_BAD_FIELD = 6
166OFPBMC_BAD_VALUE = 7
167OFPBMC_BAD_MASK = 8
168OFPBMC_BAD_PREREQ = 9
169OFPBMC_DUP_FIELD = 10
170OFPBMC_EPERM = 11
171
172ofp_bad_match_code_map = {
173 0: 'OFPBMC_BAD_TYPE',
174 1: 'OFPBMC_BAD_LEN',
175 2: 'OFPBMC_BAD_TAG',
176 3: 'OFPBMC_BAD_DL_ADDR_MASK',
177 4: 'OFPBMC_BAD_NW_ADDR_MASK',
178 5: 'OFPBMC_BAD_WILDCARDS',
179 6: 'OFPBMC_BAD_FIELD',
180 7: 'OFPBMC_BAD_VALUE',
181 8: 'OFPBMC_BAD_MASK',
182 9: 'OFPBMC_BAD_PREREQ',
183 10: 'OFPBMC_DUP_FIELD',
184 11: 'OFPBMC_EPERM',
185}
186
187# Identifiers from group ofp_bad_request_code
188OFPBRC_BAD_VERSION = 0
189OFPBRC_BAD_TYPE = 1
Rich Lane6f4978c2013-10-20 21:33:52 -0700190OFPBRC_BAD_STAT = 2
Rich Lanec2ee4b82013-04-24 17:12:38 -0700191OFPBRC_BAD_EXPERIMENTER = 3
Rich Lane6f4978c2013-10-20 21:33:52 -0700192OFPBRC_BAD_EXPERIMENTER_TYPE = 4
Rich Lanec2ee4b82013-04-24 17:12:38 -0700193OFPBRC_EPERM = 5
194OFPBRC_BAD_LEN = 6
195OFPBRC_BUFFER_EMPTY = 7
196OFPBRC_BUFFER_UNKNOWN = 8
197OFPBRC_BAD_TABLE_ID = 9
198OFPBRC_IS_SLAVE = 10
199OFPBRC_BAD_PORT = 11
200OFPBRC_BAD_PACKET = 12
201OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
202
203ofp_bad_request_code_map = {
204 0: 'OFPBRC_BAD_VERSION',
205 1: 'OFPBRC_BAD_TYPE',
Rich Lane6f4978c2013-10-20 21:33:52 -0700206 2: 'OFPBRC_BAD_STAT',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700207 3: 'OFPBRC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700208 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700209 5: 'OFPBRC_EPERM',
210 6: 'OFPBRC_BAD_LEN',
211 7: 'OFPBRC_BUFFER_EMPTY',
212 8: 'OFPBRC_BUFFER_UNKNOWN',
213 9: 'OFPBRC_BAD_TABLE_ID',
214 10: 'OFPBRC_IS_SLAVE',
215 11: 'OFPBRC_BAD_PORT',
216 12: 'OFPBRC_BAD_PACKET',
217 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
218}
219
Rich Lane5454b682014-01-14 17:07:36 -0800220# Identifiers from group ofp_bsn_controller_connection_state
221OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0
222OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1
223
224ofp_bsn_controller_connection_state_map = {
225 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED',
226 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED',
227}
228
229# Identifiers from group ofp_bsn_controller_role_reason
230OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST = 0
231OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG = 1
232OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER = 2
233
234ofp_bsn_controller_role_reason_map = {
235 0: 'OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST',
236 1: 'OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG',
237 2: 'OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER',
238}
239
Rich Lane7dcdf022013-12-11 14:45:27 -0800240# Identifiers from group ofp_bsn_port_counter
241OFP_BSN_PORT_COUNTER_RX_BYTES = 0
242OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1
243OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2
244OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3
245OFP_BSN_PORT_COUNTER_RX_DROPPED = 4
246OFP_BSN_PORT_COUNTER_RX_ERRORS = 5
247OFP_BSN_PORT_COUNTER_TX_BYTES = 6
248OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7
249OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8
250OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9
251OFP_BSN_PORT_COUNTER_TX_DROPPED = 10
252OFP_BSN_PORT_COUNTER_TX_ERRORS = 11
253
254ofp_bsn_port_counter_map = {
255 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
256 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST',
257 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST',
258 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST',
259 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED',
260 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS',
261 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES',
262 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST',
263 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST',
264 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST',
265 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED',
266 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS',
267}
268
Dan Talaycof6202252013-07-02 01:00:29 -0700269# Identifiers from group ofp_bsn_vport_q_in_q_untagged
270OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
271
272ofp_bsn_vport_q_in_q_untagged_map = {
273 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
274}
275
Rich Laned53156a2013-08-05 17:17:33 -0700276# Identifiers from group ofp_bsn_vport_status
277OF_BSN_VPORT_STATUS_OK = 0
278OF_BSN_VPORT_STATUS_FAILED = 1
279
280ofp_bsn_vport_status_map = {
281 0: 'OF_BSN_VPORT_STATUS_OK',
282 1: 'OF_BSN_VPORT_STATUS_FAILED',
283}
284
Rich Lanec2ee4b82013-04-24 17:12:38 -0700285# Identifiers from group ofp_capabilities
286OFPC_FLOW_STATS = 1
287OFPC_TABLE_STATS = 2
288OFPC_PORT_STATS = 4
289OFPC_GROUP_STATS = 8
290OFPC_IP_REASM = 32
291OFPC_QUEUE_STATS = 64
292OFPC_PORT_BLOCKED = 256
293
294ofp_capabilities_map = {
295 1: 'OFPC_FLOW_STATS',
296 2: 'OFPC_TABLE_STATS',
297 4: 'OFPC_PORT_STATS',
298 8: 'OFPC_GROUP_STATS',
299 32: 'OFPC_IP_REASM',
300 64: 'OFPC_QUEUE_STATS',
301 256: 'OFPC_PORT_BLOCKED',
302}
303
304# Identifiers from group ofp_config_flags
305OFPC_FRAG_NORMAL = 0
306OFPC_FRAG_DROP = 1
307OFPC_FRAG_REASM = 2
308OFPC_FRAG_MASK = 3
309
310ofp_config_flags_map = {
311 0: 'OFPC_FRAG_NORMAL',
312 1: 'OFPC_FRAG_DROP',
313 2: 'OFPC_FRAG_REASM',
314 3: 'OFPC_FRAG_MASK',
315}
316
317# Identifiers from group ofp_controller_max_len
318OFPCML_MAX = 65509
319OFPCML_NO_BUFFER = 65535
320
321ofp_controller_max_len_map = {
322 65509: 'OFPCML_MAX',
323 65535: 'OFPCML_NO_BUFFER',
324}
325
326# Identifiers from group ofp_controller_role
327OFPCR_ROLE_NOCHANGE = 0
328OFPCR_ROLE_EQUAL = 1
329OFPCR_ROLE_MASTER = 2
330OFPCR_ROLE_SLAVE = 3
331
332ofp_controller_role_map = {
333 0: 'OFPCR_ROLE_NOCHANGE',
334 1: 'OFPCR_ROLE_EQUAL',
335 2: 'OFPCR_ROLE_MASTER',
336 3: 'OFPCR_ROLE_SLAVE',
337}
338
339# Identifiers from group ofp_error_type
340OFPET_HELLO_FAILED = 0
341OFPET_BAD_REQUEST = 1
342OFPET_BAD_ACTION = 2
343OFPET_BAD_INSTRUCTION = 3
344OFPET_BAD_MATCH = 4
345OFPET_FLOW_MOD_FAILED = 5
346OFPET_GROUP_MOD_FAILED = 6
347OFPET_PORT_MOD_FAILED = 7
348OFPET_TABLE_MOD_FAILED = 8
349OFPET_QUEUE_OP_FAILED = 9
350OFPET_SWITCH_CONFIG_FAILED = 10
351OFPET_ROLE_REQUEST_FAILED = 11
352OFPET_METER_MOD_FAILED = 12
353OFPET_TABLE_FEATURES_FAILED = 13
354OFPET_EXPERIMENTER = 65535
355
356ofp_error_type_map = {
357 0: 'OFPET_HELLO_FAILED',
358 1: 'OFPET_BAD_REQUEST',
359 2: 'OFPET_BAD_ACTION',
360 3: 'OFPET_BAD_INSTRUCTION',
361 4: 'OFPET_BAD_MATCH',
362 5: 'OFPET_FLOW_MOD_FAILED',
363 6: 'OFPET_GROUP_MOD_FAILED',
364 7: 'OFPET_PORT_MOD_FAILED',
365 8: 'OFPET_TABLE_MOD_FAILED',
366 9: 'OFPET_QUEUE_OP_FAILED',
367 10: 'OFPET_SWITCH_CONFIG_FAILED',
368 11: 'OFPET_ROLE_REQUEST_FAILED',
369 12: 'OFPET_METER_MOD_FAILED',
370 13: 'OFPET_TABLE_FEATURES_FAILED',
371 65535: 'OFPET_EXPERIMENTER',
372}
373
374# Identifiers from group ofp_flow_mod_command
375OFPFC_ADD = 0
376OFPFC_MODIFY = 1
377OFPFC_MODIFY_STRICT = 2
378OFPFC_DELETE = 3
379OFPFC_DELETE_STRICT = 4
380
381ofp_flow_mod_command_map = {
382 0: 'OFPFC_ADD',
383 1: 'OFPFC_MODIFY',
384 2: 'OFPFC_MODIFY_STRICT',
385 3: 'OFPFC_DELETE',
386 4: 'OFPFC_DELETE_STRICT',
387}
388
389# Identifiers from group ofp_flow_mod_failed_code
390OFPFMFC_UNKNOWN = 0
391OFPFMFC_TABLE_FULL = 1
392OFPFMFC_BAD_TABLE_ID = 2
393OFPFMFC_OVERLAP = 3
394OFPFMFC_EPERM = 4
395OFPFMFC_BAD_TIMEOUT = 5
396OFPFMFC_BAD_COMMAND = 6
397OFPFMFC_BAD_FLAGS = 7
398
399ofp_flow_mod_failed_code_map = {
400 0: 'OFPFMFC_UNKNOWN',
401 1: 'OFPFMFC_TABLE_FULL',
402 2: 'OFPFMFC_BAD_TABLE_ID',
403 3: 'OFPFMFC_OVERLAP',
404 4: 'OFPFMFC_EPERM',
405 5: 'OFPFMFC_BAD_TIMEOUT',
406 6: 'OFPFMFC_BAD_COMMAND',
407 7: 'OFPFMFC_BAD_FLAGS',
408}
409
410# Identifiers from group ofp_flow_mod_flags
411OFPFF_SEND_FLOW_REM = 1
412OFPFF_CHECK_OVERLAP = 2
413OFPFF_RESET_COUNTS = 4
414OFPFF_NO_PKT_COUNTS = 8
415OFPFF_NO_BYT_COUNTS = 16
Rich Lane6f4978c2013-10-20 21:33:52 -0700416OFPFF_BSN_SEND_IDLE = 128
Rich Lanec2ee4b82013-04-24 17:12:38 -0700417
418ofp_flow_mod_flags_map = {
419 1: 'OFPFF_SEND_FLOW_REM',
420 2: 'OFPFF_CHECK_OVERLAP',
421 4: 'OFPFF_RESET_COUNTS',
422 8: 'OFPFF_NO_PKT_COUNTS',
423 16: 'OFPFF_NO_BYT_COUNTS',
Rich Lane6f4978c2013-10-20 21:33:52 -0700424 128: 'OFPFF_BSN_SEND_IDLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700425}
426
427# Identifiers from group ofp_flow_removed_reason
428OFPRR_IDLE_TIMEOUT = 0
429OFPRR_HARD_TIMEOUT = 1
430OFPRR_DELETE = 2
431OFPRR_GROUP_DELETE = 3
432
433ofp_flow_removed_reason_map = {
434 0: 'OFPRR_IDLE_TIMEOUT',
435 1: 'OFPRR_HARD_TIMEOUT',
436 2: 'OFPRR_DELETE',
437 3: 'OFPRR_GROUP_DELETE',
438}
439
440# Identifiers from group ofp_group
441OFPG_MAX = 4294967040
442OFPG_ALL = 4294967292
443OFPG_ANY = 4294967295
444
445ofp_group_map = {
446 4294967040: 'OFPG_MAX',
447 4294967292: 'OFPG_ALL',
448 4294967295: 'OFPG_ANY',
449}
450
451# Identifiers from group ofp_group_capabilities
452OFPGFC_SELECT_WEIGHT = 1
453OFPGFC_SELECT_LIVENESS = 2
454OFPGFC_CHAINING = 4
455OFPGFC_CHAINING_CHECKS = 8
456
457ofp_group_capabilities_map = {
458 1: 'OFPGFC_SELECT_WEIGHT',
459 2: 'OFPGFC_SELECT_LIVENESS',
460 4: 'OFPGFC_CHAINING',
461 8: 'OFPGFC_CHAINING_CHECKS',
462}
463
464# Identifiers from group ofp_group_mod_command
465OFPGC_ADD = 0
466OFPGC_MODIFY = 1
467OFPGC_DELETE = 2
468
469ofp_group_mod_command_map = {
470 0: 'OFPGC_ADD',
471 1: 'OFPGC_MODIFY',
472 2: 'OFPGC_DELETE',
473}
474
475# Identifiers from group ofp_group_mod_failed_code
476OFPGMFC_GROUP_EXISTS = 0
477OFPGMFC_INVALID_GROUP = 1
478OFPGMFC_WEIGHT_UNSUPPORTED = 2
479OFPGMFC_OUT_OF_GROUPS = 3
480OFPGMFC_OUT_OF_BUCKETS = 4
481OFPGMFC_CHAINING_UNSUPPORTED = 5
482OFPGMFC_WATCH_UNSUPPORTED = 6
483OFPGMFC_LOOP = 7
484OFPGMFC_UNKNOWN_GROUP = 8
485OFPGMFC_CHAINED_GROUP = 9
486OFPGMFC_BAD_TYPE = 10
487OFPGMFC_BAD_COMMAND = 11
488OFPGMFC_BAD_BUCKET = 12
489OFPGMFC_BAD_WATCH = 13
490OFPGMFC_EPERM = 14
491
492ofp_group_mod_failed_code_map = {
493 0: 'OFPGMFC_GROUP_EXISTS',
494 1: 'OFPGMFC_INVALID_GROUP',
495 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
496 3: 'OFPGMFC_OUT_OF_GROUPS',
497 4: 'OFPGMFC_OUT_OF_BUCKETS',
498 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
499 6: 'OFPGMFC_WATCH_UNSUPPORTED',
500 7: 'OFPGMFC_LOOP',
501 8: 'OFPGMFC_UNKNOWN_GROUP',
502 9: 'OFPGMFC_CHAINED_GROUP',
503 10: 'OFPGMFC_BAD_TYPE',
504 11: 'OFPGMFC_BAD_COMMAND',
505 12: 'OFPGMFC_BAD_BUCKET',
506 13: 'OFPGMFC_BAD_WATCH',
507 14: 'OFPGMFC_EPERM',
508}
509
510# Identifiers from group ofp_group_type
511OFPGT_ALL = 0
512OFPGT_SELECT = 1
513OFPGT_INDIRECT = 2
514OFPGT_FF = 3
515
516ofp_group_type_map = {
517 0: 'OFPGT_ALL',
518 1: 'OFPGT_SELECT',
519 2: 'OFPGT_INDIRECT',
520 3: 'OFPGT_FF',
521}
522
523# Identifiers from group ofp_hello_elem_type
524OFPHET_VERSIONBITMAP = 1
525
526ofp_hello_elem_type_map = {
527 1: 'OFPHET_VERSIONBITMAP',
528}
529
530# Identifiers from group ofp_hello_failed_code
531OFPHFC_INCOMPATIBLE = 0
532OFPHFC_EPERM = 1
533
534ofp_hello_failed_code_map = {
535 0: 'OFPHFC_INCOMPATIBLE',
536 1: 'OFPHFC_EPERM',
537}
538
539# Identifiers from group ofp_instruction_type
540OFPIT_GOTO_TABLE = 1
541OFPIT_WRITE_METADATA = 2
542OFPIT_WRITE_ACTIONS = 3
543OFPIT_APPLY_ACTIONS = 4
544OFPIT_CLEAR_ACTIONS = 5
545OFPIT_METER = 6
546OFPIT_EXPERIMENTER = 65535
547
548ofp_instruction_type_map = {
549 1: 'OFPIT_GOTO_TABLE',
550 2: 'OFPIT_WRITE_METADATA',
551 3: 'OFPIT_WRITE_ACTIONS',
552 4: 'OFPIT_APPLY_ACTIONS',
553 5: 'OFPIT_CLEAR_ACTIONS',
554 6: 'OFPIT_METER',
555 65535: 'OFPIT_EXPERIMENTER',
556}
557
558# Identifiers from group ofp_ipv6exthdr_flags
559OFPIEH_NONEXT = 1
560OFPIEH_ESP = 2
561OFPIEH_AUTH = 4
562OFPIEH_DEST = 8
563OFPIEH_FRAG = 16
564OFPIEH_ROUTER = 32
565OFPIEH_HOP = 64
566OFPIEH_UNREP = 128
567OFPIEH_UNSEQ = 256
568
569ofp_ipv6exthdr_flags_map = {
570 1: 'OFPIEH_NONEXT',
571 2: 'OFPIEH_ESP',
572 4: 'OFPIEH_AUTH',
573 8: 'OFPIEH_DEST',
574 16: 'OFPIEH_FRAG',
575 32: 'OFPIEH_ROUTER',
576 64: 'OFPIEH_HOP',
577 128: 'OFPIEH_UNREP',
578 256: 'OFPIEH_UNSEQ',
579}
580
581# Identifiers from group ofp_match_type
582OFPMT_STANDARD = 0
583OFPMT_OXM = 1
584
585ofp_match_type_map = {
586 0: 'OFPMT_STANDARD',
587 1: 'OFPMT_OXM',
588}
589
590# Identifiers from group ofp_meter
591OFPM_MAX = 4294901760
592OFPM_SLOWPATH = 4294967293
593OFPM_CONTROLLER = 4294967294
594OFPM_ALL = 4294967295
595
596ofp_meter_map = {
597 4294901760: 'OFPM_MAX',
598 4294967293: 'OFPM_SLOWPATH',
599 4294967294: 'OFPM_CONTROLLER',
600 4294967295: 'OFPM_ALL',
601}
602
603# Identifiers from group ofp_meter_band_type
604OFPMBT_DROP = 1
605OFPMBT_DSCP_REMARK = 2
606OFPMBT_EXPERIMENTER = 65535
607
608ofp_meter_band_type_map = {
609 1: 'OFPMBT_DROP',
610 2: 'OFPMBT_DSCP_REMARK',
611 65535: 'OFPMBT_EXPERIMENTER',
612}
613
614# Identifiers from group ofp_meter_flags
615OFPMF_KBPS = 1
616OFPMF_PKTPS = 2
617OFPMF_BURST = 4
618OFPMF_STATS = 8
619
620ofp_meter_flags_map = {
621 1: 'OFPMF_KBPS',
622 2: 'OFPMF_PKTPS',
623 4: 'OFPMF_BURST',
624 8: 'OFPMF_STATS',
625}
626
627# Identifiers from group ofp_meter_mod_command
628OFPMC_ADD = 0
629OFPMC_MODIFY = 1
630OFPMC_DELETE = 2
631
632ofp_meter_mod_command_map = {
633 0: 'OFPMC_ADD',
634 1: 'OFPMC_MODIFY',
635 2: 'OFPMC_DELETE',
636}
637
638# Identifiers from group ofp_meter_mod_failed_code
639OFPMMFC_UNKNOWN = 0
640OFPMMFC_METER_EXISTS = 1
641OFPMMFC_INVALID_METER = 2
642OFPMMFC_UNKNOWN_METER = 3
643OFPMMFC_BAD_COMMAND = 4
644OFPMMFC_BAD_FLAGS = 5
645OFPMMFC_BAD_RATE = 6
646OFPMMFC_BAD_BURST = 7
647OFPMMFC_BAD_BAND = 8
648OFPMMFC_BAD_BAND_VALUE = 9
649OFPMMFC_OUT_OF_METERS = 10
650OFPMMFC_OUT_OF_BANDS = 11
651
652ofp_meter_mod_failed_code_map = {
653 0: 'OFPMMFC_UNKNOWN',
654 1: 'OFPMMFC_METER_EXISTS',
655 2: 'OFPMMFC_INVALID_METER',
656 3: 'OFPMMFC_UNKNOWN_METER',
657 4: 'OFPMMFC_BAD_COMMAND',
658 5: 'OFPMMFC_BAD_FLAGS',
659 6: 'OFPMMFC_BAD_RATE',
660 7: 'OFPMMFC_BAD_BURST',
661 8: 'OFPMMFC_BAD_BAND',
662 9: 'OFPMMFC_BAD_BAND_VALUE',
663 10: 'OFPMMFC_OUT_OF_METERS',
664 11: 'OFPMMFC_OUT_OF_BANDS',
665}
666
Rich Lanec2ee4b82013-04-24 17:12:38 -0700667# Identifiers from group ofp_oxm_class
668OFPXMC_NXM_0 = 0
669OFPXMC_NXM_1 = 1
670OFPXMC_OPENFLOW_BASIC = 32768
671OFPXMC_EXPERIMENTER = 65535
672
673ofp_oxm_class_map = {
674 0: 'OFPXMC_NXM_0',
675 1: 'OFPXMC_NXM_1',
676 32768: 'OFPXMC_OPENFLOW_BASIC',
677 65535: 'OFPXMC_EXPERIMENTER',
678}
679
680# Identifiers from group ofp_packet_in_reason
681OFPR_NO_MATCH = 0
682OFPR_ACTION = 1
683OFPR_INVALID_TTL = 2
Rich Laned9e3f7b2013-11-04 11:40:43 -0800684OFPR_BSN_NEW_HOST = 128
685OFPR_BSN_STATION_MOVE = 129
686OFPR_BSN_BAD_VLAN = 130
687OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
Rich Lane5454b682014-01-14 17:07:36 -0800688OFPR_BSN_NO_ROUTE = 132
Rich Lane95f7fc92014-01-27 17:08:16 -0800689OFPR_BSN_ICMP_ECHO_REQUEST = 133
690OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
691OFPR_BSN_DEST_HOST_UNREACHABLE = 135
692OFPR_BSN_DEST_PORT_UNREACHABLE = 136
693OFPR_BSN_FRAGMENTATION_REQUIRED = 137
694OFPR_BSN_ARP = 139
Rich Lane1b75abf2014-02-05 11:23:20 -0800695OFPR_BSN_DHCP = 140
Rich Lane9ec3fca2014-02-26 16:22:56 -0800696OFPR_BSN_DEBUG = 141
Rich Lanef50b7c32014-03-20 11:38:02 -0700697OFPR_BSN_PACKET_OF_DEATH = 142
Rich Lanec2ee4b82013-04-24 17:12:38 -0700698
699ofp_packet_in_reason_map = {
700 0: 'OFPR_NO_MATCH',
701 1: 'OFPR_ACTION',
702 2: 'OFPR_INVALID_TTL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800703 128: 'OFPR_BSN_NEW_HOST',
704 129: 'OFPR_BSN_STATION_MOVE',
705 130: 'OFPR_BSN_BAD_VLAN',
706 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
Rich Lane5454b682014-01-14 17:07:36 -0800707 132: 'OFPR_BSN_NO_ROUTE',
Rich Lane95f7fc92014-01-27 17:08:16 -0800708 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
709 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
710 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
711 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
712 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
713 139: 'OFPR_BSN_ARP',
Rich Lane1b75abf2014-02-05 11:23:20 -0800714 140: 'OFPR_BSN_DHCP',
Rich Lane9ec3fca2014-02-26 16:22:56 -0800715 141: 'OFPR_BSN_DEBUG',
Rich Lanef50b7c32014-03-20 11:38:02 -0700716 142: 'OFPR_BSN_PACKET_OF_DEATH',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700717}
718
719# Identifiers from group ofp_port
720OFPP_MAX = 4294967040
721OFPP_IN_PORT = 4294967288
722OFPP_TABLE = 4294967289
723OFPP_NORMAL = 4294967290
724OFPP_FLOOD = 4294967291
725OFPP_ALL = 4294967292
726OFPP_CONTROLLER = 4294967293
727OFPP_LOCAL = 4294967294
Rich Laned9e3f7b2013-11-04 11:40:43 -0800728OFPP_ANY = 4294967295
Rich Lanec2ee4b82013-04-24 17:12:38 -0700729
730ofp_port_map = {
731 4294967040: 'OFPP_MAX',
732 4294967288: 'OFPP_IN_PORT',
733 4294967289: 'OFPP_TABLE',
734 4294967290: 'OFPP_NORMAL',
735 4294967291: 'OFPP_FLOOD',
736 4294967292: 'OFPP_ALL',
737 4294967293: 'OFPP_CONTROLLER',
738 4294967294: 'OFPP_LOCAL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800739 4294967295: 'OFPP_ANY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700740}
741
742# Identifiers from group ofp_port_config
743OFPPC_PORT_DOWN = 1
744OFPPC_NO_RECV = 4
745OFPPC_NO_FWD = 32
746OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700747OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700748
749ofp_port_config_map = {
750 1: 'OFPPC_PORT_DOWN',
751 4: 'OFPPC_NO_RECV',
752 32: 'OFPPC_NO_FWD',
753 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700754 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700755}
756
757# Identifiers from group ofp_port_features
758OFPPF_10MB_HD = 1
759OFPPF_10MB_FD = 2
760OFPPF_100MB_HD = 4
761OFPPF_100MB_FD = 8
762OFPPF_1GB_HD = 16
763OFPPF_1GB_FD = 32
764OFPPF_10GB_FD = 64
765OFPPF_40GB_FD = 128
766OFPPF_100GB_FD = 256
767OFPPF_1TB_FD = 512
768OFPPF_OTHER = 1024
769OFPPF_COPPER = 2048
770OFPPF_FIBER = 4096
771OFPPF_AUTONEG = 8192
772OFPPF_PAUSE = 16384
773OFPPF_PAUSE_ASYM = 32768
774
775ofp_port_features_map = {
776 1: 'OFPPF_10MB_HD',
777 2: 'OFPPF_10MB_FD',
778 4: 'OFPPF_100MB_HD',
779 8: 'OFPPF_100MB_FD',
780 16: 'OFPPF_1GB_HD',
781 32: 'OFPPF_1GB_FD',
782 64: 'OFPPF_10GB_FD',
783 128: 'OFPPF_40GB_FD',
784 256: 'OFPPF_100GB_FD',
785 512: 'OFPPF_1TB_FD',
786 1024: 'OFPPF_OTHER',
787 2048: 'OFPPF_COPPER',
788 4096: 'OFPPF_FIBER',
789 8192: 'OFPPF_AUTONEG',
790 16384: 'OFPPF_PAUSE',
791 32768: 'OFPPF_PAUSE_ASYM',
792}
793
794# Identifiers from group ofp_port_mod_failed_code
795OFPPMFC_BAD_PORT = 0
796OFPPMFC_BAD_HW_ADDR = 1
797OFPPMFC_BAD_CONFIG = 2
798OFPPMFC_BAD_ADVERTISE = 3
799OFPPMFC_EPERM = 4
800
801ofp_port_mod_failed_code_map = {
802 0: 'OFPPMFC_BAD_PORT',
803 1: 'OFPPMFC_BAD_HW_ADDR',
804 2: 'OFPPMFC_BAD_CONFIG',
805 3: 'OFPPMFC_BAD_ADVERTISE',
806 4: 'OFPPMFC_EPERM',
807}
808
Rich Lanec2ee4b82013-04-24 17:12:38 -0700809# Identifiers from group ofp_port_reason
810OFPPR_ADD = 0
811OFPPR_DELETE = 1
812OFPPR_MODIFY = 2
813
814ofp_port_reason_map = {
815 0: 'OFPPR_ADD',
816 1: 'OFPPR_DELETE',
817 2: 'OFPPR_MODIFY',
818}
819
820# Identifiers from group ofp_port_state
821OFPPS_LINK_DOWN = 1
822OFPPS_BLOCKED = 2
823OFPPS_LIVE = 4
824
825ofp_port_state_map = {
826 1: 'OFPPS_LINK_DOWN',
827 2: 'OFPPS_BLOCKED',
828 4: 'OFPPS_LIVE',
829}
830
831# Identifiers from group ofp_queue_op_failed_code
832OFPQOFC_BAD_PORT = 0
833OFPQOFC_BAD_QUEUE = 1
834OFPQOFC_EPERM = 2
835
836ofp_queue_op_failed_code_map = {
837 0: 'OFPQOFC_BAD_PORT',
838 1: 'OFPQOFC_BAD_QUEUE',
839 2: 'OFPQOFC_EPERM',
840}
841
842# Identifiers from group ofp_queue_properties
843OFPQT_MIN_RATE = 1
844OFPQT_MAX_RATE = 2
845OFPQT_EXPERIMENTER = 65535
846
847ofp_queue_properties_map = {
848 1: 'OFPQT_MIN_RATE',
849 2: 'OFPQT_MAX_RATE',
850 65535: 'OFPQT_EXPERIMENTER',
851}
852
853# Identifiers from group ofp_role_request_failed_code
854OFPRRFC_STALE = 0
855OFPRRFC_UNSUP = 1
856OFPRRFC_BAD_ROLE = 2
857
858ofp_role_request_failed_code_map = {
859 0: 'OFPRRFC_STALE',
860 1: 'OFPRRFC_UNSUP',
861 2: 'OFPRRFC_BAD_ROLE',
862}
863
Rich Lane6f4978c2013-10-20 21:33:52 -0700864# Identifiers from group ofp_stats_reply_flags
865OFPSF_REPLY_MORE = 1
866
867ofp_stats_reply_flags_map = {
868 1: 'OFPSF_REPLY_MORE',
869}
870
871# Identifiers from group ofp_stats_request_flags
872OFPSF_REQ_MORE = 1
873
874ofp_stats_request_flags_map = {
875 1: 'OFPSF_REQ_MORE',
876}
877
878# Identifiers from group ofp_stats_type
879OFPST_DESC = 0
880OFPST_FLOW = 1
881OFPST_AGGREGATE = 2
882OFPST_TABLE = 3
883OFPST_PORT = 4
884OFPST_QUEUE = 5
885OFPST_GROUP = 6
886OFPST_GROUP_DESC = 7
887OFPST_GROUP_FEATURES = 8
888OFPST_METER = 9
889OFPST_METER_CONFIG = 10
890OFPST_METER_FEATURES = 11
891OFPST_TABLE_FEATURES = 12
892OFPST_PORT_DESC = 13
893OFPST_EXPERIMENTER = 65535
894
895ofp_stats_type_map = {
896 0: 'OFPST_DESC',
897 1: 'OFPST_FLOW',
898 2: 'OFPST_AGGREGATE',
899 3: 'OFPST_TABLE',
900 4: 'OFPST_PORT',
901 5: 'OFPST_QUEUE',
902 6: 'OFPST_GROUP',
903 7: 'OFPST_GROUP_DESC',
904 8: 'OFPST_GROUP_FEATURES',
905 9: 'OFPST_METER',
906 10: 'OFPST_METER_CONFIG',
907 11: 'OFPST_METER_FEATURES',
908 12: 'OFPST_TABLE_FEATURES',
909 13: 'OFPST_PORT_DESC',
910 65535: 'OFPST_EXPERIMENTER',
911}
912
Rich Lanec2ee4b82013-04-24 17:12:38 -0700913# Identifiers from group ofp_switch_config_failed_code
914OFPSCFC_BAD_FLAGS = 0
915OFPSCFC_BAD_LEN = 1
916OFPSCFC_EPERM = 2
917
918ofp_switch_config_failed_code_map = {
919 0: 'OFPSCFC_BAD_FLAGS',
920 1: 'OFPSCFC_BAD_LEN',
921 2: 'OFPSCFC_EPERM',
922}
923
924# Identifiers from group ofp_table
925OFPTT_MAX = 254
926OFPTT_ALL = 255
927
928ofp_table_map = {
929 254: 'OFPTT_MAX',
930 255: 'OFPTT_ALL',
931}
932
933# Identifiers from group ofp_table_config
934OFPTC_DEPRECATED_MASK = 3
935
936ofp_table_config_map = {
937 3: 'OFPTC_DEPRECATED_MASK',
938}
939
940# Identifiers from group ofp_table_feature_prop_type
941OFPTFPT_INSTRUCTIONS = 0
942OFPTFPT_INSTRUCTIONS_MISS = 1
943OFPTFPT_NEXT_TABLES = 2
944OFPTFPT_NEXT_TABLES_MISS = 3
945OFPTFPT_WRITE_ACTIONS = 4
946OFPTFPT_WRITE_ACTIONS_MISS = 5
947OFPTFPT_APPLY_ACTIONS = 6
948OFPTFPT_APPLY_ACTIONS_MISS = 7
949OFPTFPT_MATCH = 8
950OFPTFPT_WILDCARDS = 10
951OFPTFPT_WRITE_SETFIELD = 12
952OFPTFPT_WRITE_SETFIELD_MISS = 13
953OFPTFPT_APPLY_SETFIELD = 14
954OFPTFPT_APPLY_SETFIELD_MISS = 15
955OFPTFPT_EXPERIMENTER = 65534
956OFPTFPT_EXPERIMENTER_MISS = 65535
957
958ofp_table_feature_prop_type_map = {
959 0: 'OFPTFPT_INSTRUCTIONS',
960 1: 'OFPTFPT_INSTRUCTIONS_MISS',
961 2: 'OFPTFPT_NEXT_TABLES',
962 3: 'OFPTFPT_NEXT_TABLES_MISS',
963 4: 'OFPTFPT_WRITE_ACTIONS',
964 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
965 6: 'OFPTFPT_APPLY_ACTIONS',
966 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
967 8: 'OFPTFPT_MATCH',
968 10: 'OFPTFPT_WILDCARDS',
969 12: 'OFPTFPT_WRITE_SETFIELD',
970 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
971 14: 'OFPTFPT_APPLY_SETFIELD',
972 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
973 65534: 'OFPTFPT_EXPERIMENTER',
974 65535: 'OFPTFPT_EXPERIMENTER_MISS',
975}
976
977# Identifiers from group ofp_table_features_failed_code
978OFPTFFC_BAD_TABLE = 0
979OFPTFFC_BAD_METADATA = 1
980OFPTFFC_BAD_TYPE = 2
981OFPTFFC_BAD_LEN = 3
982OFPTFFC_BAD_ARGUMENT = 4
983OFPTFFC_EPERM = 5
984
985ofp_table_features_failed_code_map = {
986 0: 'OFPTFFC_BAD_TABLE',
987 1: 'OFPTFFC_BAD_METADATA',
988 2: 'OFPTFFC_BAD_TYPE',
989 3: 'OFPTFFC_BAD_LEN',
990 4: 'OFPTFFC_BAD_ARGUMENT',
991 5: 'OFPTFFC_EPERM',
992}
993
994# Identifiers from group ofp_table_mod_failed_code
995OFPTMFC_BAD_TABLE = 0
996OFPTMFC_BAD_CONFIG = 1
997OFPTMFC_EPERM = 2
998
999ofp_table_mod_failed_code_map = {
1000 0: 'OFPTMFC_BAD_TABLE',
1001 1: 'OFPTMFC_BAD_CONFIG',
1002 2: 'OFPTMFC_EPERM',
1003}
1004
1005# Identifiers from group ofp_type
1006OFPT_HELLO = 0
1007OFPT_ERROR = 1
1008OFPT_ECHO_REQUEST = 2
1009OFPT_ECHO_REPLY = 3
1010OFPT_EXPERIMENTER = 4
1011OFPT_FEATURES_REQUEST = 5
1012OFPT_FEATURES_REPLY = 6
1013OFPT_GET_CONFIG_REQUEST = 7
1014OFPT_GET_CONFIG_REPLY = 8
1015OFPT_SET_CONFIG = 9
1016OFPT_PACKET_IN = 10
1017OFPT_FLOW_REMOVED = 11
1018OFPT_PORT_STATUS = 12
1019OFPT_PACKET_OUT = 13
1020OFPT_FLOW_MOD = 14
1021OFPT_GROUP_MOD = 15
1022OFPT_PORT_MOD = 16
1023OFPT_TABLE_MOD = 17
Rich Lane6f4978c2013-10-20 21:33:52 -07001024OFPT_STATS_REQUEST = 18
1025OFPT_STATS_REPLY = 19
Rich Lanec2ee4b82013-04-24 17:12:38 -07001026OFPT_BARRIER_REQUEST = 20
1027OFPT_BARRIER_REPLY = 21
1028OFPT_QUEUE_GET_CONFIG_REQUEST = 22
1029OFPT_QUEUE_GET_CONFIG_REPLY = 23
1030OFPT_ROLE_REQUEST = 24
1031OFPT_ROLE_REPLY = 25
1032OFPT_GET_ASYNC_REQUEST = 26
1033OFPT_GET_ASYNC_REPLY = 27
1034OFPT_SET_ASYNC = 28
1035OFPT_METER_MOD = 29
1036
1037ofp_type_map = {
1038 0: 'OFPT_HELLO',
1039 1: 'OFPT_ERROR',
1040 2: 'OFPT_ECHO_REQUEST',
1041 3: 'OFPT_ECHO_REPLY',
1042 4: 'OFPT_EXPERIMENTER',
1043 5: 'OFPT_FEATURES_REQUEST',
1044 6: 'OFPT_FEATURES_REPLY',
1045 7: 'OFPT_GET_CONFIG_REQUEST',
1046 8: 'OFPT_GET_CONFIG_REPLY',
1047 9: 'OFPT_SET_CONFIG',
1048 10: 'OFPT_PACKET_IN',
1049 11: 'OFPT_FLOW_REMOVED',
1050 12: 'OFPT_PORT_STATUS',
1051 13: 'OFPT_PACKET_OUT',
1052 14: 'OFPT_FLOW_MOD',
1053 15: 'OFPT_GROUP_MOD',
1054 16: 'OFPT_PORT_MOD',
1055 17: 'OFPT_TABLE_MOD',
Rich Lane6f4978c2013-10-20 21:33:52 -07001056 18: 'OFPT_STATS_REQUEST',
1057 19: 'OFPT_STATS_REPLY',
Rich Lanec2ee4b82013-04-24 17:12:38 -07001058 20: 'OFPT_BARRIER_REQUEST',
1059 21: 'OFPT_BARRIER_REPLY',
1060 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
1061 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
1062 24: 'OFPT_ROLE_REQUEST',
1063 25: 'OFPT_ROLE_REPLY',
1064 26: 'OFPT_GET_ASYNC_REQUEST',
1065 27: 'OFPT_GET_ASYNC_REPLY',
1066 28: 'OFPT_SET_ASYNC',
1067 29: 'OFPT_METER_MOD',
1068}
1069
1070# Identifiers from group ofp_vlan_id
1071OFPVID_NONE = 0
1072OFPVID_PRESENT = 4096
1073
1074ofp_vlan_id_map = {
1075 0: 'OFPVID_NONE',
1076 4096: 'OFPVID_PRESENT',
1077}
1078