blob: 71e7edc9aded9240102b4cf36599833efe8b2df4 [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 Lane2e079da2014-10-29 15:30:24 -070028# Identifiers from group of_bsn_lacp_convergence_status
Rich Lane7b0f2012013-11-22 14:15:26 -080029LACP_SUCCESS = 0
30LACP_TIMEDOUT = 1
31LACP_OUT_OF_SYNC = 2
32
Rich Lane2e079da2014-10-29 15:30:24 -070033of_bsn_lacp_convergence_status_map = {
Rich Lane7b0f2012013-11-22 14:15:26 -080034 0: 'LACP_SUCCESS',
35 1: 'LACP_TIMEDOUT',
36 2: 'LACP_OUT_OF_SYNC',
37}
38
Rich Lane2e079da2014-10-29 15:30:24 -070039# Identifiers from group of_bsn_pdu_slot_num
Rich Lane6f4978c2013-10-20 21:33:52 -070040BSN_PDU_SLOT_NUM_ANY = 255
41
Rich Lane2e079da2014-10-29 15:30:24 -070042of_bsn_pdu_slot_num_map = {
Rich Lane6f4978c2013-10-20 21:33:52 -070043 255: 'BSN_PDU_SLOT_NUM_ANY',
44}
45
Rich Lane2e079da2014-10-29 15:30:24 -070046# Identifiers from group of_bsn_vlan_counter
Rich Lane7dcdf022013-12-11 14:45:27 -080047OFP_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
Rich Lane2e079da2014-10-29 15:30:24 -070052of_bsn_vlan_counter_map = {
Rich Lane7dcdf022013-12-11 14:45:27 -080053 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 Lane2e079da2014-10-29 15:30:24 -070059# Identifiers from group of_bsn_vrf_counter
Rich Lane5587ab12014-06-30 11:19:09 -070060OFP_BSN_VRF_COUNTER_BYTES = 0
61OFP_BSN_VRF_COUNTER_PACKETS = 1
62
Rich Lane2e079da2014-10-29 15:30:24 -070063of_bsn_vrf_counter_map = {
Rich Lane5587ab12014-06-30 11:19:09 -070064 0: 'OFP_BSN_VRF_COUNTER_BYTES',
65 1: 'OFP_BSN_VRF_COUNTER_PACKETS',
66}
67
Rich Lanec2ee4b82013-04-24 17:12:38 -070068# Identifiers from group ofp_action_type
69OFPAT_OUTPUT = 0
70OFPAT_COPY_TTL_OUT = 11
71OFPAT_COPY_TTL_IN = 12
72OFPAT_SET_MPLS_TTL = 15
73OFPAT_DEC_MPLS_TTL = 16
74OFPAT_PUSH_VLAN = 17
75OFPAT_POP_VLAN = 18
76OFPAT_PUSH_MPLS = 19
77OFPAT_POP_MPLS = 20
78OFPAT_SET_QUEUE = 21
79OFPAT_GROUP = 22
80OFPAT_SET_NW_TTL = 23
81OFPAT_DEC_NW_TTL = 24
82OFPAT_SET_FIELD = 25
83OFPAT_PUSH_PBB = 26
84OFPAT_POP_PBB = 27
85OFPAT_EXPERIMENTER = 65535
86
87ofp_action_type_map = {
88 0: 'OFPAT_OUTPUT',
89 11: 'OFPAT_COPY_TTL_OUT',
90 12: 'OFPAT_COPY_TTL_IN',
91 15: 'OFPAT_SET_MPLS_TTL',
92 16: 'OFPAT_DEC_MPLS_TTL',
93 17: 'OFPAT_PUSH_VLAN',
94 18: 'OFPAT_POP_VLAN',
95 19: 'OFPAT_PUSH_MPLS',
96 20: 'OFPAT_POP_MPLS',
97 21: 'OFPAT_SET_QUEUE',
98 22: 'OFPAT_GROUP',
99 23: 'OFPAT_SET_NW_TTL',
100 24: 'OFPAT_DEC_NW_TTL',
101 25: 'OFPAT_SET_FIELD',
102 26: 'OFPAT_PUSH_PBB',
103 27: 'OFPAT_POP_PBB',
104 65535: 'OFPAT_EXPERIMENTER',
105}
106
107# Identifiers from group ofp_bad_action_code
108OFPBAC_BAD_TYPE = 0
109OFPBAC_BAD_LEN = 1
110OFPBAC_BAD_EXPERIMENTER = 2
Rich Lane6f4978c2013-10-20 21:33:52 -0700111OFPBAC_BAD_EXPERIMENTER_TYPE = 3
Rich Lanec2ee4b82013-04-24 17:12:38 -0700112OFPBAC_BAD_OUT_PORT = 4
113OFPBAC_BAD_ARGUMENT = 5
114OFPBAC_EPERM = 6
115OFPBAC_TOO_MANY = 7
116OFPBAC_BAD_QUEUE = 8
117OFPBAC_BAD_OUT_GROUP = 9
118OFPBAC_MATCH_INCONSISTENT = 10
119OFPBAC_UNSUPPORTED_ORDER = 11
120OFPBAC_BAD_TAG = 12
121OFPBAC_BAD_SET_TYPE = 13
122OFPBAC_BAD_SET_LEN = 14
123OFPBAC_BAD_SET_ARGUMENT = 15
124
125ofp_bad_action_code_map = {
126 0: 'OFPBAC_BAD_TYPE',
127 1: 'OFPBAC_BAD_LEN',
128 2: 'OFPBAC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700129 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700130 4: 'OFPBAC_BAD_OUT_PORT',
131 5: 'OFPBAC_BAD_ARGUMENT',
132 6: 'OFPBAC_EPERM',
133 7: 'OFPBAC_TOO_MANY',
134 8: 'OFPBAC_BAD_QUEUE',
135 9: 'OFPBAC_BAD_OUT_GROUP',
136 10: 'OFPBAC_MATCH_INCONSISTENT',
137 11: 'OFPBAC_UNSUPPORTED_ORDER',
138 12: 'OFPBAC_BAD_TAG',
139 13: 'OFPBAC_BAD_SET_TYPE',
140 14: 'OFPBAC_BAD_SET_LEN',
141 15: 'OFPBAC_BAD_SET_ARGUMENT',
142}
143
144# Identifiers from group ofp_bad_instruction_code
145OFPBIC_UNKNOWN_INST = 0
146OFPBIC_UNSUP_INST = 1
147OFPBIC_BAD_TABLE_ID = 2
148OFPBIC_UNSUP_METADATA = 3
149OFPBIC_UNSUP_METADATA_MASK = 4
150OFPBIC_BAD_EXPERIMENTER = 5
Rich Lane6f4978c2013-10-20 21:33:52 -0700151OFPBIC_BAD_EXPERIMENTER_TYPE = 6
Rich Lanec2ee4b82013-04-24 17:12:38 -0700152OFPBIC_BAD_LEN = 7
153OFPBIC_EPERM = 8
154
155ofp_bad_instruction_code_map = {
156 0: 'OFPBIC_UNKNOWN_INST',
157 1: 'OFPBIC_UNSUP_INST',
158 2: 'OFPBIC_BAD_TABLE_ID',
159 3: 'OFPBIC_UNSUP_METADATA',
160 4: 'OFPBIC_UNSUP_METADATA_MASK',
161 5: 'OFPBIC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700162 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700163 7: 'OFPBIC_BAD_LEN',
164 8: 'OFPBIC_EPERM',
165}
166
167# Identifiers from group ofp_bad_match_code
168OFPBMC_BAD_TYPE = 0
169OFPBMC_BAD_LEN = 1
170OFPBMC_BAD_TAG = 2
171OFPBMC_BAD_DL_ADDR_MASK = 3
172OFPBMC_BAD_NW_ADDR_MASK = 4
173OFPBMC_BAD_WILDCARDS = 5
174OFPBMC_BAD_FIELD = 6
175OFPBMC_BAD_VALUE = 7
176OFPBMC_BAD_MASK = 8
177OFPBMC_BAD_PREREQ = 9
178OFPBMC_DUP_FIELD = 10
179OFPBMC_EPERM = 11
180
181ofp_bad_match_code_map = {
182 0: 'OFPBMC_BAD_TYPE',
183 1: 'OFPBMC_BAD_LEN',
184 2: 'OFPBMC_BAD_TAG',
185 3: 'OFPBMC_BAD_DL_ADDR_MASK',
186 4: 'OFPBMC_BAD_NW_ADDR_MASK',
187 5: 'OFPBMC_BAD_WILDCARDS',
188 6: 'OFPBMC_BAD_FIELD',
189 7: 'OFPBMC_BAD_VALUE',
190 8: 'OFPBMC_BAD_MASK',
191 9: 'OFPBMC_BAD_PREREQ',
192 10: 'OFPBMC_DUP_FIELD',
193 11: 'OFPBMC_EPERM',
194}
195
196# Identifiers from group ofp_bad_request_code
197OFPBRC_BAD_VERSION = 0
198OFPBRC_BAD_TYPE = 1
Rich Lane6f4978c2013-10-20 21:33:52 -0700199OFPBRC_BAD_STAT = 2
Rich Lanec2ee4b82013-04-24 17:12:38 -0700200OFPBRC_BAD_EXPERIMENTER = 3
Rich Lane6f4978c2013-10-20 21:33:52 -0700201OFPBRC_BAD_EXPERIMENTER_TYPE = 4
Rich Lanec2ee4b82013-04-24 17:12:38 -0700202OFPBRC_EPERM = 5
203OFPBRC_BAD_LEN = 6
204OFPBRC_BUFFER_EMPTY = 7
205OFPBRC_BUFFER_UNKNOWN = 8
206OFPBRC_BAD_TABLE_ID = 9
207OFPBRC_IS_SLAVE = 10
208OFPBRC_BAD_PORT = 11
209OFPBRC_BAD_PACKET = 12
210OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
211
212ofp_bad_request_code_map = {
213 0: 'OFPBRC_BAD_VERSION',
214 1: 'OFPBRC_BAD_TYPE',
Rich Lane6f4978c2013-10-20 21:33:52 -0700215 2: 'OFPBRC_BAD_STAT',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700216 3: 'OFPBRC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700217 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700218 5: 'OFPBRC_EPERM',
219 6: 'OFPBRC_BAD_LEN',
220 7: 'OFPBRC_BUFFER_EMPTY',
221 8: 'OFPBRC_BUFFER_UNKNOWN',
222 9: 'OFPBRC_BAD_TABLE_ID',
223 10: 'OFPBRC_IS_SLAVE',
224 11: 'OFPBRC_BAD_PORT',
225 12: 'OFPBRC_BAD_PACKET',
226 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
227}
228
Rich Laneb41363b2015-07-08 15:42:38 -0700229# Identifiers from group ofp_bsn_anchor
230OFP_BSN_ANCHOR_PACKET_START = 0
231OFP_BSN_ANCHOR_L3_HEADER_START = 1
232OFP_BSN_ANCHOR_L4_HEADER_START = 2
233OFP_BSN_ANCHOR_L4_PAYLOAD_START = 3
234
235ofp_bsn_anchor_map = {
236 0: 'OFP_BSN_ANCHOR_PACKET_START',
237 1: 'OFP_BSN_ANCHOR_L3_HEADER_START',
238 2: 'OFP_BSN_ANCHOR_L4_HEADER_START',
239 3: 'OFP_BSN_ANCHOR_L4_PAYLOAD_START',
240}
241
Rich Lane5454b682014-01-14 17:07:36 -0800242# Identifiers from group ofp_bsn_controller_connection_state
243OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0
244OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1
245
246ofp_bsn_controller_connection_state_map = {
247 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED',
248 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED',
249}
250
251# Identifiers from group ofp_bsn_controller_role_reason
252OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST = 0
253OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG = 1
254OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER = 2
255
256ofp_bsn_controller_role_reason_map = {
257 0: 'OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST',
258 1: 'OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG',
259 2: 'OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER',
260}
261
Rich Lane2e079da2014-10-29 15:30:24 -0700262# Identifiers from group ofp_bsn_lacp_state
263OFP_BSN_LACP_STATE_ACTIVITY = 1
264OFP_BSN_LACP_STATE_TIMEOUT = 2
265OFP_BSN_LACP_STATE_AGGREGATION = 4
266OFP_BSN_LACP_STATE_SYNCHRONIZATION = 8
267OFP_BSN_LACP_STATE_COLLECTING = 16
268OFP_BSN_LACP_STATE_DISTRIBUTING = 32
269OFP_BSN_LACP_STATE_DEFAULTED = 64
270OFP_BSN_LACP_STATE_EXPIRED = 128
271
272ofp_bsn_lacp_state_map = {
273 1: 'OFP_BSN_LACP_STATE_ACTIVITY',
274 2: 'OFP_BSN_LACP_STATE_TIMEOUT',
275 4: 'OFP_BSN_LACP_STATE_AGGREGATION',
276 8: 'OFP_BSN_LACP_STATE_SYNCHRONIZATION',
277 16: 'OFP_BSN_LACP_STATE_COLLECTING',
278 32: 'OFP_BSN_LACP_STATE_DISTRIBUTING',
279 64: 'OFP_BSN_LACP_STATE_DEFAULTED',
280 128: 'OFP_BSN_LACP_STATE_EXPIRED',
281}
282
Rich Lane5587ab12014-06-30 11:19:09 -0700283# Identifiers from group ofp_bsn_loglevel
284OFP_BSN_LOGLEVEL_MSG = 0
285OFP_BSN_LOGLEVEL_ERROR = 1
286OFP_BSN_LOGLEVEL_WARN = 2
287OFP_BSN_LOGLEVEL_INFO = 3
288OFP_BSN_LOGLEVEL_VERBOSE = 4
289OFP_BSN_LOGLEVEL_TRACE = 5
290
291ofp_bsn_loglevel_map = {
292 0: 'OFP_BSN_LOGLEVEL_MSG',
293 1: 'OFP_BSN_LOGLEVEL_ERROR',
294 2: 'OFP_BSN_LOGLEVEL_WARN',
295 3: 'OFP_BSN_LOGLEVEL_INFO',
296 4: 'OFP_BSN_LOGLEVEL_VERBOSE',
297 5: 'OFP_BSN_LOGLEVEL_TRACE',
298}
299
Rich Lane474324f2015-01-14 15:22:56 -0800300# Identifiers from group ofp_bsn_lua_upload_flags
301OFP_BSN_LUA_UPLOAD_MORE = 1
302OFP_BSN_LUA_UPLOAD_FORCE = 2
303
304ofp_bsn_lua_upload_flags_map = {
305 1: 'OFP_BSN_LUA_UPLOAD_MORE',
306 2: 'OFP_BSN_LUA_UPLOAD_FORCE',
307}
308
Rich Lane93b33132014-04-21 12:20:58 -0700309# Identifiers from group ofp_bsn_pktin_flag
310OFP_BSN_PKTIN_FLAG_PDU = 1
311OFP_BSN_PKTIN_FLAG_NEW_HOST = 2
312OFP_BSN_PKTIN_FLAG_STATION_MOVE = 4
313OFP_BSN_PKTIN_FLAG_ARP = 8
314OFP_BSN_PKTIN_FLAG_DHCP = 16
315OFP_BSN_PKTIN_FLAG_L2_CPU = 32
316OFP_BSN_PKTIN_FLAG_DEBUG = 64
317OFP_BSN_PKTIN_FLAG_TTL_EXPIRED = 128
318OFP_BSN_PKTIN_FLAG_L3_MISS = 256
319OFP_BSN_PKTIN_FLAG_L3_CPU = 512
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700320OFP_BSN_PKTIN_FLAG_INGRESS_ACL = 1024
Rich Laneccd32ed2014-11-10 17:48:24 -0800321OFP_BSN_PKTIN_FLAG_SFLOW = 2048
Rich Lane2d1b40e2015-02-11 12:45:33 -0800322OFP_BSN_PKTIN_FLAG_ARP_CACHE = 4096
Rich Lane7b69e792015-03-31 11:12:50 -0700323OFP_BSN_PKTIN_FLAG_ARP_TARGET = 8192
Rich Lane93b33132014-04-21 12:20:58 -0700324
325ofp_bsn_pktin_flag_map = {
326 1: 'OFP_BSN_PKTIN_FLAG_PDU',
327 2: 'OFP_BSN_PKTIN_FLAG_NEW_HOST',
328 4: 'OFP_BSN_PKTIN_FLAG_STATION_MOVE',
329 8: 'OFP_BSN_PKTIN_FLAG_ARP',
330 16: 'OFP_BSN_PKTIN_FLAG_DHCP',
331 32: 'OFP_BSN_PKTIN_FLAG_L2_CPU',
332 64: 'OFP_BSN_PKTIN_FLAG_DEBUG',
333 128: 'OFP_BSN_PKTIN_FLAG_TTL_EXPIRED',
334 256: 'OFP_BSN_PKTIN_FLAG_L3_MISS',
335 512: 'OFP_BSN_PKTIN_FLAG_L3_CPU',
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700336 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL',
Rich Laneccd32ed2014-11-10 17:48:24 -0800337 2048: 'OFP_BSN_PKTIN_FLAG_SFLOW',
Rich Lane2d1b40e2015-02-11 12:45:33 -0800338 4096: 'OFP_BSN_PKTIN_FLAG_ARP_CACHE',
Rich Lane7b69e792015-03-31 11:12:50 -0700339 8192: 'OFP_BSN_PKTIN_FLAG_ARP_TARGET',
Rich Lane93b33132014-04-21 12:20:58 -0700340}
341
Rich Lane7dcdf022013-12-11 14:45:27 -0800342# Identifiers from group ofp_bsn_port_counter
343OFP_BSN_PORT_COUNTER_RX_BYTES = 0
344OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1
345OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2
346OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3
347OFP_BSN_PORT_COUNTER_RX_DROPPED = 4
348OFP_BSN_PORT_COUNTER_RX_ERRORS = 5
349OFP_BSN_PORT_COUNTER_TX_BYTES = 6
350OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7
351OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8
352OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9
353OFP_BSN_PORT_COUNTER_TX_DROPPED = 10
354OFP_BSN_PORT_COUNTER_TX_ERRORS = 11
Rich Lane5587ab12014-06-30 11:19:09 -0700355OFP_BSN_PORT_COUNTER_RX_RUNTS = 12
356OFP_BSN_PORT_COUNTER_RX_GIANTS = 13
357OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS = 14
358OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS = 15
359OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS = 16
360OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT = 17
361OFP_BSN_PORT_COUNTER_TX_COLLISIONS = 18
362OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS = 19
363OFP_BSN_PORT_COUNTER_TX_DEFERRED = 20
364OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT = 21
Harshmeet Singh6f0c8932014-07-02 15:52:56 -0700365OFP_BSN_PORT_COUNTER_RX_PACKETS = 22
366OFP_BSN_PORT_COUNTER_TX_PACKETS = 23
367OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS = 24
368OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
369OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
Rich Lane51168312015-06-25 13:13:54 -0700370OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27
Rich Lane7dcdf022013-12-11 14:45:27 -0800371
372ofp_bsn_port_counter_map = {
373 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
374 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST',
375 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST',
376 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST',
377 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED',
378 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS',
379 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES',
380 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST',
381 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST',
382 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST',
383 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED',
384 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS',
Rich Lane5587ab12014-06-30 11:19:09 -0700385 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS',
386 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS',
387 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS',
388 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS',
389 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS',
390 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT',
391 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS',
392 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS',
393 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED',
394 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT',
Harshmeet Singh6f0c8932014-07-02 15:52:56 -0700395 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS',
396 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS',
397 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS',
398 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
399 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
Rich Lane51168312015-06-25 13:13:54 -0700400 27: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN',
Rich Lane7dcdf022013-12-11 14:45:27 -0800401}
402
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700403# Identifiers from group ofp_bsn_tcp_flag
404OFP_BSN_TCP_FLAG_FIN = 1
405OFP_BSN_TCP_FLAG_SYN = 2
406OFP_BSN_TCP_FLAG_RST = 4
407OFP_BSN_TCP_FLAG_PSH = 8
408OFP_BSN_TCP_FLAG_ACK = 16
409OFP_BSN_TCP_FLAG_URG = 32
410OFP_BSN_TCP_FLAG_ECE = 64
411OFP_BSN_TCP_FLAG_CWR = 128
412OFP_BSN_TCP_FLAG_NS = 256
413
414ofp_bsn_tcp_flag_map = {
415 1: 'OFP_BSN_TCP_FLAG_FIN',
416 2: 'OFP_BSN_TCP_FLAG_SYN',
417 4: 'OFP_BSN_TCP_FLAG_RST',
418 8: 'OFP_BSN_TCP_FLAG_PSH',
419 16: 'OFP_BSN_TCP_FLAG_ACK',
420 32: 'OFP_BSN_TCP_FLAG_URG',
421 64: 'OFP_BSN_TCP_FLAG_ECE',
422 128: 'OFP_BSN_TCP_FLAG_CWR',
423 256: 'OFP_BSN_TCP_FLAG_NS',
424}
425
Rich Lane93b33132014-04-21 12:20:58 -0700426# Identifiers from group ofp_bsn_udf_anchor
427OFP_BSN_UDF_ANCHOR_PACKET_START = 0
428OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1
429OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2
430
431ofp_bsn_udf_anchor_map = {
432 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START',
433 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START',
434 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START',
435}
436
Rich Lane5587ab12014-06-30 11:19:09 -0700437# Identifiers from group ofp_bsn_vlan_counter_constants
438OFP_BSN_VLAN_ALL = 65535
439
440ofp_bsn_vlan_counter_constants_map = {
441 65535: 'OFP_BSN_VLAN_ALL',
442}
443
Rich Lane93b33132014-04-21 12:20:58 -0700444# Identifiers from group ofp_bsn_vport_l2gre_flags
445OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
446OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
447OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
Rich Lane5587ab12014-06-30 11:19:09 -0700448OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
Rich Lanef9530c42014-09-15 09:59:43 -0700449OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
Rich Lane93b33132014-04-21 12:20:58 -0700450
451ofp_bsn_vport_l2gre_flags_map = {
452 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
453 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
454 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
Rich Lane5587ab12014-06-30 11:19:09 -0700455 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
Rich Lanef9530c42014-09-15 09:59:43 -0700456 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
Rich Lane93b33132014-04-21 12:20:58 -0700457}
458
Dan Talaycof6202252013-07-02 01:00:29 -0700459# Identifiers from group ofp_bsn_vport_q_in_q_untagged
460OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
461
462ofp_bsn_vport_q_in_q_untagged_map = {
463 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
464}
465
Rich Laned53156a2013-08-05 17:17:33 -0700466# Identifiers from group ofp_bsn_vport_status
467OF_BSN_VPORT_STATUS_OK = 0
468OF_BSN_VPORT_STATUS_FAILED = 1
469
470ofp_bsn_vport_status_map = {
471 0: 'OF_BSN_VPORT_STATUS_OK',
472 1: 'OF_BSN_VPORT_STATUS_FAILED',
473}
474
Rich Lane5587ab12014-06-30 11:19:09 -0700475# Identifiers from group ofp_bsn_vrf_counter_constants
476OFP_BSN_VRF_ALL = 4294967295
477
478ofp_bsn_vrf_counter_constants_map = {
479 4294967295: 'OFP_BSN_VRF_ALL',
480}
481
Rich Lanec2ee4b82013-04-24 17:12:38 -0700482# Identifiers from group ofp_capabilities
483OFPC_FLOW_STATS = 1
484OFPC_TABLE_STATS = 2
485OFPC_PORT_STATS = 4
486OFPC_GROUP_STATS = 8
487OFPC_IP_REASM = 32
488OFPC_QUEUE_STATS = 64
489OFPC_PORT_BLOCKED = 256
490
491ofp_capabilities_map = {
492 1: 'OFPC_FLOW_STATS',
493 2: 'OFPC_TABLE_STATS',
494 4: 'OFPC_PORT_STATS',
495 8: 'OFPC_GROUP_STATS',
496 32: 'OFPC_IP_REASM',
497 64: 'OFPC_QUEUE_STATS',
498 256: 'OFPC_PORT_BLOCKED',
499}
500
501# Identifiers from group ofp_config_flags
502OFPC_FRAG_NORMAL = 0
503OFPC_FRAG_DROP = 1
504OFPC_FRAG_REASM = 2
505OFPC_FRAG_MASK = 3
506
507ofp_config_flags_map = {
508 0: 'OFPC_FRAG_NORMAL',
509 1: 'OFPC_FRAG_DROP',
510 2: 'OFPC_FRAG_REASM',
511 3: 'OFPC_FRAG_MASK',
512}
513
514# Identifiers from group ofp_controller_max_len
515OFPCML_MAX = 65509
516OFPCML_NO_BUFFER = 65535
517
518ofp_controller_max_len_map = {
519 65509: 'OFPCML_MAX',
520 65535: 'OFPCML_NO_BUFFER',
521}
522
523# Identifiers from group ofp_controller_role
524OFPCR_ROLE_NOCHANGE = 0
525OFPCR_ROLE_EQUAL = 1
526OFPCR_ROLE_MASTER = 2
527OFPCR_ROLE_SLAVE = 3
528
529ofp_controller_role_map = {
530 0: 'OFPCR_ROLE_NOCHANGE',
531 1: 'OFPCR_ROLE_EQUAL',
532 2: 'OFPCR_ROLE_MASTER',
533 3: 'OFPCR_ROLE_SLAVE',
534}
535
536# Identifiers from group ofp_error_type
537OFPET_HELLO_FAILED = 0
538OFPET_BAD_REQUEST = 1
539OFPET_BAD_ACTION = 2
540OFPET_BAD_INSTRUCTION = 3
541OFPET_BAD_MATCH = 4
542OFPET_FLOW_MOD_FAILED = 5
543OFPET_GROUP_MOD_FAILED = 6
544OFPET_PORT_MOD_FAILED = 7
545OFPET_TABLE_MOD_FAILED = 8
546OFPET_QUEUE_OP_FAILED = 9
547OFPET_SWITCH_CONFIG_FAILED = 10
548OFPET_ROLE_REQUEST_FAILED = 11
549OFPET_METER_MOD_FAILED = 12
550OFPET_TABLE_FEATURES_FAILED = 13
551OFPET_EXPERIMENTER = 65535
552
553ofp_error_type_map = {
554 0: 'OFPET_HELLO_FAILED',
555 1: 'OFPET_BAD_REQUEST',
556 2: 'OFPET_BAD_ACTION',
557 3: 'OFPET_BAD_INSTRUCTION',
558 4: 'OFPET_BAD_MATCH',
559 5: 'OFPET_FLOW_MOD_FAILED',
560 6: 'OFPET_GROUP_MOD_FAILED',
561 7: 'OFPET_PORT_MOD_FAILED',
562 8: 'OFPET_TABLE_MOD_FAILED',
563 9: 'OFPET_QUEUE_OP_FAILED',
564 10: 'OFPET_SWITCH_CONFIG_FAILED',
565 11: 'OFPET_ROLE_REQUEST_FAILED',
566 12: 'OFPET_METER_MOD_FAILED',
567 13: 'OFPET_TABLE_FEATURES_FAILED',
568 65535: 'OFPET_EXPERIMENTER',
569}
570
571# Identifiers from group ofp_flow_mod_command
572OFPFC_ADD = 0
573OFPFC_MODIFY = 1
574OFPFC_MODIFY_STRICT = 2
575OFPFC_DELETE = 3
576OFPFC_DELETE_STRICT = 4
577
578ofp_flow_mod_command_map = {
579 0: 'OFPFC_ADD',
580 1: 'OFPFC_MODIFY',
581 2: 'OFPFC_MODIFY_STRICT',
582 3: 'OFPFC_DELETE',
583 4: 'OFPFC_DELETE_STRICT',
584}
585
586# Identifiers from group ofp_flow_mod_failed_code
587OFPFMFC_UNKNOWN = 0
588OFPFMFC_TABLE_FULL = 1
589OFPFMFC_BAD_TABLE_ID = 2
590OFPFMFC_OVERLAP = 3
591OFPFMFC_EPERM = 4
592OFPFMFC_BAD_TIMEOUT = 5
593OFPFMFC_BAD_COMMAND = 6
594OFPFMFC_BAD_FLAGS = 7
595
596ofp_flow_mod_failed_code_map = {
597 0: 'OFPFMFC_UNKNOWN',
598 1: 'OFPFMFC_TABLE_FULL',
599 2: 'OFPFMFC_BAD_TABLE_ID',
600 3: 'OFPFMFC_OVERLAP',
601 4: 'OFPFMFC_EPERM',
602 5: 'OFPFMFC_BAD_TIMEOUT',
603 6: 'OFPFMFC_BAD_COMMAND',
604 7: 'OFPFMFC_BAD_FLAGS',
605}
606
607# Identifiers from group ofp_flow_mod_flags
608OFPFF_SEND_FLOW_REM = 1
609OFPFF_CHECK_OVERLAP = 2
610OFPFF_RESET_COUNTS = 4
611OFPFF_NO_PKT_COUNTS = 8
612OFPFF_NO_BYT_COUNTS = 16
Rich Lane6f4978c2013-10-20 21:33:52 -0700613OFPFF_BSN_SEND_IDLE = 128
Rich Lanec2ee4b82013-04-24 17:12:38 -0700614
615ofp_flow_mod_flags_map = {
616 1: 'OFPFF_SEND_FLOW_REM',
617 2: 'OFPFF_CHECK_OVERLAP',
618 4: 'OFPFF_RESET_COUNTS',
619 8: 'OFPFF_NO_PKT_COUNTS',
620 16: 'OFPFF_NO_BYT_COUNTS',
Rich Lane6f4978c2013-10-20 21:33:52 -0700621 128: 'OFPFF_BSN_SEND_IDLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700622}
623
624# Identifiers from group ofp_flow_removed_reason
625OFPRR_IDLE_TIMEOUT = 0
626OFPRR_HARD_TIMEOUT = 1
627OFPRR_DELETE = 2
628OFPRR_GROUP_DELETE = 3
629
630ofp_flow_removed_reason_map = {
631 0: 'OFPRR_IDLE_TIMEOUT',
632 1: 'OFPRR_HARD_TIMEOUT',
633 2: 'OFPRR_DELETE',
634 3: 'OFPRR_GROUP_DELETE',
635}
636
637# Identifiers from group ofp_group
638OFPG_MAX = 4294967040
639OFPG_ALL = 4294967292
640OFPG_ANY = 4294967295
641
642ofp_group_map = {
643 4294967040: 'OFPG_MAX',
644 4294967292: 'OFPG_ALL',
645 4294967295: 'OFPG_ANY',
646}
647
648# Identifiers from group ofp_group_capabilities
649OFPGFC_SELECT_WEIGHT = 1
650OFPGFC_SELECT_LIVENESS = 2
651OFPGFC_CHAINING = 4
652OFPGFC_CHAINING_CHECKS = 8
653
654ofp_group_capabilities_map = {
655 1: 'OFPGFC_SELECT_WEIGHT',
656 2: 'OFPGFC_SELECT_LIVENESS',
657 4: 'OFPGFC_CHAINING',
658 8: 'OFPGFC_CHAINING_CHECKS',
659}
660
661# Identifiers from group ofp_group_mod_command
662OFPGC_ADD = 0
663OFPGC_MODIFY = 1
664OFPGC_DELETE = 2
665
666ofp_group_mod_command_map = {
667 0: 'OFPGC_ADD',
668 1: 'OFPGC_MODIFY',
669 2: 'OFPGC_DELETE',
670}
671
672# Identifiers from group ofp_group_mod_failed_code
673OFPGMFC_GROUP_EXISTS = 0
674OFPGMFC_INVALID_GROUP = 1
675OFPGMFC_WEIGHT_UNSUPPORTED = 2
676OFPGMFC_OUT_OF_GROUPS = 3
677OFPGMFC_OUT_OF_BUCKETS = 4
678OFPGMFC_CHAINING_UNSUPPORTED = 5
679OFPGMFC_WATCH_UNSUPPORTED = 6
680OFPGMFC_LOOP = 7
681OFPGMFC_UNKNOWN_GROUP = 8
682OFPGMFC_CHAINED_GROUP = 9
683OFPGMFC_BAD_TYPE = 10
684OFPGMFC_BAD_COMMAND = 11
685OFPGMFC_BAD_BUCKET = 12
686OFPGMFC_BAD_WATCH = 13
687OFPGMFC_EPERM = 14
688
689ofp_group_mod_failed_code_map = {
690 0: 'OFPGMFC_GROUP_EXISTS',
691 1: 'OFPGMFC_INVALID_GROUP',
692 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
693 3: 'OFPGMFC_OUT_OF_GROUPS',
694 4: 'OFPGMFC_OUT_OF_BUCKETS',
695 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
696 6: 'OFPGMFC_WATCH_UNSUPPORTED',
697 7: 'OFPGMFC_LOOP',
698 8: 'OFPGMFC_UNKNOWN_GROUP',
699 9: 'OFPGMFC_CHAINED_GROUP',
700 10: 'OFPGMFC_BAD_TYPE',
701 11: 'OFPGMFC_BAD_COMMAND',
702 12: 'OFPGMFC_BAD_BUCKET',
703 13: 'OFPGMFC_BAD_WATCH',
704 14: 'OFPGMFC_EPERM',
705}
706
707# Identifiers from group ofp_group_type
708OFPGT_ALL = 0
709OFPGT_SELECT = 1
710OFPGT_INDIRECT = 2
711OFPGT_FF = 3
712
713ofp_group_type_map = {
714 0: 'OFPGT_ALL',
715 1: 'OFPGT_SELECT',
716 2: 'OFPGT_INDIRECT',
717 3: 'OFPGT_FF',
718}
719
720# Identifiers from group ofp_hello_elem_type
721OFPHET_VERSIONBITMAP = 1
722
723ofp_hello_elem_type_map = {
724 1: 'OFPHET_VERSIONBITMAP',
725}
726
727# Identifiers from group ofp_hello_failed_code
728OFPHFC_INCOMPATIBLE = 0
729OFPHFC_EPERM = 1
730
731ofp_hello_failed_code_map = {
732 0: 'OFPHFC_INCOMPATIBLE',
733 1: 'OFPHFC_EPERM',
734}
735
736# Identifiers from group ofp_instruction_type
737OFPIT_GOTO_TABLE = 1
738OFPIT_WRITE_METADATA = 2
739OFPIT_WRITE_ACTIONS = 3
740OFPIT_APPLY_ACTIONS = 4
741OFPIT_CLEAR_ACTIONS = 5
742OFPIT_METER = 6
743OFPIT_EXPERIMENTER = 65535
744
745ofp_instruction_type_map = {
746 1: 'OFPIT_GOTO_TABLE',
747 2: 'OFPIT_WRITE_METADATA',
748 3: 'OFPIT_WRITE_ACTIONS',
749 4: 'OFPIT_APPLY_ACTIONS',
750 5: 'OFPIT_CLEAR_ACTIONS',
751 6: 'OFPIT_METER',
752 65535: 'OFPIT_EXPERIMENTER',
753}
754
755# Identifiers from group ofp_ipv6exthdr_flags
756OFPIEH_NONEXT = 1
757OFPIEH_ESP = 2
758OFPIEH_AUTH = 4
759OFPIEH_DEST = 8
760OFPIEH_FRAG = 16
761OFPIEH_ROUTER = 32
762OFPIEH_HOP = 64
763OFPIEH_UNREP = 128
764OFPIEH_UNSEQ = 256
765
766ofp_ipv6exthdr_flags_map = {
767 1: 'OFPIEH_NONEXT',
768 2: 'OFPIEH_ESP',
769 4: 'OFPIEH_AUTH',
770 8: 'OFPIEH_DEST',
771 16: 'OFPIEH_FRAG',
772 32: 'OFPIEH_ROUTER',
773 64: 'OFPIEH_HOP',
774 128: 'OFPIEH_UNREP',
775 256: 'OFPIEH_UNSEQ',
776}
777
778# Identifiers from group ofp_match_type
779OFPMT_STANDARD = 0
780OFPMT_OXM = 1
781
782ofp_match_type_map = {
783 0: 'OFPMT_STANDARD',
784 1: 'OFPMT_OXM',
785}
786
787# Identifiers from group ofp_meter
788OFPM_MAX = 4294901760
789OFPM_SLOWPATH = 4294967293
790OFPM_CONTROLLER = 4294967294
791OFPM_ALL = 4294967295
792
793ofp_meter_map = {
794 4294901760: 'OFPM_MAX',
795 4294967293: 'OFPM_SLOWPATH',
796 4294967294: 'OFPM_CONTROLLER',
797 4294967295: 'OFPM_ALL',
798}
799
800# Identifiers from group ofp_meter_band_type
801OFPMBT_DROP = 1
802OFPMBT_DSCP_REMARK = 2
803OFPMBT_EXPERIMENTER = 65535
804
805ofp_meter_band_type_map = {
806 1: 'OFPMBT_DROP',
807 2: 'OFPMBT_DSCP_REMARK',
808 65535: 'OFPMBT_EXPERIMENTER',
809}
810
811# Identifiers from group ofp_meter_flags
812OFPMF_KBPS = 1
813OFPMF_PKTPS = 2
814OFPMF_BURST = 4
815OFPMF_STATS = 8
816
817ofp_meter_flags_map = {
818 1: 'OFPMF_KBPS',
819 2: 'OFPMF_PKTPS',
820 4: 'OFPMF_BURST',
821 8: 'OFPMF_STATS',
822}
823
824# Identifiers from group ofp_meter_mod_command
825OFPMC_ADD = 0
826OFPMC_MODIFY = 1
827OFPMC_DELETE = 2
828
829ofp_meter_mod_command_map = {
830 0: 'OFPMC_ADD',
831 1: 'OFPMC_MODIFY',
832 2: 'OFPMC_DELETE',
833}
834
835# Identifiers from group ofp_meter_mod_failed_code
836OFPMMFC_UNKNOWN = 0
837OFPMMFC_METER_EXISTS = 1
838OFPMMFC_INVALID_METER = 2
839OFPMMFC_UNKNOWN_METER = 3
840OFPMMFC_BAD_COMMAND = 4
841OFPMMFC_BAD_FLAGS = 5
842OFPMMFC_BAD_RATE = 6
843OFPMMFC_BAD_BURST = 7
844OFPMMFC_BAD_BAND = 8
845OFPMMFC_BAD_BAND_VALUE = 9
846OFPMMFC_OUT_OF_METERS = 10
847OFPMMFC_OUT_OF_BANDS = 11
848
849ofp_meter_mod_failed_code_map = {
850 0: 'OFPMMFC_UNKNOWN',
851 1: 'OFPMMFC_METER_EXISTS',
852 2: 'OFPMMFC_INVALID_METER',
853 3: 'OFPMMFC_UNKNOWN_METER',
854 4: 'OFPMMFC_BAD_COMMAND',
855 5: 'OFPMMFC_BAD_FLAGS',
856 6: 'OFPMMFC_BAD_RATE',
857 7: 'OFPMMFC_BAD_BURST',
858 8: 'OFPMMFC_BAD_BAND',
859 9: 'OFPMMFC_BAD_BAND_VALUE',
860 10: 'OFPMMFC_OUT_OF_METERS',
861 11: 'OFPMMFC_OUT_OF_BANDS',
862}
863
Rich Lanec2ee4b82013-04-24 17:12:38 -0700864# Identifiers from group ofp_oxm_class
865OFPXMC_NXM_0 = 0
866OFPXMC_NXM_1 = 1
867OFPXMC_OPENFLOW_BASIC = 32768
868OFPXMC_EXPERIMENTER = 65535
869
870ofp_oxm_class_map = {
871 0: 'OFPXMC_NXM_0',
872 1: 'OFPXMC_NXM_1',
873 32768: 'OFPXMC_OPENFLOW_BASIC',
874 65535: 'OFPXMC_EXPERIMENTER',
875}
876
877# Identifiers from group ofp_packet_in_reason
878OFPR_NO_MATCH = 0
879OFPR_ACTION = 1
880OFPR_INVALID_TTL = 2
Rich Laned9e3f7b2013-11-04 11:40:43 -0800881OFPR_BSN_NEW_HOST = 128
882OFPR_BSN_STATION_MOVE = 129
883OFPR_BSN_BAD_VLAN = 130
884OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
Rich Lane5454b682014-01-14 17:07:36 -0800885OFPR_BSN_NO_ROUTE = 132
Rich Lane95f7fc92014-01-27 17:08:16 -0800886OFPR_BSN_ICMP_ECHO_REQUEST = 133
887OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
888OFPR_BSN_DEST_HOST_UNREACHABLE = 135
889OFPR_BSN_DEST_PORT_UNREACHABLE = 136
890OFPR_BSN_FRAGMENTATION_REQUIRED = 137
891OFPR_BSN_ARP = 139
Rich Lane1b75abf2014-02-05 11:23:20 -0800892OFPR_BSN_DHCP = 140
Rich Lane9ec3fca2014-02-26 16:22:56 -0800893OFPR_BSN_DEBUG = 141
Rich Lanef50b7c32014-03-20 11:38:02 -0700894OFPR_BSN_PACKET_OF_DEATH = 142
Rich Lanec2ee4b82013-04-24 17:12:38 -0700895
896ofp_packet_in_reason_map = {
897 0: 'OFPR_NO_MATCH',
898 1: 'OFPR_ACTION',
899 2: 'OFPR_INVALID_TTL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800900 128: 'OFPR_BSN_NEW_HOST',
901 129: 'OFPR_BSN_STATION_MOVE',
902 130: 'OFPR_BSN_BAD_VLAN',
903 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
Rich Lane5454b682014-01-14 17:07:36 -0800904 132: 'OFPR_BSN_NO_ROUTE',
Rich Lane95f7fc92014-01-27 17:08:16 -0800905 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
906 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
907 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
908 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
909 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
910 139: 'OFPR_BSN_ARP',
Rich Lane1b75abf2014-02-05 11:23:20 -0800911 140: 'OFPR_BSN_DHCP',
Rich Lane9ec3fca2014-02-26 16:22:56 -0800912 141: 'OFPR_BSN_DEBUG',
Rich Lanef50b7c32014-03-20 11:38:02 -0700913 142: 'OFPR_BSN_PACKET_OF_DEATH',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700914}
915
916# Identifiers from group ofp_port
917OFPP_MAX = 4294967040
918OFPP_IN_PORT = 4294967288
919OFPP_TABLE = 4294967289
920OFPP_NORMAL = 4294967290
921OFPP_FLOOD = 4294967291
922OFPP_ALL = 4294967292
923OFPP_CONTROLLER = 4294967293
924OFPP_LOCAL = 4294967294
Rich Laned9e3f7b2013-11-04 11:40:43 -0800925OFPP_ANY = 4294967295
Rich Lanec2ee4b82013-04-24 17:12:38 -0700926
927ofp_port_map = {
928 4294967040: 'OFPP_MAX',
929 4294967288: 'OFPP_IN_PORT',
930 4294967289: 'OFPP_TABLE',
931 4294967290: 'OFPP_NORMAL',
932 4294967291: 'OFPP_FLOOD',
933 4294967292: 'OFPP_ALL',
934 4294967293: 'OFPP_CONTROLLER',
935 4294967294: 'OFPP_LOCAL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800936 4294967295: 'OFPP_ANY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700937}
938
939# Identifiers from group ofp_port_config
940OFPPC_PORT_DOWN = 1
941OFPPC_NO_RECV = 4
942OFPPC_NO_FWD = 32
943OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700944OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700945
946ofp_port_config_map = {
947 1: 'OFPPC_PORT_DOWN',
948 4: 'OFPPC_NO_RECV',
949 32: 'OFPPC_NO_FWD',
950 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700951 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700952}
953
954# Identifiers from group ofp_port_features
955OFPPF_10MB_HD = 1
956OFPPF_10MB_FD = 2
957OFPPF_100MB_HD = 4
958OFPPF_100MB_FD = 8
959OFPPF_1GB_HD = 16
960OFPPF_1GB_FD = 32
961OFPPF_10GB_FD = 64
962OFPPF_40GB_FD = 128
963OFPPF_100GB_FD = 256
964OFPPF_1TB_FD = 512
965OFPPF_OTHER = 1024
966OFPPF_COPPER = 2048
967OFPPF_FIBER = 4096
968OFPPF_AUTONEG = 8192
969OFPPF_PAUSE = 16384
970OFPPF_PAUSE_ASYM = 32768
Rich Laneccd32ed2014-11-10 17:48:24 -0800971OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700972
973ofp_port_features_map = {
974 1: 'OFPPF_10MB_HD',
975 2: 'OFPPF_10MB_FD',
976 4: 'OFPPF_100MB_HD',
977 8: 'OFPPF_100MB_FD',
978 16: 'OFPPF_1GB_HD',
979 32: 'OFPPF_1GB_FD',
980 64: 'OFPPF_10GB_FD',
981 128: 'OFPPF_40GB_FD',
982 256: 'OFPPF_100GB_FD',
983 512: 'OFPPF_1TB_FD',
984 1024: 'OFPPF_OTHER',
985 2048: 'OFPPF_COPPER',
986 4096: 'OFPPF_FIBER',
987 8192: 'OFPPF_AUTONEG',
988 16384: 'OFPPF_PAUSE',
989 32768: 'OFPPF_PAUSE_ASYM',
Rich Laneccd32ed2014-11-10 17:48:24 -0800990 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700991}
992
993# Identifiers from group ofp_port_mod_failed_code
994OFPPMFC_BAD_PORT = 0
995OFPPMFC_BAD_HW_ADDR = 1
996OFPPMFC_BAD_CONFIG = 2
997OFPPMFC_BAD_ADVERTISE = 3
998OFPPMFC_EPERM = 4
999
1000ofp_port_mod_failed_code_map = {
1001 0: 'OFPPMFC_BAD_PORT',
1002 1: 'OFPPMFC_BAD_HW_ADDR',
1003 2: 'OFPPMFC_BAD_CONFIG',
1004 3: 'OFPPMFC_BAD_ADVERTISE',
1005 4: 'OFPPMFC_EPERM',
1006}
1007
Rich Lanec2ee4b82013-04-24 17:12:38 -07001008# Identifiers from group ofp_port_reason
1009OFPPR_ADD = 0
1010OFPPR_DELETE = 1
1011OFPPR_MODIFY = 2
1012
1013ofp_port_reason_map = {
1014 0: 'OFPPR_ADD',
1015 1: 'OFPPR_DELETE',
1016 2: 'OFPPR_MODIFY',
1017}
1018
1019# Identifiers from group ofp_port_state
1020OFPPS_LINK_DOWN = 1
1021OFPPS_BLOCKED = 2
1022OFPPS_LIVE = 4
1023
1024ofp_port_state_map = {
1025 1: 'OFPPS_LINK_DOWN',
1026 2: 'OFPPS_BLOCKED',
1027 4: 'OFPPS_LIVE',
1028}
1029
1030# Identifiers from group ofp_queue_op_failed_code
1031OFPQOFC_BAD_PORT = 0
1032OFPQOFC_BAD_QUEUE = 1
1033OFPQOFC_EPERM = 2
1034
1035ofp_queue_op_failed_code_map = {
1036 0: 'OFPQOFC_BAD_PORT',
1037 1: 'OFPQOFC_BAD_QUEUE',
1038 2: 'OFPQOFC_EPERM',
1039}
1040
1041# Identifiers from group ofp_queue_properties
1042OFPQT_MIN_RATE = 1
1043OFPQT_MAX_RATE = 2
1044OFPQT_EXPERIMENTER = 65535
1045
1046ofp_queue_properties_map = {
1047 1: 'OFPQT_MIN_RATE',
1048 2: 'OFPQT_MAX_RATE',
1049 65535: 'OFPQT_EXPERIMENTER',
1050}
1051
1052# Identifiers from group ofp_role_request_failed_code
1053OFPRRFC_STALE = 0
1054OFPRRFC_UNSUP = 1
1055OFPRRFC_BAD_ROLE = 2
1056
1057ofp_role_request_failed_code_map = {
1058 0: 'OFPRRFC_STALE',
1059 1: 'OFPRRFC_UNSUP',
1060 2: 'OFPRRFC_BAD_ROLE',
1061}
1062
Rich Lane6f4978c2013-10-20 21:33:52 -07001063# Identifiers from group ofp_stats_reply_flags
1064OFPSF_REPLY_MORE = 1
1065
1066ofp_stats_reply_flags_map = {
1067 1: 'OFPSF_REPLY_MORE',
1068}
1069
1070# Identifiers from group ofp_stats_request_flags
1071OFPSF_REQ_MORE = 1
1072
1073ofp_stats_request_flags_map = {
1074 1: 'OFPSF_REQ_MORE',
1075}
1076
1077# Identifiers from group ofp_stats_type
1078OFPST_DESC = 0
1079OFPST_FLOW = 1
1080OFPST_AGGREGATE = 2
1081OFPST_TABLE = 3
1082OFPST_PORT = 4
1083OFPST_QUEUE = 5
1084OFPST_GROUP = 6
1085OFPST_GROUP_DESC = 7
1086OFPST_GROUP_FEATURES = 8
1087OFPST_METER = 9
1088OFPST_METER_CONFIG = 10
1089OFPST_METER_FEATURES = 11
1090OFPST_TABLE_FEATURES = 12
1091OFPST_PORT_DESC = 13
1092OFPST_EXPERIMENTER = 65535
1093
1094ofp_stats_type_map = {
1095 0: 'OFPST_DESC',
1096 1: 'OFPST_FLOW',
1097 2: 'OFPST_AGGREGATE',
1098 3: 'OFPST_TABLE',
1099 4: 'OFPST_PORT',
1100 5: 'OFPST_QUEUE',
1101 6: 'OFPST_GROUP',
1102 7: 'OFPST_GROUP_DESC',
1103 8: 'OFPST_GROUP_FEATURES',
1104 9: 'OFPST_METER',
1105 10: 'OFPST_METER_CONFIG',
1106 11: 'OFPST_METER_FEATURES',
1107 12: 'OFPST_TABLE_FEATURES',
1108 13: 'OFPST_PORT_DESC',
1109 65535: 'OFPST_EXPERIMENTER',
1110}
1111
Rich Lanec2ee4b82013-04-24 17:12:38 -07001112# Identifiers from group ofp_switch_config_failed_code
1113OFPSCFC_BAD_FLAGS = 0
1114OFPSCFC_BAD_LEN = 1
1115OFPSCFC_EPERM = 2
1116
1117ofp_switch_config_failed_code_map = {
1118 0: 'OFPSCFC_BAD_FLAGS',
1119 1: 'OFPSCFC_BAD_LEN',
1120 2: 'OFPSCFC_EPERM',
1121}
1122
1123# Identifiers from group ofp_table
1124OFPTT_MAX = 254
1125OFPTT_ALL = 255
1126
1127ofp_table_map = {
1128 254: 'OFPTT_MAX',
1129 255: 'OFPTT_ALL',
1130}
1131
1132# Identifiers from group ofp_table_config
1133OFPTC_DEPRECATED_MASK = 3
1134
1135ofp_table_config_map = {
1136 3: 'OFPTC_DEPRECATED_MASK',
1137}
1138
1139# Identifiers from group ofp_table_feature_prop_type
1140OFPTFPT_INSTRUCTIONS = 0
1141OFPTFPT_INSTRUCTIONS_MISS = 1
1142OFPTFPT_NEXT_TABLES = 2
1143OFPTFPT_NEXT_TABLES_MISS = 3
1144OFPTFPT_WRITE_ACTIONS = 4
1145OFPTFPT_WRITE_ACTIONS_MISS = 5
1146OFPTFPT_APPLY_ACTIONS = 6
1147OFPTFPT_APPLY_ACTIONS_MISS = 7
1148OFPTFPT_MATCH = 8
1149OFPTFPT_WILDCARDS = 10
1150OFPTFPT_WRITE_SETFIELD = 12
1151OFPTFPT_WRITE_SETFIELD_MISS = 13
1152OFPTFPT_APPLY_SETFIELD = 14
1153OFPTFPT_APPLY_SETFIELD_MISS = 15
1154OFPTFPT_EXPERIMENTER = 65534
1155OFPTFPT_EXPERIMENTER_MISS = 65535
1156
1157ofp_table_feature_prop_type_map = {
1158 0: 'OFPTFPT_INSTRUCTIONS',
1159 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1160 2: 'OFPTFPT_NEXT_TABLES',
1161 3: 'OFPTFPT_NEXT_TABLES_MISS',
1162 4: 'OFPTFPT_WRITE_ACTIONS',
1163 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1164 6: 'OFPTFPT_APPLY_ACTIONS',
1165 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1166 8: 'OFPTFPT_MATCH',
1167 10: 'OFPTFPT_WILDCARDS',
1168 12: 'OFPTFPT_WRITE_SETFIELD',
1169 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1170 14: 'OFPTFPT_APPLY_SETFIELD',
1171 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1172 65534: 'OFPTFPT_EXPERIMENTER',
1173 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1174}
1175
1176# Identifiers from group ofp_table_features_failed_code
1177OFPTFFC_BAD_TABLE = 0
1178OFPTFFC_BAD_METADATA = 1
1179OFPTFFC_BAD_TYPE = 2
1180OFPTFFC_BAD_LEN = 3
1181OFPTFFC_BAD_ARGUMENT = 4
1182OFPTFFC_EPERM = 5
1183
1184ofp_table_features_failed_code_map = {
1185 0: 'OFPTFFC_BAD_TABLE',
1186 1: 'OFPTFFC_BAD_METADATA',
1187 2: 'OFPTFFC_BAD_TYPE',
1188 3: 'OFPTFFC_BAD_LEN',
1189 4: 'OFPTFFC_BAD_ARGUMENT',
1190 5: 'OFPTFFC_EPERM',
1191}
1192
1193# Identifiers from group ofp_table_mod_failed_code
1194OFPTMFC_BAD_TABLE = 0
1195OFPTMFC_BAD_CONFIG = 1
1196OFPTMFC_EPERM = 2
1197
1198ofp_table_mod_failed_code_map = {
1199 0: 'OFPTMFC_BAD_TABLE',
1200 1: 'OFPTMFC_BAD_CONFIG',
1201 2: 'OFPTMFC_EPERM',
1202}
1203
1204# Identifiers from group ofp_type
1205OFPT_HELLO = 0
1206OFPT_ERROR = 1
1207OFPT_ECHO_REQUEST = 2
1208OFPT_ECHO_REPLY = 3
1209OFPT_EXPERIMENTER = 4
1210OFPT_FEATURES_REQUEST = 5
1211OFPT_FEATURES_REPLY = 6
1212OFPT_GET_CONFIG_REQUEST = 7
1213OFPT_GET_CONFIG_REPLY = 8
1214OFPT_SET_CONFIG = 9
1215OFPT_PACKET_IN = 10
1216OFPT_FLOW_REMOVED = 11
1217OFPT_PORT_STATUS = 12
1218OFPT_PACKET_OUT = 13
1219OFPT_FLOW_MOD = 14
1220OFPT_GROUP_MOD = 15
1221OFPT_PORT_MOD = 16
1222OFPT_TABLE_MOD = 17
Rich Lane6f4978c2013-10-20 21:33:52 -07001223OFPT_STATS_REQUEST = 18
1224OFPT_STATS_REPLY = 19
Rich Lanec2ee4b82013-04-24 17:12:38 -07001225OFPT_BARRIER_REQUEST = 20
1226OFPT_BARRIER_REPLY = 21
1227OFPT_QUEUE_GET_CONFIG_REQUEST = 22
1228OFPT_QUEUE_GET_CONFIG_REPLY = 23
1229OFPT_ROLE_REQUEST = 24
1230OFPT_ROLE_REPLY = 25
1231OFPT_GET_ASYNC_REQUEST = 26
1232OFPT_GET_ASYNC_REPLY = 27
1233OFPT_SET_ASYNC = 28
1234OFPT_METER_MOD = 29
1235
1236ofp_type_map = {
1237 0: 'OFPT_HELLO',
1238 1: 'OFPT_ERROR',
1239 2: 'OFPT_ECHO_REQUEST',
1240 3: 'OFPT_ECHO_REPLY',
1241 4: 'OFPT_EXPERIMENTER',
1242 5: 'OFPT_FEATURES_REQUEST',
1243 6: 'OFPT_FEATURES_REPLY',
1244 7: 'OFPT_GET_CONFIG_REQUEST',
1245 8: 'OFPT_GET_CONFIG_REPLY',
1246 9: 'OFPT_SET_CONFIG',
1247 10: 'OFPT_PACKET_IN',
1248 11: 'OFPT_FLOW_REMOVED',
1249 12: 'OFPT_PORT_STATUS',
1250 13: 'OFPT_PACKET_OUT',
1251 14: 'OFPT_FLOW_MOD',
1252 15: 'OFPT_GROUP_MOD',
1253 16: 'OFPT_PORT_MOD',
1254 17: 'OFPT_TABLE_MOD',
Rich Lane6f4978c2013-10-20 21:33:52 -07001255 18: 'OFPT_STATS_REQUEST',
1256 19: 'OFPT_STATS_REPLY',
Rich Lanec2ee4b82013-04-24 17:12:38 -07001257 20: 'OFPT_BARRIER_REQUEST',
1258 21: 'OFPT_BARRIER_REPLY',
1259 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
1260 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
1261 24: 'OFPT_ROLE_REQUEST',
1262 25: 'OFPT_ROLE_REPLY',
1263 26: 'OFPT_GET_ASYNC_REQUEST',
1264 27: 'OFPT_GET_ASYNC_REPLY',
1265 28: 'OFPT_SET_ASYNC',
1266 29: 'OFPT_METER_MOD',
1267}
1268
1269# Identifiers from group ofp_vlan_id
1270OFPVID_NONE = 0
1271OFPVID_PRESENT = 4096
1272
1273ofp_vlan_id_map = {
1274 0: 'OFPVID_NONE',
1275 4096: 'OFPVID_PRESENT',
1276}
1277