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