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