blob: 777bd64ef806a35ebe67443450e656ea71dd57e1 [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 Lane2e079da2014-10-29 15:30:24 -070030# Identifiers from group of_bsn_pdu_slot_num
Rich Lane6f4978c2013-10-20 21:33:52 -070031BSN_PDU_SLOT_NUM_ANY = 255
32
Rich Lane2e079da2014-10-29 15:30:24 -070033of_bsn_pdu_slot_num_map = {
Rich Lane6f4978c2013-10-20 21:33:52 -070034 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 Lanef9530c42014-09-15 09:59:43 -0700119OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
Rich Lane93b33132014-04-21 12:20:58 -0700120
121ofp_bsn_vport_l2gre_flags_map = {
122 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
123 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
124 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
Rich Lane5587ab12014-06-30 11:19:09 -0700125 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
Rich Lanef9530c42014-09-15 09:59:43 -0700126 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
Rich Lane93b33132014-04-21 12:20:58 -0700127}
128
Dan Talaycof6202252013-07-02 01:00:29 -0700129# Identifiers from group ofp_bsn_vport_q_in_q_untagged
130OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
131
132ofp_bsn_vport_q_in_q_untagged_map = {
133 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
134}
135
Rich Laned53156a2013-08-05 17:17:33 -0700136# Identifiers from group ofp_bsn_vport_status
137OF_BSN_VPORT_STATUS_OK = 0
138OF_BSN_VPORT_STATUS_FAILED = 1
139
140ofp_bsn_vport_status_map = {
141 0: 'OF_BSN_VPORT_STATUS_OK',
142 1: 'OF_BSN_VPORT_STATUS_FAILED',
143}
144
Rich Laneb658ddd2013-03-12 10:15:10 -0700145# Identifiers from group ofp_capabilities
Rich Lanec2ee4b82013-04-24 17:12:38 -0700146OFPC_FLOW_STATS = 1
147OFPC_TABLE_STATS = 2
148OFPC_PORT_STATS = 4
149OFPC_STP = 8
150OFPC_RESERVED = 16
151OFPC_IP_REASM = 32
152OFPC_QUEUE_STATS = 64
153OFPC_ARP_MATCH_IP = 128
Rich Laneb658ddd2013-03-12 10:15:10 -0700154
155ofp_capabilities_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700156 1: 'OFPC_FLOW_STATS',
157 2: 'OFPC_TABLE_STATS',
158 4: 'OFPC_PORT_STATS',
159 8: 'OFPC_STP',
160 16: 'OFPC_RESERVED',
161 32: 'OFPC_IP_REASM',
162 64: 'OFPC_QUEUE_STATS',
163 128: 'OFPC_ARP_MATCH_IP',
Rich Laneb658ddd2013-03-12 10:15:10 -0700164}
165
166# Identifiers from group ofp_config_flags
167OFPC_FRAG_NORMAL = 0
168OFPC_FRAG_DROP = 1
169OFPC_FRAG_REASM = 2
170OFPC_FRAG_MASK = 3
171
172ofp_config_flags_map = {
173 0: 'OFPC_FRAG_NORMAL',
174 1: 'OFPC_FRAG_DROP',
175 2: 'OFPC_FRAG_REASM',
176 3: 'OFPC_FRAG_MASK',
177}
178
179# Identifiers from group ofp_error_type
180OFPET_HELLO_FAILED = 0
181OFPET_BAD_REQUEST = 1
182OFPET_BAD_ACTION = 2
183OFPET_FLOW_MOD_FAILED = 3
184OFPET_PORT_MOD_FAILED = 4
185OFPET_QUEUE_OP_FAILED = 5
186
187ofp_error_type_map = {
188 0: 'OFPET_HELLO_FAILED',
189 1: 'OFPET_BAD_REQUEST',
190 2: 'OFPET_BAD_ACTION',
191 3: 'OFPET_FLOW_MOD_FAILED',
192 4: 'OFPET_PORT_MOD_FAILED',
193 5: 'OFPET_QUEUE_OP_FAILED',
194}
195
196# Identifiers from group ofp_flow_mod_command
197OFPFC_ADD = 0
198OFPFC_MODIFY = 1
199OFPFC_MODIFY_STRICT = 2
200OFPFC_DELETE = 3
201OFPFC_DELETE_STRICT = 4
202
203ofp_flow_mod_command_map = {
204 0: 'OFPFC_ADD',
205 1: 'OFPFC_MODIFY',
206 2: 'OFPFC_MODIFY_STRICT',
207 3: 'OFPFC_DELETE',
208 4: 'OFPFC_DELETE_STRICT',
209}
210
211# Identifiers from group ofp_flow_mod_failed_code
212OFPFMFC_ALL_TABLES_FULL = 0
213OFPFMFC_OVERLAP = 1
214OFPFMFC_EPERM = 2
215OFPFMFC_BAD_EMERG_TIMEOUT = 3
216OFPFMFC_BAD_COMMAND = 4
217OFPFMFC_UNSUPPORTED = 5
218
219ofp_flow_mod_failed_code_map = {
220 0: 'OFPFMFC_ALL_TABLES_FULL',
221 1: 'OFPFMFC_OVERLAP',
222 2: 'OFPFMFC_EPERM',
223 3: 'OFPFMFC_BAD_EMERG_TIMEOUT',
224 4: 'OFPFMFC_BAD_COMMAND',
225 5: 'OFPFMFC_UNSUPPORTED',
226}
227
228# Identifiers from group ofp_flow_mod_flags
Rich Lanec2ee4b82013-04-24 17:12:38 -0700229OFPFF_SEND_FLOW_REM = 1
230OFPFF_CHECK_OVERLAP = 2
231OFPFF_EMERG = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700232
233ofp_flow_mod_flags_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700234 1: 'OFPFF_SEND_FLOW_REM',
235 2: 'OFPFF_CHECK_OVERLAP',
236 4: 'OFPFF_EMERG',
Rich Laneb658ddd2013-03-12 10:15:10 -0700237}
238
239# Identifiers from group ofp_flow_removed_reason
240OFPRR_IDLE_TIMEOUT = 0
241OFPRR_HARD_TIMEOUT = 1
242OFPRR_DELETE = 2
243
244ofp_flow_removed_reason_map = {
245 0: 'OFPRR_IDLE_TIMEOUT',
246 1: 'OFPRR_HARD_TIMEOUT',
247 2: 'OFPRR_DELETE',
248}
249
250# Identifiers from group ofp_flow_wildcards
Rich Lanec2ee4b82013-04-24 17:12:38 -0700251OFPFW_IN_PORT = 1
252OFPFW_DL_VLAN = 2
253OFPFW_DL_SRC = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700254OFPFW_NW_DST_BITS = 6
255OFPFW_NW_SRC_BITS = 6
256OFPFW_NW_SRC_SHIFT = 8
Rich Lanec2ee4b82013-04-24 17:12:38 -0700257OFPFW_DL_DST = 8
Rich Laneb658ddd2013-03-12 10:15:10 -0700258OFPFW_NW_DST_SHIFT = 14
Rich Lanec2ee4b82013-04-24 17:12:38 -0700259OFPFW_DL_TYPE = 16
260OFPFW_NW_PROTO = 32
261OFPFW_TP_SRC = 64
262OFPFW_TP_DST = 128
263OFPFW_NW_SRC_ALL = 8192
264OFPFW_NW_SRC_MASK = 16128
265OFPFW_NW_DST_ALL = 524288
266OFPFW_NW_DST_MASK = 1032192
267OFPFW_DL_VLAN_PCP = 1048576
268OFPFW_NW_TOS = 2097152
269OFPFW_ALL = 4194303
Rich Laneb658ddd2013-03-12 10:15:10 -0700270
271ofp_flow_wildcards_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700272 1: 'OFPFW_IN_PORT',
273 2: 'OFPFW_DL_VLAN',
274 4: 'OFPFW_DL_SRC',
275 8: 'OFPFW_DL_DST',
276 16: 'OFPFW_DL_TYPE',
277 32: 'OFPFW_NW_PROTO',
278 64: 'OFPFW_TP_SRC',
279 128: 'OFPFW_TP_DST',
280 1048576: 'OFPFW_DL_VLAN_PCP',
281 2097152: 'OFPFW_NW_TOS',
Rich Laneb658ddd2013-03-12 10:15:10 -0700282}
283
284# Identifiers from group ofp_hello_failed_code
285OFPHFC_INCOMPATIBLE = 0
286OFPHFC_EPERM = 1
287
288ofp_hello_failed_code_map = {
289 0: 'OFPHFC_INCOMPATIBLE',
290 1: 'OFPHFC_EPERM',
291}
292
Rich Lanec2ee4b82013-04-24 17:12:38 -0700293# Identifiers from group ofp_nicira_controller_role
294NX_ROLE_OTHER = 0
295NX_ROLE_MASTER = 1
296NX_ROLE_SLAVE = 2
297
298ofp_nicira_controller_role_map = {
299 0: 'NX_ROLE_OTHER',
300 1: 'NX_ROLE_MASTER',
301 2: 'NX_ROLE_SLAVE',
302}
303
Rich Laneb658ddd2013-03-12 10:15:10 -0700304# Identifiers from group ofp_packet_in_reason
305OFPR_NO_MATCH = 0
306OFPR_ACTION = 1
307
308ofp_packet_in_reason_map = {
309 0: 'OFPR_NO_MATCH',
310 1: 'OFPR_ACTION',
311}
312
313# Identifiers from group ofp_port
314OFPP_MAX = 0xff00
315OFPP_IN_PORT = 0xfff8
316OFPP_TABLE = 0xfff9
317OFPP_NORMAL = 0xfffa
318OFPP_FLOOD = 0xfffb
319OFPP_ALL = 0xfffc
320OFPP_CONTROLLER = 0xfffd
321OFPP_LOCAL = 0xfffe
322OFPP_NONE = 0xffff
323
324ofp_port_map = {
325 0xff00: 'OFPP_MAX',
326 0xfff8: 'OFPP_IN_PORT',
327 0xfff9: 'OFPP_TABLE',
328 0xfffa: 'OFPP_NORMAL',
329 0xfffb: 'OFPP_FLOOD',
330 0xfffc: 'OFPP_ALL',
331 0xfffd: 'OFPP_CONTROLLER',
332 0xfffe: 'OFPP_LOCAL',
333 0xffff: 'OFPP_NONE',
334}
335
336# Identifiers from group ofp_port_config
Rich Lanec2ee4b82013-04-24 17:12:38 -0700337OFPPC_PORT_DOWN = 1
338OFPPC_NO_STP = 2
339OFPPC_NO_RECV = 4
340OFPPC_NO_RECV_STP = 8
341OFPPC_NO_FLOOD = 16
342OFPPC_NO_FWD = 32
343OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700344OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Laneb658ddd2013-03-12 10:15:10 -0700345
346ofp_port_config_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700347 1: 'OFPPC_PORT_DOWN',
348 2: 'OFPPC_NO_STP',
349 4: 'OFPPC_NO_RECV',
350 8: 'OFPPC_NO_RECV_STP',
351 16: 'OFPPC_NO_FLOOD',
352 32: 'OFPPC_NO_FWD',
353 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700354 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Laneb658ddd2013-03-12 10:15:10 -0700355}
356
357# Identifiers from group ofp_port_features
Rich Lanec2ee4b82013-04-24 17:12:38 -0700358OFPPF_10MB_HD = 1
359OFPPF_10MB_FD = 2
360OFPPF_100MB_HD = 4
361OFPPF_100MB_FD = 8
362OFPPF_1GB_HD = 16
363OFPPF_1GB_FD = 32
364OFPPF_10GB_FD = 64
365OFPPF_COPPER = 128
366OFPPF_FIBER = 256
367OFPPF_AUTONEG = 512
368OFPPF_PAUSE = 1024
369OFPPF_PAUSE_ASYM = 2048
Rich Laneb658ddd2013-03-12 10:15:10 -0700370
371ofp_port_features_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700372 1: 'OFPPF_10MB_HD',
373 2: 'OFPPF_10MB_FD',
374 4: 'OFPPF_100MB_HD',
375 8: 'OFPPF_100MB_FD',
376 16: 'OFPPF_1GB_HD',
377 32: 'OFPPF_1GB_FD',
378 64: 'OFPPF_10GB_FD',
379 128: 'OFPPF_COPPER',
380 256: 'OFPPF_FIBER',
381 512: 'OFPPF_AUTONEG',
382 1024: 'OFPPF_PAUSE',
383 2048: 'OFPPF_PAUSE_ASYM',
Rich Laneb658ddd2013-03-12 10:15:10 -0700384}
385
386# Identifiers from group ofp_port_mod_failed_code
387OFPPMFC_BAD_PORT = 0
388OFPPMFC_BAD_HW_ADDR = 1
389
390ofp_port_mod_failed_code_map = {
391 0: 'OFPPMFC_BAD_PORT',
392 1: 'OFPPMFC_BAD_HW_ADDR',
393}
394
395# Identifiers from group ofp_port_reason
396OFPPR_ADD = 0
397OFPPR_DELETE = 1
398OFPPR_MODIFY = 2
399
400ofp_port_reason_map = {
401 0: 'OFPPR_ADD',
402 1: 'OFPPR_DELETE',
403 2: 'OFPPR_MODIFY',
404}
405
406# Identifiers from group ofp_port_state
Rich Lanec2ee4b82013-04-24 17:12:38 -0700407OFPPS_LINK_DOWN = 1
Rich Lane6f4978c2013-10-20 21:33:52 -0700408OFPPS_STP_LISTEN = 0
Rich Lanec2ee4b82013-04-24 17:12:38 -0700409OFPPS_STP_LEARN = 256
410OFPPS_STP_FORWARD = 512
411OFPPS_STP_BLOCK = 768
412OFPPS_STP_MASK = 768
Rich Laneb658ddd2013-03-12 10:15:10 -0700413
414ofp_port_state_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700415 1: 'OFPPS_LINK_DOWN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700416 0: 'OFPPS_STP_LISTEN',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700417 256: 'OFPPS_STP_LEARN',
418 512: 'OFPPS_STP_FORWARD',
419 768: 'OFPPS_STP_BLOCK',
420 768: 'OFPPS_STP_MASK',
Rich Laneb658ddd2013-03-12 10:15:10 -0700421}
422
423# Identifiers from group ofp_queue_op_failed_code
424OFPQOFC_BAD_PORT = 0
425OFPQOFC_BAD_QUEUE = 1
426OFPQOFC_EPERM = 2
427
428ofp_queue_op_failed_code_map = {
429 0: 'OFPQOFC_BAD_PORT',
430 1: 'OFPQOFC_BAD_QUEUE',
431 2: 'OFPQOFC_EPERM',
432}
433
434# Identifiers from group ofp_queue_properties
435OFPQT_NONE = 0
436OFPQT_MIN_RATE = 1
437
438ofp_queue_properties_map = {
439 0: 'OFPQT_NONE',
440 1: 'OFPQT_MIN_RATE',
441}
442
443# Identifiers from group ofp_stats_reply_flags
Rich Lanec2ee4b82013-04-24 17:12:38 -0700444OFPSF_REPLY_MORE = 1
Rich Laneb658ddd2013-03-12 10:15:10 -0700445
446ofp_stats_reply_flags_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700447 1: 'OFPSF_REPLY_MORE',
Rich Laneb658ddd2013-03-12 10:15:10 -0700448}
449
Rich Laned9e3f7b2013-11-04 11:40:43 -0800450# Identifiers from group ofp_stats_request_flags
451
452ofp_stats_request_flags_map = {
453}
454
Rich Lane6f4978c2013-10-20 21:33:52 -0700455# Identifiers from group ofp_stats_type
Rich Laneb658ddd2013-03-12 10:15:10 -0700456OFPST_DESC = 0
457OFPST_FLOW = 1
458OFPST_AGGREGATE = 2
459OFPST_TABLE = 3
460OFPST_PORT = 4
461OFPST_QUEUE = 5
Rich Lane6f4978c2013-10-20 21:33:52 -0700462OFPST_EXPERIMENTER = 65535
Rich Laneb658ddd2013-03-12 10:15:10 -0700463
Rich Lane6f4978c2013-10-20 21:33:52 -0700464ofp_stats_type_map = {
Rich Laneb658ddd2013-03-12 10:15:10 -0700465 0: 'OFPST_DESC',
466 1: 'OFPST_FLOW',
467 2: 'OFPST_AGGREGATE',
468 3: 'OFPST_TABLE',
469 4: 'OFPST_PORT',
470 5: 'OFPST_QUEUE',
Rich Lane6f4978c2013-10-20 21:33:52 -0700471 65535: 'OFPST_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700472}
473
474# Identifiers from group ofp_type
475OFPT_HELLO = 0
476OFPT_ERROR = 1
477OFPT_ECHO_REQUEST = 2
478OFPT_ECHO_REPLY = 3
Rich Lane6f4978c2013-10-20 21:33:52 -0700479OFPT_EXPERIMENTER = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700480OFPT_FEATURES_REQUEST = 5
481OFPT_FEATURES_REPLY = 6
482OFPT_GET_CONFIG_REQUEST = 7
483OFPT_GET_CONFIG_REPLY = 8
484OFPT_SET_CONFIG = 9
485OFPT_PACKET_IN = 10
486OFPT_FLOW_REMOVED = 11
487OFPT_PORT_STATUS = 12
488OFPT_PACKET_OUT = 13
489OFPT_FLOW_MOD = 14
490OFPT_PORT_MOD = 15
491OFPT_STATS_REQUEST = 16
492OFPT_STATS_REPLY = 17
493OFPT_BARRIER_REQUEST = 18
494OFPT_BARRIER_REPLY = 19
495OFPT_QUEUE_GET_CONFIG_REQUEST = 20
496OFPT_QUEUE_GET_CONFIG_REPLY = 21
497
498ofp_type_map = {
499 0: 'OFPT_HELLO',
500 1: 'OFPT_ERROR',
501 2: 'OFPT_ECHO_REQUEST',
502 3: 'OFPT_ECHO_REPLY',
Rich Lane6f4978c2013-10-20 21:33:52 -0700503 4: 'OFPT_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700504 5: 'OFPT_FEATURES_REQUEST',
505 6: 'OFPT_FEATURES_REPLY',
506 7: 'OFPT_GET_CONFIG_REQUEST',
507 8: 'OFPT_GET_CONFIG_REPLY',
508 9: 'OFPT_SET_CONFIG',
509 10: 'OFPT_PACKET_IN',
510 11: 'OFPT_FLOW_REMOVED',
511 12: 'OFPT_PORT_STATUS',
512 13: 'OFPT_PACKET_OUT',
513 14: 'OFPT_FLOW_MOD',
514 15: 'OFPT_PORT_MOD',
515 16: 'OFPT_STATS_REQUEST',
516 17: 'OFPT_STATS_REPLY',
517 18: 'OFPT_BARRIER_REQUEST',
518 19: 'OFPT_BARRIER_REPLY',
519 20: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
520 21: 'OFPT_QUEUE_GET_CONFIG_REPLY',
521}
522