blob: cb58e69fab73195df9219dade516f2fa4a539448 [file] [log] [blame]
Rich Lanec2ee4b82013-04-24 17:12:38 -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.
Dan Talaycof6202252013-07-02 01:00:29 -07004# See the file LICENSE.pyloxi which should have been included in the source distribution
Rich Lanec2ee4b82013-04-24 17:12:38 -07005
6# Automatically generated by LOXI from template const.py
7# Do not modify
8
9OFP_VERSION = 4
10
11# Identifiers from group macro_definitions
Rich Lanec2ee4b82013-04-24 17:12:38 -070012OFP_MAX_TABLE_NAME_LEN = 32
Dan Talaycof6202252013-07-02 01:00:29 -070013OFP_MAX_PORT_NAME_LEN = 16
Rich Lane6f4978c2013-10-20 21:33:52 -070014OFP_TCP_PORT = 6653
15OFP_SSL_PORT = 6653
Dan Talaycof6202252013-07-02 01:00:29 -070016OFP_ETH_ALEN = 6
17OFP_DEFAULT_MISS_SEND_LEN = 128
18OFP_VLAN_NONE = 0
19OFP_FLOW_PERMANENT = 0
Rich Lanec2ee4b82013-04-24 17:12:38 -070020OFP_DEFAULT_PRIORITY = 32768
Rich Lanec2ee4b82013-04-24 17:12:38 -070021OFP_NO_BUFFER = 4294967295
Dan Talaycof6202252013-07-02 01:00:29 -070022DESC_STR_LEN = 256
23SERIAL_NUM_LEN = 32
24OFPQ_ALL = 4294967295
25OFPQ_MAX_RATE_UNCFG = 65535
26OFPQ_MIN_RATE_UNCFG = 65535
Rich Lanec2ee4b82013-04-24 17:12:38 -070027
Rich Lane2e079da2014-10-29 15:30:24 -070028# Identifiers from group of_bsn_lacp_convergence_status
Rich Lane7b0f2012013-11-22 14:15:26 -080029LACP_SUCCESS = 0
30LACP_TIMEDOUT = 1
31LACP_OUT_OF_SYNC = 2
32
Rich Lane2e079da2014-10-29 15:30:24 -070033of_bsn_lacp_convergence_status_map = {
Rich Lane7b0f2012013-11-22 14:15:26 -080034 0: 'LACP_SUCCESS',
35 1: 'LACP_TIMEDOUT',
36 2: 'LACP_OUT_OF_SYNC',
37}
38
Rich Lane2e079da2014-10-29 15:30:24 -070039# Identifiers from group of_bsn_pdu_slot_num
Rich Lane6f4978c2013-10-20 21:33:52 -070040BSN_PDU_SLOT_NUM_ANY = 255
41
Rich Lane2e079da2014-10-29 15:30:24 -070042of_bsn_pdu_slot_num_map = {
Rich Lane6f4978c2013-10-20 21:33:52 -070043 255: 'BSN_PDU_SLOT_NUM_ANY',
44}
45
Rich Lane2e079da2014-10-29 15:30:24 -070046# Identifiers from group of_bsn_vlan_counter
Rich Lane7dcdf022013-12-11 14:45:27 -080047OFP_BSN_VLAN_COUNTER_RX_BYTES = 0
48OFP_BSN_VLAN_COUNTER_RX_PACKETS = 1
49OFP_BSN_VLAN_COUNTER_TX_BYTES = 2
50OFP_BSN_VLAN_COUNTER_TX_PACKETS = 3
51
Rich Lane2e079da2014-10-29 15:30:24 -070052of_bsn_vlan_counter_map = {
Rich Lane7dcdf022013-12-11 14:45:27 -080053 0: 'OFP_BSN_VLAN_COUNTER_RX_BYTES',
54 1: 'OFP_BSN_VLAN_COUNTER_RX_PACKETS',
55 2: 'OFP_BSN_VLAN_COUNTER_TX_BYTES',
56 3: 'OFP_BSN_VLAN_COUNTER_TX_PACKETS',
57}
58
Rich Lane2e079da2014-10-29 15:30:24 -070059# Identifiers from group of_bsn_vrf_counter
Rich Lane5587ab12014-06-30 11:19:09 -070060OFP_BSN_VRF_COUNTER_BYTES = 0
61OFP_BSN_VRF_COUNTER_PACKETS = 1
62
Rich Lane2e079da2014-10-29 15:30:24 -070063of_bsn_vrf_counter_map = {
Rich Lane5587ab12014-06-30 11:19:09 -070064 0: 'OFP_BSN_VRF_COUNTER_BYTES',
65 1: 'OFP_BSN_VRF_COUNTER_PACKETS',
66}
67
Rich Lanec2ee4b82013-04-24 17:12:38 -070068# Identifiers from group ofp_action_type
69OFPAT_OUTPUT = 0
70OFPAT_COPY_TTL_OUT = 11
71OFPAT_COPY_TTL_IN = 12
72OFPAT_SET_MPLS_TTL = 15
73OFPAT_DEC_MPLS_TTL = 16
74OFPAT_PUSH_VLAN = 17
75OFPAT_POP_VLAN = 18
76OFPAT_PUSH_MPLS = 19
77OFPAT_POP_MPLS = 20
78OFPAT_SET_QUEUE = 21
79OFPAT_GROUP = 22
80OFPAT_SET_NW_TTL = 23
81OFPAT_DEC_NW_TTL = 24
82OFPAT_SET_FIELD = 25
83OFPAT_PUSH_PBB = 26
84OFPAT_POP_PBB = 27
85OFPAT_EXPERIMENTER = 65535
86
87ofp_action_type_map = {
88 0: 'OFPAT_OUTPUT',
89 11: 'OFPAT_COPY_TTL_OUT',
90 12: 'OFPAT_COPY_TTL_IN',
91 15: 'OFPAT_SET_MPLS_TTL',
92 16: 'OFPAT_DEC_MPLS_TTL',
93 17: 'OFPAT_PUSH_VLAN',
94 18: 'OFPAT_POP_VLAN',
95 19: 'OFPAT_PUSH_MPLS',
96 20: 'OFPAT_POP_MPLS',
97 21: 'OFPAT_SET_QUEUE',
98 22: 'OFPAT_GROUP',
99 23: 'OFPAT_SET_NW_TTL',
100 24: 'OFPAT_DEC_NW_TTL',
101 25: 'OFPAT_SET_FIELD',
102 26: 'OFPAT_PUSH_PBB',
103 27: 'OFPAT_POP_PBB',
104 65535: 'OFPAT_EXPERIMENTER',
105}
106
107# Identifiers from group ofp_bad_action_code
108OFPBAC_BAD_TYPE = 0
109OFPBAC_BAD_LEN = 1
110OFPBAC_BAD_EXPERIMENTER = 2
Rich Lane6f4978c2013-10-20 21:33:52 -0700111OFPBAC_BAD_EXPERIMENTER_TYPE = 3
Rich Lanec2ee4b82013-04-24 17:12:38 -0700112OFPBAC_BAD_OUT_PORT = 4
113OFPBAC_BAD_ARGUMENT = 5
114OFPBAC_EPERM = 6
115OFPBAC_TOO_MANY = 7
116OFPBAC_BAD_QUEUE = 8
117OFPBAC_BAD_OUT_GROUP = 9
118OFPBAC_MATCH_INCONSISTENT = 10
119OFPBAC_UNSUPPORTED_ORDER = 11
120OFPBAC_BAD_TAG = 12
121OFPBAC_BAD_SET_TYPE = 13
122OFPBAC_BAD_SET_LEN = 14
123OFPBAC_BAD_SET_ARGUMENT = 15
124
125ofp_bad_action_code_map = {
126 0: 'OFPBAC_BAD_TYPE',
127 1: 'OFPBAC_BAD_LEN',
128 2: 'OFPBAC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700129 3: 'OFPBAC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700130 4: 'OFPBAC_BAD_OUT_PORT',
131 5: 'OFPBAC_BAD_ARGUMENT',
132 6: 'OFPBAC_EPERM',
133 7: 'OFPBAC_TOO_MANY',
134 8: 'OFPBAC_BAD_QUEUE',
135 9: 'OFPBAC_BAD_OUT_GROUP',
136 10: 'OFPBAC_MATCH_INCONSISTENT',
137 11: 'OFPBAC_UNSUPPORTED_ORDER',
138 12: 'OFPBAC_BAD_TAG',
139 13: 'OFPBAC_BAD_SET_TYPE',
140 14: 'OFPBAC_BAD_SET_LEN',
141 15: 'OFPBAC_BAD_SET_ARGUMENT',
142}
143
144# Identifiers from group ofp_bad_instruction_code
145OFPBIC_UNKNOWN_INST = 0
146OFPBIC_UNSUP_INST = 1
147OFPBIC_BAD_TABLE_ID = 2
148OFPBIC_UNSUP_METADATA = 3
149OFPBIC_UNSUP_METADATA_MASK = 4
150OFPBIC_BAD_EXPERIMENTER = 5
Rich Lane6f4978c2013-10-20 21:33:52 -0700151OFPBIC_BAD_EXPERIMENTER_TYPE = 6
Rich Lanec2ee4b82013-04-24 17:12:38 -0700152OFPBIC_BAD_LEN = 7
153OFPBIC_EPERM = 8
154
155ofp_bad_instruction_code_map = {
156 0: 'OFPBIC_UNKNOWN_INST',
157 1: 'OFPBIC_UNSUP_INST',
158 2: 'OFPBIC_BAD_TABLE_ID',
159 3: 'OFPBIC_UNSUP_METADATA',
160 4: 'OFPBIC_UNSUP_METADATA_MASK',
161 5: 'OFPBIC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700162 6: 'OFPBIC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700163 7: 'OFPBIC_BAD_LEN',
164 8: 'OFPBIC_EPERM',
165}
166
167# Identifiers from group ofp_bad_match_code
168OFPBMC_BAD_TYPE = 0
169OFPBMC_BAD_LEN = 1
170OFPBMC_BAD_TAG = 2
171OFPBMC_BAD_DL_ADDR_MASK = 3
172OFPBMC_BAD_NW_ADDR_MASK = 4
173OFPBMC_BAD_WILDCARDS = 5
174OFPBMC_BAD_FIELD = 6
175OFPBMC_BAD_VALUE = 7
176OFPBMC_BAD_MASK = 8
177OFPBMC_BAD_PREREQ = 9
178OFPBMC_DUP_FIELD = 10
179OFPBMC_EPERM = 11
180
181ofp_bad_match_code_map = {
182 0: 'OFPBMC_BAD_TYPE',
183 1: 'OFPBMC_BAD_LEN',
184 2: 'OFPBMC_BAD_TAG',
185 3: 'OFPBMC_BAD_DL_ADDR_MASK',
186 4: 'OFPBMC_BAD_NW_ADDR_MASK',
187 5: 'OFPBMC_BAD_WILDCARDS',
188 6: 'OFPBMC_BAD_FIELD',
189 7: 'OFPBMC_BAD_VALUE',
190 8: 'OFPBMC_BAD_MASK',
191 9: 'OFPBMC_BAD_PREREQ',
192 10: 'OFPBMC_DUP_FIELD',
193 11: 'OFPBMC_EPERM',
194}
195
196# Identifiers from group ofp_bad_request_code
197OFPBRC_BAD_VERSION = 0
198OFPBRC_BAD_TYPE = 1
Rich Lane6f4978c2013-10-20 21:33:52 -0700199OFPBRC_BAD_STAT = 2
Rich Lanec2ee4b82013-04-24 17:12:38 -0700200OFPBRC_BAD_EXPERIMENTER = 3
Rich Lane6f4978c2013-10-20 21:33:52 -0700201OFPBRC_BAD_EXPERIMENTER_TYPE = 4
Rich Lanec2ee4b82013-04-24 17:12:38 -0700202OFPBRC_EPERM = 5
203OFPBRC_BAD_LEN = 6
204OFPBRC_BUFFER_EMPTY = 7
205OFPBRC_BUFFER_UNKNOWN = 8
206OFPBRC_BAD_TABLE_ID = 9
207OFPBRC_IS_SLAVE = 10
208OFPBRC_BAD_PORT = 11
209OFPBRC_BAD_PACKET = 12
210OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13
211
212ofp_bad_request_code_map = {
213 0: 'OFPBRC_BAD_VERSION',
214 1: 'OFPBRC_BAD_TYPE',
Rich Lane6f4978c2013-10-20 21:33:52 -0700215 2: 'OFPBRC_BAD_STAT',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700216 3: 'OFPBRC_BAD_EXPERIMENTER',
Rich Lane6f4978c2013-10-20 21:33:52 -0700217 4: 'OFPBRC_BAD_EXPERIMENTER_TYPE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700218 5: 'OFPBRC_EPERM',
219 6: 'OFPBRC_BAD_LEN',
220 7: 'OFPBRC_BUFFER_EMPTY',
221 8: 'OFPBRC_BUFFER_UNKNOWN',
222 9: 'OFPBRC_BAD_TABLE_ID',
223 10: 'OFPBRC_IS_SLAVE',
224 11: 'OFPBRC_BAD_PORT',
225 12: 'OFPBRC_BAD_PACKET',
226 13: 'OFPBRC_MULTIPART_BUFFER_OVERFLOW',
227}
228
Rich Lane5454b682014-01-14 17:07:36 -0800229# Identifiers from group ofp_bsn_controller_connection_state
230OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0
231OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED = 1
232
233ofp_bsn_controller_connection_state_map = {
234 0: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED',
235 1: 'OFP_BSN_CONTROLLER_CONNECTION_STATE_CONNECTED',
236}
237
238# Identifiers from group ofp_bsn_controller_role_reason
239OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST = 0
240OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG = 1
241OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER = 2
242
243ofp_bsn_controller_role_reason_map = {
244 0: 'OFP_BSN_CONTROLLER_ROLE_REASON_MASTER_REQUEST',
245 1: 'OFP_BSN_CONTROLLER_ROLE_REASON_CONFIG',
246 2: 'OFP_BSN_CONTROLLER_ROLE_REASON_EXPERIMENTER',
247}
248
Rich Lane2e079da2014-10-29 15:30:24 -0700249# Identifiers from group ofp_bsn_lacp_state
250OFP_BSN_LACP_STATE_ACTIVITY = 1
251OFP_BSN_LACP_STATE_TIMEOUT = 2
252OFP_BSN_LACP_STATE_AGGREGATION = 4
253OFP_BSN_LACP_STATE_SYNCHRONIZATION = 8
254OFP_BSN_LACP_STATE_COLLECTING = 16
255OFP_BSN_LACP_STATE_DISTRIBUTING = 32
256OFP_BSN_LACP_STATE_DEFAULTED = 64
257OFP_BSN_LACP_STATE_EXPIRED = 128
258
259ofp_bsn_lacp_state_map = {
260 1: 'OFP_BSN_LACP_STATE_ACTIVITY',
261 2: 'OFP_BSN_LACP_STATE_TIMEOUT',
262 4: 'OFP_BSN_LACP_STATE_AGGREGATION',
263 8: 'OFP_BSN_LACP_STATE_SYNCHRONIZATION',
264 16: 'OFP_BSN_LACP_STATE_COLLECTING',
265 32: 'OFP_BSN_LACP_STATE_DISTRIBUTING',
266 64: 'OFP_BSN_LACP_STATE_DEFAULTED',
267 128: 'OFP_BSN_LACP_STATE_EXPIRED',
268}
269
Rich Lane5587ab12014-06-30 11:19:09 -0700270# Identifiers from group ofp_bsn_loglevel
271OFP_BSN_LOGLEVEL_MSG = 0
272OFP_BSN_LOGLEVEL_ERROR = 1
273OFP_BSN_LOGLEVEL_WARN = 2
274OFP_BSN_LOGLEVEL_INFO = 3
275OFP_BSN_LOGLEVEL_VERBOSE = 4
276OFP_BSN_LOGLEVEL_TRACE = 5
277
278ofp_bsn_loglevel_map = {
279 0: 'OFP_BSN_LOGLEVEL_MSG',
280 1: 'OFP_BSN_LOGLEVEL_ERROR',
281 2: 'OFP_BSN_LOGLEVEL_WARN',
282 3: 'OFP_BSN_LOGLEVEL_INFO',
283 4: 'OFP_BSN_LOGLEVEL_VERBOSE',
284 5: 'OFP_BSN_LOGLEVEL_TRACE',
285}
286
Rich Lane474324f2015-01-14 15:22:56 -0800287# Identifiers from group ofp_bsn_lua_upload_flags
288OFP_BSN_LUA_UPLOAD_MORE = 1
289OFP_BSN_LUA_UPLOAD_FORCE = 2
290
291ofp_bsn_lua_upload_flags_map = {
292 1: 'OFP_BSN_LUA_UPLOAD_MORE',
293 2: 'OFP_BSN_LUA_UPLOAD_FORCE',
294}
295
Rich Lane93b33132014-04-21 12:20:58 -0700296# Identifiers from group ofp_bsn_pktin_flag
297OFP_BSN_PKTIN_FLAG_PDU = 1
298OFP_BSN_PKTIN_FLAG_NEW_HOST = 2
299OFP_BSN_PKTIN_FLAG_STATION_MOVE = 4
300OFP_BSN_PKTIN_FLAG_ARP = 8
301OFP_BSN_PKTIN_FLAG_DHCP = 16
302OFP_BSN_PKTIN_FLAG_L2_CPU = 32
303OFP_BSN_PKTIN_FLAG_DEBUG = 64
304OFP_BSN_PKTIN_FLAG_TTL_EXPIRED = 128
305OFP_BSN_PKTIN_FLAG_L3_MISS = 256
306OFP_BSN_PKTIN_FLAG_L3_CPU = 512
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700307OFP_BSN_PKTIN_FLAG_INGRESS_ACL = 1024
Rich Laneccd32ed2014-11-10 17:48:24 -0800308OFP_BSN_PKTIN_FLAG_SFLOW = 2048
Rich Lane93b33132014-04-21 12:20:58 -0700309
310ofp_bsn_pktin_flag_map = {
311 1: 'OFP_BSN_PKTIN_FLAG_PDU',
312 2: 'OFP_BSN_PKTIN_FLAG_NEW_HOST',
313 4: 'OFP_BSN_PKTIN_FLAG_STATION_MOVE',
314 8: 'OFP_BSN_PKTIN_FLAG_ARP',
315 16: 'OFP_BSN_PKTIN_FLAG_DHCP',
316 32: 'OFP_BSN_PKTIN_FLAG_L2_CPU',
317 64: 'OFP_BSN_PKTIN_FLAG_DEBUG',
318 128: 'OFP_BSN_PKTIN_FLAG_TTL_EXPIRED',
319 256: 'OFP_BSN_PKTIN_FLAG_L3_MISS',
320 512: 'OFP_BSN_PKTIN_FLAG_L3_CPU',
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700321 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL',
Rich Laneccd32ed2014-11-10 17:48:24 -0800322 2048: 'OFP_BSN_PKTIN_FLAG_SFLOW',
Rich Lane93b33132014-04-21 12:20:58 -0700323}
324
Rich Lane7dcdf022013-12-11 14:45:27 -0800325# Identifiers from group ofp_bsn_port_counter
326OFP_BSN_PORT_COUNTER_RX_BYTES = 0
327OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1
328OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2
329OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3
330OFP_BSN_PORT_COUNTER_RX_DROPPED = 4
331OFP_BSN_PORT_COUNTER_RX_ERRORS = 5
332OFP_BSN_PORT_COUNTER_TX_BYTES = 6
333OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7
334OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8
335OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9
336OFP_BSN_PORT_COUNTER_TX_DROPPED = 10
337OFP_BSN_PORT_COUNTER_TX_ERRORS = 11
Rich Lane5587ab12014-06-30 11:19:09 -0700338OFP_BSN_PORT_COUNTER_RX_RUNTS = 12
339OFP_BSN_PORT_COUNTER_RX_GIANTS = 13
340OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS = 14
341OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS = 15
342OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS = 16
343OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT = 17
344OFP_BSN_PORT_COUNTER_TX_COLLISIONS = 18
345OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS = 19
346OFP_BSN_PORT_COUNTER_TX_DEFERRED = 20
347OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT = 21
Harshmeet Singh6f0c8932014-07-02 15:52:56 -0700348OFP_BSN_PORT_COUNTER_RX_PACKETS = 22
349OFP_BSN_PORT_COUNTER_TX_PACKETS = 23
350OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS = 24
351OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
352OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
Rich Lane7dcdf022013-12-11 14:45:27 -0800353
354ofp_bsn_port_counter_map = {
355 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
356 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST',
357 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST',
358 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST',
359 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED',
360 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS',
361 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES',
362 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST',
363 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST',
364 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST',
365 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED',
366 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS',
Rich Lane5587ab12014-06-30 11:19:09 -0700367 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS',
368 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS',
369 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS',
370 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS',
371 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS',
372 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT',
373 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS',
374 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS',
375 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED',
376 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT',
Harshmeet Singh6f0c8932014-07-02 15:52:56 -0700377 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS',
378 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS',
379 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS',
380 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
381 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
Rich Lane7dcdf022013-12-11 14:45:27 -0800382}
383
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700384# Identifiers from group ofp_bsn_tcp_flag
385OFP_BSN_TCP_FLAG_FIN = 1
386OFP_BSN_TCP_FLAG_SYN = 2
387OFP_BSN_TCP_FLAG_RST = 4
388OFP_BSN_TCP_FLAG_PSH = 8
389OFP_BSN_TCP_FLAG_ACK = 16
390OFP_BSN_TCP_FLAG_URG = 32
391OFP_BSN_TCP_FLAG_ECE = 64
392OFP_BSN_TCP_FLAG_CWR = 128
393OFP_BSN_TCP_FLAG_NS = 256
394
395ofp_bsn_tcp_flag_map = {
396 1: 'OFP_BSN_TCP_FLAG_FIN',
397 2: 'OFP_BSN_TCP_FLAG_SYN',
398 4: 'OFP_BSN_TCP_FLAG_RST',
399 8: 'OFP_BSN_TCP_FLAG_PSH',
400 16: 'OFP_BSN_TCP_FLAG_ACK',
401 32: 'OFP_BSN_TCP_FLAG_URG',
402 64: 'OFP_BSN_TCP_FLAG_ECE',
403 128: 'OFP_BSN_TCP_FLAG_CWR',
404 256: 'OFP_BSN_TCP_FLAG_NS',
405}
406
Rich Lane93b33132014-04-21 12:20:58 -0700407# Identifiers from group ofp_bsn_udf_anchor
408OFP_BSN_UDF_ANCHOR_PACKET_START = 0
409OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1
410OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2
411
412ofp_bsn_udf_anchor_map = {
413 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START',
414 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START',
415 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START',
416}
417
Rich Lane5587ab12014-06-30 11:19:09 -0700418# Identifiers from group ofp_bsn_vlan_counter_constants
419OFP_BSN_VLAN_ALL = 65535
420
421ofp_bsn_vlan_counter_constants_map = {
422 65535: 'OFP_BSN_VLAN_ALL',
423}
424
Rich Lane93b33132014-04-21 12:20:58 -0700425# Identifiers from group ofp_bsn_vport_l2gre_flags
426OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
427OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
428OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
Rich Lane5587ab12014-06-30 11:19:09 -0700429OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
Rich Lanef9530c42014-09-15 09:59:43 -0700430OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
Rich Lane93b33132014-04-21 12:20:58 -0700431
432ofp_bsn_vport_l2gre_flags_map = {
433 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
434 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
435 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
Rich Lane5587ab12014-06-30 11:19:09 -0700436 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
Rich Lanef9530c42014-09-15 09:59:43 -0700437 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
Rich Lane93b33132014-04-21 12:20:58 -0700438}
439
Dan Talaycof6202252013-07-02 01:00:29 -0700440# Identifiers from group ofp_bsn_vport_q_in_q_untagged
441OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
442
443ofp_bsn_vport_q_in_q_untagged_map = {
444 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
445}
446
Rich Laned53156a2013-08-05 17:17:33 -0700447# Identifiers from group ofp_bsn_vport_status
448OF_BSN_VPORT_STATUS_OK = 0
449OF_BSN_VPORT_STATUS_FAILED = 1
450
451ofp_bsn_vport_status_map = {
452 0: 'OF_BSN_VPORT_STATUS_OK',
453 1: 'OF_BSN_VPORT_STATUS_FAILED',
454}
455
Rich Lane5587ab12014-06-30 11:19:09 -0700456# Identifiers from group ofp_bsn_vrf_counter_constants
457OFP_BSN_VRF_ALL = 4294967295
458
459ofp_bsn_vrf_counter_constants_map = {
460 4294967295: 'OFP_BSN_VRF_ALL',
461}
462
Rich Lanec2ee4b82013-04-24 17:12:38 -0700463# Identifiers from group ofp_capabilities
464OFPC_FLOW_STATS = 1
465OFPC_TABLE_STATS = 2
466OFPC_PORT_STATS = 4
467OFPC_GROUP_STATS = 8
468OFPC_IP_REASM = 32
469OFPC_QUEUE_STATS = 64
470OFPC_PORT_BLOCKED = 256
471
472ofp_capabilities_map = {
473 1: 'OFPC_FLOW_STATS',
474 2: 'OFPC_TABLE_STATS',
475 4: 'OFPC_PORT_STATS',
476 8: 'OFPC_GROUP_STATS',
477 32: 'OFPC_IP_REASM',
478 64: 'OFPC_QUEUE_STATS',
479 256: 'OFPC_PORT_BLOCKED',
480}
481
482# Identifiers from group ofp_config_flags
483OFPC_FRAG_NORMAL = 0
484OFPC_FRAG_DROP = 1
485OFPC_FRAG_REASM = 2
486OFPC_FRAG_MASK = 3
487
488ofp_config_flags_map = {
489 0: 'OFPC_FRAG_NORMAL',
490 1: 'OFPC_FRAG_DROP',
491 2: 'OFPC_FRAG_REASM',
492 3: 'OFPC_FRAG_MASK',
493}
494
495# Identifiers from group ofp_controller_max_len
496OFPCML_MAX = 65509
497OFPCML_NO_BUFFER = 65535
498
499ofp_controller_max_len_map = {
500 65509: 'OFPCML_MAX',
501 65535: 'OFPCML_NO_BUFFER',
502}
503
504# Identifiers from group ofp_controller_role
505OFPCR_ROLE_NOCHANGE = 0
506OFPCR_ROLE_EQUAL = 1
507OFPCR_ROLE_MASTER = 2
508OFPCR_ROLE_SLAVE = 3
509
510ofp_controller_role_map = {
511 0: 'OFPCR_ROLE_NOCHANGE',
512 1: 'OFPCR_ROLE_EQUAL',
513 2: 'OFPCR_ROLE_MASTER',
514 3: 'OFPCR_ROLE_SLAVE',
515}
516
517# Identifiers from group ofp_error_type
518OFPET_HELLO_FAILED = 0
519OFPET_BAD_REQUEST = 1
520OFPET_BAD_ACTION = 2
521OFPET_BAD_INSTRUCTION = 3
522OFPET_BAD_MATCH = 4
523OFPET_FLOW_MOD_FAILED = 5
524OFPET_GROUP_MOD_FAILED = 6
525OFPET_PORT_MOD_FAILED = 7
526OFPET_TABLE_MOD_FAILED = 8
527OFPET_QUEUE_OP_FAILED = 9
528OFPET_SWITCH_CONFIG_FAILED = 10
529OFPET_ROLE_REQUEST_FAILED = 11
530OFPET_METER_MOD_FAILED = 12
531OFPET_TABLE_FEATURES_FAILED = 13
532OFPET_EXPERIMENTER = 65535
533
534ofp_error_type_map = {
535 0: 'OFPET_HELLO_FAILED',
536 1: 'OFPET_BAD_REQUEST',
537 2: 'OFPET_BAD_ACTION',
538 3: 'OFPET_BAD_INSTRUCTION',
539 4: 'OFPET_BAD_MATCH',
540 5: 'OFPET_FLOW_MOD_FAILED',
541 6: 'OFPET_GROUP_MOD_FAILED',
542 7: 'OFPET_PORT_MOD_FAILED',
543 8: 'OFPET_TABLE_MOD_FAILED',
544 9: 'OFPET_QUEUE_OP_FAILED',
545 10: 'OFPET_SWITCH_CONFIG_FAILED',
546 11: 'OFPET_ROLE_REQUEST_FAILED',
547 12: 'OFPET_METER_MOD_FAILED',
548 13: 'OFPET_TABLE_FEATURES_FAILED',
549 65535: 'OFPET_EXPERIMENTER',
550}
551
552# Identifiers from group ofp_flow_mod_command
553OFPFC_ADD = 0
554OFPFC_MODIFY = 1
555OFPFC_MODIFY_STRICT = 2
556OFPFC_DELETE = 3
557OFPFC_DELETE_STRICT = 4
558
559ofp_flow_mod_command_map = {
560 0: 'OFPFC_ADD',
561 1: 'OFPFC_MODIFY',
562 2: 'OFPFC_MODIFY_STRICT',
563 3: 'OFPFC_DELETE',
564 4: 'OFPFC_DELETE_STRICT',
565}
566
567# Identifiers from group ofp_flow_mod_failed_code
568OFPFMFC_UNKNOWN = 0
569OFPFMFC_TABLE_FULL = 1
570OFPFMFC_BAD_TABLE_ID = 2
571OFPFMFC_OVERLAP = 3
572OFPFMFC_EPERM = 4
573OFPFMFC_BAD_TIMEOUT = 5
574OFPFMFC_BAD_COMMAND = 6
575OFPFMFC_BAD_FLAGS = 7
576
577ofp_flow_mod_failed_code_map = {
578 0: 'OFPFMFC_UNKNOWN',
579 1: 'OFPFMFC_TABLE_FULL',
580 2: 'OFPFMFC_BAD_TABLE_ID',
581 3: 'OFPFMFC_OVERLAP',
582 4: 'OFPFMFC_EPERM',
583 5: 'OFPFMFC_BAD_TIMEOUT',
584 6: 'OFPFMFC_BAD_COMMAND',
585 7: 'OFPFMFC_BAD_FLAGS',
586}
587
588# Identifiers from group ofp_flow_mod_flags
589OFPFF_SEND_FLOW_REM = 1
590OFPFF_CHECK_OVERLAP = 2
591OFPFF_RESET_COUNTS = 4
592OFPFF_NO_PKT_COUNTS = 8
593OFPFF_NO_BYT_COUNTS = 16
Rich Lane6f4978c2013-10-20 21:33:52 -0700594OFPFF_BSN_SEND_IDLE = 128
Rich Lanec2ee4b82013-04-24 17:12:38 -0700595
596ofp_flow_mod_flags_map = {
597 1: 'OFPFF_SEND_FLOW_REM',
598 2: 'OFPFF_CHECK_OVERLAP',
599 4: 'OFPFF_RESET_COUNTS',
600 8: 'OFPFF_NO_PKT_COUNTS',
601 16: 'OFPFF_NO_BYT_COUNTS',
Rich Lane6f4978c2013-10-20 21:33:52 -0700602 128: 'OFPFF_BSN_SEND_IDLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700603}
604
605# Identifiers from group ofp_flow_removed_reason
606OFPRR_IDLE_TIMEOUT = 0
607OFPRR_HARD_TIMEOUT = 1
608OFPRR_DELETE = 2
609OFPRR_GROUP_DELETE = 3
610
611ofp_flow_removed_reason_map = {
612 0: 'OFPRR_IDLE_TIMEOUT',
613 1: 'OFPRR_HARD_TIMEOUT',
614 2: 'OFPRR_DELETE',
615 3: 'OFPRR_GROUP_DELETE',
616}
617
618# Identifiers from group ofp_group
619OFPG_MAX = 4294967040
620OFPG_ALL = 4294967292
621OFPG_ANY = 4294967295
622
623ofp_group_map = {
624 4294967040: 'OFPG_MAX',
625 4294967292: 'OFPG_ALL',
626 4294967295: 'OFPG_ANY',
627}
628
629# Identifiers from group ofp_group_capabilities
630OFPGFC_SELECT_WEIGHT = 1
631OFPGFC_SELECT_LIVENESS = 2
632OFPGFC_CHAINING = 4
633OFPGFC_CHAINING_CHECKS = 8
634
635ofp_group_capabilities_map = {
636 1: 'OFPGFC_SELECT_WEIGHT',
637 2: 'OFPGFC_SELECT_LIVENESS',
638 4: 'OFPGFC_CHAINING',
639 8: 'OFPGFC_CHAINING_CHECKS',
640}
641
642# Identifiers from group ofp_group_mod_command
643OFPGC_ADD = 0
644OFPGC_MODIFY = 1
645OFPGC_DELETE = 2
646
647ofp_group_mod_command_map = {
648 0: 'OFPGC_ADD',
649 1: 'OFPGC_MODIFY',
650 2: 'OFPGC_DELETE',
651}
652
653# Identifiers from group ofp_group_mod_failed_code
654OFPGMFC_GROUP_EXISTS = 0
655OFPGMFC_INVALID_GROUP = 1
656OFPGMFC_WEIGHT_UNSUPPORTED = 2
657OFPGMFC_OUT_OF_GROUPS = 3
658OFPGMFC_OUT_OF_BUCKETS = 4
659OFPGMFC_CHAINING_UNSUPPORTED = 5
660OFPGMFC_WATCH_UNSUPPORTED = 6
661OFPGMFC_LOOP = 7
662OFPGMFC_UNKNOWN_GROUP = 8
663OFPGMFC_CHAINED_GROUP = 9
664OFPGMFC_BAD_TYPE = 10
665OFPGMFC_BAD_COMMAND = 11
666OFPGMFC_BAD_BUCKET = 12
667OFPGMFC_BAD_WATCH = 13
668OFPGMFC_EPERM = 14
669
670ofp_group_mod_failed_code_map = {
671 0: 'OFPGMFC_GROUP_EXISTS',
672 1: 'OFPGMFC_INVALID_GROUP',
673 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
674 3: 'OFPGMFC_OUT_OF_GROUPS',
675 4: 'OFPGMFC_OUT_OF_BUCKETS',
676 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
677 6: 'OFPGMFC_WATCH_UNSUPPORTED',
678 7: 'OFPGMFC_LOOP',
679 8: 'OFPGMFC_UNKNOWN_GROUP',
680 9: 'OFPGMFC_CHAINED_GROUP',
681 10: 'OFPGMFC_BAD_TYPE',
682 11: 'OFPGMFC_BAD_COMMAND',
683 12: 'OFPGMFC_BAD_BUCKET',
684 13: 'OFPGMFC_BAD_WATCH',
685 14: 'OFPGMFC_EPERM',
686}
687
688# Identifiers from group ofp_group_type
689OFPGT_ALL = 0
690OFPGT_SELECT = 1
691OFPGT_INDIRECT = 2
692OFPGT_FF = 3
693
694ofp_group_type_map = {
695 0: 'OFPGT_ALL',
696 1: 'OFPGT_SELECT',
697 2: 'OFPGT_INDIRECT',
698 3: 'OFPGT_FF',
699}
700
701# Identifiers from group ofp_hello_elem_type
702OFPHET_VERSIONBITMAP = 1
703
704ofp_hello_elem_type_map = {
705 1: 'OFPHET_VERSIONBITMAP',
706}
707
708# Identifiers from group ofp_hello_failed_code
709OFPHFC_INCOMPATIBLE = 0
710OFPHFC_EPERM = 1
711
712ofp_hello_failed_code_map = {
713 0: 'OFPHFC_INCOMPATIBLE',
714 1: 'OFPHFC_EPERM',
715}
716
717# Identifiers from group ofp_instruction_type
718OFPIT_GOTO_TABLE = 1
719OFPIT_WRITE_METADATA = 2
720OFPIT_WRITE_ACTIONS = 3
721OFPIT_APPLY_ACTIONS = 4
722OFPIT_CLEAR_ACTIONS = 5
723OFPIT_METER = 6
724OFPIT_EXPERIMENTER = 65535
725
726ofp_instruction_type_map = {
727 1: 'OFPIT_GOTO_TABLE',
728 2: 'OFPIT_WRITE_METADATA',
729 3: 'OFPIT_WRITE_ACTIONS',
730 4: 'OFPIT_APPLY_ACTIONS',
731 5: 'OFPIT_CLEAR_ACTIONS',
732 6: 'OFPIT_METER',
733 65535: 'OFPIT_EXPERIMENTER',
734}
735
736# Identifiers from group ofp_ipv6exthdr_flags
737OFPIEH_NONEXT = 1
738OFPIEH_ESP = 2
739OFPIEH_AUTH = 4
740OFPIEH_DEST = 8
741OFPIEH_FRAG = 16
742OFPIEH_ROUTER = 32
743OFPIEH_HOP = 64
744OFPIEH_UNREP = 128
745OFPIEH_UNSEQ = 256
746
747ofp_ipv6exthdr_flags_map = {
748 1: 'OFPIEH_NONEXT',
749 2: 'OFPIEH_ESP',
750 4: 'OFPIEH_AUTH',
751 8: 'OFPIEH_DEST',
752 16: 'OFPIEH_FRAG',
753 32: 'OFPIEH_ROUTER',
754 64: 'OFPIEH_HOP',
755 128: 'OFPIEH_UNREP',
756 256: 'OFPIEH_UNSEQ',
757}
758
759# Identifiers from group ofp_match_type
760OFPMT_STANDARD = 0
761OFPMT_OXM = 1
762
763ofp_match_type_map = {
764 0: 'OFPMT_STANDARD',
765 1: 'OFPMT_OXM',
766}
767
768# Identifiers from group ofp_meter
769OFPM_MAX = 4294901760
770OFPM_SLOWPATH = 4294967293
771OFPM_CONTROLLER = 4294967294
772OFPM_ALL = 4294967295
773
774ofp_meter_map = {
775 4294901760: 'OFPM_MAX',
776 4294967293: 'OFPM_SLOWPATH',
777 4294967294: 'OFPM_CONTROLLER',
778 4294967295: 'OFPM_ALL',
779}
780
781# Identifiers from group ofp_meter_band_type
782OFPMBT_DROP = 1
783OFPMBT_DSCP_REMARK = 2
784OFPMBT_EXPERIMENTER = 65535
785
786ofp_meter_band_type_map = {
787 1: 'OFPMBT_DROP',
788 2: 'OFPMBT_DSCP_REMARK',
789 65535: 'OFPMBT_EXPERIMENTER',
790}
791
792# Identifiers from group ofp_meter_flags
793OFPMF_KBPS = 1
794OFPMF_PKTPS = 2
795OFPMF_BURST = 4
796OFPMF_STATS = 8
797
798ofp_meter_flags_map = {
799 1: 'OFPMF_KBPS',
800 2: 'OFPMF_PKTPS',
801 4: 'OFPMF_BURST',
802 8: 'OFPMF_STATS',
803}
804
805# Identifiers from group ofp_meter_mod_command
806OFPMC_ADD = 0
807OFPMC_MODIFY = 1
808OFPMC_DELETE = 2
809
810ofp_meter_mod_command_map = {
811 0: 'OFPMC_ADD',
812 1: 'OFPMC_MODIFY',
813 2: 'OFPMC_DELETE',
814}
815
816# Identifiers from group ofp_meter_mod_failed_code
817OFPMMFC_UNKNOWN = 0
818OFPMMFC_METER_EXISTS = 1
819OFPMMFC_INVALID_METER = 2
820OFPMMFC_UNKNOWN_METER = 3
821OFPMMFC_BAD_COMMAND = 4
822OFPMMFC_BAD_FLAGS = 5
823OFPMMFC_BAD_RATE = 6
824OFPMMFC_BAD_BURST = 7
825OFPMMFC_BAD_BAND = 8
826OFPMMFC_BAD_BAND_VALUE = 9
827OFPMMFC_OUT_OF_METERS = 10
828OFPMMFC_OUT_OF_BANDS = 11
829
830ofp_meter_mod_failed_code_map = {
831 0: 'OFPMMFC_UNKNOWN',
832 1: 'OFPMMFC_METER_EXISTS',
833 2: 'OFPMMFC_INVALID_METER',
834 3: 'OFPMMFC_UNKNOWN_METER',
835 4: 'OFPMMFC_BAD_COMMAND',
836 5: 'OFPMMFC_BAD_FLAGS',
837 6: 'OFPMMFC_BAD_RATE',
838 7: 'OFPMMFC_BAD_BURST',
839 8: 'OFPMMFC_BAD_BAND',
840 9: 'OFPMMFC_BAD_BAND_VALUE',
841 10: 'OFPMMFC_OUT_OF_METERS',
842 11: 'OFPMMFC_OUT_OF_BANDS',
843}
844
Rich Lanec2ee4b82013-04-24 17:12:38 -0700845# Identifiers from group ofp_oxm_class
846OFPXMC_NXM_0 = 0
847OFPXMC_NXM_1 = 1
848OFPXMC_OPENFLOW_BASIC = 32768
849OFPXMC_EXPERIMENTER = 65535
850
851ofp_oxm_class_map = {
852 0: 'OFPXMC_NXM_0',
853 1: 'OFPXMC_NXM_1',
854 32768: 'OFPXMC_OPENFLOW_BASIC',
855 65535: 'OFPXMC_EXPERIMENTER',
856}
857
858# Identifiers from group ofp_packet_in_reason
859OFPR_NO_MATCH = 0
860OFPR_ACTION = 1
861OFPR_INVALID_TTL = 2
Rich Laned9e3f7b2013-11-04 11:40:43 -0800862OFPR_BSN_NEW_HOST = 128
863OFPR_BSN_STATION_MOVE = 129
864OFPR_BSN_BAD_VLAN = 130
865OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
Rich Lane5454b682014-01-14 17:07:36 -0800866OFPR_BSN_NO_ROUTE = 132
Rich Lane95f7fc92014-01-27 17:08:16 -0800867OFPR_BSN_ICMP_ECHO_REQUEST = 133
868OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
869OFPR_BSN_DEST_HOST_UNREACHABLE = 135
870OFPR_BSN_DEST_PORT_UNREACHABLE = 136
871OFPR_BSN_FRAGMENTATION_REQUIRED = 137
872OFPR_BSN_ARP = 139
Rich Lane1b75abf2014-02-05 11:23:20 -0800873OFPR_BSN_DHCP = 140
Rich Lane9ec3fca2014-02-26 16:22:56 -0800874OFPR_BSN_DEBUG = 141
Rich Lanef50b7c32014-03-20 11:38:02 -0700875OFPR_BSN_PACKET_OF_DEATH = 142
Rich Lanec2ee4b82013-04-24 17:12:38 -0700876
877ofp_packet_in_reason_map = {
878 0: 'OFPR_NO_MATCH',
879 1: 'OFPR_ACTION',
880 2: 'OFPR_INVALID_TTL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800881 128: 'OFPR_BSN_NEW_HOST',
882 129: 'OFPR_BSN_STATION_MOVE',
883 130: 'OFPR_BSN_BAD_VLAN',
884 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
Rich Lane5454b682014-01-14 17:07:36 -0800885 132: 'OFPR_BSN_NO_ROUTE',
Rich Lane95f7fc92014-01-27 17:08:16 -0800886 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
887 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
888 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
889 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
890 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
891 139: 'OFPR_BSN_ARP',
Rich Lane1b75abf2014-02-05 11:23:20 -0800892 140: 'OFPR_BSN_DHCP',
Rich Lane9ec3fca2014-02-26 16:22:56 -0800893 141: 'OFPR_BSN_DEBUG',
Rich Lanef50b7c32014-03-20 11:38:02 -0700894 142: 'OFPR_BSN_PACKET_OF_DEATH',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700895}
896
897# Identifiers from group ofp_port
898OFPP_MAX = 4294967040
899OFPP_IN_PORT = 4294967288
900OFPP_TABLE = 4294967289
901OFPP_NORMAL = 4294967290
902OFPP_FLOOD = 4294967291
903OFPP_ALL = 4294967292
904OFPP_CONTROLLER = 4294967293
905OFPP_LOCAL = 4294967294
Rich Laned9e3f7b2013-11-04 11:40:43 -0800906OFPP_ANY = 4294967295
Rich Lanec2ee4b82013-04-24 17:12:38 -0700907
908ofp_port_map = {
909 4294967040: 'OFPP_MAX',
910 4294967288: 'OFPP_IN_PORT',
911 4294967289: 'OFPP_TABLE',
912 4294967290: 'OFPP_NORMAL',
913 4294967291: 'OFPP_FLOOD',
914 4294967292: 'OFPP_ALL',
915 4294967293: 'OFPP_CONTROLLER',
916 4294967294: 'OFPP_LOCAL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800917 4294967295: 'OFPP_ANY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700918}
919
920# Identifiers from group ofp_port_config
921OFPPC_PORT_DOWN = 1
922OFPPC_NO_RECV = 4
923OFPPC_NO_FWD = 32
924OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700925OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700926
927ofp_port_config_map = {
928 1: 'OFPPC_PORT_DOWN',
929 4: 'OFPPC_NO_RECV',
930 32: 'OFPPC_NO_FWD',
931 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700932 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700933}
934
935# Identifiers from group ofp_port_features
936OFPPF_10MB_HD = 1
937OFPPF_10MB_FD = 2
938OFPPF_100MB_HD = 4
939OFPPF_100MB_FD = 8
940OFPPF_1GB_HD = 16
941OFPPF_1GB_FD = 32
942OFPPF_10GB_FD = 64
943OFPPF_40GB_FD = 128
944OFPPF_100GB_FD = 256
945OFPPF_1TB_FD = 512
946OFPPF_OTHER = 1024
947OFPPF_COPPER = 2048
948OFPPF_FIBER = 4096
949OFPPF_AUTONEG = 8192
950OFPPF_PAUSE = 16384
951OFPPF_PAUSE_ASYM = 32768
Rich Laneccd32ed2014-11-10 17:48:24 -0800952OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700953
954ofp_port_features_map = {
955 1: 'OFPPF_10MB_HD',
956 2: 'OFPPF_10MB_FD',
957 4: 'OFPPF_100MB_HD',
958 8: 'OFPPF_100MB_FD',
959 16: 'OFPPF_1GB_HD',
960 32: 'OFPPF_1GB_FD',
961 64: 'OFPPF_10GB_FD',
962 128: 'OFPPF_40GB_FD',
963 256: 'OFPPF_100GB_FD',
964 512: 'OFPPF_1TB_FD',
965 1024: 'OFPPF_OTHER',
966 2048: 'OFPPF_COPPER',
967 4096: 'OFPPF_FIBER',
968 8192: 'OFPPF_AUTONEG',
969 16384: 'OFPPF_PAUSE',
970 32768: 'OFPPF_PAUSE_ASYM',
Rich Laneccd32ed2014-11-10 17:48:24 -0800971 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700972}
973
974# Identifiers from group ofp_port_mod_failed_code
975OFPPMFC_BAD_PORT = 0
976OFPPMFC_BAD_HW_ADDR = 1
977OFPPMFC_BAD_CONFIG = 2
978OFPPMFC_BAD_ADVERTISE = 3
979OFPPMFC_EPERM = 4
980
981ofp_port_mod_failed_code_map = {
982 0: 'OFPPMFC_BAD_PORT',
983 1: 'OFPPMFC_BAD_HW_ADDR',
984 2: 'OFPPMFC_BAD_CONFIG',
985 3: 'OFPPMFC_BAD_ADVERTISE',
986 4: 'OFPPMFC_EPERM',
987}
988
Rich Lanec2ee4b82013-04-24 17:12:38 -0700989# Identifiers from group ofp_port_reason
990OFPPR_ADD = 0
991OFPPR_DELETE = 1
992OFPPR_MODIFY = 2
993
994ofp_port_reason_map = {
995 0: 'OFPPR_ADD',
996 1: 'OFPPR_DELETE',
997 2: 'OFPPR_MODIFY',
998}
999
1000# Identifiers from group ofp_port_state
1001OFPPS_LINK_DOWN = 1
1002OFPPS_BLOCKED = 2
1003OFPPS_LIVE = 4
1004
1005ofp_port_state_map = {
1006 1: 'OFPPS_LINK_DOWN',
1007 2: 'OFPPS_BLOCKED',
1008 4: 'OFPPS_LIVE',
1009}
1010
1011# Identifiers from group ofp_queue_op_failed_code
1012OFPQOFC_BAD_PORT = 0
1013OFPQOFC_BAD_QUEUE = 1
1014OFPQOFC_EPERM = 2
1015
1016ofp_queue_op_failed_code_map = {
1017 0: 'OFPQOFC_BAD_PORT',
1018 1: 'OFPQOFC_BAD_QUEUE',
1019 2: 'OFPQOFC_EPERM',
1020}
1021
1022# Identifiers from group ofp_queue_properties
1023OFPQT_MIN_RATE = 1
1024OFPQT_MAX_RATE = 2
1025OFPQT_EXPERIMENTER = 65535
1026
1027ofp_queue_properties_map = {
1028 1: 'OFPQT_MIN_RATE',
1029 2: 'OFPQT_MAX_RATE',
1030 65535: 'OFPQT_EXPERIMENTER',
1031}
1032
1033# Identifiers from group ofp_role_request_failed_code
1034OFPRRFC_STALE = 0
1035OFPRRFC_UNSUP = 1
1036OFPRRFC_BAD_ROLE = 2
1037
1038ofp_role_request_failed_code_map = {
1039 0: 'OFPRRFC_STALE',
1040 1: 'OFPRRFC_UNSUP',
1041 2: 'OFPRRFC_BAD_ROLE',
1042}
1043
Rich Lane6f4978c2013-10-20 21:33:52 -07001044# Identifiers from group ofp_stats_reply_flags
1045OFPSF_REPLY_MORE = 1
1046
1047ofp_stats_reply_flags_map = {
1048 1: 'OFPSF_REPLY_MORE',
1049}
1050
1051# Identifiers from group ofp_stats_request_flags
1052OFPSF_REQ_MORE = 1
1053
1054ofp_stats_request_flags_map = {
1055 1: 'OFPSF_REQ_MORE',
1056}
1057
1058# Identifiers from group ofp_stats_type
1059OFPST_DESC = 0
1060OFPST_FLOW = 1
1061OFPST_AGGREGATE = 2
1062OFPST_TABLE = 3
1063OFPST_PORT = 4
1064OFPST_QUEUE = 5
1065OFPST_GROUP = 6
1066OFPST_GROUP_DESC = 7
1067OFPST_GROUP_FEATURES = 8
1068OFPST_METER = 9
1069OFPST_METER_CONFIG = 10
1070OFPST_METER_FEATURES = 11
1071OFPST_TABLE_FEATURES = 12
1072OFPST_PORT_DESC = 13
1073OFPST_EXPERIMENTER = 65535
1074
1075ofp_stats_type_map = {
1076 0: 'OFPST_DESC',
1077 1: 'OFPST_FLOW',
1078 2: 'OFPST_AGGREGATE',
1079 3: 'OFPST_TABLE',
1080 4: 'OFPST_PORT',
1081 5: 'OFPST_QUEUE',
1082 6: 'OFPST_GROUP',
1083 7: 'OFPST_GROUP_DESC',
1084 8: 'OFPST_GROUP_FEATURES',
1085 9: 'OFPST_METER',
1086 10: 'OFPST_METER_CONFIG',
1087 11: 'OFPST_METER_FEATURES',
1088 12: 'OFPST_TABLE_FEATURES',
1089 13: 'OFPST_PORT_DESC',
1090 65535: 'OFPST_EXPERIMENTER',
1091}
1092
Rich Lanec2ee4b82013-04-24 17:12:38 -07001093# Identifiers from group ofp_switch_config_failed_code
1094OFPSCFC_BAD_FLAGS = 0
1095OFPSCFC_BAD_LEN = 1
1096OFPSCFC_EPERM = 2
1097
1098ofp_switch_config_failed_code_map = {
1099 0: 'OFPSCFC_BAD_FLAGS',
1100 1: 'OFPSCFC_BAD_LEN',
1101 2: 'OFPSCFC_EPERM',
1102}
1103
1104# Identifiers from group ofp_table
1105OFPTT_MAX = 254
1106OFPTT_ALL = 255
1107
1108ofp_table_map = {
1109 254: 'OFPTT_MAX',
1110 255: 'OFPTT_ALL',
1111}
1112
1113# Identifiers from group ofp_table_config
1114OFPTC_DEPRECATED_MASK = 3
1115
1116ofp_table_config_map = {
1117 3: 'OFPTC_DEPRECATED_MASK',
1118}
1119
1120# Identifiers from group ofp_table_feature_prop_type
1121OFPTFPT_INSTRUCTIONS = 0
1122OFPTFPT_INSTRUCTIONS_MISS = 1
1123OFPTFPT_NEXT_TABLES = 2
1124OFPTFPT_NEXT_TABLES_MISS = 3
1125OFPTFPT_WRITE_ACTIONS = 4
1126OFPTFPT_WRITE_ACTIONS_MISS = 5
1127OFPTFPT_APPLY_ACTIONS = 6
1128OFPTFPT_APPLY_ACTIONS_MISS = 7
1129OFPTFPT_MATCH = 8
1130OFPTFPT_WILDCARDS = 10
1131OFPTFPT_WRITE_SETFIELD = 12
1132OFPTFPT_WRITE_SETFIELD_MISS = 13
1133OFPTFPT_APPLY_SETFIELD = 14
1134OFPTFPT_APPLY_SETFIELD_MISS = 15
1135OFPTFPT_EXPERIMENTER = 65534
1136OFPTFPT_EXPERIMENTER_MISS = 65535
1137
1138ofp_table_feature_prop_type_map = {
1139 0: 'OFPTFPT_INSTRUCTIONS',
1140 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1141 2: 'OFPTFPT_NEXT_TABLES',
1142 3: 'OFPTFPT_NEXT_TABLES_MISS',
1143 4: 'OFPTFPT_WRITE_ACTIONS',
1144 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1145 6: 'OFPTFPT_APPLY_ACTIONS',
1146 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1147 8: 'OFPTFPT_MATCH',
1148 10: 'OFPTFPT_WILDCARDS',
1149 12: 'OFPTFPT_WRITE_SETFIELD',
1150 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1151 14: 'OFPTFPT_APPLY_SETFIELD',
1152 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1153 65534: 'OFPTFPT_EXPERIMENTER',
1154 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1155}
1156
1157# Identifiers from group ofp_table_features_failed_code
1158OFPTFFC_BAD_TABLE = 0
1159OFPTFFC_BAD_METADATA = 1
1160OFPTFFC_BAD_TYPE = 2
1161OFPTFFC_BAD_LEN = 3
1162OFPTFFC_BAD_ARGUMENT = 4
1163OFPTFFC_EPERM = 5
1164
1165ofp_table_features_failed_code_map = {
1166 0: 'OFPTFFC_BAD_TABLE',
1167 1: 'OFPTFFC_BAD_METADATA',
1168 2: 'OFPTFFC_BAD_TYPE',
1169 3: 'OFPTFFC_BAD_LEN',
1170 4: 'OFPTFFC_BAD_ARGUMENT',
1171 5: 'OFPTFFC_EPERM',
1172}
1173
1174# Identifiers from group ofp_table_mod_failed_code
1175OFPTMFC_BAD_TABLE = 0
1176OFPTMFC_BAD_CONFIG = 1
1177OFPTMFC_EPERM = 2
1178
1179ofp_table_mod_failed_code_map = {
1180 0: 'OFPTMFC_BAD_TABLE',
1181 1: 'OFPTMFC_BAD_CONFIG',
1182 2: 'OFPTMFC_EPERM',
1183}
1184
1185# Identifiers from group ofp_type
1186OFPT_HELLO = 0
1187OFPT_ERROR = 1
1188OFPT_ECHO_REQUEST = 2
1189OFPT_ECHO_REPLY = 3
1190OFPT_EXPERIMENTER = 4
1191OFPT_FEATURES_REQUEST = 5
1192OFPT_FEATURES_REPLY = 6
1193OFPT_GET_CONFIG_REQUEST = 7
1194OFPT_GET_CONFIG_REPLY = 8
1195OFPT_SET_CONFIG = 9
1196OFPT_PACKET_IN = 10
1197OFPT_FLOW_REMOVED = 11
1198OFPT_PORT_STATUS = 12
1199OFPT_PACKET_OUT = 13
1200OFPT_FLOW_MOD = 14
1201OFPT_GROUP_MOD = 15
1202OFPT_PORT_MOD = 16
1203OFPT_TABLE_MOD = 17
Rich Lane6f4978c2013-10-20 21:33:52 -07001204OFPT_STATS_REQUEST = 18
1205OFPT_STATS_REPLY = 19
Rich Lanec2ee4b82013-04-24 17:12:38 -07001206OFPT_BARRIER_REQUEST = 20
1207OFPT_BARRIER_REPLY = 21
1208OFPT_QUEUE_GET_CONFIG_REQUEST = 22
1209OFPT_QUEUE_GET_CONFIG_REPLY = 23
1210OFPT_ROLE_REQUEST = 24
1211OFPT_ROLE_REPLY = 25
1212OFPT_GET_ASYNC_REQUEST = 26
1213OFPT_GET_ASYNC_REPLY = 27
1214OFPT_SET_ASYNC = 28
1215OFPT_METER_MOD = 29
1216
1217ofp_type_map = {
1218 0: 'OFPT_HELLO',
1219 1: 'OFPT_ERROR',
1220 2: 'OFPT_ECHO_REQUEST',
1221 3: 'OFPT_ECHO_REPLY',
1222 4: 'OFPT_EXPERIMENTER',
1223 5: 'OFPT_FEATURES_REQUEST',
1224 6: 'OFPT_FEATURES_REPLY',
1225 7: 'OFPT_GET_CONFIG_REQUEST',
1226 8: 'OFPT_GET_CONFIG_REPLY',
1227 9: 'OFPT_SET_CONFIG',
1228 10: 'OFPT_PACKET_IN',
1229 11: 'OFPT_FLOW_REMOVED',
1230 12: 'OFPT_PORT_STATUS',
1231 13: 'OFPT_PACKET_OUT',
1232 14: 'OFPT_FLOW_MOD',
1233 15: 'OFPT_GROUP_MOD',
1234 16: 'OFPT_PORT_MOD',
1235 17: 'OFPT_TABLE_MOD',
Rich Lane6f4978c2013-10-20 21:33:52 -07001236 18: 'OFPT_STATS_REQUEST',
1237 19: 'OFPT_STATS_REPLY',
Rich Lanec2ee4b82013-04-24 17:12:38 -07001238 20: 'OFPT_BARRIER_REQUEST',
1239 21: 'OFPT_BARRIER_REPLY',
1240 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
1241 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
1242 24: 'OFPT_ROLE_REQUEST',
1243 25: 'OFPT_ROLE_REPLY',
1244 26: 'OFPT_GET_ASYNC_REQUEST',
1245 27: 'OFPT_GET_ASYNC_REPLY',
1246 28: 'OFPT_SET_ASYNC',
1247 29: 'OFPT_METER_MOD',
1248}
1249
1250# Identifiers from group ofp_vlan_id
1251OFPVID_NONE = 0
1252OFPVID_PRESENT = 4096
1253
1254ofp_vlan_id_map = {
1255 0: 'OFPVID_NONE',
1256 4096: 'OFPVID_PRESENT',
1257}
1258