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