blob: 27d4c76323b553d595bcfd9ec0a2b450add45bb3 [file] [log] [blame]
Matteo Scandoloa229eca2017-08-08 13:05:28 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Rich Lanec2ee4b82013-04-24 17:12:38 -070017# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
18# Copyright (c) 2011, 2012 Open Networking Foundation
19# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
Dan Talaycof6202252013-07-02 01:00:29 -070020# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Laneb658ddd2013-03-12 10:15:10 -070021
22# Automatically generated by LOXI from template const.py
23# Do not modify
24
25OFP_VERSION = 1
26
27# Identifiers from group macro_definitions
Rich Laneb658ddd2013-03-12 10:15:10 -070028OFP_MAX_TABLE_NAME_LEN = 32
Dan Talaycof6202252013-07-02 01:00:29 -070029OFP_MAX_PORT_NAME_LEN = 16
Rich Lane6f4978c2013-10-20 21:33:52 -070030OFP_TCP_PORT = 6653
31OFP_SSL_PORT = 6653
Dan Talaycof6202252013-07-02 01:00:29 -070032OFP_ETH_ALEN = 6
33OFP_DEFAULT_MISS_SEND_LEN = 128
Rich Lanec2ee4b82013-04-24 17:12:38 -070034OFP_VLAN_NONE = 65535
Dan Talaycof6202252013-07-02 01:00:29 -070035OFPFW_ICMP_TYPE = 64
36OFPFW_ICMP_CODE = 128
37OFP_DL_TYPE_ETH2_CUTOFF = 1536
38OFP_DL_TYPE_NOT_ETH_TYPE = 1535
39OFP_FLOW_PERMANENT = 0
40OFP_DEFAULT_PRIORITY = 32768
41DESC_STR_LEN = 256
42SERIAL_NUM_LEN = 32
Rich Lanec2ee4b82013-04-24 17:12:38 -070043OFPQ_ALL = 4294967295
Dan Talaycof6202252013-07-02 01:00:29 -070044OFPQ_MIN_RATE_UNCFG = 65535
Rich Laneb658ddd2013-03-12 10:15:10 -070045
Rich Lane2e079da2014-10-29 15:30:24 -070046# Identifiers from group of_bsn_pdu_slot_num
Rich Lane6f4978c2013-10-20 21:33:52 -070047BSN_PDU_SLOT_NUM_ANY = 255
48
Rich Lane2e079da2014-10-29 15:30:24 -070049of_bsn_pdu_slot_num_map = {
Rich Lane6f4978c2013-10-20 21:33:52 -070050 255: 'BSN_PDU_SLOT_NUM_ANY',
51}
52
Rich Laneb658ddd2013-03-12 10:15:10 -070053# Identifiers from group ofp_action_type
54OFPAT_OUTPUT = 0
55OFPAT_SET_VLAN_VID = 1
56OFPAT_SET_VLAN_PCP = 2
57OFPAT_STRIP_VLAN = 3
58OFPAT_SET_DL_SRC = 4
59OFPAT_SET_DL_DST = 5
60OFPAT_SET_NW_SRC = 6
61OFPAT_SET_NW_DST = 7
62OFPAT_SET_NW_TOS = 8
63OFPAT_SET_TP_SRC = 9
64OFPAT_SET_TP_DST = 10
65OFPAT_ENQUEUE = 11
Rich Lane6f4978c2013-10-20 21:33:52 -070066OFPAT_EXPERIMENTER = 65535
Rich Laneb658ddd2013-03-12 10:15:10 -070067
68ofp_action_type_map = {
69 0: 'OFPAT_OUTPUT',
70 1: 'OFPAT_SET_VLAN_VID',
71 2: 'OFPAT_SET_VLAN_PCP',
72 3: 'OFPAT_STRIP_VLAN',
73 4: 'OFPAT_SET_DL_SRC',
74 5: 'OFPAT_SET_DL_DST',
75 6: 'OFPAT_SET_NW_SRC',
76 7: 'OFPAT_SET_NW_DST',
77 8: 'OFPAT_SET_NW_TOS',
78 9: 'OFPAT_SET_TP_SRC',
79 10: 'OFPAT_SET_TP_DST',
80 11: 'OFPAT_ENQUEUE',
Rich Lane6f4978c2013-10-20 21:33:52 -070081 65535: 'OFPAT_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -070082}
83
84# Identifiers from group ofp_bad_action_code
85OFPBAC_BAD_TYPE = 0
86OFPBAC_BAD_LEN = 1
Rich Lane6f4978c2013-10-20 21:33:52 -070087OFPBAC_BAD_EXPERIMENTER = 2
88OFPBAC_BAD_EXPERIMENTER_TYPE = 3
Rich Laneb658ddd2013-03-12 10:15:10 -070089OFPBAC_BAD_OUT_PORT = 4
90OFPBAC_BAD_ARGUMENT = 5
91OFPBAC_EPERM = 6
92OFPBAC_TOO_MANY = 7
93OFPBAC_BAD_QUEUE = 8
94
95ofp_bad_action_code_map = {
96 0: 'OFPBAC_BAD_TYPE',
97 1: 'OFPBAC_BAD_LEN',
Rich Lane6f4978c2013-10-20 21:33:52 -070098 2: 'OFPBAC_BAD_EXPERIMENTER',
99 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
Rich Laneb658ddd2013-03-12 10:15:10 -0700100 4: 'OFPBAC_BAD_OUT_PORT',
101 5: 'OFPBAC_BAD_ARGUMENT',
102 6: 'OFPBAC_EPERM',
103 7: 'OFPBAC_TOO_MANY',
104 8: 'OFPBAC_BAD_QUEUE',
105}
106
107# Identifiers from group ofp_bad_request_code
108OFPBRC_BAD_VERSION = 0
109OFPBRC_BAD_TYPE = 1
110OFPBRC_BAD_STAT = 2
Rich Lane6f4978c2013-10-20 21:33:52 -0700111OFPBRC_BAD_EXPERIMENTER = 3
Rich Laneb658ddd2013-03-12 10:15:10 -0700112OFPBRC_BAD_SUBTYPE = 4
113OFPBRC_EPERM = 5
114OFPBRC_BAD_LEN = 6
115OFPBRC_BUFFER_EMPTY = 7
116OFPBRC_BUFFER_UNKNOWN = 8
117
118ofp_bad_request_code_map = {
119 0: 'OFPBRC_BAD_VERSION',
120 1: 'OFPBRC_BAD_TYPE',
121 2: 'OFPBRC_BAD_STAT',
Rich Lane6f4978c2013-10-20 21:33:52 -0700122 3: 'OFPBRC_BAD_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700123 4: 'OFPBRC_BAD_SUBTYPE',
124 5: 'OFPBRC_EPERM',
125 6: 'OFPBRC_BAD_LEN',
126 7: 'OFPBRC_BUFFER_EMPTY',
127 8: 'OFPBRC_BUFFER_UNKNOWN',
128}
129
Rich Lane93b33132014-04-21 12:20:58 -0700130# Identifiers from group ofp_bsn_vport_l2gre_flags
131OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
132OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
133OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
Rich Lane5587ab12014-06-30 11:19:09 -0700134OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
Rich Lanef9530c42014-09-15 09:59:43 -0700135OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
Rich Lane93b33132014-04-21 12:20:58 -0700136
137ofp_bsn_vport_l2gre_flags_map = {
138 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
139 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
140 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
Rich Lane5587ab12014-06-30 11:19:09 -0700141 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
Rich Lanef9530c42014-09-15 09:59:43 -0700142 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
Rich Lane93b33132014-04-21 12:20:58 -0700143}
144
Dan Talaycof6202252013-07-02 01:00:29 -0700145# Identifiers from group ofp_bsn_vport_q_in_q_untagged
146OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
147
148ofp_bsn_vport_q_in_q_untagged_map = {
149 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
150}
151
Rich Laned53156a2013-08-05 17:17:33 -0700152# Identifiers from group ofp_bsn_vport_status
153OF_BSN_VPORT_STATUS_OK = 0
154OF_BSN_VPORT_STATUS_FAILED = 1
155
156ofp_bsn_vport_status_map = {
157 0: 'OF_BSN_VPORT_STATUS_OK',
158 1: 'OF_BSN_VPORT_STATUS_FAILED',
159}
160
Rich Laneb658ddd2013-03-12 10:15:10 -0700161# Identifiers from group ofp_capabilities
Rich Lanec2ee4b82013-04-24 17:12:38 -0700162OFPC_FLOW_STATS = 1
163OFPC_TABLE_STATS = 2
164OFPC_PORT_STATS = 4
165OFPC_STP = 8
166OFPC_RESERVED = 16
167OFPC_IP_REASM = 32
168OFPC_QUEUE_STATS = 64
169OFPC_ARP_MATCH_IP = 128
Rich Laneb658ddd2013-03-12 10:15:10 -0700170
171ofp_capabilities_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700172 1: 'OFPC_FLOW_STATS',
173 2: 'OFPC_TABLE_STATS',
174 4: 'OFPC_PORT_STATS',
175 8: 'OFPC_STP',
176 16: 'OFPC_RESERVED',
177 32: 'OFPC_IP_REASM',
178 64: 'OFPC_QUEUE_STATS',
179 128: 'OFPC_ARP_MATCH_IP',
Rich Laneb658ddd2013-03-12 10:15:10 -0700180}
181
182# Identifiers from group ofp_config_flags
183OFPC_FRAG_NORMAL = 0
184OFPC_FRAG_DROP = 1
185OFPC_FRAG_REASM = 2
186OFPC_FRAG_MASK = 3
187
188ofp_config_flags_map = {
189 0: 'OFPC_FRAG_NORMAL',
190 1: 'OFPC_FRAG_DROP',
191 2: 'OFPC_FRAG_REASM',
192 3: 'OFPC_FRAG_MASK',
193}
194
195# Identifiers from group ofp_error_type
196OFPET_HELLO_FAILED = 0
197OFPET_BAD_REQUEST = 1
198OFPET_BAD_ACTION = 2
199OFPET_FLOW_MOD_FAILED = 3
200OFPET_PORT_MOD_FAILED = 4
201OFPET_QUEUE_OP_FAILED = 5
202
203ofp_error_type_map = {
204 0: 'OFPET_HELLO_FAILED',
205 1: 'OFPET_BAD_REQUEST',
206 2: 'OFPET_BAD_ACTION',
207 3: 'OFPET_FLOW_MOD_FAILED',
208 4: 'OFPET_PORT_MOD_FAILED',
209 5: 'OFPET_QUEUE_OP_FAILED',
210}
211
212# Identifiers from group ofp_flow_mod_command
213OFPFC_ADD = 0
214OFPFC_MODIFY = 1
215OFPFC_MODIFY_STRICT = 2
216OFPFC_DELETE = 3
217OFPFC_DELETE_STRICT = 4
218
219ofp_flow_mod_command_map = {
220 0: 'OFPFC_ADD',
221 1: 'OFPFC_MODIFY',
222 2: 'OFPFC_MODIFY_STRICT',
223 3: 'OFPFC_DELETE',
224 4: 'OFPFC_DELETE_STRICT',
225}
226
227# Identifiers from group ofp_flow_mod_failed_code
228OFPFMFC_ALL_TABLES_FULL = 0
229OFPFMFC_OVERLAP = 1
230OFPFMFC_EPERM = 2
231OFPFMFC_BAD_EMERG_TIMEOUT = 3
232OFPFMFC_BAD_COMMAND = 4
233OFPFMFC_UNSUPPORTED = 5
234
235ofp_flow_mod_failed_code_map = {
236 0: 'OFPFMFC_ALL_TABLES_FULL',
237 1: 'OFPFMFC_OVERLAP',
238 2: 'OFPFMFC_EPERM',
239 3: 'OFPFMFC_BAD_EMERG_TIMEOUT',
240 4: 'OFPFMFC_BAD_COMMAND',
241 5: 'OFPFMFC_UNSUPPORTED',
242}
243
244# Identifiers from group ofp_flow_mod_flags
Rich Lanec2ee4b82013-04-24 17:12:38 -0700245OFPFF_SEND_FLOW_REM = 1
246OFPFF_CHECK_OVERLAP = 2
247OFPFF_EMERG = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700248
249ofp_flow_mod_flags_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700250 1: 'OFPFF_SEND_FLOW_REM',
251 2: 'OFPFF_CHECK_OVERLAP',
252 4: 'OFPFF_EMERG',
Rich Laneb658ddd2013-03-12 10:15:10 -0700253}
254
255# Identifiers from group ofp_flow_removed_reason
256OFPRR_IDLE_TIMEOUT = 0
257OFPRR_HARD_TIMEOUT = 1
258OFPRR_DELETE = 2
259
260ofp_flow_removed_reason_map = {
261 0: 'OFPRR_IDLE_TIMEOUT',
262 1: 'OFPRR_HARD_TIMEOUT',
263 2: 'OFPRR_DELETE',
264}
265
266# Identifiers from group ofp_flow_wildcards
Rich Lanec2ee4b82013-04-24 17:12:38 -0700267OFPFW_IN_PORT = 1
268OFPFW_DL_VLAN = 2
269OFPFW_DL_SRC = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700270OFPFW_NW_DST_BITS = 6
271OFPFW_NW_SRC_BITS = 6
272OFPFW_NW_SRC_SHIFT = 8
Rich Lanec2ee4b82013-04-24 17:12:38 -0700273OFPFW_DL_DST = 8
Rich Laneb658ddd2013-03-12 10:15:10 -0700274OFPFW_NW_DST_SHIFT = 14
Rich Lanec2ee4b82013-04-24 17:12:38 -0700275OFPFW_DL_TYPE = 16
276OFPFW_NW_PROTO = 32
277OFPFW_TP_SRC = 64
278OFPFW_TP_DST = 128
279OFPFW_NW_SRC_ALL = 8192
280OFPFW_NW_SRC_MASK = 16128
281OFPFW_NW_DST_ALL = 524288
282OFPFW_NW_DST_MASK = 1032192
283OFPFW_DL_VLAN_PCP = 1048576
284OFPFW_NW_TOS = 2097152
285OFPFW_ALL = 4194303
Rich Laneb658ddd2013-03-12 10:15:10 -0700286
287ofp_flow_wildcards_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700288 1: 'OFPFW_IN_PORT',
289 2: 'OFPFW_DL_VLAN',
290 4: 'OFPFW_DL_SRC',
291 8: 'OFPFW_DL_DST',
292 16: 'OFPFW_DL_TYPE',
293 32: 'OFPFW_NW_PROTO',
294 64: 'OFPFW_TP_SRC',
295 128: 'OFPFW_TP_DST',
296 1048576: 'OFPFW_DL_VLAN_PCP',
297 2097152: 'OFPFW_NW_TOS',
Rich Laneb658ddd2013-03-12 10:15:10 -0700298}
299
300# Identifiers from group ofp_hello_failed_code
301OFPHFC_INCOMPATIBLE = 0
302OFPHFC_EPERM = 1
303
304ofp_hello_failed_code_map = {
305 0: 'OFPHFC_INCOMPATIBLE',
306 1: 'OFPHFC_EPERM',
307}
308
Rich Lanec2ee4b82013-04-24 17:12:38 -0700309# Identifiers from group ofp_nicira_controller_role
310NX_ROLE_OTHER = 0
311NX_ROLE_MASTER = 1
312NX_ROLE_SLAVE = 2
313
314ofp_nicira_controller_role_map = {
315 0: 'NX_ROLE_OTHER',
316 1: 'NX_ROLE_MASTER',
317 2: 'NX_ROLE_SLAVE',
318}
319
Rich Laneb658ddd2013-03-12 10:15:10 -0700320# Identifiers from group ofp_packet_in_reason
321OFPR_NO_MATCH = 0
322OFPR_ACTION = 1
323
324ofp_packet_in_reason_map = {
325 0: 'OFPR_NO_MATCH',
326 1: 'OFPR_ACTION',
327}
328
329# Identifiers from group ofp_port
330OFPP_MAX = 0xff00
331OFPP_IN_PORT = 0xfff8
332OFPP_TABLE = 0xfff9
333OFPP_NORMAL = 0xfffa
334OFPP_FLOOD = 0xfffb
335OFPP_ALL = 0xfffc
336OFPP_CONTROLLER = 0xfffd
337OFPP_LOCAL = 0xfffe
338OFPP_NONE = 0xffff
339
340ofp_port_map = {
341 0xff00: 'OFPP_MAX',
342 0xfff8: 'OFPP_IN_PORT',
343 0xfff9: 'OFPP_TABLE',
344 0xfffa: 'OFPP_NORMAL',
345 0xfffb: 'OFPP_FLOOD',
346 0xfffc: 'OFPP_ALL',
347 0xfffd: 'OFPP_CONTROLLER',
348 0xfffe: 'OFPP_LOCAL',
349 0xffff: 'OFPP_NONE',
350}
351
352# Identifiers from group ofp_port_config
Rich Lanec2ee4b82013-04-24 17:12:38 -0700353OFPPC_PORT_DOWN = 1
354OFPPC_NO_STP = 2
355OFPPC_NO_RECV = 4
356OFPPC_NO_RECV_STP = 8
357OFPPC_NO_FLOOD = 16
358OFPPC_NO_FWD = 32
359OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700360OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Laneb658ddd2013-03-12 10:15:10 -0700361
362ofp_port_config_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700363 1: 'OFPPC_PORT_DOWN',
364 2: 'OFPPC_NO_STP',
365 4: 'OFPPC_NO_RECV',
366 8: 'OFPPC_NO_RECV_STP',
367 16: 'OFPPC_NO_FLOOD',
368 32: 'OFPPC_NO_FWD',
369 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700370 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Laneb658ddd2013-03-12 10:15:10 -0700371}
372
373# Identifiers from group ofp_port_features
Rich Lanec2ee4b82013-04-24 17:12:38 -0700374OFPPF_10MB_HD = 1
375OFPPF_10MB_FD = 2
376OFPPF_100MB_HD = 4
377OFPPF_100MB_FD = 8
378OFPPF_1GB_HD = 16
379OFPPF_1GB_FD = 32
380OFPPF_10GB_FD = 64
381OFPPF_COPPER = 128
382OFPPF_FIBER = 256
383OFPPF_AUTONEG = 512
384OFPPF_PAUSE = 1024
385OFPPF_PAUSE_ASYM = 2048
Rich Laneb658ddd2013-03-12 10:15:10 -0700386
387ofp_port_features_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700388 1: 'OFPPF_10MB_HD',
389 2: 'OFPPF_10MB_FD',
390 4: 'OFPPF_100MB_HD',
391 8: 'OFPPF_100MB_FD',
392 16: 'OFPPF_1GB_HD',
393 32: 'OFPPF_1GB_FD',
394 64: 'OFPPF_10GB_FD',
395 128: 'OFPPF_COPPER',
396 256: 'OFPPF_FIBER',
397 512: 'OFPPF_AUTONEG',
398 1024: 'OFPPF_PAUSE',
399 2048: 'OFPPF_PAUSE_ASYM',
Rich Laneb658ddd2013-03-12 10:15:10 -0700400}
401
402# Identifiers from group ofp_port_mod_failed_code
403OFPPMFC_BAD_PORT = 0
404OFPPMFC_BAD_HW_ADDR = 1
405
406ofp_port_mod_failed_code_map = {
407 0: 'OFPPMFC_BAD_PORT',
408 1: 'OFPPMFC_BAD_HW_ADDR',
409}
410
411# Identifiers from group ofp_port_reason
412OFPPR_ADD = 0
413OFPPR_DELETE = 1
414OFPPR_MODIFY = 2
415
416ofp_port_reason_map = {
417 0: 'OFPPR_ADD',
418 1: 'OFPPR_DELETE',
419 2: 'OFPPR_MODIFY',
420}
421
422# Identifiers from group ofp_port_state
Rich Lanec2ee4b82013-04-24 17:12:38 -0700423OFPPS_LINK_DOWN = 1
Rich Lane6f4978c2013-10-20 21:33:52 -0700424OFPPS_STP_LISTEN = 0
Rich Lanec2ee4b82013-04-24 17:12:38 -0700425OFPPS_STP_LEARN = 256
426OFPPS_STP_FORWARD = 512
427OFPPS_STP_BLOCK = 768
428OFPPS_STP_MASK = 768
Rich Laneb658ddd2013-03-12 10:15:10 -0700429
430ofp_port_state_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700431 1: 'OFPPS_LINK_DOWN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700432 0: 'OFPPS_STP_LISTEN',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700433 256: 'OFPPS_STP_LEARN',
434 512: 'OFPPS_STP_FORWARD',
435 768: 'OFPPS_STP_BLOCK',
436 768: 'OFPPS_STP_MASK',
Rich Laneb658ddd2013-03-12 10:15:10 -0700437}
438
439# Identifiers from group ofp_queue_op_failed_code
440OFPQOFC_BAD_PORT = 0
441OFPQOFC_BAD_QUEUE = 1
442OFPQOFC_EPERM = 2
443
444ofp_queue_op_failed_code_map = {
445 0: 'OFPQOFC_BAD_PORT',
446 1: 'OFPQOFC_BAD_QUEUE',
447 2: 'OFPQOFC_EPERM',
448}
449
450# Identifiers from group ofp_queue_properties
451OFPQT_NONE = 0
452OFPQT_MIN_RATE = 1
453
454ofp_queue_properties_map = {
455 0: 'OFPQT_NONE',
456 1: 'OFPQT_MIN_RATE',
457}
458
459# Identifiers from group ofp_stats_reply_flags
Rich Lanec2ee4b82013-04-24 17:12:38 -0700460OFPSF_REPLY_MORE = 1
Rich Laneb658ddd2013-03-12 10:15:10 -0700461
462ofp_stats_reply_flags_map = {
Rich Lanec2ee4b82013-04-24 17:12:38 -0700463 1: 'OFPSF_REPLY_MORE',
Rich Laneb658ddd2013-03-12 10:15:10 -0700464}
465
Rich Laned9e3f7b2013-11-04 11:40:43 -0800466# Identifiers from group ofp_stats_request_flags
467
468ofp_stats_request_flags_map = {
469}
470
Rich Lane6f4978c2013-10-20 21:33:52 -0700471# Identifiers from group ofp_stats_type
Rich Laneb658ddd2013-03-12 10:15:10 -0700472OFPST_DESC = 0
473OFPST_FLOW = 1
474OFPST_AGGREGATE = 2
475OFPST_TABLE = 3
476OFPST_PORT = 4
477OFPST_QUEUE = 5
Rich Lane6f4978c2013-10-20 21:33:52 -0700478OFPST_EXPERIMENTER = 65535
Rich Laneb658ddd2013-03-12 10:15:10 -0700479
Rich Lane6f4978c2013-10-20 21:33:52 -0700480ofp_stats_type_map = {
Rich Laneb658ddd2013-03-12 10:15:10 -0700481 0: 'OFPST_DESC',
482 1: 'OFPST_FLOW',
483 2: 'OFPST_AGGREGATE',
484 3: 'OFPST_TABLE',
485 4: 'OFPST_PORT',
486 5: 'OFPST_QUEUE',
Rich Lane6f4978c2013-10-20 21:33:52 -0700487 65535: 'OFPST_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700488}
489
490# Identifiers from group ofp_type
491OFPT_HELLO = 0
492OFPT_ERROR = 1
493OFPT_ECHO_REQUEST = 2
494OFPT_ECHO_REPLY = 3
Rich Lane6f4978c2013-10-20 21:33:52 -0700495OFPT_EXPERIMENTER = 4
Rich Laneb658ddd2013-03-12 10:15:10 -0700496OFPT_FEATURES_REQUEST = 5
497OFPT_FEATURES_REPLY = 6
498OFPT_GET_CONFIG_REQUEST = 7
499OFPT_GET_CONFIG_REPLY = 8
500OFPT_SET_CONFIG = 9
501OFPT_PACKET_IN = 10
502OFPT_FLOW_REMOVED = 11
503OFPT_PORT_STATUS = 12
504OFPT_PACKET_OUT = 13
505OFPT_FLOW_MOD = 14
506OFPT_PORT_MOD = 15
507OFPT_STATS_REQUEST = 16
508OFPT_STATS_REPLY = 17
509OFPT_BARRIER_REQUEST = 18
510OFPT_BARRIER_REPLY = 19
511OFPT_QUEUE_GET_CONFIG_REQUEST = 20
512OFPT_QUEUE_GET_CONFIG_REPLY = 21
513
514ofp_type_map = {
515 0: 'OFPT_HELLO',
516 1: 'OFPT_ERROR',
517 2: 'OFPT_ECHO_REQUEST',
518 3: 'OFPT_ECHO_REPLY',
Rich Lane6f4978c2013-10-20 21:33:52 -0700519 4: 'OFPT_EXPERIMENTER',
Rich Laneb658ddd2013-03-12 10:15:10 -0700520 5: 'OFPT_FEATURES_REQUEST',
521 6: 'OFPT_FEATURES_REPLY',
522 7: 'OFPT_GET_CONFIG_REQUEST',
523 8: 'OFPT_GET_CONFIG_REPLY',
524 9: 'OFPT_SET_CONFIG',
525 10: 'OFPT_PACKET_IN',
526 11: 'OFPT_FLOW_REMOVED',
527 12: 'OFPT_PORT_STATUS',
528 13: 'OFPT_PACKET_OUT',
529 14: 'OFPT_FLOW_MOD',
530 15: 'OFPT_PORT_MOD',
531 16: 'OFPT_STATS_REQUEST',
532 17: 'OFPT_STATS_REPLY',
533 18: 'OFPT_BARRIER_REQUEST',
534 19: 'OFPT_BARRIER_REPLY',
535 20: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
536 21: 'OFPT_QUEUE_GET_CONFIG_REPLY',
537}
538