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