blob: b6c860bf0dc89e9dd7ef1bf92990ee606b08d9d4 [file] [log] [blame]
Nathan Knuth418fdc82016-09-16 22:51:15 -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 = 4
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
28# Identifiers from group of_bsn_hash_packet_field
29OFP_BSN_HASH_FIELD_DISABLE = 1
30OFP_BSN_HASH_FIELD_DST_MAC = 2
31OFP_BSN_HASH_FIELD_SRC_MAC = 4
32OFP_BSN_HASH_FIELD_ETH_TYPE = 8
33OFP_BSN_HASH_FIELD_VLAN_ID = 16
34OFP_BSN_HASH_FIELD_INNER_L2 = 32
35OFP_BSN_HASH_FIELD_INNER_L3 = 64
36OFP_BSN_HASH_FIELD_SRC_IP = 128
37OFP_BSN_HASH_FIELD_DST_IP = 256
38OFP_BSN_HASH_FIELD_IP_PROTO = 512
39OFP_BSN_HASH_FIELD_SRC_L4_PORT = 1024
40OFP_BSN_HASH_FIELD_DST_L4_PORT = 2048
41OFP_BSN_HASH_FIELD_MPLS_LABEL1 = 4096
42OFP_BSN_HASH_FIELD_MPLS_LABEL2 = 8192
43OFP_BSN_HASH_FIELD_MPLS_LABEL3 = 16384
44OFP_BSN_HASH_FIELD_MPLS_LABEL_HI_BITS = 32768
45OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_SRC_IP = 65536
46OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_DST_IP = 131072
47OFP_BSN_HASH_FIELD_SYMMETRIC = 262144
48
49of_bsn_hash_packet_field_map = {
50 1: 'OFP_BSN_HASH_FIELD_DISABLE',
51 2: 'OFP_BSN_HASH_FIELD_DST_MAC',
52 4: 'OFP_BSN_HASH_FIELD_SRC_MAC',
53 8: 'OFP_BSN_HASH_FIELD_ETH_TYPE',
54 16: 'OFP_BSN_HASH_FIELD_VLAN_ID',
55 32: 'OFP_BSN_HASH_FIELD_INNER_L2',
56 64: 'OFP_BSN_HASH_FIELD_INNER_L3',
57 128: 'OFP_BSN_HASH_FIELD_SRC_IP',
58 256: 'OFP_BSN_HASH_FIELD_DST_IP',
59 512: 'OFP_BSN_HASH_FIELD_IP_PROTO',
60 1024: 'OFP_BSN_HASH_FIELD_SRC_L4_PORT',
61 2048: 'OFP_BSN_HASH_FIELD_DST_L4_PORT',
62 4096: 'OFP_BSN_HASH_FIELD_MPLS_LABEL1',
63 8192: 'OFP_BSN_HASH_FIELD_MPLS_LABEL2',
64 16384: 'OFP_BSN_HASH_FIELD_MPLS_LABEL3',
65 32768: 'OFP_BSN_HASH_FIELD_MPLS_LABEL_HI_BITS',
66 65536: 'OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_SRC_IP',
67 131072: 'OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_DST_IP',
68 262144: 'OFP_BSN_HASH_FIELD_SYMMETRIC',
69}
70
71# Identifiers from group of_bsn_hash_packet_type
72OF_BSN_HASH_PACKET_L2 = 0
73OF_BSN_HASH_PACKET_L2GRE = 1
74OF_BSN_HASH_PACKET_IPV4 = 3
75OF_BSN_HASH_PACKET_IPV6 = 4
76OF_BSN_HASH_PACKET_GTP = 5
77OF_BSN_HASH_PACKET_MPLS = 6
78OF_BSN_HASH_PACKET_SYMMETRIC = 7
79
80of_bsn_hash_packet_type_map = {
81 0: 'OF_BSN_HASH_PACKET_L2',
82 1: 'OF_BSN_HASH_PACKET_L2GRE',
83 3: 'OF_BSN_HASH_PACKET_IPV4',
84 4: 'OF_BSN_HASH_PACKET_IPV6',
85 5: 'OF_BSN_HASH_PACKET_GTP',
86 6: 'OF_BSN_HASH_PACKET_MPLS',
87 7: 'OF_BSN_HASH_PACKET_SYMMETRIC',
88}
89
90# Identifiers from group of_bsn_hash_type
91OFP_BSN_HASH_TYPE_L2 = 0
92OFP_BSN_HASH_TYPE_L3 = 1
93OFP_BSN_HASH_TYPE_ENHANCED = 2
94
95of_bsn_hash_type_map = {
96 0: 'OFP_BSN_HASH_TYPE_L2',
97 1: 'OFP_BSN_HASH_TYPE_L3',
98 2: 'OFP_BSN_HASH_TYPE_ENHANCED',
99}
100
101# Identifiers from group of_bsn_lacp_convergence_status
102LACP_SUCCESS = 0
103LACP_TIMEDOUT = 1
104LACP_OUT_OF_SYNC = 2
105
106of_bsn_lacp_convergence_status_map = {
107 0: 'LACP_SUCCESS',
108 1: 'LACP_TIMEDOUT',
109 2: 'LACP_OUT_OF_SYNC',
110}
111
112# Identifiers from group of_bsn_pdu_slot_num
113BSN_PDU_SLOT_NUM_ANY = 255
114
115of_bsn_pdu_slot_num_map = {
116 255: 'BSN_PDU_SLOT_NUM_ANY',
117}
118
119# Identifiers from group of_bsn_vlan_counter
120OFP_BSN_VLAN_COUNTER_RX_BYTES = 0
121OFP_BSN_VLAN_COUNTER_RX_PACKETS = 1
122OFP_BSN_VLAN_COUNTER_TX_BYTES = 2
123OFP_BSN_VLAN_COUNTER_TX_PACKETS = 3
124
125of_bsn_vlan_counter_map = {
126 0: 'OFP_BSN_VLAN_COUNTER_RX_BYTES',
127 1: 'OFP_BSN_VLAN_COUNTER_RX_PACKETS',
128 2: 'OFP_BSN_VLAN_COUNTER_TX_BYTES',
129 3: 'OFP_BSN_VLAN_COUNTER_TX_PACKETS',
130}
131
132# Identifiers from group of_bsn_vrf_counter
133OFP_BSN_VRF_COUNTER_BYTES = 0
134OFP_BSN_VRF_COUNTER_PACKETS = 1
135
136of_bsn_vrf_counter_map = {
137 0: 'OFP_BSN_VRF_COUNTER_BYTES',
138 1: 'OFP_BSN_VRF_COUNTER_PACKETS',
139}
140
141# Identifiers from group ofp_action_type
142OFPAT_OUTPUT = 0
143OFPAT_COPY_TTL_OUT = 11
144OFPAT_COPY_TTL_IN = 12
145OFPAT_SET_MPLS_TTL = 15
146OFPAT_DEC_MPLS_TTL = 16
147OFPAT_PUSH_VLAN = 17
148OFPAT_POP_VLAN = 18
149OFPAT_PUSH_MPLS = 19
150OFPAT_POP_MPLS = 20
151OFPAT_SET_QUEUE = 21
152OFPAT_GROUP = 22
153OFPAT_SET_NW_TTL = 23
154OFPAT_DEC_NW_TTL = 24
155OFPAT_SET_FIELD = 25
156OFPAT_PUSH_PBB = 26
157OFPAT_POP_PBB = 27
158OFPAT_EXPERIMENTER = 65535
159
160ofp_action_type_map = {
161 0: 'OFPAT_OUTPUT',
162 11: 'OFPAT_COPY_TTL_OUT',
163 12: 'OFPAT_COPY_TTL_IN',
164 15: 'OFPAT_SET_MPLS_TTL',
165 16: 'OFPAT_DEC_MPLS_TTL',
166 17: 'OFPAT_PUSH_VLAN',
167 18: 'OFPAT_POP_VLAN',
168 19: 'OFPAT_PUSH_MPLS',
169 20: 'OFPAT_POP_MPLS',
170 21: 'OFPAT_SET_QUEUE',
171 22: 'OFPAT_GROUP',
172 23: 'OFPAT_SET_NW_TTL',
173 24: 'OFPAT_DEC_NW_TTL',
174 25: 'OFPAT_SET_FIELD',
175 26: 'OFPAT_PUSH_PBB',
176 27: 'OFPAT_POP_PBB',
177 65535: 'OFPAT_EXPERIMENTER',
178}
179
180# Identifiers from group ofp_bad_action_code
181OFPBAC_BAD_TYPE = 0
182OFPBAC_BAD_LEN = 1
183OFPBAC_BAD_EXPERIMENTER = 2
184OFPBAC_BAD_EXPERIMENTER_TYPE = 3
185OFPBAC_BAD_OUT_PORT = 4
186OFPBAC_BAD_ARGUMENT = 5
187OFPBAC_EPERM = 6
188OFPBAC_TOO_MANY = 7
189OFPBAC_BAD_QUEUE = 8
190OFPBAC_BAD_OUT_GROUP = 9
191OFPBAC_MATCH_INCONSISTENT = 10
192OFPBAC_UNSUPPORTED_ORDER = 11
193OFPBAC_BAD_TAG = 12
194OFPBAC_BAD_SET_TYPE = 13
195OFPBAC_BAD_SET_LEN = 14
196OFPBAC_BAD_SET_ARGUMENT = 15
197
198ofp_bad_action_code_map = {
199 0: 'OFPBAC_BAD_TYPE',
200 1: 'OFPBAC_BAD_LEN',
201 2: 'OFPBAC_BAD_EXPERIMENTER',
202 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
203 4: 'OFPBAC_BAD_OUT_PORT',
204 5: 'OFPBAC_BAD_ARGUMENT',
205 6: 'OFPBAC_EPERM',
206 7: 'OFPBAC_TOO_MANY',
207 8: 'OFPBAC_BAD_QUEUE',
208 9: 'OFPBAC_BAD_OUT_GROUP',
209 10: 'OFPBAC_MATCH_INCONSISTENT',
210 11: 'OFPBAC_UNSUPPORTED_ORDER',
211 12: 'OFPBAC_BAD_TAG',
212 13: 'OFPBAC_BAD_SET_TYPE',
213 14: 'OFPBAC_BAD_SET_LEN',
214 15: 'OFPBAC_BAD_SET_ARGUMENT',
215}
216
217# Identifiers from group ofp_bad_instruction_code
218OFPBIC_UNKNOWN_INST = 0
219OFPBIC_UNSUP_INST = 1
220OFPBIC_BAD_TABLE_ID = 2
221OFPBIC_UNSUP_METADATA = 3
222OFPBIC_UNSUP_METADATA_MASK = 4
223OFPBIC_BAD_EXPERIMENTER = 5
224OFPBIC_BAD_EXPERIMENTER_TYPE = 6
225OFPBIC_BAD_LEN = 7
226OFPBIC_EPERM = 8
227
228ofp_bad_instruction_code_map = {
229 0: 'OFPBIC_UNKNOWN_INST',
230 1: 'OFPBIC_UNSUP_INST',
231 2: 'OFPBIC_BAD_TABLE_ID',
232 3: 'OFPBIC_UNSUP_METADATA',
233 4: 'OFPBIC_UNSUP_METADATA_MASK',
234 5: 'OFPBIC_BAD_EXPERIMENTER',
235 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
236 7: 'OFPBIC_BAD_LEN',
237 8: 'OFPBIC_EPERM',
238}
239
240# Identifiers from group ofp_bad_match_code
241OFPBMC_BAD_TYPE = 0
242OFPBMC_BAD_LEN = 1
243OFPBMC_BAD_TAG = 2
244OFPBMC_BAD_DL_ADDR_MASK = 3
245OFPBMC_BAD_NW_ADDR_MASK = 4
246OFPBMC_BAD_WILDCARDS = 5
247OFPBMC_BAD_FIELD = 6
248OFPBMC_BAD_VALUE = 7
249OFPBMC_BAD_MASK = 8
250OFPBMC_BAD_PREREQ = 9
251OFPBMC_DUP_FIELD = 10
252OFPBMC_EPERM = 11
253
254ofp_bad_match_code_map = {
255 0: 'OFPBMC_BAD_TYPE',
256 1: 'OFPBMC_BAD_LEN',
257 2: 'OFPBMC_BAD_TAG',
258 3: 'OFPBMC_BAD_DL_ADDR_MASK',
259 4: 'OFPBMC_BAD_NW_ADDR_MASK',
260 5: 'OFPBMC_BAD_WILDCARDS',
261 6: 'OFPBMC_BAD_FIELD',
262 7: 'OFPBMC_BAD_VALUE',
263 8: 'OFPBMC_BAD_MASK',
264 9: 'OFPBMC_BAD_PREREQ',
265 10: 'OFPBMC_DUP_FIELD',
266 11: 'OFPBMC_EPERM',
267}
268
269# Identifiers from group ofp_bad_request_code
270OFPBRC_BAD_VERSION = 0
271OFPBRC_BAD_TYPE = 1
272OFPBRC_BAD_STAT = 2
273OFPBRC_BAD_EXPERIMENTER = 3
274OFPBRC_BAD_EXPERIMENTER_TYPE = 4
275OFPBRC_EPERM = 5
276OFPBRC_BAD_LEN = 6
277OFPBRC_BUFFER_EMPTY = 7
278OFPBRC_BUFFER_UNKNOWN = 8
279OFPBRC_BAD_TABLE_ID = 9
280OFPBRC_IS_SLAVE = 10
281OFPBRC_BAD_PORT = 11
282OFPBRC_BAD_PACKET = 12
283OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
284
285ofp_bad_request_code_map = {
286 0: 'OFPBRC_BAD_VERSION',
287 1: 'OFPBRC_BAD_TYPE',
288 2: 'OFPBRC_BAD_STAT',
289 3: 'OFPBRC_BAD_EXPERIMENTER',
290 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
291 5: 'OFPBRC_EPERM',
292 6: 'OFPBRC_BAD_LEN',
293 7: 'OFPBRC_BUFFER_EMPTY',
294 8: 'OFPBRC_BUFFER_UNKNOWN',
295 9: 'OFPBRC_BAD_TABLE_ID',
296 10: 'OFPBRC_IS_SLAVE',
297 11: 'OFPBRC_BAD_PORT',
298 12: 'OFPBRC_BAD_PACKET',
299 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
300}
301
302# Identifiers from group ofp_bsn_anchor
303OFP_BSN_ANCHOR_PACKET_START = 0
304OFP_BSN_ANCHOR_L3_HEADER_START = 1
305OFP_BSN_ANCHOR_L4_HEADER_START = 2
306OFP_BSN_ANCHOR_L4_PAYLOAD_START = 3
307
308ofp_bsn_anchor_map = {
309 0: 'OFP_BSN_ANCHOR_PACKET_START',
310 1: 'OFP_BSN_ANCHOR_L3_HEADER_START',
311 2: 'OFP_BSN_ANCHOR_L4_HEADER_START',
312 3: 'OFP_BSN_ANCHOR_L4_PAYLOAD_START',
313}
314
315# Identifiers from group ofp_bsn_controller_connection_state
316OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0
317OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1
318
319ofp_bsn_controller_connection_state_map = {
320 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED',
321 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED',
322}
323
324# Identifiers from group ofp_bsn_controller_role_reason
325OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST = 0
326OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG = 1
327OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER = 2
328
329ofp_bsn_controller_role_reason_map = {
330 0: 'OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST',
331 1: 'OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG',
332 2: 'OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER',
333}
334
335# Identifiers from group ofp_bsn_decap
336OFP_BSN_DECAP_VXLAN = 0
337OFP_BSN_DECAP_ERSPAN = 1
338OFP_BSN_DECAP_L2_GRE = 2
339OFP_BSN_DECAP_NVGRE = 3
340OFP_BSN_DECAP_CAPWAP = 4
341OFP_BSN_DECAP_L2_MPLS = 5
342OFP_BSN_DECAP_L3_GRE = 6
343OFP_BSN_DECAP_GTP = 7
344OFP_BSN_DECAP_L3_MPLS = 8
345
346ofp_bsn_decap_map = {
347 0: 'OFP_BSN_DECAP_VXLAN',
348 1: 'OFP_BSN_DECAP_ERSPAN',
349 2: 'OFP_BSN_DECAP_L2_GRE',
350 3: 'OFP_BSN_DECAP_NVGRE',
351 4: 'OFP_BSN_DECAP_CAPWAP',
352 5: 'OFP_BSN_DECAP_L2_MPLS',
353 6: 'OFP_BSN_DECAP_L3_GRE',
354 7: 'OFP_BSN_DECAP_GTP',
355 8: 'OFP_BSN_DECAP_L3_MPLS',
356}
357
358# Identifiers from group ofp_bsn_lacp_state
359OFP_BSN_LACP_STATE_ACTIVITY = 1
360OFP_BSN_LACP_STATE_TIMEOUT = 2
361OFP_BSN_LACP_STATE_AGGREGATION = 4
362OFP_BSN_LACP_STATE_SYNCHRONIZATION = 8
363OFP_BSN_LACP_STATE_COLLECTING = 16
364OFP_BSN_LACP_STATE_DISTRIBUTING = 32
365OFP_BSN_LACP_STATE_DEFAULTED = 64
366OFP_BSN_LACP_STATE_EXPIRED = 128
367
368ofp_bsn_lacp_state_map = {
369 1: 'OFP_BSN_LACP_STATE_ACTIVITY',
370 2: 'OFP_BSN_LACP_STATE_TIMEOUT',
371 4: 'OFP_BSN_LACP_STATE_AGGREGATION',
372 8: 'OFP_BSN_LACP_STATE_SYNCHRONIZATION',
373 16: 'OFP_BSN_LACP_STATE_COLLECTING',
374 32: 'OFP_BSN_LACP_STATE_DISTRIBUTING',
375 64: 'OFP_BSN_LACP_STATE_DEFAULTED',
376 128: 'OFP_BSN_LACP_STATE_EXPIRED',
377}
378
379# Identifiers from group ofp_bsn_loglevel
380OFP_BSN_LOGLEVEL_MSG = 0
381OFP_BSN_LOGLEVEL_ERROR = 1
382OFP_BSN_LOGLEVEL_WARN = 2
383OFP_BSN_LOGLEVEL_INFO = 3
384OFP_BSN_LOGLEVEL_VERBOSE = 4
385OFP_BSN_LOGLEVEL_TRACE = 5
386
387ofp_bsn_loglevel_map = {
388 0: 'OFP_BSN_LOGLEVEL_MSG',
389 1: 'OFP_BSN_LOGLEVEL_ERROR',
390 2: 'OFP_BSN_LOGLEVEL_WARN',
391 3: 'OFP_BSN_LOGLEVEL_INFO',
392 4: 'OFP_BSN_LOGLEVEL_VERBOSE',
393 5: 'OFP_BSN_LOGLEVEL_TRACE',
394}
395
396# Identifiers from group ofp_bsn_lua_upload_flags
397OFP_BSN_LUA_UPLOAD_MORE = 1
398OFP_BSN_LUA_UPLOAD_FORCE = 2
399
400ofp_bsn_lua_upload_flags_map = {
401 1: 'OFP_BSN_LUA_UPLOAD_MORE',
402 2: 'OFP_BSN_LUA_UPLOAD_FORCE',
403}
404
405# Identifiers from group ofp_bsn_pktin_flag
406OFP_BSN_PKTIN_FLAG_PDU = 1
407OFP_BSN_PKTIN_FLAG_NEW_HOST = 2
408OFP_BSN_PKTIN_FLAG_STATION_MOVE = 4
409OFP_BSN_PKTIN_FLAG_ARP = 8
410OFP_BSN_PKTIN_FLAG_DHCP = 16
411OFP_BSN_PKTIN_FLAG_L2_CPU = 32
412OFP_BSN_PKTIN_FLAG_DEBUG = 64
413OFP_BSN_PKTIN_FLAG_TTL_EXPIRED = 128
414OFP_BSN_PKTIN_FLAG_L3_MISS = 256
415OFP_BSN_PKTIN_FLAG_L3_CPU = 512
416OFP_BSN_PKTIN_FLAG_INGRESS_ACL = 1024
417OFP_BSN_PKTIN_FLAG_SFLOW = 2048
418OFP_BSN_PKTIN_FLAG_ARP_CACHE = 4096
419OFP_BSN_PKTIN_FLAG_ARP_TARGET = 8192
420OFP_BSN_PKTIN_FLAG_IGMP = 16384
421OFP_BSN_PKTIN_FLAG_PIM = 32768
422OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS = 65536
423OFP_BSN_PKTIN_FLAG_MC_RESERVED = 131072
424
425ofp_bsn_pktin_flag_map = {
426 1: 'OFP_BSN_PKTIN_FLAG_PDU',
427 2: 'OFP_BSN_PKTIN_FLAG_NEW_HOST',
428 4: 'OFP_BSN_PKTIN_FLAG_STATION_MOVE',
429 8: 'OFP_BSN_PKTIN_FLAG_ARP',
430 16: 'OFP_BSN_PKTIN_FLAG_DHCP',
431 32: 'OFP_BSN_PKTIN_FLAG_L2_CPU',
432 64: 'OFP_BSN_PKTIN_FLAG_DEBUG',
433 128: 'OFP_BSN_PKTIN_FLAG_TTL_EXPIRED',
434 256: 'OFP_BSN_PKTIN_FLAG_L3_MISS',
435 512: 'OFP_BSN_PKTIN_FLAG_L3_CPU',
436 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL',
437 2048: 'OFP_BSN_PKTIN_FLAG_SFLOW',
438 4096: 'OFP_BSN_PKTIN_FLAG_ARP_CACHE',
439 8192: 'OFP_BSN_PKTIN_FLAG_ARP_TARGET',
440 16384: 'OFP_BSN_PKTIN_FLAG_IGMP',
441 32768: 'OFP_BSN_PKTIN_FLAG_PIM',
442 65536: 'OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS',
443 131072: 'OFP_BSN_PKTIN_FLAG_MC_RESERVED',
444}
445
446# Identifiers from group ofp_bsn_port_counter
447OFP_BSN_PORT_COUNTER_RX_BYTES = 0
448OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1
449OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2
450OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3
451OFP_BSN_PORT_COUNTER_RX_DROPPED = 4
452OFP_BSN_PORT_COUNTER_RX_ERRORS = 5
453OFP_BSN_PORT_COUNTER_TX_BYTES = 6
454OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7
455OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8
456OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9
457OFP_BSN_PORT_COUNTER_TX_DROPPED = 10
458OFP_BSN_PORT_COUNTER_TX_ERRORS = 11
459OFP_BSN_PORT_COUNTER_RX_RUNTS = 12
460OFP_BSN_PORT_COUNTER_RX_GIANTS = 13
461OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS = 14
462OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS = 15
463OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS = 16
464OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT = 17
465OFP_BSN_PORT_COUNTER_TX_COLLISIONS = 18
466OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS = 19
467OFP_BSN_PORT_COUNTER_TX_DEFERRED = 20
468OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT = 21
469OFP_BSN_PORT_COUNTER_RX_PACKETS = 22
470OFP_BSN_PORT_COUNTER_TX_PACKETS = 23
471OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS = 24
472OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
473OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
474OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27
475OFP_BSN_PORT_COUNTER_LINK_UP = 28
476OFP_BSN_PORT_COUNTER_LINK_DOWN = 29
477
478ofp_bsn_port_counter_map = {
479 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
480 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST',
481 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST',
482 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST',
483 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED',
484 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS',
485 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES',
486 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST',
487 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST',
488 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST',
489 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED',
490 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS',
491 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS',
492 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS',
493 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS',
494 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS',
495 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS',
496 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT',
497 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS',
498 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS',
499 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED',
500 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT',
501 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS',
502 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS',
503 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS',
504 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
505 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
506 27: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN',
507 28: 'OFP_BSN_PORT_COUNTER_LINK_UP',
508 29: 'OFP_BSN_PORT_COUNTER_LINK_DOWN',
509}
510
511# Identifiers from group ofp_bsn_port_vxlan_mode
512OFP_BSN_PORT_VXLAN_RECIRCULATION_ENABLE = 0
513OFP_BSN_PORT_VXLAN_TERMINATION_ENABLE = 1
514
515ofp_bsn_port_vxlan_mode_map = {
516 0: 'OFP_BSN_PORT_VXLAN_RECIRCULATION_ENABLE',
517 1: 'OFP_BSN_PORT_VXLAN_TERMINATION_ENABLE',
518}
519
520# Identifiers from group ofp_bsn_rate_unit
521OFP_BSN_RATE_UNIT_PPS = 0
522OFP_BSN_RATE_UNIT_KBITPS = 1
523
524ofp_bsn_rate_unit_map = {
525 0: 'OFP_BSN_RATE_UNIT_PPS',
526 1: 'OFP_BSN_RATE_UNIT_KBITPS',
527}
528
529# Identifiers from group ofp_bsn_status
530OFP_BSN_STATUS_DISABLE = 0
531OFP_BSN_STATUS_ENABLE = 1
532
533ofp_bsn_status_map = {
534 0: 'OFP_BSN_STATUS_DISABLE',
535 1: 'OFP_BSN_STATUS_ENABLE',
536}
537
538# Identifiers from group ofp_bsn_tcp_flag
539OFP_BSN_TCP_FLAG_FIN = 1
540OFP_BSN_TCP_FLAG_SYN = 2
541OFP_BSN_TCP_FLAG_RST = 4
542OFP_BSN_TCP_FLAG_PSH = 8
543OFP_BSN_TCP_FLAG_ACK = 16
544OFP_BSN_TCP_FLAG_URG = 32
545OFP_BSN_TCP_FLAG_ECE = 64
546OFP_BSN_TCP_FLAG_CWR = 128
547OFP_BSN_TCP_FLAG_NS = 256
548
549ofp_bsn_tcp_flag_map = {
550 1: 'OFP_BSN_TCP_FLAG_FIN',
551 2: 'OFP_BSN_TCP_FLAG_SYN',
552 4: 'OFP_BSN_TCP_FLAG_RST',
553 8: 'OFP_BSN_TCP_FLAG_PSH',
554 16: 'OFP_BSN_TCP_FLAG_ACK',
555 32: 'OFP_BSN_TCP_FLAG_URG',
556 64: 'OFP_BSN_TCP_FLAG_ECE',
557 128: 'OFP_BSN_TCP_FLAG_CWR',
558 256: 'OFP_BSN_TCP_FLAG_NS',
559}
560
561# Identifiers from group ofp_bsn_udf_anchor
562OFP_BSN_UDF_ANCHOR_PACKET_START = 0
563OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1
564OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2
565
566ofp_bsn_udf_anchor_map = {
567 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START',
568 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START',
569 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START',
570}
571
572# Identifiers from group ofp_bsn_vlan_counter_constants
573OFP_BSN_VLAN_ALL = 65535
574
575ofp_bsn_vlan_counter_constants_map = {
576 65535: 'OFP_BSN_VLAN_ALL',
577}
578
579# Identifiers from group ofp_bsn_vport_l2gre_flags
580OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
581OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
582OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
583OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
584OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
585
586ofp_bsn_vport_l2gre_flags_map = {
587 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
588 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
589 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
590 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
591 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
592}
593
594# Identifiers from group ofp_bsn_vport_q_in_q_untagged
595OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
596
597ofp_bsn_vport_q_in_q_untagged_map = {
598 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
599}
600
601# Identifiers from group ofp_bsn_vport_status
602OF_BSN_VPORT_STATUS_OK = 0
603OF_BSN_VPORT_STATUS_FAILED = 1
604
605ofp_bsn_vport_status_map = {
606 0: 'OF_BSN_VPORT_STATUS_OK',
607 1: 'OF_BSN_VPORT_STATUS_FAILED',
608}
609
610# Identifiers from group ofp_bsn_vrf_counter_constants
611OFP_BSN_VRF_ALL = 4294967295
612
613ofp_bsn_vrf_counter_constants_map = {
614 4294967295: 'OFP_BSN_VRF_ALL',
615}
616
617# Identifiers from group ofp_capabilities
618OFPC_FLOW_STATS = 1
619OFPC_TABLE_STATS = 2
620OFPC_PORT_STATS = 4
621OFPC_GROUP_STATS = 8
622OFPC_IP_REASM = 32
623OFPC_QUEUE_STATS = 64
624OFPC_PORT_BLOCKED = 256
625
626ofp_capabilities_map = {
627 1: 'OFPC_FLOW_STATS',
628 2: 'OFPC_TABLE_STATS',
629 4: 'OFPC_PORT_STATS',
630 8: 'OFPC_GROUP_STATS',
631 32: 'OFPC_IP_REASM',
632 64: 'OFPC_QUEUE_STATS',
633 256: 'OFPC_PORT_BLOCKED',
634}
635
636# Identifiers from group ofp_config_flags
637OFPC_FRAG_NORMAL = 0
638OFPC_FRAG_DROP = 1
639OFPC_FRAG_REASM = 2
640OFPC_FRAG_MASK = 3
641
642ofp_config_flags_map = {
643 0: 'OFPC_FRAG_NORMAL',
644 1: 'OFPC_FRAG_DROP',
645 2: 'OFPC_FRAG_REASM',
646 3: 'OFPC_FRAG_MASK',
647}
648
649# Identifiers from group ofp_controller_max_len
650OFPCML_MAX = 65509
651OFPCML_NO_BUFFER = 65535
652
653ofp_controller_max_len_map = {
654 65509: 'OFPCML_MAX',
655 65535: 'OFPCML_NO_BUFFER',
656}
657
658# Identifiers from group ofp_controller_role
659OFPCR_ROLE_NOCHANGE = 0
660OFPCR_ROLE_EQUAL = 1
661OFPCR_ROLE_MASTER = 2
662OFPCR_ROLE_SLAVE = 3
663
664ofp_controller_role_map = {
665 0: 'OFPCR_ROLE_NOCHANGE',
666 1: 'OFPCR_ROLE_EQUAL',
667 2: 'OFPCR_ROLE_MASTER',
668 3: 'OFPCR_ROLE_SLAVE',
669}
670
671# Identifiers from group ofp_error_type
672OFPET_HELLO_FAILED = 0
673OFPET_BAD_REQUEST = 1
674OFPET_BAD_ACTION = 2
675OFPET_BAD_INSTRUCTION = 3
676OFPET_BAD_MATCH = 4
677OFPET_FLOW_MOD_FAILED = 5
678OFPET_GROUP_MOD_FAILED = 6
679OFPET_PORT_MOD_FAILED = 7
680OFPET_TABLE_MOD_FAILED = 8
681OFPET_QUEUE_OP_FAILED = 9
682OFPET_SWITCH_CONFIG_FAILED = 10
683OFPET_ROLE_REQUEST_FAILED = 11
684OFPET_METER_MOD_FAILED = 12
685OFPET_TABLE_FEATURES_FAILED = 13
686OFPET_EXPERIMENTER = 65535
687
688ofp_error_type_map = {
689 0: 'OFPET_HELLO_FAILED',
690 1: 'OFPET_BAD_REQUEST',
691 2: 'OFPET_BAD_ACTION',
692 3: 'OFPET_BAD_INSTRUCTION',
693 4: 'OFPET_BAD_MATCH',
694 5: 'OFPET_FLOW_MOD_FAILED',
695 6: 'OFPET_GROUP_MOD_FAILED',
696 7: 'OFPET_PORT_MOD_FAILED',
697 8: 'OFPET_TABLE_MOD_FAILED',
698 9: 'OFPET_QUEUE_OP_FAILED',
699 10: 'OFPET_SWITCH_CONFIG_FAILED',
700 11: 'OFPET_ROLE_REQUEST_FAILED',
701 12: 'OFPET_METER_MOD_FAILED',
702 13: 'OFPET_TABLE_FEATURES_FAILED',
703 65535: 'OFPET_EXPERIMENTER',
704}
705
706# Identifiers from group ofp_flow_mod_command
707OFPFC_ADD = 0
708OFPFC_MODIFY = 1
709OFPFC_MODIFY_STRICT = 2
710OFPFC_DELETE = 3
711OFPFC_DELETE_STRICT = 4
712
713ofp_flow_mod_command_map = {
714 0: 'OFPFC_ADD',
715 1: 'OFPFC_MODIFY',
716 2: 'OFPFC_MODIFY_STRICT',
717 3: 'OFPFC_DELETE',
718 4: 'OFPFC_DELETE_STRICT',
719}
720
721# Identifiers from group ofp_flow_mod_failed_code
722OFPFMFC_UNKNOWN = 0
723OFPFMFC_TABLE_FULL = 1
724OFPFMFC_BAD_TABLE_ID = 2
725OFPFMFC_OVERLAP = 3
726OFPFMFC_EPERM = 4
727OFPFMFC_BAD_TIMEOUT = 5
728OFPFMFC_BAD_COMMAND = 6
729OFPFMFC_BAD_FLAGS = 7
730
731ofp_flow_mod_failed_code_map = {
732 0: 'OFPFMFC_UNKNOWN',
733 1: 'OFPFMFC_TABLE_FULL',
734 2: 'OFPFMFC_BAD_TABLE_ID',
735 3: 'OFPFMFC_OVERLAP',
736 4: 'OFPFMFC_EPERM',
737 5: 'OFPFMFC_BAD_TIMEOUT',
738 6: 'OFPFMFC_BAD_COMMAND',
739 7: 'OFPFMFC_BAD_FLAGS',
740}
741
742# Identifiers from group ofp_flow_mod_flags
743OFPFF_SEND_FLOW_REM = 1
744OFPFF_CHECK_OVERLAP = 2
745OFPFF_RESET_COUNTS = 4
746OFPFF_NO_PKT_COUNTS = 8
747OFPFF_NO_BYT_COUNTS = 16
748OFPFF_BSN_SEND_IDLE = 128
749
750ofp_flow_mod_flags_map = {
751 1: 'OFPFF_SEND_FLOW_REM',
752 2: 'OFPFF_CHECK_OVERLAP',
753 4: 'OFPFF_RESET_COUNTS',
754 8: 'OFPFF_NO_PKT_COUNTS',
755 16: 'OFPFF_NO_BYT_COUNTS',
756 128: 'OFPFF_BSN_SEND_IDLE',
757}
758
759# Identifiers from group ofp_flow_removed_reason
760OFPRR_IDLE_TIMEOUT = 0
761OFPRR_HARD_TIMEOUT = 1
762OFPRR_DELETE = 2
763OFPRR_GROUP_DELETE = 3
764
765ofp_flow_removed_reason_map = {
766 0: 'OFPRR_IDLE_TIMEOUT',
767 1: 'OFPRR_HARD_TIMEOUT',
768 2: 'OFPRR_DELETE',
769 3: 'OFPRR_GROUP_DELETE',
770}
771
772# Identifiers from group ofp_group
773OFPG_MAX = 4294967040
774OFPG_ALL = 4294967292
775OFPG_ANY = 4294967295
776
777ofp_group_map = {
778 4294967040: 'OFPG_MAX',
779 4294967292: 'OFPG_ALL',
780 4294967295: 'OFPG_ANY',
781}
782
783# Identifiers from group ofp_group_capabilities
784OFPGFC_SELECT_WEIGHT = 1
785OFPGFC_SELECT_LIVENESS = 2
786OFPGFC_CHAINING = 4
787OFPGFC_CHAINING_CHECKS = 8
788
789ofp_group_capabilities_map = {
790 1: 'OFPGFC_SELECT_WEIGHT',
791 2: 'OFPGFC_SELECT_LIVENESS',
792 4: 'OFPGFC_CHAINING',
793 8: 'OFPGFC_CHAINING_CHECKS',
794}
795
796# Identifiers from group ofp_group_mod_command
797OFPGC_ADD = 0
798OFPGC_MODIFY = 1
799OFPGC_DELETE = 2
800
801ofp_group_mod_command_map = {
802 0: 'OFPGC_ADD',
803 1: 'OFPGC_MODIFY',
804 2: 'OFPGC_DELETE',
805}
806
807# Identifiers from group ofp_group_mod_failed_code
808OFPGMFC_GROUP_EXISTS = 0
809OFPGMFC_INVALID_GROUP = 1
810OFPGMFC_WEIGHT_UNSUPPORTED = 2
811OFPGMFC_OUT_OF_GROUPS = 3
812OFPGMFC_OUT_OF_BUCKETS = 4
813OFPGMFC_CHAINING_UNSUPPORTED = 5
814OFPGMFC_WATCH_UNSUPPORTED = 6
815OFPGMFC_LOOP = 7
816OFPGMFC_UNKNOWN_GROUP = 8
817OFPGMFC_CHAINED_GROUP = 9
818OFPGMFC_BAD_TYPE = 10
819OFPGMFC_BAD_COMMAND = 11
820OFPGMFC_BAD_BUCKET = 12
821OFPGMFC_BAD_WATCH = 13
822OFPGMFC_EPERM = 14
823
824ofp_group_mod_failed_code_map = {
825 0: 'OFPGMFC_GROUP_EXISTS',
826 1: 'OFPGMFC_INVALID_GROUP',
827 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
828 3: 'OFPGMFC_OUT_OF_GROUPS',
829 4: 'OFPGMFC_OUT_OF_BUCKETS',
830 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
831 6: 'OFPGMFC_WATCH_UNSUPPORTED',
832 7: 'OFPGMFC_LOOP',
833 8: 'OFPGMFC_UNKNOWN_GROUP',
834 9: 'OFPGMFC_CHAINED_GROUP',
835 10: 'OFPGMFC_BAD_TYPE',
836 11: 'OFPGMFC_BAD_COMMAND',
837 12: 'OFPGMFC_BAD_BUCKET',
838 13: 'OFPGMFC_BAD_WATCH',
839 14: 'OFPGMFC_EPERM',
840}
841
842# Identifiers from group ofp_group_type
843OFPGT_ALL = 0
844OFPGT_SELECT = 1
845OFPGT_INDIRECT = 2
846OFPGT_FF = 3
847
848ofp_group_type_map = {
849 0: 'OFPGT_ALL',
850 1: 'OFPGT_SELECT',
851 2: 'OFPGT_INDIRECT',
852 3: 'OFPGT_FF',
853}
854
855# Identifiers from group ofp_hello_elem_type
856OFPHET_VERSIONBITMAP = 1
857
858ofp_hello_elem_type_map = {
859 1: 'OFPHET_VERSIONBITMAP',
860}
861
862# Identifiers from group ofp_hello_failed_code
863OFPHFC_INCOMPATIBLE = 0
864OFPHFC_EPERM = 1
865
866ofp_hello_failed_code_map = {
867 0: 'OFPHFC_INCOMPATIBLE',
868 1: 'OFPHFC_EPERM',
869}
870
871# Identifiers from group ofp_instruction_type
872OFPIT_GOTO_TABLE = 1
873OFPIT_WRITE_METADATA = 2
874OFPIT_WRITE_ACTIONS = 3
875OFPIT_APPLY_ACTIONS = 4
876OFPIT_CLEAR_ACTIONS = 5
877OFPIT_METER = 6
878OFPIT_EXPERIMENTER = 65535
879
880ofp_instruction_type_map = {
881 1: 'OFPIT_GOTO_TABLE',
882 2: 'OFPIT_WRITE_METADATA',
883 3: 'OFPIT_WRITE_ACTIONS',
884 4: 'OFPIT_APPLY_ACTIONS',
885 5: 'OFPIT_CLEAR_ACTIONS',
886 6: 'OFPIT_METER',
887 65535: 'OFPIT_EXPERIMENTER',
888}
889
890# Identifiers from group ofp_ipv6exthdr_flags
891OFPIEH_NONEXT = 1
892OFPIEH_ESP = 2
893OFPIEH_AUTH = 4
894OFPIEH_DEST = 8
895OFPIEH_FRAG = 16
896OFPIEH_ROUTER = 32
897OFPIEH_HOP = 64
898OFPIEH_UNREP = 128
899OFPIEH_UNSEQ = 256
900
901ofp_ipv6exthdr_flags_map = {
902 1: 'OFPIEH_NONEXT',
903 2: 'OFPIEH_ESP',
904 4: 'OFPIEH_AUTH',
905 8: 'OFPIEH_DEST',
906 16: 'OFPIEH_FRAG',
907 32: 'OFPIEH_ROUTER',
908 64: 'OFPIEH_HOP',
909 128: 'OFPIEH_UNREP',
910 256: 'OFPIEH_UNSEQ',
911}
912
913# Identifiers from group ofp_match_type
914OFPMT_STANDARD = 0
915OFPMT_OXM = 1
916
917ofp_match_type_map = {
918 0: 'OFPMT_STANDARD',
919 1: 'OFPMT_OXM',
920}
921
922# Identifiers from group ofp_meter
923OFPM_MAX = 4294901760
924OFPM_SLOWPATH = 4294967293
925OFPM_CONTROLLER = 4294967294
926OFPM_ALL = 4294967295
927
928ofp_meter_map = {
929 4294901760: 'OFPM_MAX',
930 4294967293: 'OFPM_SLOWPATH',
931 4294967294: 'OFPM_CONTROLLER',
932 4294967295: 'OFPM_ALL',
933}
934
935# Identifiers from group ofp_meter_band_type
936OFPMBT_DROP = 1
937OFPMBT_DSCP_REMARK = 2
938OFPMBT_EXPERIMENTER = 65535
939
940ofp_meter_band_type_map = {
941 1: 'OFPMBT_DROP',
942 2: 'OFPMBT_DSCP_REMARK',
943 65535: 'OFPMBT_EXPERIMENTER',
944}
945
946# Identifiers from group ofp_meter_flags
947OFPMF_KBPS = 1
948OFPMF_PKTPS = 2
949OFPMF_BURST = 4
950OFPMF_STATS = 8
951
952ofp_meter_flags_map = {
953 1: 'OFPMF_KBPS',
954 2: 'OFPMF_PKTPS',
955 4: 'OFPMF_BURST',
956 8: 'OFPMF_STATS',
957}
958
959# Identifiers from group ofp_meter_mod_command
960OFPMC_ADD = 0
961OFPMC_MODIFY = 1
962OFPMC_DELETE = 2
963
964ofp_meter_mod_command_map = {
965 0: 'OFPMC_ADD',
966 1: 'OFPMC_MODIFY',
967 2: 'OFPMC_DELETE',
968}
969
970# Identifiers from group ofp_meter_mod_failed_code
971OFPMMFC_UNKNOWN = 0
972OFPMMFC_METER_EXISTS = 1
973OFPMMFC_INVALID_METER = 2
974OFPMMFC_UNKNOWN_METER = 3
975OFPMMFC_BAD_COMMAND = 4
976OFPMMFC_BAD_FLAGS = 5
977OFPMMFC_BAD_RATE = 6
978OFPMMFC_BAD_BURST = 7
979OFPMMFC_BAD_BAND = 8
980OFPMMFC_BAD_BAND_VALUE = 9
981OFPMMFC_OUT_OF_METERS = 10
982OFPMMFC_OUT_OF_BANDS = 11
983
984ofp_meter_mod_failed_code_map = {
985 0: 'OFPMMFC_UNKNOWN',
986 1: 'OFPMMFC_METER_EXISTS',
987 2: 'OFPMMFC_INVALID_METER',
988 3: 'OFPMMFC_UNKNOWN_METER',
989 4: 'OFPMMFC_BAD_COMMAND',
990 5: 'OFPMMFC_BAD_FLAGS',
991 6: 'OFPMMFC_BAD_RATE',
992 7: 'OFPMMFC_BAD_BURST',
993 8: 'OFPMMFC_BAD_BAND',
994 9: 'OFPMMFC_BAD_BAND_VALUE',
995 10: 'OFPMMFC_OUT_OF_METERS',
996 11: 'OFPMMFC_OUT_OF_BANDS',
997}
998
999# Identifiers from group ofp_oxm_class
1000OFPXMC_NXM_0 = 0
1001OFPXMC_NXM_1 = 1
1002OFPXMC_OPENFLOW_BASIC = 32768
1003OFPXMC_EXPERIMENTER = 65535
1004
1005ofp_oxm_class_map = {
1006 0: 'OFPXMC_NXM_0',
1007 1: 'OFPXMC_NXM_1',
1008 32768: 'OFPXMC_OPENFLOW_BASIC',
1009 65535: 'OFPXMC_EXPERIMENTER',
1010}
1011
1012# Identifiers from group ofp_packet_in_reason
1013OFPR_NO_MATCH = 0
1014OFPR_ACTION = 1
1015OFPR_INVALID_TTL = 2
1016OFPR_BSN_NEW_HOST = 128
1017OFPR_BSN_STATION_MOVE = 129
1018OFPR_BSN_BAD_VLAN = 130
1019OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
1020OFPR_BSN_NO_ROUTE = 132
1021OFPR_BSN_ICMP_ECHO_REQUEST = 133
1022OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
1023OFPR_BSN_DEST_HOST_UNREACHABLE = 135
1024OFPR_BSN_DEST_PORT_UNREACHABLE = 136
1025OFPR_BSN_FRAGMENTATION_REQUIRED = 137
1026OFPR_BSN_ARP = 139
1027OFPR_BSN_DHCP = 140
1028OFPR_BSN_DEBUG = 141
1029OFPR_BSN_PACKET_OF_DEATH = 142
1030
1031ofp_packet_in_reason_map = {
1032 0: 'OFPR_NO_MATCH',
1033 1: 'OFPR_ACTION',
1034 2: 'OFPR_INVALID_TTL',
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
1106OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648
1107
1108ofp_port_features_map = {
1109 1: 'OFPPF_10MB_HD',
1110 2: 'OFPPF_10MB_FD',
1111 4: 'OFPPF_100MB_HD',
1112 8: 'OFPPF_100MB_FD',
1113 16: 'OFPPF_1GB_HD',
1114 32: 'OFPPF_1GB_FD',
1115 64: 'OFPPF_10GB_FD',
1116 128: 'OFPPF_40GB_FD',
1117 256: 'OFPPF_100GB_FD',
1118 512: 'OFPPF_1TB_FD',
1119 1024: 'OFPPF_OTHER',
1120 2048: 'OFPPF_COPPER',
1121 4096: 'OFPPF_FIBER',
1122 8192: 'OFPPF_AUTONEG',
1123 16384: 'OFPPF_PAUSE',
1124 32768: 'OFPPF_PAUSE_ASYM',
1125 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE',
1126}
1127
1128# Identifiers from group ofp_port_mod_failed_code
1129OFPPMFC_BAD_PORT = 0
1130OFPPMFC_BAD_HW_ADDR = 1
1131OFPPMFC_BAD_CONFIG = 2
1132OFPPMFC_BAD_ADVERTISE = 3
1133OFPPMFC_EPERM = 4
1134
1135ofp_port_mod_failed_code_map = {
1136 0: 'OFPPMFC_BAD_PORT',
1137 1: 'OFPPMFC_BAD_HW_ADDR',
1138 2: 'OFPPMFC_BAD_CONFIG',
1139 3: 'OFPPMFC_BAD_ADVERTISE',
1140 4: 'OFPPMFC_EPERM',
1141}
1142
1143# Identifiers from group ofp_port_reason
1144OFPPR_ADD = 0
1145OFPPR_DELETE = 1
1146OFPPR_MODIFY = 2
1147
1148ofp_port_reason_map = {
1149 0: 'OFPPR_ADD',
1150 1: 'OFPPR_DELETE',
1151 2: 'OFPPR_MODIFY',
1152}
1153
1154# Identifiers from group ofp_port_state
1155OFPPS_LINK_DOWN = 1
1156OFPPS_BLOCKED = 2
1157OFPPS_LIVE = 4
1158
1159ofp_port_state_map = {
1160 1: 'OFPPS_LINK_DOWN',
1161 2: 'OFPPS_BLOCKED',
1162 4: 'OFPPS_LIVE',
1163}
1164
1165# Identifiers from group ofp_queue_op_failed_code
1166OFPQOFC_BAD_PORT = 0
1167OFPQOFC_BAD_QUEUE = 1
1168OFPQOFC_EPERM = 2
1169
1170ofp_queue_op_failed_code_map = {
1171 0: 'OFPQOFC_BAD_PORT',
1172 1: 'OFPQOFC_BAD_QUEUE',
1173 2: 'OFPQOFC_EPERM',
1174}
1175
1176# Identifiers from group ofp_queue_properties
1177OFPQT_MIN_RATE = 1
1178OFPQT_MAX_RATE = 2
1179OFPQT_EXPERIMENTER = 65535
1180
1181ofp_queue_properties_map = {
1182 1: 'OFPQT_MIN_RATE',
1183 2: 'OFPQT_MAX_RATE',
1184 65535: 'OFPQT_EXPERIMENTER',
1185}
1186
1187# Identifiers from group ofp_role_request_failed_code
1188OFPRRFC_STALE = 0
1189OFPRRFC_UNSUP = 1
1190OFPRRFC_BAD_ROLE = 2
1191
1192ofp_role_request_failed_code_map = {
1193 0: 'OFPRRFC_STALE',
1194 1: 'OFPRRFC_UNSUP',
1195 2: 'OFPRRFC_BAD_ROLE',
1196}
1197
1198# Identifiers from group ofp_stats_reply_flags
1199OFPSF_REPLY_MORE = 1
1200
1201ofp_stats_reply_flags_map = {
1202 1: 'OFPSF_REPLY_MORE',
1203}
1204
1205# Identifiers from group ofp_stats_request_flags
1206OFPSF_REQ_MORE = 1
1207
1208ofp_stats_request_flags_map = {
1209 1: 'OFPSF_REQ_MORE',
1210}
1211
1212# Identifiers from group ofp_stats_type
1213OFPST_DESC = 0
1214OFPST_FLOW = 1
1215OFPST_AGGREGATE = 2
1216OFPST_TABLE = 3
1217OFPST_PORT = 4
1218OFPST_QUEUE = 5
1219OFPST_GROUP = 6
1220OFPST_GROUP_DESC = 7
1221OFPST_GROUP_FEATURES = 8
1222OFPST_METER = 9
1223OFPST_METER_CONFIG = 10
1224OFPST_METER_FEATURES = 11
1225OFPST_TABLE_FEATURES = 12
1226OFPST_PORT_DESC = 13
1227OFPST_EXPERIMENTER = 65535
1228
1229ofp_stats_type_map = {
1230 0: 'OFPST_DESC',
1231 1: 'OFPST_FLOW',
1232 2: 'OFPST_AGGREGATE',
1233 3: 'OFPST_TABLE',
1234 4: 'OFPST_PORT',
1235 5: 'OFPST_QUEUE',
1236 6: 'OFPST_GROUP',
1237 7: 'OFPST_GROUP_DESC',
1238 8: 'OFPST_GROUP_FEATURES',
1239 9: 'OFPST_METER',
1240 10: 'OFPST_METER_CONFIG',
1241 11: 'OFPST_METER_FEATURES',
1242 12: 'OFPST_TABLE_FEATURES',
1243 13: 'OFPST_PORT_DESC',
1244 65535: 'OFPST_EXPERIMENTER',
1245}
1246
1247# Identifiers from group ofp_switch_config_failed_code
1248OFPSCFC_BAD_FLAGS = 0
1249OFPSCFC_BAD_LEN = 1
1250OFPSCFC_EPERM = 2
1251
1252ofp_switch_config_failed_code_map = {
1253 0: 'OFPSCFC_BAD_FLAGS',
1254 1: 'OFPSCFC_BAD_LEN',
1255 2: 'OFPSCFC_EPERM',
1256}
1257
1258# Identifiers from group ofp_table
1259OFPTT_MAX = 254
1260OFPTT_ALL = 255
1261
1262ofp_table_map = {
1263 254: 'OFPTT_MAX',
1264 255: 'OFPTT_ALL',
1265}
1266
1267# Identifiers from group ofp_table_config
1268OFPTC_DEPRECATED_MASK = 3
1269
1270ofp_table_config_map = {
1271 3: 'OFPTC_DEPRECATED_MASK',
1272}
1273
1274# Identifiers from group ofp_table_feature_prop_type
1275OFPTFPT_INSTRUCTIONS = 0
1276OFPTFPT_INSTRUCTIONS_MISS = 1
1277OFPTFPT_NEXT_TABLES = 2
1278OFPTFPT_NEXT_TABLES_MISS = 3
1279OFPTFPT_WRITE_ACTIONS = 4
1280OFPTFPT_WRITE_ACTIONS_MISS = 5
1281OFPTFPT_APPLY_ACTIONS = 6
1282OFPTFPT_APPLY_ACTIONS_MISS = 7
1283OFPTFPT_MATCH = 8
1284OFPTFPT_WILDCARDS = 10
1285OFPTFPT_WRITE_SETFIELD = 12
1286OFPTFPT_WRITE_SETFIELD_MISS = 13
1287OFPTFPT_APPLY_SETFIELD = 14
1288OFPTFPT_APPLY_SETFIELD_MISS = 15
1289OFPTFPT_EXPERIMENTER = 65534
1290OFPTFPT_EXPERIMENTER_MISS = 65535
1291
1292ofp_table_feature_prop_type_map = {
1293 0: 'OFPTFPT_INSTRUCTIONS',
1294 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1295 2: 'OFPTFPT_NEXT_TABLES',
1296 3: 'OFPTFPT_NEXT_TABLES_MISS',
1297 4: 'OFPTFPT_WRITE_ACTIONS',
1298 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1299 6: 'OFPTFPT_APPLY_ACTIONS',
1300 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1301 8: 'OFPTFPT_MATCH',
1302 10: 'OFPTFPT_WILDCARDS',
1303 12: 'OFPTFPT_WRITE_SETFIELD',
1304 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1305 14: 'OFPTFPT_APPLY_SETFIELD',
1306 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1307 65534: 'OFPTFPT_EXPERIMENTER',
1308 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1309}
1310
1311# Identifiers from group ofp_table_features_failed_code
1312OFPTFFC_BAD_TABLE = 0
1313OFPTFFC_BAD_METADATA = 1
1314OFPTFFC_BAD_TYPE = 2
1315OFPTFFC_BAD_LEN = 3
1316OFPTFFC_BAD_ARGUMENT = 4
1317OFPTFFC_EPERM = 5
1318
1319ofp_table_features_failed_code_map = {
1320 0: 'OFPTFFC_BAD_TABLE',
1321 1: 'OFPTFFC_BAD_METADATA',
1322 2: 'OFPTFFC_BAD_TYPE',
1323 3: 'OFPTFFC_BAD_LEN',
1324 4: 'OFPTFFC_BAD_ARGUMENT',
1325 5: 'OFPTFFC_EPERM',
1326}
1327
1328# Identifiers from group ofp_table_mod_failed_code
1329OFPTMFC_BAD_TABLE = 0
1330OFPTMFC_BAD_CONFIG = 1
1331OFPTMFC_EPERM = 2
1332
1333ofp_table_mod_failed_code_map = {
1334 0: 'OFPTMFC_BAD_TABLE',
1335 1: 'OFPTMFC_BAD_CONFIG',
1336 2: 'OFPTMFC_EPERM',
1337}
1338
1339# Identifiers from group ofp_type
1340OFPT_HELLO = 0
1341OFPT_ERROR = 1
1342OFPT_ECHO_REQUEST = 2
1343OFPT_ECHO_REPLY = 3
1344OFPT_EXPERIMENTER = 4
1345OFPT_FEATURES_REQUEST = 5
1346OFPT_FEATURES_REPLY = 6
1347OFPT_GET_CONFIG_REQUEST = 7
1348OFPT_GET_CONFIG_REPLY = 8
1349OFPT_SET_CONFIG = 9
1350OFPT_PACKET_IN = 10
1351OFPT_FLOW_REMOVED = 11
1352OFPT_PORT_STATUS = 12
1353OFPT_PACKET_OUT = 13
1354OFPT_FLOW_MOD = 14
1355OFPT_GROUP_MOD = 15
1356OFPT_PORT_MOD = 16
1357OFPT_TABLE_MOD = 17
1358OFPT_STATS_REQUEST = 18
1359OFPT_STATS_REPLY = 19
1360OFPT_BARRIER_REQUEST = 20
1361OFPT_BARRIER_REPLY = 21
1362OFPT_QUEUE_GET_CONFIG_REQUEST = 22
1363OFPT_QUEUE_GET_CONFIG_REPLY = 23
1364OFPT_ROLE_REQUEST = 24
1365OFPT_ROLE_REPLY = 25
1366OFPT_GET_ASYNC_REQUEST = 26
1367OFPT_GET_ASYNC_REPLY = 27
1368OFPT_SET_ASYNC = 28
1369OFPT_METER_MOD = 29
1370
1371ofp_type_map = {
1372 0: 'OFPT_HELLO',
1373 1: 'OFPT_ERROR',
1374 2: 'OFPT_ECHO_REQUEST',
1375 3: 'OFPT_ECHO_REPLY',
1376 4: 'OFPT_EXPERIMENTER',
1377 5: 'OFPT_FEATURES_REQUEST',
1378 6: 'OFPT_FEATURES_REPLY',
1379 7: 'OFPT_GET_CONFIG_REQUEST',
1380 8: 'OFPT_GET_CONFIG_REPLY',
1381 9: 'OFPT_SET_CONFIG',
1382 10: 'OFPT_PACKET_IN',
1383 11: 'OFPT_FLOW_REMOVED',
1384 12: 'OFPT_PORT_STATUS',
1385 13: 'OFPT_PACKET_OUT',
1386 14: 'OFPT_FLOW_MOD',
1387 15: 'OFPT_GROUP_MOD',
1388 16: 'OFPT_PORT_MOD',
1389 17: 'OFPT_TABLE_MOD',
1390 18: 'OFPT_STATS_REQUEST',
1391 19: 'OFPT_STATS_REPLY',
1392 20: 'OFPT_BARRIER_REQUEST',
1393 21: 'OFPT_BARRIER_REPLY',
1394 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
1395 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
1396 24: 'OFPT_ROLE_REQUEST',
1397 25: 'OFPT_ROLE_REPLY',
1398 26: 'OFPT_GET_ASYNC_REQUEST',
1399 27: 'OFPT_GET_ASYNC_REPLY',
1400 28: 'OFPT_SET_ASYNC',
1401 29: 'OFPT_METER_MOD',
1402}
1403
1404# Identifiers from group ofp_vlan_id
1405OFPVID_NONE = 0
1406OFPVID_PRESENT = 4096
1407
1408ofp_vlan_id_map = {
1409 0: 'OFPVID_NONE',
1410 4096: 'OFPVID_PRESENT',
1411}
1412