blob: 97c78730a50d28a93b3c5b0f07ffd9d82536a21c [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 Laneb658ddd2013-03-12 10:15:10 -07005
6# Automatically generated by LOXI from template const.py
7# Do not modify
8
9OFP_VERSION = 1
10
11# Identifiers from group macro_definitions
Rich Laneb658ddd2013-03-12 10:15:10 -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
Rich Lanec2ee4b82013-04-24 17:12:38 -070018OFP_VLAN_NONE = 65535
Dan Talaycof6202252013-07-02 01:00:29 -070019OFPFW_ICMP_TYPE = 64
20OFPFW_ICMP_CODE = 128
21OFP_DL_TYPE_ETH2_CUTOFF = 1536
22OFP_DL_TYPE_NOT_ETH_TYPE = 1535
23OFP_FLOW_PERMANENT = 0
24OFP_DEFAULT_PRIORITY = 32768
25DESC_STR_LEN = 256
26SERIAL_NUM_LEN = 32
Rich Lanec2ee4b82013-04-24 17:12:38 -070027OFPQ_ALL = 4294967295
Dan Talaycof6202252013-07-02 01:00:29 -070028OFPQ_MIN_RATE_UNCFG = 65535
Rich Laneb658ddd2013-03-12 10:15:10 -070029
Rich Lane6f4978c2013-10-20 21:33:52 -070030# Identifiers from group of_bsn_pdu_slot_num_t
31BSN_PDU_SLOT_NUM_ANY = 255
32
33of_bsn_pdu_slot_num_t_map = {
34 255: 'BSN_PDU_SLOT_NUM_ANY',
35}
36
Rich Laneb658ddd2013-03-12 10:15:10 -070037# Identifiers from group ofp_action_type
38OFPAT_OUTPUT = 0
39OFPAT_SET_VLAN_VID = 1
40OFPAT_SET_VLAN_PCP = 2
41OFPAT_STRIP_VLAN = 3
42OFPAT_SET_DL_SRC = 4
43OFPAT_SET_DL_DST = 5
44OFPAT_SET_NW_SRC = 6
45OFPAT_SET_NW_DST = 7
46OFPAT_SET_NW_TOS = 8
47OFPAT_SET_TP_SRC = 9
48OFPAT_SET_TP_DST = 10
49OFPAT_ENQUEUE = 11
Rich Lane6f4978c2013-10-20 21:33:52 -070050OFPAT_EXPERIMENTER = 65535
Rich Laneb658ddd2013-03-12 10:15:10 -070051
52ofp_action_type_map = {
53 0: 'OFPAT_OUTPUT',
54 1: 'OFPAT_SET_VLAN_VID',
55 2: 'OFPAT_SET_VLAN_PCP',
56 3: 'OFPAT_STRIP_VLAN',
57 4: 'OFPAT_SET_DL_SRC',
58 5: 'OFPAT_SET_DL_DST',
59 6: 'OFPAT_SET_NW_SRC',
60 7: 'OFPAT_SET_NW_DST',
61 8: 'OFPAT_SET_NW_TOS',
62 9: 'OFPAT_SET_TP_SRC',
63 10: 'OFPAT_SET_TP_DST',
64 11: 'OFPAT_ENQUEUE',
Rich Lane6f4978c2013-10-20 21:33:52 -070065 65535: 'OFPAT_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -070066}
67
68# Identifiers from group ofp_bad_action_code
69OFPBAC_BAD_TYPE = 0
70OFPBAC_BAD_LEN = 1
Rich Lane6f4978c2013-10-20 21:33:52 -070071OFPBAC_BAD_EXPERIMENTER = 2
72OFPBAC_BAD_EXPERIMENTER_TYPE = 3
Rich Laneb658ddd2013-03-12 10:15:10 -070073OFPBAC_BAD_OUT_PORT = 4
74OFPBAC_BAD_ARGUMENT = 5
75OFPBAC_EPERM = 6
76OFPBAC_TOO_MANY = 7
77OFPBAC_BAD_QUEUE = 8
78
79ofp_bad_action_code_map = {
80 0: 'OFPBAC_BAD_TYPE',
81 1: 'OFPBAC_BAD_LEN',
Rich Lane6f4978c2013-10-20 21:33:52 -070082 2: 'OFPBAC_BAD_EXPERIMENTER',
83 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
Rich Laneb658ddd2013-03-12 10:15:10 -070084 4: 'OFPBAC_BAD_OUT_PORT',
85 5: 'OFPBAC_BAD_ARGUMENT',
86 6: 'OFPBAC_EPERM',
87 7: 'OFPBAC_TOO_MANY',
88 8: 'OFPBAC_BAD_QUEUE',
89}
90
91# Identifiers from group ofp_bad_request_code
92OFPBRC_BAD_VERSION = 0
93OFPBRC_BAD_TYPE = 1
94OFPBRC_BAD_STAT = 2
Rich Lane6f4978c2013-10-20 21:33:52 -070095OFPBRC_BAD_EXPERIMENTER = 3
Rich Laneb658ddd2013-03-12 10:15:10 -070096OFPBRC_BAD_SUBTYPE = 4
97OFPBRC_EPERM = 5
98OFPBRC_BAD_LEN = 6
99OFPBRC_BUFFER_EMPTY = 7
100OFPBRC_BUFFER_UNKNOWN = 8
101
102ofp_bad_request_code_map = {
103 0: 'OFPBRC_BAD_VERSION',
104 1: 'OFPBRC_BAD_TYPE',
105 2: 'OFPBRC_BAD_STAT',
Rich Lane6f4978c2013-10-20 21:33:52 -0700106 3: 'OFPBRC_BAD_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700107 4: 'OFPBRC_BAD_SUBTYPE',
108 5: 'OFPBRC_EPERM',
109 6: 'OFPBRC_BAD_LEN',
110 7: 'OFPBRC_BUFFER_EMPTY',
111 8: 'OFPBRC_BUFFER_UNKNOWN',
112}
113
Rich Lane93b33132014-04-21 12:20:58 -0700114# Identifiers from group ofp_bsn_vport_l2gre_flags
115OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
116OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
117OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
Rich Lane5587ab12014-06-30 11:19:09 -0700118OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
Rich Lane93b33132014-04-21 12:20:58 -0700119
120ofp_bsn_vport_l2gre_flags_map = {
121 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
122 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
123 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
Rich Lane5587ab12014-06-30 11:19:09 -0700124 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
Rich Lane93b33132014-04-21 12:20:58 -0700125}
126
Dan Talaycof6202252013-07-02 01:00:29 -0700127# Identifiers from group ofp_bsn_vport_q_in_q_untagged
128OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
129
130ofp_bsn_vport_q_in_q_untagged_map = {
131 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
132}
133
Rich Laned53156a2013-08-05 17:17:33 -0700134# Identifiers from group ofp_bsn_vport_status
135OF_BSN_VPORT_STATUS_OK = 0
136OF_BSN_VPORT_STATUS_FAILED = 1
137
138ofp_bsn_vport_status_map = {
139 0: 'OF_BSN_VPORT_STATUS_OK',
140 1: 'OF_BSN_VPORT_STATUS_FAILED',
141}
142
Rich Laneb658ddd2013-03-12 10:15:10 -0700143# Identifiers from group ofp_capabilities
Rich Lanec2ee4b82013-04-24 17:12:38 -0700144OFPC_FLOW_STATS = 1
145OFPC_TABLE_STATS = 2
146OFPC_PORT_STATS = 4
147OFPC_STP = 8
148OFPC_RESERVED = 16
149OFPC_IP_REASM = 32
150OFPC_QUEUE_STATS = 64
151OFPC_ARP_MATCH_IP = 128
Rich Laneb658ddd2013-03-12 10:15:10 -0700152
153ofp_capabilities_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700154 1: 'OFPC_FLOW_STATS',
155 2: 'OFPC_TABLE_STATS',
156 4: 'OFPC_PORT_STATS',
157 8: 'OFPC_STP',
158 16: 'OFPC_RESERVED',
159 32: 'OFPC_IP_REASM',
160 64: 'OFPC_QUEUE_STATS',
161 128: 'OFPC_ARP_MATCH_IP',
Rich Laneb658ddd2013-03-12 10:15:10 -0700162}
163
164# Identifiers from group ofp_config_flags
165OFPC_FRAG_NORMAL = 0
166OFPC_FRAG_DROP = 1
167OFPC_FRAG_REASM = 2
168OFPC_FRAG_MASK = 3
169
170ofp_config_flags_map = {
171 0: 'OFPC_FRAG_NORMAL',
172 1: 'OFPC_FRAG_DROP',
173 2: 'OFPC_FRAG_REASM',
174 3: 'OFPC_FRAG_MASK',
175}
176
177# Identifiers from group ofp_error_type
178OFPET_HELLO_FAILED = 0
179OFPET_BAD_REQUEST = 1
180OFPET_BAD_ACTION = 2
181OFPET_FLOW_MOD_FAILED = 3
182OFPET_PORT_MOD_FAILED = 4
183OFPET_QUEUE_OP_FAILED = 5
184
185ofp_error_type_map = {
186 0: 'OFPET_HELLO_FAILED',
187 1: 'OFPET_BAD_REQUEST',
188 2: 'OFPET_BAD_ACTION',
189 3: 'OFPET_FLOW_MOD_FAILED',
190 4: 'OFPET_PORT_MOD_FAILED',
191 5: 'OFPET_QUEUE_OP_FAILED',
192}
193
194# Identifiers from group ofp_flow_mod_command
195OFPFC_ADD = 0
196OFPFC_MODIFY = 1
197OFPFC_MODIFY_STRICT = 2
198OFPFC_DELETE = 3
199OFPFC_DELETE_STRICT = 4
200
201ofp_flow_mod_command_map = {
202 0: 'OFPFC_ADD',
203 1: 'OFPFC_MODIFY',
204 2: 'OFPFC_MODIFY_STRICT',
205 3: 'OFPFC_DELETE',
206 4: 'OFPFC_DELETE_STRICT',
207}
208
209# Identifiers from group ofp_flow_mod_failed_code
210OFPFMFC_ALL_TABLES_FULL = 0
211OFPFMFC_OVERLAP = 1
212OFPFMFC_EPERM = 2
213OFPFMFC_BAD_EMERG_TIMEOUT = 3
214OFPFMFC_BAD_COMMAND = 4
215OFPFMFC_UNSUPPORTED = 5
216
217ofp_flow_mod_failed_code_map = {
218 0: 'OFPFMFC_ALL_TABLES_FULL',
219 1: 'OFPFMFC_OVERLAP',
220 2: 'OFPFMFC_EPERM',
221 3: 'OFPFMFC_BAD_EMERG_TIMEOUT',
222 4: 'OFPFMFC_BAD_COMMAND',
223 5: 'OFPFMFC_UNSUPPORTED',
224}
225
226# Identifiers from group ofp_flow_mod_flags
Rich Lanec2ee4b82013-04-24 17:12:38 -0700227OFPFF_SEND_FLOW_REM = 1
228OFPFF_CHECK_OVERLAP = 2
229OFPFF_EMERG = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700230
231ofp_flow_mod_flags_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700232 1: 'OFPFF_SEND_FLOW_REM',
233 2: 'OFPFF_CHECK_OVERLAP',
234 4: 'OFPFF_EMERG',
Rich Laneb658ddd2013-03-12 10:15:10 -0700235}
236
237# Identifiers from group ofp_flow_removed_reason
238OFPRR_IDLE_TIMEOUT = 0
239OFPRR_HARD_TIMEOUT = 1
240OFPRR_DELETE = 2
241
242ofp_flow_removed_reason_map = {
243 0: 'OFPRR_IDLE_TIMEOUT',
244 1: 'OFPRR_HARD_TIMEOUT',
245 2: 'OFPRR_DELETE',
246}
247
248# Identifiers from group ofp_flow_wildcards
Rich Lanec2ee4b82013-04-24 17:12:38 -0700249OFPFW_IN_PORT = 1
250OFPFW_DL_VLAN = 2
251OFPFW_DL_SRC = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700252OFPFW_NW_DST_BITS = 6
253OFPFW_NW_SRC_BITS = 6
254OFPFW_NW_SRC_SHIFT = 8
Rich Lanec2ee4b82013-04-24 17:12:38 -0700255OFPFW_DL_DST = 8
Rich Laneb658ddd2013-03-12 10:15:10 -0700256OFPFW_NW_DST_SHIFT = 14
Rich Lanec2ee4b82013-04-24 17:12:38 -0700257OFPFW_DL_TYPE = 16
258OFPFW_NW_PROTO = 32
259OFPFW_TP_SRC = 64
260OFPFW_TP_DST = 128
261OFPFW_NW_SRC_ALL = 8192
262OFPFW_NW_SRC_MASK = 16128
263OFPFW_NW_DST_ALL = 524288
264OFPFW_NW_DST_MASK = 1032192
265OFPFW_DL_VLAN_PCP = 1048576
266OFPFW_NW_TOS = 2097152
267OFPFW_ALL = 4194303
Rich Laneb658ddd2013-03-12 10:15:10 -0700268
269ofp_flow_wildcards_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700270 1: 'OFPFW_IN_PORT',
271 2: 'OFPFW_DL_VLAN',
272 4: 'OFPFW_DL_SRC',
273 8: 'OFPFW_DL_DST',
274 16: 'OFPFW_DL_TYPE',
275 32: 'OFPFW_NW_PROTO',
276 64: 'OFPFW_TP_SRC',
277 128: 'OFPFW_TP_DST',
278 1048576: 'OFPFW_DL_VLAN_PCP',
279 2097152: 'OFPFW_NW_TOS',
Rich Laneb658ddd2013-03-12 10:15:10 -0700280}
281
282# Identifiers from group ofp_hello_failed_code
283OFPHFC_INCOMPATIBLE = 0
284OFPHFC_EPERM = 1
285
286ofp_hello_failed_code_map = {
287 0: 'OFPHFC_INCOMPATIBLE',
288 1: 'OFPHFC_EPERM',
289}
290
Rich Lanec2ee4b82013-04-24 17:12:38 -0700291# Identifiers from group ofp_nicira_controller_role
292NX_ROLE_OTHER = 0
293NX_ROLE_MASTER = 1
294NX_ROLE_SLAVE = 2
295
296ofp_nicira_controller_role_map = {
297 0: 'NX_ROLE_OTHER',
298 1: 'NX_ROLE_MASTER',
299 2: 'NX_ROLE_SLAVE',
300}
301
Rich Laneb658ddd2013-03-12 10:15:10 -0700302# Identifiers from group ofp_packet_in_reason
303OFPR_NO_MATCH = 0
304OFPR_ACTION = 1
305
306ofp_packet_in_reason_map = {
307 0: 'OFPR_NO_MATCH',
308 1: 'OFPR_ACTION',
309}
310
311# Identifiers from group ofp_port
312OFPP_MAX = 0xff00
313OFPP_IN_PORT = 0xfff8
314OFPP_TABLE = 0xfff9
315OFPP_NORMAL = 0xfffa
316OFPP_FLOOD = 0xfffb
317OFPP_ALL = 0xfffc
318OFPP_CONTROLLER = 0xfffd
319OFPP_LOCAL = 0xfffe
320OFPP_NONE = 0xffff
321
322ofp_port_map = {
323 0xff00: 'OFPP_MAX',
324 0xfff8: 'OFPP_IN_PORT',
325 0xfff9: 'OFPP_TABLE',
326 0xfffa: 'OFPP_NORMAL',
327 0xfffb: 'OFPP_FLOOD',
328 0xfffc: 'OFPP_ALL',
329 0xfffd: 'OFPP_CONTROLLER',
330 0xfffe: 'OFPP_LOCAL',
331 0xffff: 'OFPP_NONE',
332}
333
334# Identifiers from group ofp_port_config
Rich Lanec2ee4b82013-04-24 17:12:38 -0700335OFPPC_PORT_DOWN = 1
336OFPPC_NO_STP = 2
337OFPPC_NO_RECV = 4
338OFPPC_NO_RECV_STP = 8
339OFPPC_NO_FLOOD = 16
340OFPPC_NO_FWD = 32
341OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700342OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Laneb658ddd2013-03-12 10:15:10 -0700343
344ofp_port_config_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700345 1: 'OFPPC_PORT_DOWN',
346 2: 'OFPPC_NO_STP',
347 4: 'OFPPC_NO_RECV',
348 8: 'OFPPC_NO_RECV_STP',
349 16: 'OFPPC_NO_FLOOD',
350 32: 'OFPPC_NO_FWD',
351 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700352 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Laneb658ddd2013-03-12 10:15:10 -0700353}
354
355# Identifiers from group ofp_port_features
Rich Lanec2ee4b82013-04-24 17:12:38 -0700356OFPPF_10MB_HD = 1
357OFPPF_10MB_FD = 2
358OFPPF_100MB_HD = 4
359OFPPF_100MB_FD = 8
360OFPPF_1GB_HD = 16
361OFPPF_1GB_FD = 32
362OFPPF_10GB_FD = 64
363OFPPF_COPPER = 128
364OFPPF_FIBER = 256
365OFPPF_AUTONEG = 512
366OFPPF_PAUSE = 1024
367OFPPF_PAUSE_ASYM = 2048
Rich Laneb658ddd2013-03-12 10:15:10 -0700368
369ofp_port_features_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700370 1: 'OFPPF_10MB_HD',
371 2: 'OFPPF_10MB_FD',
372 4: 'OFPPF_100MB_HD',
373 8: 'OFPPF_100MB_FD',
374 16: 'OFPPF_1GB_HD',
375 32: 'OFPPF_1GB_FD',
376 64: 'OFPPF_10GB_FD',
377 128: 'OFPPF_COPPER',
378 256: 'OFPPF_FIBER',
379 512: 'OFPPF_AUTONEG',
380 1024: 'OFPPF_PAUSE',
381 2048: 'OFPPF_PAUSE_ASYM',
Rich Laneb658ddd2013-03-12 10:15:10 -0700382}
383
384# Identifiers from group ofp_port_mod_failed_code
385OFPPMFC_BAD_PORT = 0
386OFPPMFC_BAD_HW_ADDR = 1
387
388ofp_port_mod_failed_code_map = {
389 0: 'OFPPMFC_BAD_PORT',
390 1: 'OFPPMFC_BAD_HW_ADDR',
391}
392
393# Identifiers from group ofp_port_reason
394OFPPR_ADD = 0
395OFPPR_DELETE = 1
396OFPPR_MODIFY = 2
397
398ofp_port_reason_map = {
399 0: 'OFPPR_ADD',
400 1: 'OFPPR_DELETE',
401 2: 'OFPPR_MODIFY',
402}
403
404# Identifiers from group ofp_port_state
Rich Lanec2ee4b82013-04-24 17:12:38 -0700405OFPPS_LINK_DOWN = 1
Rich Lane6f4978c2013-10-20 21:33:52 -0700406OFPPS_STP_LISTEN = 0
Rich Lanec2ee4b82013-04-24 17:12:38 -0700407OFPPS_STP_LEARN = 256
408OFPPS_STP_FORWARD = 512
409OFPPS_STP_BLOCK = 768
410OFPPS_STP_MASK = 768
Rich Laneb658ddd2013-03-12 10:15:10 -0700411
412ofp_port_state_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700413 1: 'OFPPS_LINK_DOWN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700414 0: 'OFPPS_STP_LISTEN',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700415 256: 'OFPPS_STP_LEARN',
416 512: 'OFPPS_STP_FORWARD',
417 768: 'OFPPS_STP_BLOCK',
418 768: 'OFPPS_STP_MASK',
Rich Laneb658ddd2013-03-12 10:15:10 -0700419}
420
421# Identifiers from group ofp_queue_op_failed_code
422OFPQOFC_BAD_PORT = 0
423OFPQOFC_BAD_QUEUE = 1
424OFPQOFC_EPERM = 2
425
426ofp_queue_op_failed_code_map = {
427 0: 'OFPQOFC_BAD_PORT',
428 1: 'OFPQOFC_BAD_QUEUE',
429 2: 'OFPQOFC_EPERM',
430}
431
432# Identifiers from group ofp_queue_properties
433OFPQT_NONE = 0
434OFPQT_MIN_RATE = 1
435
436ofp_queue_properties_map = {
437 0: 'OFPQT_NONE',
438 1: 'OFPQT_MIN_RATE',
439}
440
441# Identifiers from group ofp_stats_reply_flags
Rich Lanec2ee4b82013-04-24 17:12:38 -0700442OFPSF_REPLY_MORE = 1
Rich Laneb658ddd2013-03-12 10:15:10 -0700443
444ofp_stats_reply_flags_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700445 1: 'OFPSF_REPLY_MORE',
Rich Laneb658ddd2013-03-12 10:15:10 -0700446}
447
Rich Laned9e3f7b2013-11-04 11:40:43 -0800448# Identifiers from group ofp_stats_request_flags
449
450ofp_stats_request_flags_map = {
451}
452
Rich Lane6f4978c2013-10-20 21:33:52 -0700453# Identifiers from group ofp_stats_type
Rich Laneb658ddd2013-03-12 10:15:10 -0700454OFPST_DESC = 0
455OFPST_FLOW = 1
456OFPST_AGGREGATE = 2
457OFPST_TABLE = 3
458OFPST_PORT = 4
459OFPST_QUEUE = 5
Rich Lane6f4978c2013-10-20 21:33:52 -0700460OFPST_EXPERIMENTER = 65535
Rich Laneb658ddd2013-03-12 10:15:10 -0700461
Rich Lane6f4978c2013-10-20 21:33:52 -0700462ofp_stats_type_map = {
Rich Laneb658ddd2013-03-12 10:15:10 -0700463 0: 'OFPST_DESC',
464 1: 'OFPST_FLOW',
465 2: 'OFPST_AGGREGATE',
466 3: 'OFPST_TABLE',
467 4: 'OFPST_PORT',
468 5: 'OFPST_QUEUE',
Rich Lane6f4978c2013-10-20 21:33:52 -0700469 65535: 'OFPST_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700470}
471
472# Identifiers from group ofp_type
473OFPT_HELLO = 0
474OFPT_ERROR = 1
475OFPT_ECHO_REQUEST = 2
476OFPT_ECHO_REPLY = 3
Rich Lane6f4978c2013-10-20 21:33:52 -0700477OFPT_EXPERIMENTER = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700478OFPT_FEATURES_REQUEST = 5
479OFPT_FEATURES_REPLY = 6
480OFPT_GET_CONFIG_REQUEST = 7
481OFPT_GET_CONFIG_REPLY = 8
482OFPT_SET_CONFIG = 9
483OFPT_PACKET_IN = 10
484OFPT_FLOW_REMOVED = 11
485OFPT_PORT_STATUS = 12
486OFPT_PACKET_OUT = 13
487OFPT_FLOW_MOD = 14
488OFPT_PORT_MOD = 15
489OFPT_STATS_REQUEST = 16
490OFPT_STATS_REPLY = 17
491OFPT_BARRIER_REQUEST = 18
492OFPT_BARRIER_REPLY = 19
493OFPT_QUEUE_GET_CONFIG_REQUEST = 20
494OFPT_QUEUE_GET_CONFIG_REPLY = 21
495
496ofp_type_map = {
497 0: 'OFPT_HELLO',
498 1: 'OFPT_ERROR',
499 2: 'OFPT_ECHO_REQUEST',
500 3: 'OFPT_ECHO_REPLY',
Rich Lane6f4978c2013-10-20 21:33:52 -0700501 4: 'OFPT_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700502 5: 'OFPT_FEATURES_REQUEST',
503 6: 'OFPT_FEATURES_REPLY',
504 7: 'OFPT_GET_CONFIG_REQUEST',
505 8: 'OFPT_GET_CONFIG_REPLY',
506 9: 'OFPT_SET_CONFIG',
507 10: 'OFPT_PACKET_IN',
508 11: 'OFPT_FLOW_REMOVED',
509 12: 'OFPT_PORT_STATUS',
510 13: 'OFPT_PACKET_OUT',
511 14: 'OFPT_FLOW_MOD',
512 15: 'OFPT_PORT_MOD',
513 16: 'OFPT_STATS_REQUEST',
514 17: 'OFPT_STATS_REPLY',
515 18: 'OFPT_BARRIER_REQUEST',
516 19: 'OFPT_BARRIER_REPLY',
517 20: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
518 21: 'OFPT_QUEUE_GET_CONFIG_REPLY',
519}
520