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