blob: 8bcc494622735ea79248ab2c5db356781d0ffbf8 [file] [log] [blame]
Rich Lane2e079da2014-10-29 15:30:24 -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.
4# See the file LICENSE.pyloxi which should have been included in the source distribution
5
6# Automatically generated by LOXI from template const.py
7# Do not modify
8
9OFP_VERSION = 5
10
11# Identifiers from group macro_definitions
12OFP_MAX_TABLE_NAME_LEN = 32
13OFP_MAX_PORT_NAME_LEN = 16
14OFP_TCP_PORT = 6653
15OFP_SSL_PORT = 6653
16OFP_ETH_ALEN = 6
17OFP_DEFAULT_MISS_SEND_LEN = 128
18OFP_VLAN_NONE = 0
19OFP_FLOW_PERMANENT = 0
20OFP_DEFAULT_PRIORITY = 32768
21OFP_NO_BUFFER = 4294967295
22DESC_STR_LEN = 256
23SERIAL_NUM_LEN = 32
24OFPQ_ALL = 4294967295
25OFPQ_MAX_RATE_UNCFG = 65535
26OFPQ_MIN_RATE_UNCFG = 65535
27
Rich Laneccd32ed2014-11-10 17:48:24 -080028# Identifiers from group of_bsn_lacp_convergence_status
29LACP_SUCCESS = 0
30LACP_TIMEDOUT = 1
31LACP_OUT_OF_SYNC = 2
32
33of_bsn_lacp_convergence_status_map = {
34 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
40BSN_PDU_SLOT_NUM_ANY = 255
41
42of_bsn_pdu_slot_num_map = {
43 255: 'BSN_PDU_SLOT_NUM_ANY',
44}
45
Rich Laneccd32ed2014-11-10 17:48:24 -080046# Identifiers from group of_bsn_vlan_counter
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_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
59# Identifiers from group of_bsn_vrf_counter
60OFP_BSN_VRF_COUNTER_BYTES = 0
61OFP_BSN_VRF_COUNTER_PACKETS = 1
62
63of_bsn_vrf_counter_map = {
64 0: 'OFP_BSN_VRF_COUNTER_BYTES',
65 1: 'OFP_BSN_VRF_COUNTER_PACKETS',
66}
67
Rich Lane2e079da2014-10-29 15:30:24 -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_async_config_failed_code
108OFPACFC_INVALID = 0
109OFPACFC_UNSUPPORTED = 1
110OFPACFC_EPERM = 2
111
112ofp_async_config_failed_code_map = {
113 0: 'OFPACFC_INVALID',
114 1: 'OFPACFC_UNSUPPORTED',
115 2: 'OFPACFC_EPERM',
116}
117
118# Identifiers from group ofp_bad_action_code
119OFPBAC_BAD_TYPE = 0
120OFPBAC_BAD_LEN = 1
121OFPBAC_BAD_EXPERIMENTER = 2
122OFPBAC_BAD_EXPERIMENTER_TYPE = 3
123OFPBAC_BAD_OUT_PORT = 4
124OFPBAC_BAD_ARGUMENT = 5
125OFPBAC_EPERM = 6
126OFPBAC_TOO_MANY = 7
127OFPBAC_BAD_QUEUE = 8
128OFPBAC_BAD_OUT_GROUP = 9
129OFPBAC_MATCH_INCONSISTENT = 10
130OFPBAC_UNSUPPORTED_ORDER = 11
131OFPBAC_BAD_TAG = 12
132OFPBAC_BAD_SET_TYPE = 13
133OFPBAC_BAD_SET_LEN = 14
134OFPBAC_BAD_SET_ARGUMENT = 15
135
136ofp_bad_action_code_map = {
137 0: 'OFPBAC_BAD_TYPE',
138 1: 'OFPBAC_BAD_LEN',
139 2: 'OFPBAC_BAD_EXPERIMENTER',
140 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
141 4: 'OFPBAC_BAD_OUT_PORT',
142 5: 'OFPBAC_BAD_ARGUMENT',
143 6: 'OFPBAC_EPERM',
144 7: 'OFPBAC_TOO_MANY',
145 8: 'OFPBAC_BAD_QUEUE',
146 9: 'OFPBAC_BAD_OUT_GROUP',
147 10: 'OFPBAC_MATCH_INCONSISTENT',
148 11: 'OFPBAC_UNSUPPORTED_ORDER',
149 12: 'OFPBAC_BAD_TAG',
150 13: 'OFPBAC_BAD_SET_TYPE',
151 14: 'OFPBAC_BAD_SET_LEN',
152 15: 'OFPBAC_BAD_SET_ARGUMENT',
153}
154
155# Identifiers from group ofp_bad_instruction_code
156OFPBIC_UNKNOWN_INST = 0
157OFPBIC_UNSUP_INST = 1
158OFPBIC_BAD_TABLE_ID = 2
159OFPBIC_UNSUP_METADATA = 3
160OFPBIC_UNSUP_METADATA_MASK = 4
161OFPBIC_BAD_EXPERIMENTER = 5
162OFPBIC_BAD_EXPERIMENTER_TYPE = 6
163OFPBIC_BAD_LEN = 7
164OFPBIC_EPERM = 8
165OFPBIC_DUP_INST = 9
166
167ofp_bad_instruction_code_map = {
168 0: 'OFPBIC_UNKNOWN_INST',
169 1: 'OFPBIC_UNSUP_INST',
170 2: 'OFPBIC_BAD_TABLE_ID',
171 3: 'OFPBIC_UNSUP_METADATA',
172 4: 'OFPBIC_UNSUP_METADATA_MASK',
173 5: 'OFPBIC_BAD_EXPERIMENTER',
174 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
175 7: 'OFPBIC_BAD_LEN',
176 8: 'OFPBIC_EPERM',
177 9: 'OFPBIC_DUP_INST',
178}
179
180# Identifiers from group ofp_bad_match_code
181OFPBMC_BAD_TYPE = 0
182OFPBMC_BAD_LEN = 1
183OFPBMC_BAD_TAG = 2
184OFPBMC_BAD_DL_ADDR_MASK = 3
185OFPBMC_BAD_NW_ADDR_MASK = 4
186OFPBMC_BAD_WILDCARDS = 5
187OFPBMC_BAD_FIELD = 6
188OFPBMC_BAD_VALUE = 7
189OFPBMC_BAD_MASK = 8
190OFPBMC_BAD_PREREQ = 9
191OFPBMC_DUP_FIELD = 10
192OFPBMC_EPERM = 11
193
194ofp_bad_match_code_map = {
195 0: 'OFPBMC_BAD_TYPE',
196 1: 'OFPBMC_BAD_LEN',
197 2: 'OFPBMC_BAD_TAG',
198 3: 'OFPBMC_BAD_DL_ADDR_MASK',
199 4: 'OFPBMC_BAD_NW_ADDR_MASK',
200 5: 'OFPBMC_BAD_WILDCARDS',
201 6: 'OFPBMC_BAD_FIELD',
202 7: 'OFPBMC_BAD_VALUE',
203 8: 'OFPBMC_BAD_MASK',
204 9: 'OFPBMC_BAD_PREREQ',
205 10: 'OFPBMC_DUP_FIELD',
206 11: 'OFPBMC_EPERM',
207}
208
209# Identifiers from group ofp_bad_property_code
210OFPBPC_BAD_TYPE = 0
211OFPBPC_BAD_LEN = 1
212OFPBPC_BAD_VALUE = 2
213OFPBPC_TOO_MANY = 3
214OFPBPC_DUP_TYPE = 4
215OFPBPC_BAD_EXPERIMENTER = 5
216OFPBPC_BAD_EXP_TYPE = 6
217OFPBPC_BAD_EXP_VALUE = 7
218OFPBPC_EPERM = 8
219
220ofp_bad_property_code_map = {
221 0: 'OFPBPC_BAD_TYPE',
222 1: 'OFPBPC_BAD_LEN',
223 2: 'OFPBPC_BAD_VALUE',
224 3: 'OFPBPC_TOO_MANY',
225 4: 'OFPBPC_DUP_TYPE',
226 5: 'OFPBPC_BAD_EXPERIMENTER',
227 6: 'OFPBPC_BAD_EXP_TYPE',
228 7: 'OFPBPC_BAD_EXP_VALUE',
229 8: 'OFPBPC_EPERM',
230}
231
232# Identifiers from group ofp_bad_request_code
233OFPBRC_BAD_VERSION = 0
234OFPBRC_BAD_TYPE = 1
235OFPBRC_BAD_STAT = 2
236OFPBRC_BAD_EXPERIMENTER = 3
237OFPBRC_BAD_EXPERIMENTER_TYPE = 4
238OFPBRC_EPERM = 5
239OFPBRC_BAD_LEN = 6
240OFPBRC_BUFFER_EMPTY = 7
241OFPBRC_BUFFER_UNKNOWN = 8
242OFPBRC_BAD_TABLE_ID = 9
243OFPBRC_IS_SLAVE = 10
244OFPBRC_BAD_PORT = 11
245OFPBRC_BAD_PACKET = 12
246OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
247OFPBRC_MULTIPART_REQUEST_TIMEOUT = 14
248OFPBRC_MULTIPART_REPLY_TIMEOUT = 15
249
250ofp_bad_request_code_map = {
251 0: 'OFPBRC_BAD_VERSION',
252 1: 'OFPBRC_BAD_TYPE',
253 2: 'OFPBRC_BAD_STAT',
254 3: 'OFPBRC_BAD_EXPERIMENTER',
255 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
256 5: 'OFPBRC_EPERM',
257 6: 'OFPBRC_BAD_LEN',
258 7: 'OFPBRC_BUFFER_EMPTY',
259 8: 'OFPBRC_BUFFER_UNKNOWN',
260 9: 'OFPBRC_BAD_TABLE_ID',
261 10: 'OFPBRC_IS_SLAVE',
262 11: 'OFPBRC_BAD_PORT',
263 12: 'OFPBRC_BAD_PACKET',
264 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
265 14: 'OFPBRC_MULTIPART_REQUEST_TIMEOUT',
266 15: 'OFPBRC_MULTIPART_REPLY_TIMEOUT',
267}
268
Rich Laneb41363b2015-07-08 15:42:38 -0700269# Identifiers from group ofp_bsn_anchor
270OFP_BSN_ANCHOR_PACKET_START = 0
271OFP_BSN_ANCHOR_L3_HEADER_START = 1
272OFP_BSN_ANCHOR_L4_HEADER_START = 2
273OFP_BSN_ANCHOR_L4_PAYLOAD_START = 3
274
275ofp_bsn_anchor_map = {
276 0: 'OFP_BSN_ANCHOR_PACKET_START',
277 1: 'OFP_BSN_ANCHOR_L3_HEADER_START',
278 2: 'OFP_BSN_ANCHOR_L4_HEADER_START',
279 3: 'OFP_BSN_ANCHOR_L4_PAYLOAD_START',
280}
281
Rich Laneccd32ed2014-11-10 17:48:24 -0800282# Identifiers from group ofp_bsn_controller_connection_state
283OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0
284OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1
285
286ofp_bsn_controller_connection_state_map = {
287 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED',
288 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED',
289}
290
291# Identifiers from group ofp_bsn_lacp_state
292OFP_BSN_LACP_STATE_ACTIVITY = 1
293OFP_BSN_LACP_STATE_TIMEOUT = 2
294OFP_BSN_LACP_STATE_AGGREGATION = 4
295OFP_BSN_LACP_STATE_SYNCHRONIZATION = 8
296OFP_BSN_LACP_STATE_COLLECTING = 16
297OFP_BSN_LACP_STATE_DISTRIBUTING = 32
298OFP_BSN_LACP_STATE_DEFAULTED = 64
299OFP_BSN_LACP_STATE_EXPIRED = 128
300
301ofp_bsn_lacp_state_map = {
302 1: 'OFP_BSN_LACP_STATE_ACTIVITY',
303 2: 'OFP_BSN_LACP_STATE_TIMEOUT',
304 4: 'OFP_BSN_LACP_STATE_AGGREGATION',
305 8: 'OFP_BSN_LACP_STATE_SYNCHRONIZATION',
306 16: 'OFP_BSN_LACP_STATE_COLLECTING',
307 32: 'OFP_BSN_LACP_STATE_DISTRIBUTING',
308 64: 'OFP_BSN_LACP_STATE_DEFAULTED',
309 128: 'OFP_BSN_LACP_STATE_EXPIRED',
310}
311
312# Identifiers from group ofp_bsn_loglevel
313OFP_BSN_LOGLEVEL_MSG = 0
314OFP_BSN_LOGLEVEL_ERROR = 1
315OFP_BSN_LOGLEVEL_WARN = 2
316OFP_BSN_LOGLEVEL_INFO = 3
317OFP_BSN_LOGLEVEL_VERBOSE = 4
318OFP_BSN_LOGLEVEL_TRACE = 5
319
320ofp_bsn_loglevel_map = {
321 0: 'OFP_BSN_LOGLEVEL_MSG',
322 1: 'OFP_BSN_LOGLEVEL_ERROR',
323 2: 'OFP_BSN_LOGLEVEL_WARN',
324 3: 'OFP_BSN_LOGLEVEL_INFO',
325 4: 'OFP_BSN_LOGLEVEL_VERBOSE',
326 5: 'OFP_BSN_LOGLEVEL_TRACE',
327}
328
Rich Lane474324f2015-01-14 15:22:56 -0800329# Identifiers from group ofp_bsn_lua_upload_flags
330OFP_BSN_LUA_UPLOAD_MORE = 1
331OFP_BSN_LUA_UPLOAD_FORCE = 2
332
333ofp_bsn_lua_upload_flags_map = {
334 1: 'OFP_BSN_LUA_UPLOAD_MORE',
335 2: 'OFP_BSN_LUA_UPLOAD_FORCE',
336}
337
Rich Laneccd32ed2014-11-10 17:48:24 -0800338# Identifiers from group ofp_bsn_pktin_flag
339OFP_BSN_PKTIN_FLAG_PDU = 1
340OFP_BSN_PKTIN_FLAG_NEW_HOST = 2
341OFP_BSN_PKTIN_FLAG_STATION_MOVE = 4
342OFP_BSN_PKTIN_FLAG_ARP = 8
343OFP_BSN_PKTIN_FLAG_DHCP = 16
344OFP_BSN_PKTIN_FLAG_L2_CPU = 32
345OFP_BSN_PKTIN_FLAG_DEBUG = 64
346OFP_BSN_PKTIN_FLAG_TTL_EXPIRED = 128
347OFP_BSN_PKTIN_FLAG_L3_MISS = 256
348OFP_BSN_PKTIN_FLAG_L3_CPU = 512
349OFP_BSN_PKTIN_FLAG_INGRESS_ACL = 1024
350OFP_BSN_PKTIN_FLAG_SFLOW = 2048
Rich Lane2d1b40e2015-02-11 12:45:33 -0800351OFP_BSN_PKTIN_FLAG_ARP_CACHE = 4096
Rich Lane7b69e792015-03-31 11:12:50 -0700352OFP_BSN_PKTIN_FLAG_ARP_TARGET = 8192
Rich Laneccd32ed2014-11-10 17:48:24 -0800353
354ofp_bsn_pktin_flag_map = {
355 1: 'OFP_BSN_PKTIN_FLAG_PDU',
356 2: 'OFP_BSN_PKTIN_FLAG_NEW_HOST',
357 4: 'OFP_BSN_PKTIN_FLAG_STATION_MOVE',
358 8: 'OFP_BSN_PKTIN_FLAG_ARP',
359 16: 'OFP_BSN_PKTIN_FLAG_DHCP',
360 32: 'OFP_BSN_PKTIN_FLAG_L2_CPU',
361 64: 'OFP_BSN_PKTIN_FLAG_DEBUG',
362 128: 'OFP_BSN_PKTIN_FLAG_TTL_EXPIRED',
363 256: 'OFP_BSN_PKTIN_FLAG_L3_MISS',
364 512: 'OFP_BSN_PKTIN_FLAG_L3_CPU',
365 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL',
366 2048: 'OFP_BSN_PKTIN_FLAG_SFLOW',
Rich Lane2d1b40e2015-02-11 12:45:33 -0800367 4096: 'OFP_BSN_PKTIN_FLAG_ARP_CACHE',
Rich Lane7b69e792015-03-31 11:12:50 -0700368 8192: 'OFP_BSN_PKTIN_FLAG_ARP_TARGET',
Rich Laneccd32ed2014-11-10 17:48:24 -0800369}
370
371# Identifiers from group ofp_bsn_port_counter
372OFP_BSN_PORT_COUNTER_RX_BYTES = 0
373OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1
374OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2
375OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3
376OFP_BSN_PORT_COUNTER_RX_DROPPED = 4
377OFP_BSN_PORT_COUNTER_RX_ERRORS = 5
378OFP_BSN_PORT_COUNTER_TX_BYTES = 6
379OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7
380OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8
381OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9
382OFP_BSN_PORT_COUNTER_TX_DROPPED = 10
383OFP_BSN_PORT_COUNTER_TX_ERRORS = 11
384OFP_BSN_PORT_COUNTER_RX_RUNTS = 12
385OFP_BSN_PORT_COUNTER_RX_GIANTS = 13
386OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS = 14
387OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS = 15
388OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS = 16
389OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT = 17
390OFP_BSN_PORT_COUNTER_TX_COLLISIONS = 18
391OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS = 19
392OFP_BSN_PORT_COUNTER_TX_DEFERRED = 20
393OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT = 21
394OFP_BSN_PORT_COUNTER_RX_PACKETS = 22
395OFP_BSN_PORT_COUNTER_TX_PACKETS = 23
396OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS = 24
397OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
398OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
Rich Lane51168312015-06-25 13:13:54 -0700399OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27
Rich Laneccd32ed2014-11-10 17:48:24 -0800400
401ofp_bsn_port_counter_map = {
402 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
403 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST',
404 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST',
405 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST',
406 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED',
407 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS',
408 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES',
409 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST',
410 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST',
411 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST',
412 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED',
413 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS',
414 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS',
415 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS',
416 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS',
417 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS',
418 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS',
419 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT',
420 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS',
421 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS',
422 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED',
423 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT',
424 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS',
425 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS',
426 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS',
427 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
428 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
Rich Lane51168312015-06-25 13:13:54 -0700429 27: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN',
Rich Laneccd32ed2014-11-10 17:48:24 -0800430}
431
432# Identifiers from group ofp_bsn_tcp_flag
433OFP_BSN_TCP_FLAG_FIN = 1
434OFP_BSN_TCP_FLAG_SYN = 2
435OFP_BSN_TCP_FLAG_RST = 4
436OFP_BSN_TCP_FLAG_PSH = 8
437OFP_BSN_TCP_FLAG_ACK = 16
438OFP_BSN_TCP_FLAG_URG = 32
439OFP_BSN_TCP_FLAG_ECE = 64
440OFP_BSN_TCP_FLAG_CWR = 128
441OFP_BSN_TCP_FLAG_NS = 256
442
443ofp_bsn_tcp_flag_map = {
444 1: 'OFP_BSN_TCP_FLAG_FIN',
445 2: 'OFP_BSN_TCP_FLAG_SYN',
446 4: 'OFP_BSN_TCP_FLAG_RST',
447 8: 'OFP_BSN_TCP_FLAG_PSH',
448 16: 'OFP_BSN_TCP_FLAG_ACK',
449 32: 'OFP_BSN_TCP_FLAG_URG',
450 64: 'OFP_BSN_TCP_FLAG_ECE',
451 128: 'OFP_BSN_TCP_FLAG_CWR',
452 256: 'OFP_BSN_TCP_FLAG_NS',
453}
454
455# Identifiers from group ofp_bsn_udf_anchor
456OFP_BSN_UDF_ANCHOR_PACKET_START = 0
457OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1
458OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2
459
460ofp_bsn_udf_anchor_map = {
461 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START',
462 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START',
463 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START',
464}
465
466# Identifiers from group ofp_bsn_vlan_counter_constants
467OFP_BSN_VLAN_ALL = 65535
468
469ofp_bsn_vlan_counter_constants_map = {
470 65535: 'OFP_BSN_VLAN_ALL',
471}
472
Rich Lane2e079da2014-10-29 15:30:24 -0700473# Identifiers from group ofp_bsn_vport_l2gre_flags
474OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
475OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
476OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
477OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
478OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
479
480ofp_bsn_vport_l2gre_flags_map = {
481 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
482 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
483 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
484 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
485 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
486}
487
488# Identifiers from group ofp_bsn_vport_q_in_q_untagged
489OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
490
491ofp_bsn_vport_q_in_q_untagged_map = {
492 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
493}
494
495# Identifiers from group ofp_bsn_vport_status
496OF_BSN_VPORT_STATUS_OK = 0
497OF_BSN_VPORT_STATUS_FAILED = 1
498
499ofp_bsn_vport_status_map = {
500 0: 'OF_BSN_VPORT_STATUS_OK',
501 1: 'OF_BSN_VPORT_STATUS_FAILED',
502}
503
Rich Laneccd32ed2014-11-10 17:48:24 -0800504# Identifiers from group ofp_bsn_vrf_counter_constants
505OFP_BSN_VRF_ALL = 4294967295
506
507ofp_bsn_vrf_counter_constants_map = {
508 4294967295: 'OFP_BSN_VRF_ALL',
509}
510
Rich Lane2e079da2014-10-29 15:30:24 -0700511# Identifiers from group ofp_bundle_ctrl_type
512OFPBCT_OPEN_REQUEST = 0
513OFPBCT_OPEN_REPLY = 1
514OFPBCT_CLOSE_REQUEST = 2
515OFPBCT_CLOSE_REPLY = 3
516OFPBCT_COMMIT_REQUEST = 4
517OFPBCT_COMMIT_REPLY = 5
518OFPBCT_DISCARD_REQUEST = 6
519OFPBCT_DISCARD_REPLY = 7
520
521ofp_bundle_ctrl_type_map = {
522 0: 'OFPBCT_OPEN_REQUEST',
523 1: 'OFPBCT_OPEN_REPLY',
524 2: 'OFPBCT_CLOSE_REQUEST',
525 3: 'OFPBCT_CLOSE_REPLY',
526 4: 'OFPBCT_COMMIT_REQUEST',
527 5: 'OFPBCT_COMMIT_REPLY',
528 6: 'OFPBCT_DISCARD_REQUEST',
529 7: 'OFPBCT_DISCARD_REPLY',
530}
531
532# Identifiers from group ofp_bundle_failed_code
533OFPBFC_UNKNOWN = 0
534OFPBFC_EPERM = 1
535OFPBFC_BAD_ID = 2
536OFPBFC_BUNDLE_EXIST = 3
537OFPBFC_BUNDLE_CLOSED = 4
538OFPBFC_OUT_OF_BUNDLES = 5
539OFPBFC_BAD_TYPE = 6
540OFPBFC_BAD_FLAGS = 7
541OFPBFC_MSG_BAD_LEN = 8
542OFPBFC_MSG_BAD_XID = 9
543OFPBFC_MSG_UNSUP = 10
544OFPBFC_MSG_CONFLICT = 11
545OFPBFC_MSG_TOO_MANY = 12
546OFPBFC_MSG_FAILED = 13
547OFPBFC_TIMEOUT = 14
548OFPBFC_BUNDLE_IN_PROGRESS = 15
549
550ofp_bundle_failed_code_map = {
551 0: 'OFPBFC_UNKNOWN',
552 1: 'OFPBFC_EPERM',
553 2: 'OFPBFC_BAD_ID',
554 3: 'OFPBFC_BUNDLE_EXIST',
555 4: 'OFPBFC_BUNDLE_CLOSED',
556 5: 'OFPBFC_OUT_OF_BUNDLES',
557 6: 'OFPBFC_BAD_TYPE',
558 7: 'OFPBFC_BAD_FLAGS',
559 8: 'OFPBFC_MSG_BAD_LEN',
560 9: 'OFPBFC_MSG_BAD_XID',
561 10: 'OFPBFC_MSG_UNSUP',
562 11: 'OFPBFC_MSG_CONFLICT',
563 12: 'OFPBFC_MSG_TOO_MANY',
564 13: 'OFPBFC_MSG_FAILED',
565 14: 'OFPBFC_TIMEOUT',
566 15: 'OFPBFC_BUNDLE_IN_PROGRESS',
567}
568
569# Identifiers from group ofp_bundle_flags
570OFPBF_ATOMIC = 1
571OFPBF_ORDERED = 2
572
573ofp_bundle_flags_map = {
574 1: 'OFPBF_ATOMIC',
575 2: 'OFPBF_ORDERED',
576}
577
578# Identifiers from group ofp_capabilities
579OFPC_FLOW_STATS = 1
580OFPC_TABLE_STATS = 2
581OFPC_PORT_STATS = 4
582OFPC_GROUP_STATS = 8
583OFPC_IP_REASM = 32
584OFPC_QUEUE_STATS = 64
585OFPC_PORT_BLOCKED = 256
586
587ofp_capabilities_map = {
588 1: 'OFPC_FLOW_STATS',
589 2: 'OFPC_TABLE_STATS',
590 4: 'OFPC_PORT_STATS',
591 8: 'OFPC_GROUP_STATS',
592 32: 'OFPC_IP_REASM',
593 64: 'OFPC_QUEUE_STATS',
594 256: 'OFPC_PORT_BLOCKED',
595}
596
597# Identifiers from group ofp_config_flags
598OFPC_FRAG_NORMAL = 0
599OFPC_FRAG_DROP = 1
600OFPC_FRAG_REASM = 2
601OFPC_FRAG_MASK = 3
602
603ofp_config_flags_map = {
604 0: 'OFPC_FRAG_NORMAL',
605 1: 'OFPC_FRAG_DROP',
606 2: 'OFPC_FRAG_REASM',
607 3: 'OFPC_FRAG_MASK',
608}
609
610# Identifiers from group ofp_controller_max_len
611OFPCML_MAX = 65509
612OFPCML_NO_BUFFER = 65535
613
614ofp_controller_max_len_map = {
615 65509: 'OFPCML_MAX',
616 65535: 'OFPCML_NO_BUFFER',
617}
618
619# Identifiers from group ofp_controller_role
620OFPCR_ROLE_NOCHANGE = 0
621OFPCR_ROLE_EQUAL = 1
622OFPCR_ROLE_MASTER = 2
623OFPCR_ROLE_SLAVE = 3
624
625ofp_controller_role_map = {
626 0: 'OFPCR_ROLE_NOCHANGE',
627 1: 'OFPCR_ROLE_EQUAL',
628 2: 'OFPCR_ROLE_MASTER',
629 3: 'OFPCR_ROLE_SLAVE',
630}
631
632# Identifiers from group ofp_controller_role_reason
633OFPCRR_MASTER_REQUEST = 0
634OFPCRR_CONFIG = 1
635OFPCRR_EXPERIMENTER = 2
636
637ofp_controller_role_reason_map = {
638 0: 'OFPCRR_MASTER_REQUEST',
639 1: 'OFPCRR_CONFIG',
640 2: 'OFPCRR_EXPERIMENTER',
641}
642
643# Identifiers from group ofp_error_type
644OFPET_HELLO_FAILED = 0
645OFPET_BAD_REQUEST = 1
646OFPET_BAD_ACTION = 2
647OFPET_BAD_INSTRUCTION = 3
648OFPET_BAD_MATCH = 4
649OFPET_FLOW_MOD_FAILED = 5
650OFPET_GROUP_MOD_FAILED = 6
651OFPET_PORT_MOD_FAILED = 7
652OFPET_TABLE_MOD_FAILED = 8
653OFPET_QUEUE_OP_FAILED = 9
654OFPET_SWITCH_CONFIG_FAILED = 10
655OFPET_ROLE_REQUEST_FAILED = 11
656OFPET_METER_MOD_FAILED = 12
657OFPET_TABLE_FEATURES_FAILED = 13
658OFPET_BAD_PROPERTY = 14
659OFPET_ASYNC_CONFIG_FAILED = 15
660OFPET_FLOW_MONITOR_FAILED = 16
661OFPET_BUNDLE_FAILED = 17
662OFPET_EXPERIMENTER = 65535
663
664ofp_error_type_map = {
665 0: 'OFPET_HELLO_FAILED',
666 1: 'OFPET_BAD_REQUEST',
667 2: 'OFPET_BAD_ACTION',
668 3: 'OFPET_BAD_INSTRUCTION',
669 4: 'OFPET_BAD_MATCH',
670 5: 'OFPET_FLOW_MOD_FAILED',
671 6: 'OFPET_GROUP_MOD_FAILED',
672 7: 'OFPET_PORT_MOD_FAILED',
673 8: 'OFPET_TABLE_MOD_FAILED',
674 9: 'OFPET_QUEUE_OP_FAILED',
675 10: 'OFPET_SWITCH_CONFIG_FAILED',
676 11: 'OFPET_ROLE_REQUEST_FAILED',
677 12: 'OFPET_METER_MOD_FAILED',
678 13: 'OFPET_TABLE_FEATURES_FAILED',
679 14: 'OFPET_BAD_PROPERTY',
680 15: 'OFPET_ASYNC_CONFIG_FAILED',
681 16: 'OFPET_FLOW_MONITOR_FAILED',
682 17: 'OFPET_BUNDLE_FAILED',
683 65535: 'OFPET_EXPERIMENTER',
684}
685
686# Identifiers from group ofp_flow_mod_command
687OFPFC_ADD = 0
688OFPFC_MODIFY = 1
689OFPFC_MODIFY_STRICT = 2
690OFPFC_DELETE = 3
691OFPFC_DELETE_STRICT = 4
692
693ofp_flow_mod_command_map = {
694 0: 'OFPFC_ADD',
695 1: 'OFPFC_MODIFY',
696 2: 'OFPFC_MODIFY_STRICT',
697 3: 'OFPFC_DELETE',
698 4: 'OFPFC_DELETE_STRICT',
699}
700
701# Identifiers from group ofp_flow_mod_failed_code
702OFPFMFC_UNKNOWN = 0
703OFPFMFC_TABLE_FULL = 1
704OFPFMFC_BAD_TABLE_ID = 2
705OFPFMFC_OVERLAP = 3
706OFPFMFC_EPERM = 4
707OFPFMFC_BAD_TIMEOUT = 5
708OFPFMFC_BAD_COMMAND = 6
709OFPFMFC_BAD_FLAGS = 7
710OFPFMFC_CANT_SYNC = 8
711OFPFMFC_BAD_PRIORITY = 9
712
713ofp_flow_mod_failed_code_map = {
714 0: 'OFPFMFC_UNKNOWN',
715 1: 'OFPFMFC_TABLE_FULL',
716 2: 'OFPFMFC_BAD_TABLE_ID',
717 3: 'OFPFMFC_OVERLAP',
718 4: 'OFPFMFC_EPERM',
719 5: 'OFPFMFC_BAD_TIMEOUT',
720 6: 'OFPFMFC_BAD_COMMAND',
721 7: 'OFPFMFC_BAD_FLAGS',
722 8: 'OFPFMFC_CANT_SYNC',
723 9: 'OFPFMFC_BAD_PRIORITY',
724}
725
726# Identifiers from group ofp_flow_mod_flags
727OFPFF_SEND_FLOW_REM = 1
728OFPFF_CHECK_OVERLAP = 2
729OFPFF_RESET_COUNTS = 4
730OFPFF_NO_PKT_COUNTS = 8
731OFPFF_NO_BYT_COUNTS = 16
732OFPFF_BSN_SEND_IDLE = 128
733
734ofp_flow_mod_flags_map = {
735 1: 'OFPFF_SEND_FLOW_REM',
736 2: 'OFPFF_CHECK_OVERLAP',
737 4: 'OFPFF_RESET_COUNTS',
738 8: 'OFPFF_NO_PKT_COUNTS',
739 16: 'OFPFF_NO_BYT_COUNTS',
740 128: 'OFPFF_BSN_SEND_IDLE',
741}
742
743# Identifiers from group ofp_flow_monitor_failed_code
744OFPMOFC_UNKNOWN = 0
745OFPMOFC_MONITOR_EXISTS = 1
746OFPMOFC_INVALID_MONITOR = 2
747OFPMOFC_UNKNOWN_MONITOR = 3
748OFPMOFC_BAD_COMMAND = 4
749OFPMOFC_BAD_FLAGS = 5
750OFPMOFC_BAD_TABLE_ID = 6
751OFPMOFC_BAD_OUT = 7
752
753ofp_flow_monitor_failed_code_map = {
754 0: 'OFPMOFC_UNKNOWN',
755 1: 'OFPMOFC_MONITOR_EXISTS',
756 2: 'OFPMOFC_INVALID_MONITOR',
757 3: 'OFPMOFC_UNKNOWN_MONITOR',
758 4: 'OFPMOFC_BAD_COMMAND',
759 5: 'OFPMOFC_BAD_FLAGS',
760 6: 'OFPMOFC_BAD_TABLE_ID',
761 7: 'OFPMOFC_BAD_OUT',
762}
763
764# Identifiers from group ofp_flow_removed_reason
765OFPRR_IDLE_TIMEOUT = 0
766OFPRR_HARD_TIMEOUT = 1
767OFPRR_DELETE = 2
768OFPRR_GROUP_DELETE = 3
769OFPRR_METER_DELETE = 4
770OFPRR_EVICTION = 5
771
772ofp_flow_removed_reason_map = {
773 0: 'OFPRR_IDLE_TIMEOUT',
774 1: 'OFPRR_HARD_TIMEOUT',
775 2: 'OFPRR_DELETE',
776 3: 'OFPRR_GROUP_DELETE',
777 4: 'OFPRR_METER_DELETE',
778 5: 'OFPRR_EVICTION',
779}
780
781# Identifiers from group ofp_group
782OFPG_MAX = 4294967040
783OFPG_ALL = 4294967292
784OFPG_ANY = 4294967295
785
786ofp_group_map = {
787 4294967040: 'OFPG_MAX',
788 4294967292: 'OFPG_ALL',
789 4294967295: 'OFPG_ANY',
790}
791
792# Identifiers from group ofp_group_capabilities
793OFPGFC_SELECT_WEIGHT = 1
794OFPGFC_SELECT_LIVENESS = 2
795OFPGFC_CHAINING = 4
796OFPGFC_CHAINING_CHECKS = 8
797
798ofp_group_capabilities_map = {
799 1: 'OFPGFC_SELECT_WEIGHT',
800 2: 'OFPGFC_SELECT_LIVENESS',
801 4: 'OFPGFC_CHAINING',
802 8: 'OFPGFC_CHAINING_CHECKS',
803}
804
805# Identifiers from group ofp_group_mod_command
806OFPGC_ADD = 0
807OFPGC_MODIFY = 1
808OFPGC_DELETE = 2
809
810ofp_group_mod_command_map = {
811 0: 'OFPGC_ADD',
812 1: 'OFPGC_MODIFY',
813 2: 'OFPGC_DELETE',
814}
815
816# Identifiers from group ofp_group_mod_failed_code
817OFPGMFC_GROUP_EXISTS = 0
818OFPGMFC_INVALID_GROUP = 1
819OFPGMFC_WEIGHT_UNSUPPORTED = 2
820OFPGMFC_OUT_OF_GROUPS = 3
821OFPGMFC_OUT_OF_BUCKETS = 4
822OFPGMFC_CHAINING_UNSUPPORTED = 5
823OFPGMFC_WATCH_UNSUPPORTED = 6
824OFPGMFC_LOOP = 7
825OFPGMFC_UNKNOWN_GROUP = 8
826OFPGMFC_CHAINED_GROUP = 9
827OFPGMFC_BAD_TYPE = 10
828OFPGMFC_BAD_COMMAND = 11
829OFPGMFC_BAD_BUCKET = 12
830OFPGMFC_BAD_WATCH = 13
831OFPGMFC_EPERM = 14
832
833ofp_group_mod_failed_code_map = {
834 0: 'OFPGMFC_GROUP_EXISTS',
835 1: 'OFPGMFC_INVALID_GROUP',
836 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
837 3: 'OFPGMFC_OUT_OF_GROUPS',
838 4: 'OFPGMFC_OUT_OF_BUCKETS',
839 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
840 6: 'OFPGMFC_WATCH_UNSUPPORTED',
841 7: 'OFPGMFC_LOOP',
842 8: 'OFPGMFC_UNKNOWN_GROUP',
843 9: 'OFPGMFC_CHAINED_GROUP',
844 10: 'OFPGMFC_BAD_TYPE',
845 11: 'OFPGMFC_BAD_COMMAND',
846 12: 'OFPGMFC_BAD_BUCKET',
847 13: 'OFPGMFC_BAD_WATCH',
848 14: 'OFPGMFC_EPERM',
849}
850
851# Identifiers from group ofp_group_type
852OFPGT_ALL = 0
853OFPGT_SELECT = 1
854OFPGT_INDIRECT = 2
855OFPGT_FF = 3
856
857ofp_group_type_map = {
858 0: 'OFPGT_ALL',
859 1: 'OFPGT_SELECT',
860 2: 'OFPGT_INDIRECT',
861 3: 'OFPGT_FF',
862}
863
864# Identifiers from group ofp_hello_elem_type
865OFPHET_VERSIONBITMAP = 1
866
867ofp_hello_elem_type_map = {
868 1: 'OFPHET_VERSIONBITMAP',
869}
870
871# Identifiers from group ofp_hello_failed_code
872OFPHFC_INCOMPATIBLE = 0
873OFPHFC_EPERM = 1
874
875ofp_hello_failed_code_map = {
876 0: 'OFPHFC_INCOMPATIBLE',
877 1: 'OFPHFC_EPERM',
878}
879
880# Identifiers from group ofp_instruction_type
881OFPIT_GOTO_TABLE = 1
882OFPIT_WRITE_METADATA = 2
883OFPIT_WRITE_ACTIONS = 3
884OFPIT_APPLY_ACTIONS = 4
885OFPIT_CLEAR_ACTIONS = 5
886OFPIT_METER = 6
887OFPIT_EXPERIMENTER = 65535
888
889ofp_instruction_type_map = {
890 1: 'OFPIT_GOTO_TABLE',
891 2: 'OFPIT_WRITE_METADATA',
892 3: 'OFPIT_WRITE_ACTIONS',
893 4: 'OFPIT_APPLY_ACTIONS',
894 5: 'OFPIT_CLEAR_ACTIONS',
895 6: 'OFPIT_METER',
896 65535: 'OFPIT_EXPERIMENTER',
897}
898
899# Identifiers from group ofp_ipv6exthdr_flags
900OFPIEH_NONEXT = 1
901OFPIEH_ESP = 2
902OFPIEH_AUTH = 4
903OFPIEH_DEST = 8
904OFPIEH_FRAG = 16
905OFPIEH_ROUTER = 32
906OFPIEH_HOP = 64
907OFPIEH_UNREP = 128
908OFPIEH_UNSEQ = 256
909
910ofp_ipv6exthdr_flags_map = {
911 1: 'OFPIEH_NONEXT',
912 2: 'OFPIEH_ESP',
913 4: 'OFPIEH_AUTH',
914 8: 'OFPIEH_DEST',
915 16: 'OFPIEH_FRAG',
916 32: 'OFPIEH_ROUTER',
917 64: 'OFPIEH_HOP',
918 128: 'OFPIEH_UNREP',
919 256: 'OFPIEH_UNSEQ',
920}
921
922# Identifiers from group ofp_match_type
923OFPMT_STANDARD = 0
924OFPMT_OXM = 1
925
926ofp_match_type_map = {
927 0: 'OFPMT_STANDARD',
928 1: 'OFPMT_OXM',
929}
930
931# Identifiers from group ofp_meter
932OFPM_MAX = 4294901760
933OFPM_SLOWPATH = 4294967293
934OFPM_CONTROLLER = 4294967294
935OFPM_ALL = 4294967295
936
937ofp_meter_map = {
938 4294901760: 'OFPM_MAX',
939 4294967293: 'OFPM_SLOWPATH',
940 4294967294: 'OFPM_CONTROLLER',
941 4294967295: 'OFPM_ALL',
942}
943
944# Identifiers from group ofp_meter_band_type
945OFPMBT_DROP = 1
946OFPMBT_DSCP_REMARK = 2
947OFPMBT_EXPERIMENTER = 65535
948
949ofp_meter_band_type_map = {
950 1: 'OFPMBT_DROP',
951 2: 'OFPMBT_DSCP_REMARK',
952 65535: 'OFPMBT_EXPERIMENTER',
953}
954
955# Identifiers from group ofp_meter_flags
956OFPMF_KBPS = 1
957OFPMF_PKTPS = 2
958OFPMF_BURST = 4
959OFPMF_STATS = 8
960
961ofp_meter_flags_map = {
962 1: 'OFPMF_KBPS',
963 2: 'OFPMF_PKTPS',
964 4: 'OFPMF_BURST',
965 8: 'OFPMF_STATS',
966}
967
968# Identifiers from group ofp_meter_mod_command
969OFPMC_ADD = 0
970OFPMC_MODIFY = 1
971OFPMC_DELETE = 2
972
973ofp_meter_mod_command_map = {
974 0: 'OFPMC_ADD',
975 1: 'OFPMC_MODIFY',
976 2: 'OFPMC_DELETE',
977}
978
979# Identifiers from group ofp_meter_mod_failed_code
980OFPMMFC_UNKNOWN = 0
981OFPMMFC_METER_EXISTS = 1
982OFPMMFC_INVALID_METER = 2
983OFPMMFC_UNKNOWN_METER = 3
984OFPMMFC_BAD_COMMAND = 4
985OFPMMFC_BAD_FLAGS = 5
986OFPMMFC_BAD_RATE = 6
987OFPMMFC_BAD_BURST = 7
988OFPMMFC_BAD_BAND = 8
989OFPMMFC_BAD_BAND_VALUE = 9
990OFPMMFC_OUT_OF_METERS = 10
991OFPMMFC_OUT_OF_BANDS = 11
992
993ofp_meter_mod_failed_code_map = {
994 0: 'OFPMMFC_UNKNOWN',
995 1: 'OFPMMFC_METER_EXISTS',
996 2: 'OFPMMFC_INVALID_METER',
997 3: 'OFPMMFC_UNKNOWN_METER',
998 4: 'OFPMMFC_BAD_COMMAND',
999 5: 'OFPMMFC_BAD_FLAGS',
1000 6: 'OFPMMFC_BAD_RATE',
1001 7: 'OFPMMFC_BAD_BURST',
1002 8: 'OFPMMFC_BAD_BAND',
1003 9: 'OFPMMFC_BAD_BAND_VALUE',
1004 10: 'OFPMMFC_OUT_OF_METERS',
1005 11: 'OFPMMFC_OUT_OF_BANDS',
1006}
1007
1008# Identifiers from group ofp_optical_port_features
1009OFPOPF_RX_TUNE = 1
1010OFPOPF_TX_TUNE = 2
1011OFPOPF_TX_PWR = 4
1012OFPOPF_USE_FREQ = 8
1013
1014ofp_optical_port_features_map = {
1015 1: 'OFPOPF_RX_TUNE',
1016 2: 'OFPOPF_TX_TUNE',
1017 4: 'OFPOPF_TX_PWR',
1018 8: 'OFPOPF_USE_FREQ',
1019}
1020
1021# Identifiers from group ofp_oxm_class
1022OFPXMC_NXM_0 = 0
1023OFPXMC_NXM_1 = 1
1024OFPXMC_OPENFLOW_BASIC = 32768
1025OFPXMC_EXPERIMENTER = 65535
1026
1027ofp_oxm_class_map = {
1028 0: 'OFPXMC_NXM_0',
1029 1: 'OFPXMC_NXM_1',
1030 32768: 'OFPXMC_OPENFLOW_BASIC',
1031 65535: 'OFPXMC_EXPERIMENTER',
1032}
1033
1034# Identifiers from group ofp_packet_in_reason
1035OFPR_NO_MATCH = 0
1036OFPR_ACTION = 1
1037OFPR_INVALID_TTL = 2
1038OFPR_ACTION_SET = 3
1039OFPR_GROUP = 4
1040OFPR_PACKET_OUT = 5
1041OFPR_BSN_NEW_HOST = 128
1042OFPR_BSN_STATION_MOVE = 129
1043OFPR_BSN_BAD_VLAN = 130
1044OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
1045OFPR_BSN_NO_ROUTE = 132
1046OFPR_BSN_ICMP_ECHO_REQUEST = 133
1047OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
1048OFPR_BSN_DEST_HOST_UNREACHABLE = 135
1049OFPR_BSN_DEST_PORT_UNREACHABLE = 136
1050OFPR_BSN_FRAGMENTATION_REQUIRED = 137
1051OFPR_BSN_ARP = 139
1052OFPR_BSN_DHCP = 140
1053OFPR_BSN_DEBUG = 141
1054OFPR_BSN_PACKET_OF_DEATH = 142
1055
1056ofp_packet_in_reason_map = {
1057 0: 'OFPR_NO_MATCH',
1058 1: 'OFPR_ACTION',
1059 2: 'OFPR_INVALID_TTL',
1060 3: 'OFPR_ACTION_SET',
1061 4: 'OFPR_GROUP',
1062 5: 'OFPR_PACKET_OUT',
1063 128: 'OFPR_BSN_NEW_HOST',
1064 129: 'OFPR_BSN_STATION_MOVE',
1065 130: 'OFPR_BSN_BAD_VLAN',
1066 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
1067 132: 'OFPR_BSN_NO_ROUTE',
1068 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
1069 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
1070 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
1071 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
1072 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
1073 139: 'OFPR_BSN_ARP',
1074 140: 'OFPR_BSN_DHCP',
1075 141: 'OFPR_BSN_DEBUG',
1076 142: 'OFPR_BSN_PACKET_OF_DEATH',
1077}
1078
1079# Identifiers from group ofp_port
1080OFPP_MAX = 4294967040
1081OFPP_IN_PORT = 4294967288
1082OFPP_TABLE = 4294967289
1083OFPP_NORMAL = 4294967290
1084OFPP_FLOOD = 4294967291
1085OFPP_ALL = 4294967292
1086OFPP_CONTROLLER = 4294967293
1087OFPP_LOCAL = 4294967294
1088OFPP_ANY = 4294967295
1089
1090ofp_port_map = {
1091 4294967040: 'OFPP_MAX',
1092 4294967288: 'OFPP_IN_PORT',
1093 4294967289: 'OFPP_TABLE',
1094 4294967290: 'OFPP_NORMAL',
1095 4294967291: 'OFPP_FLOOD',
1096 4294967292: 'OFPP_ALL',
1097 4294967293: 'OFPP_CONTROLLER',
1098 4294967294: 'OFPP_LOCAL',
1099 4294967295: 'OFPP_ANY',
1100}
1101
1102# Identifiers from group ofp_port_config
1103OFPPC_PORT_DOWN = 1
1104OFPPC_NO_RECV = 4
1105OFPPC_NO_FWD = 32
1106OFPPC_NO_PACKET_IN = 64
1107OFPPC_BSN_MIRROR_DEST = 2147483648
1108
1109ofp_port_config_map = {
1110 1: 'OFPPC_PORT_DOWN',
1111 4: 'OFPPC_NO_RECV',
1112 32: 'OFPPC_NO_FWD',
1113 64: 'OFPPC_NO_PACKET_IN',
1114 2147483648: 'OFPPC_BSN_MIRROR_DEST',
1115}
1116
1117# Identifiers from group ofp_port_features
1118OFPPF_10MB_HD = 1
1119OFPPF_10MB_FD = 2
1120OFPPF_100MB_HD = 4
1121OFPPF_100MB_FD = 8
1122OFPPF_1GB_HD = 16
1123OFPPF_1GB_FD = 32
1124OFPPF_10GB_FD = 64
1125OFPPF_40GB_FD = 128
1126OFPPF_100GB_FD = 256
1127OFPPF_1TB_FD = 512
1128OFPPF_OTHER = 1024
1129OFPPF_COPPER = 2048
1130OFPPF_FIBER = 4096
1131OFPPF_AUTONEG = 8192
1132OFPPF_PAUSE = 16384
1133OFPPF_PAUSE_ASYM = 32768
Rich Lanecb18dbd2014-12-18 10:02:29 -08001134OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648
Rich Lane2e079da2014-10-29 15:30:24 -07001135
1136ofp_port_features_map = {
1137 1: 'OFPPF_10MB_HD',
1138 2: 'OFPPF_10MB_FD',
1139 4: 'OFPPF_100MB_HD',
1140 8: 'OFPPF_100MB_FD',
1141 16: 'OFPPF_1GB_HD',
1142 32: 'OFPPF_1GB_FD',
1143 64: 'OFPPF_10GB_FD',
1144 128: 'OFPPF_40GB_FD',
1145 256: 'OFPPF_100GB_FD',
1146 512: 'OFPPF_1TB_FD',
1147 1024: 'OFPPF_OTHER',
1148 2048: 'OFPPF_COPPER',
1149 4096: 'OFPPF_FIBER',
1150 8192: 'OFPPF_AUTONEG',
1151 16384: 'OFPPF_PAUSE',
1152 32768: 'OFPPF_PAUSE_ASYM',
Rich Lanecb18dbd2014-12-18 10:02:29 -08001153 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE',
Rich Lane2e079da2014-10-29 15:30:24 -07001154}
1155
1156# Identifiers from group ofp_port_mod_failed_code
1157OFPPMFC_BAD_PORT = 0
1158OFPPMFC_BAD_HW_ADDR = 1
1159OFPPMFC_BAD_CONFIG = 2
1160OFPPMFC_BAD_ADVERTISE = 3
1161OFPPMFC_EPERM = 4
1162
1163ofp_port_mod_failed_code_map = {
1164 0: 'OFPPMFC_BAD_PORT',
1165 1: 'OFPPMFC_BAD_HW_ADDR',
1166 2: 'OFPPMFC_BAD_CONFIG',
1167 3: 'OFPPMFC_BAD_ADVERTISE',
1168 4: 'OFPPMFC_EPERM',
1169}
1170
1171# Identifiers from group ofp_port_reason
1172OFPPR_ADD = 0
1173OFPPR_DELETE = 1
1174OFPPR_MODIFY = 2
1175
1176ofp_port_reason_map = {
1177 0: 'OFPPR_ADD',
1178 1: 'OFPPR_DELETE',
1179 2: 'OFPPR_MODIFY',
1180}
1181
1182# Identifiers from group ofp_port_state
1183OFPPS_LINK_DOWN = 1
1184OFPPS_BLOCKED = 2
1185OFPPS_LIVE = 4
1186
1187ofp_port_state_map = {
1188 1: 'OFPPS_LINK_DOWN',
1189 2: 'OFPPS_BLOCKED',
1190 4: 'OFPPS_LIVE',
1191}
1192
1193# Identifiers from group ofp_port_stats_optical_flags
1194OFPOSF_RX_TUNE = 1
1195OFPOSF_TX_TUNE = 2
1196OFPOSF_TX_PWR = 4
1197OFPOSF_RX_PWR = 16
1198OFPOSF_TX_BIAS = 32
1199OFPOSF_TX_TEMP = 64
1200
1201ofp_port_stats_optical_flags_map = {
1202 1: 'OFPOSF_RX_TUNE',
1203 2: 'OFPOSF_TX_TUNE',
1204 4: 'OFPOSF_TX_PWR',
1205 16: 'OFPOSF_RX_PWR',
1206 32: 'OFPOSF_TX_BIAS',
1207 64: 'OFPOSF_TX_TEMP',
1208}
1209
1210# Identifiers from group ofp_port_stats_prop_type
1211OFPPSPT_ETHERNET = 0
1212OFPPSPT_OPTICAL = 1
1213OFPPSPT_EXPERIMENTER = 65535
1214
1215ofp_port_stats_prop_type_map = {
1216 0: 'OFPPSPT_ETHERNET',
1217 1: 'OFPPSPT_OPTICAL',
1218 65535: 'OFPPSPT_EXPERIMENTER',
1219}
1220
1221# Identifiers from group ofp_queue_op_failed_code
1222OFPQOFC_BAD_PORT = 0
1223OFPQOFC_BAD_QUEUE = 1
1224OFPQOFC_EPERM = 2
1225
1226ofp_queue_op_failed_code_map = {
1227 0: 'OFPQOFC_BAD_PORT',
1228 1: 'OFPQOFC_BAD_QUEUE',
1229 2: 'OFPQOFC_EPERM',
1230}
1231
1232# Identifiers from group ofp_requestforward_reason
1233OFPRFR_GROUP_MOD = 0
1234OFPRFR_METER_MOD = 1
1235
1236ofp_requestforward_reason_map = {
1237 0: 'OFPRFR_GROUP_MOD',
1238 1: 'OFPRFR_METER_MOD',
1239}
1240
1241# Identifiers from group ofp_role_request_failed_code
1242OFPRRFC_STALE = 0
1243OFPRRFC_UNSUP = 1
1244OFPRRFC_BAD_ROLE = 2
1245
1246ofp_role_request_failed_code_map = {
1247 0: 'OFPRRFC_STALE',
1248 1: 'OFPRRFC_UNSUP',
1249 2: 'OFPRRFC_BAD_ROLE',
1250}
1251
1252# Identifiers from group ofp_stats_reply_flags
1253OFPSF_REPLY_MORE = 1
1254
1255ofp_stats_reply_flags_map = {
1256 1: 'OFPSF_REPLY_MORE',
1257}
1258
1259# Identifiers from group ofp_stats_request_flags
1260OFPSF_REQ_MORE = 1
1261
1262ofp_stats_request_flags_map = {
1263 1: 'OFPSF_REQ_MORE',
1264}
1265
1266# Identifiers from group ofp_stats_type
1267OFPST_DESC = 0
1268OFPST_FLOW = 1
1269OFPST_AGGREGATE = 2
1270OFPST_TABLE = 3
1271OFPST_PORT = 4
1272OFPST_QUEUE = 5
1273OFPST_GROUP = 6
1274OFPST_GROUP_DESC = 7
1275OFPST_GROUP_FEATURES = 8
1276OFPST_METER = 9
1277OFPST_METER_CONFIG = 10
1278OFPST_METER_FEATURES = 11
1279OFPST_TABLE_FEATURES = 12
1280OFPST_PORT_DESC = 13
1281OFPMP_TABLE_DESC = 14
1282OFPMP_QUEUE_DESC = 15
1283OFPMP_FLOW_MONITOR = 16
1284OFPST_EXPERIMENTER = 65535
1285
1286ofp_stats_type_map = {
1287 0: 'OFPST_DESC',
1288 1: 'OFPST_FLOW',
1289 2: 'OFPST_AGGREGATE',
1290 3: 'OFPST_TABLE',
1291 4: 'OFPST_PORT',
1292 5: 'OFPST_QUEUE',
1293 6: 'OFPST_GROUP',
1294 7: 'OFPST_GROUP_DESC',
1295 8: 'OFPST_GROUP_FEATURES',
1296 9: 'OFPST_METER',
1297 10: 'OFPST_METER_CONFIG',
1298 11: 'OFPST_METER_FEATURES',
1299 12: 'OFPST_TABLE_FEATURES',
1300 13: 'OFPST_PORT_DESC',
1301 14: 'OFPMP_TABLE_DESC',
1302 15: 'OFPMP_QUEUE_DESC',
1303 16: 'OFPMP_FLOW_MONITOR',
1304 65535: 'OFPST_EXPERIMENTER',
1305}
1306
1307# Identifiers from group ofp_switch_config_failed_code
1308OFPSCFC_BAD_FLAGS = 0
1309OFPSCFC_BAD_LEN = 1
1310OFPSCFC_EPERM = 2
1311
1312ofp_switch_config_failed_code_map = {
1313 0: 'OFPSCFC_BAD_FLAGS',
1314 1: 'OFPSCFC_BAD_LEN',
1315 2: 'OFPSCFC_EPERM',
1316}
1317
1318# Identifiers from group ofp_table
1319OFPTT_MAX = 254
1320OFPTT_ALL = 255
1321
1322ofp_table_map = {
1323 254: 'OFPTT_MAX',
1324 255: 'OFPTT_ALL',
1325}
1326
1327# Identifiers from group ofp_table_config
1328OFPTC_DEPRECATED_MASK = 3
1329OFPTC_EVICTION = 4
1330OFPTC_VACANCY_EVENTS = 8
1331
1332ofp_table_config_map = {
1333 3: 'OFPTC_DEPRECATED_MASK',
1334 4: 'OFPTC_EVICTION',
1335 8: 'OFPTC_VACANCY_EVENTS',
1336}
1337
1338# Identifiers from group ofp_table_feature_prop_type
1339OFPTFPT_INSTRUCTIONS = 0
1340OFPTFPT_INSTRUCTIONS_MISS = 1
1341OFPTFPT_NEXT_TABLES = 2
1342OFPTFPT_NEXT_TABLES_MISS = 3
1343OFPTFPT_WRITE_ACTIONS = 4
1344OFPTFPT_WRITE_ACTIONS_MISS = 5
1345OFPTFPT_APPLY_ACTIONS = 6
1346OFPTFPT_APPLY_ACTIONS_MISS = 7
1347OFPTFPT_MATCH = 8
1348OFPTFPT_WILDCARDS = 10
1349OFPTFPT_WRITE_SETFIELD = 12
1350OFPTFPT_WRITE_SETFIELD_MISS = 13
1351OFPTFPT_APPLY_SETFIELD = 14
1352OFPTFPT_APPLY_SETFIELD_MISS = 15
1353OFPTFPT_TABLE_SYNC_FROM = 16
1354OFPTFPT_EXPERIMENTER = 65534
1355OFPTFPT_EXPERIMENTER_MISS = 65535
1356
1357ofp_table_feature_prop_type_map = {
1358 0: 'OFPTFPT_INSTRUCTIONS',
1359 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1360 2: 'OFPTFPT_NEXT_TABLES',
1361 3: 'OFPTFPT_NEXT_TABLES_MISS',
1362 4: 'OFPTFPT_WRITE_ACTIONS',
1363 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1364 6: 'OFPTFPT_APPLY_ACTIONS',
1365 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1366 8: 'OFPTFPT_MATCH',
1367 10: 'OFPTFPT_WILDCARDS',
1368 12: 'OFPTFPT_WRITE_SETFIELD',
1369 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1370 14: 'OFPTFPT_APPLY_SETFIELD',
1371 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1372 16: 'OFPTFPT_TABLE_SYNC_FROM',
1373 65534: 'OFPTFPT_EXPERIMENTER',
1374 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1375}
1376
1377# Identifiers from group ofp_table_features_failed_code
1378OFPTFFC_BAD_TABLE = 0
1379OFPTFFC_BAD_METADATA = 1
1380OFPTFFC_EPERM = 5
1381
1382ofp_table_features_failed_code_map = {
1383 0: 'OFPTFFC_BAD_TABLE',
1384 1: 'OFPTFFC_BAD_METADATA',
1385 5: 'OFPTFFC_EPERM',
1386}
1387
1388# Identifiers from group ofp_table_mod_failed_code
1389OFPTMFC_BAD_TABLE = 0
1390OFPTMFC_BAD_CONFIG = 1
1391OFPTMFC_EPERM = 2
1392
1393ofp_table_mod_failed_code_map = {
1394 0: 'OFPTMFC_BAD_TABLE',
1395 1: 'OFPTMFC_BAD_CONFIG',
1396 2: 'OFPTMFC_EPERM',
1397}
1398
1399# Identifiers from group ofp_table_mod_prop_eviction_flag
1400OFPTMPEF_OTHER = 1
1401OFPTMPEF_IMPORTANCE = 2
1402OFPTMPEF_LIFETIME = 4
1403
1404ofp_table_mod_prop_eviction_flag_map = {
1405 1: 'OFPTMPEF_OTHER',
1406 2: 'OFPTMPEF_IMPORTANCE',
1407 4: 'OFPTMPEF_LIFETIME',
1408}
1409
1410# Identifiers from group ofp_table_reason
1411OFPTR_VACANCY_DOWN = 3
1412OFPTR_VACANCY_UP = 4
1413
1414ofp_table_reason_map = {
1415 3: 'OFPTR_VACANCY_DOWN',
1416 4: 'OFPTR_VACANCY_UP',
1417}
1418
1419# Identifiers from group ofp_type
1420OFPT_HELLO = 0
1421OFPT_ERROR = 1
1422OFPT_ECHO_REQUEST = 2
1423OFPT_ECHO_REPLY = 3
1424OFPT_EXPERIMENTER = 4
1425OFPT_FEATURES_REQUEST = 5
1426OFPT_FEATURES_REPLY = 6
1427OFPT_GET_CONFIG_REQUEST = 7
1428OFPT_GET_CONFIG_REPLY = 8
1429OFPT_SET_CONFIG = 9
1430OFPT_PACKET_IN = 10
1431OFPT_FLOW_REMOVED = 11
1432OFPT_PORT_STATUS = 12
1433OFPT_PACKET_OUT = 13
1434OFPT_FLOW_MOD = 14
1435OFPT_GROUP_MOD = 15
1436OFPT_PORT_MOD = 16
1437OFPT_TABLE_MOD = 17
1438OFPT_STATS_REQUEST = 18
1439OFPT_STATS_REPLY = 19
1440OFPT_BARRIER_REQUEST = 20
1441OFPT_BARRIER_REPLY = 21
1442OFPT_ROLE_REQUEST = 24
1443OFPT_ROLE_REPLY = 25
1444OFPT_GET_ASYNC_REQUEST = 26
1445OFPT_GET_ASYNC_REPLY = 27
1446OFPT_SET_ASYNC = 28
1447OFPT_METER_MOD = 29
1448OFPT_ROLE_STATUS = 30
1449OFPT_TABLE_STATUS = 31
1450OFPT_REQUESTFORWARD = 32
1451OFPT_BUNDLE_CONTROL = 33
1452OFPT_BUNDLE_ADD_MESSAGE = 34
1453
1454ofp_type_map = {
1455 0: 'OFPT_HELLO',
1456 1: 'OFPT_ERROR',
1457 2: 'OFPT_ECHO_REQUEST',
1458 3: 'OFPT_ECHO_REPLY',
1459 4: 'OFPT_EXPERIMENTER',
1460 5: 'OFPT_FEATURES_REQUEST',
1461 6: 'OFPT_FEATURES_REPLY',
1462 7: 'OFPT_GET_CONFIG_REQUEST',
1463 8: 'OFPT_GET_CONFIG_REPLY',
1464 9: 'OFPT_SET_CONFIG',
1465 10: 'OFPT_PACKET_IN',
1466 11: 'OFPT_FLOW_REMOVED',
1467 12: 'OFPT_PORT_STATUS',
1468 13: 'OFPT_PACKET_OUT',
1469 14: 'OFPT_FLOW_MOD',
1470 15: 'OFPT_GROUP_MOD',
1471 16: 'OFPT_PORT_MOD',
1472 17: 'OFPT_TABLE_MOD',
1473 18: 'OFPT_STATS_REQUEST',
1474 19: 'OFPT_STATS_REPLY',
1475 20: 'OFPT_BARRIER_REQUEST',
1476 21: 'OFPT_BARRIER_REPLY',
1477 24: 'OFPT_ROLE_REQUEST',
1478 25: 'OFPT_ROLE_REPLY',
1479 26: 'OFPT_GET_ASYNC_REQUEST',
1480 27: 'OFPT_GET_ASYNC_REPLY',
1481 28: 'OFPT_SET_ASYNC',
1482 29: 'OFPT_METER_MOD',
1483 30: 'OFPT_ROLE_STATUS',
1484 31: 'OFPT_TABLE_STATUS',
1485 32: 'OFPT_REQUESTFORWARD',
1486 33: 'OFPT_BUNDLE_CONTROL',
1487 34: 'OFPT_BUNDLE_ADD_MESSAGE',
1488}
1489
1490# Identifiers from group ofp_vlan_id
1491OFPVID_NONE = 0
1492OFPVID_PRESENT = 4096
1493
1494ofp_vlan_id_map = {
1495 0: 'OFPVID_NONE',
1496 4096: 'OFPVID_PRESENT',
1497}
1498