blob: 2465a6ed9606f2330c33368e9f1f53e34bf0ba26 [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 Lane2d1b40e2015-02-11 12:45:33 -0800309OFP_BSN_PKTIN_FLAG_ARP_CACHE = 4096
Rich Lane93b33132014-04-21 12:20:58 -0700310
311ofp_bsn_pktin_flag_map = {
312 1: 'OFP_BSN_PKTIN_FLAG_PDU',
313 2: 'OFP_BSN_PKTIN_FLAG_NEW_HOST',
314 4: 'OFP_BSN_PKTIN_FLAG_STATION_MOVE',
315 8: 'OFP_BSN_PKTIN_FLAG_ARP',
316 16: 'OFP_BSN_PKTIN_FLAG_DHCP',
317 32: 'OFP_BSN_PKTIN_FLAG_L2_CPU',
318 64: 'OFP_BSN_PKTIN_FLAG_DEBUG',
319 128: 'OFP_BSN_PKTIN_FLAG_TTL_EXPIRED',
320 256: 'OFP_BSN_PKTIN_FLAG_L3_MISS',
321 512: 'OFP_BSN_PKTIN_FLAG_L3_CPU',
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700322 1024: 'OFP_BSN_PKTIN_FLAG_INGRESS_ACL',
Rich Laneccd32ed2014-11-10 17:48:24 -0800323 2048: 'OFP_BSN_PKTIN_FLAG_SFLOW',
Rich Lane2d1b40e2015-02-11 12:45:33 -0800324 4096: 'OFP_BSN_PKTIN_FLAG_ARP_CACHE',
Rich Lane93b33132014-04-21 12:20:58 -0700325}
326
Rich Lane7dcdf022013-12-11 14:45:27 -0800327# Identifiers from group ofp_bsn_port_counter
328OFP_BSN_PORT_COUNTER_RX_BYTES = 0
329OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST = 1
330OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST = 2
331OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST = 3
332OFP_BSN_PORT_COUNTER_RX_DROPPED = 4
333OFP_BSN_PORT_COUNTER_RX_ERRORS = 5
334OFP_BSN_PORT_COUNTER_TX_BYTES = 6
335OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST = 7
336OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST = 8
337OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST = 9
338OFP_BSN_PORT_COUNTER_TX_DROPPED = 10
339OFP_BSN_PORT_COUNTER_TX_ERRORS = 11
Rich Lane5587ab12014-06-30 11:19:09 -0700340OFP_BSN_PORT_COUNTER_RX_RUNTS = 12
341OFP_BSN_PORT_COUNTER_RX_GIANTS = 13
342OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS = 14
343OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS = 15
344OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS = 16
345OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT = 17
346OFP_BSN_PORT_COUNTER_TX_COLLISIONS = 18
347OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS = 19
348OFP_BSN_PORT_COUNTER_TX_DEFERRED = 20
349OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT = 21
Harshmeet Singh6f0c8932014-07-02 15:52:56 -0700350OFP_BSN_PORT_COUNTER_RX_PACKETS = 22
351OFP_BSN_PORT_COUNTER_TX_PACKETS = 23
352OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS = 24
353OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25
354OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26
Rich Lane7dcdf022013-12-11 14:45:27 -0800355
356ofp_bsn_port_counter_map = {
357 0: 'OFP_BSN_PORT_COUNTER_RX_BYTES',
358 1: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_UNICAST',
359 2: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_BROADCAST',
360 3: 'OFP_BSN_PORT_COUNTER_RX_PACKETS_MULTICAST',
361 4: 'OFP_BSN_PORT_COUNTER_RX_DROPPED',
362 5: 'OFP_BSN_PORT_COUNTER_RX_ERRORS',
363 6: 'OFP_BSN_PORT_COUNTER_TX_BYTES',
364 7: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_UNICAST',
365 8: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_BROADCAST',
366 9: 'OFP_BSN_PORT_COUNTER_TX_PACKETS_MULTICAST',
367 10: 'OFP_BSN_PORT_COUNTER_TX_DROPPED',
368 11: 'OFP_BSN_PORT_COUNTER_TX_ERRORS',
Rich Lane5587ab12014-06-30 11:19:09 -0700369 12: 'OFP_BSN_PORT_COUNTER_RX_RUNTS',
370 13: 'OFP_BSN_PORT_COUNTER_RX_GIANTS',
371 14: 'OFP_BSN_PORT_COUNTER_RX_CRC_ERRORS',
372 15: 'OFP_BSN_PORT_COUNTER_RX_ALIGNMENT_ERRORS',
373 16: 'OFP_BSN_PORT_COUNTER_RX_SYMBOL_ERRORS',
374 17: 'OFP_BSN_PORT_COUNTER_RX_PAUSE_INPUT',
375 18: 'OFP_BSN_PORT_COUNTER_TX_COLLISIONS',
376 19: 'OFP_BSN_PORT_COUNTER_TX_LATE_COLLISIONS',
377 20: 'OFP_BSN_PORT_COUNTER_TX_DEFERRED',
378 21: 'OFP_BSN_PORT_COUNTER_TX_PAUSE_OUTPUT',
Harshmeet Singh6f0c8932014-07-02 15:52:56 -0700379 22: 'OFP_BSN_PORT_COUNTER_RX_PACKETS',
380 23: 'OFP_BSN_PORT_COUNTER_TX_PACKETS',
381 24: 'OFP_BSN_PORT_COUNTER_RX_LENGTH_ERRORS',
382 25: 'OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS',
383 26: 'OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS',
Rich Lane7dcdf022013-12-11 14:45:27 -0800384}
385
Harshmeet Singhc51f4042014-05-21 13:32:52 -0700386# Identifiers from group ofp_bsn_tcp_flag
387OFP_BSN_TCP_FLAG_FIN = 1
388OFP_BSN_TCP_FLAG_SYN = 2
389OFP_BSN_TCP_FLAG_RST = 4
390OFP_BSN_TCP_FLAG_PSH = 8
391OFP_BSN_TCP_FLAG_ACK = 16
392OFP_BSN_TCP_FLAG_URG = 32
393OFP_BSN_TCP_FLAG_ECE = 64
394OFP_BSN_TCP_FLAG_CWR = 128
395OFP_BSN_TCP_FLAG_NS = 256
396
397ofp_bsn_tcp_flag_map = {
398 1: 'OFP_BSN_TCP_FLAG_FIN',
399 2: 'OFP_BSN_TCP_FLAG_SYN',
400 4: 'OFP_BSN_TCP_FLAG_RST',
401 8: 'OFP_BSN_TCP_FLAG_PSH',
402 16: 'OFP_BSN_TCP_FLAG_ACK',
403 32: 'OFP_BSN_TCP_FLAG_URG',
404 64: 'OFP_BSN_TCP_FLAG_ECE',
405 128: 'OFP_BSN_TCP_FLAG_CWR',
406 256: 'OFP_BSN_TCP_FLAG_NS',
407}
408
Rich Lane93b33132014-04-21 12:20:58 -0700409# Identifiers from group ofp_bsn_udf_anchor
410OFP_BSN_UDF_ANCHOR_PACKET_START = 0
411OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1
412OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2
413
414ofp_bsn_udf_anchor_map = {
415 0: 'OFP_BSN_UDF_ANCHOR_PACKET_START',
416 1: 'OFP_BSN_UDF_ANCHOR_L3_HEADER_START',
417 2: 'OFP_BSN_UDF_ANCHOR_L4_HEADER_START',
418}
419
Rich Lane5587ab12014-06-30 11:19:09 -0700420# Identifiers from group ofp_bsn_vlan_counter_constants
421OFP_BSN_VLAN_ALL = 65535
422
423ofp_bsn_vlan_counter_constants_map = {
424 65535: 'OFP_BSN_VLAN_ALL',
425}
426
Rich Lane93b33132014-04-21 12:20:58 -0700427# Identifiers from group ofp_bsn_vport_l2gre_flags
428OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID = 1
429OF_BSN_VPORT_L2GRE_DSCP_ASSIGN = 2
430OF_BSN_VPORT_L2GRE_DSCP_COPY = 4
Rich Lane5587ab12014-06-30 11:19:09 -0700431OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID = 8
Rich Lanef9530c42014-09-15 09:59:43 -0700432OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID = 16
Rich Lane93b33132014-04-21 12:20:58 -0700433
434ofp_bsn_vport_l2gre_flags_map = {
435 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
436 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
437 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
Rich Lane5587ab12014-06-30 11:19:09 -0700438 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
Rich Lanef9530c42014-09-15 09:59:43 -0700439 16: 'OF_BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID',
Rich Lane93b33132014-04-21 12:20:58 -0700440}
441
Dan Talaycof6202252013-07-02 01:00:29 -0700442# Identifiers from group ofp_bsn_vport_q_in_q_untagged
443OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
444
445ofp_bsn_vport_q_in_q_untagged_map = {
446 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
447}
448
Rich Laned53156a2013-08-05 17:17:33 -0700449# Identifiers from group ofp_bsn_vport_status
450OF_BSN_VPORT_STATUS_OK = 0
451OF_BSN_VPORT_STATUS_FAILED = 1
452
453ofp_bsn_vport_status_map = {
454 0: 'OF_BSN_VPORT_STATUS_OK',
455 1: 'OF_BSN_VPORT_STATUS_FAILED',
456}
457
Rich Lane5587ab12014-06-30 11:19:09 -0700458# Identifiers from group ofp_bsn_vrf_counter_constants
459OFP_BSN_VRF_ALL = 4294967295
460
461ofp_bsn_vrf_counter_constants_map = {
462 4294967295: 'OFP_BSN_VRF_ALL',
463}
464
Rich Lanec2ee4b82013-04-24 17:12:38 -0700465# Identifiers from group ofp_capabilities
466OFPC_FLOW_STATS = 1
467OFPC_TABLE_STATS = 2
468OFPC_PORT_STATS = 4
469OFPC_GROUP_STATS = 8
470OFPC_IP_REASM = 32
471OFPC_QUEUE_STATS = 64
472OFPC_PORT_BLOCKED = 256
473
474ofp_capabilities_map = {
475 1: 'OFPC_FLOW_STATS',
476 2: 'OFPC_TABLE_STATS',
477 4: 'OFPC_PORT_STATS',
478 8: 'OFPC_GROUP_STATS',
479 32: 'OFPC_IP_REASM',
480 64: 'OFPC_QUEUE_STATS',
481 256: 'OFPC_PORT_BLOCKED',
482}
483
484# Identifiers from group ofp_config_flags
485OFPC_FRAG_NORMAL = 0
486OFPC_FRAG_DROP = 1
487OFPC_FRAG_REASM = 2
488OFPC_FRAG_MASK = 3
489
490ofp_config_flags_map = {
491 0: 'OFPC_FRAG_NORMAL',
492 1: 'OFPC_FRAG_DROP',
493 2: 'OFPC_FRAG_REASM',
494 3: 'OFPC_FRAG_MASK',
495}
496
497# Identifiers from group ofp_controller_max_len
498OFPCML_MAX = 65509
499OFPCML_NO_BUFFER = 65535
500
501ofp_controller_max_len_map = {
502 65509: 'OFPCML_MAX',
503 65535: 'OFPCML_NO_BUFFER',
504}
505
506# Identifiers from group ofp_controller_role
507OFPCR_ROLE_NOCHANGE = 0
508OFPCR_ROLE_EQUAL = 1
509OFPCR_ROLE_MASTER = 2
510OFPCR_ROLE_SLAVE = 3
511
512ofp_controller_role_map = {
513 0: 'OFPCR_ROLE_NOCHANGE',
514 1: 'OFPCR_ROLE_EQUAL',
515 2: 'OFPCR_ROLE_MASTER',
516 3: 'OFPCR_ROLE_SLAVE',
517}
518
519# Identifiers from group ofp_error_type
520OFPET_HELLO_FAILED = 0
521OFPET_BAD_REQUEST = 1
522OFPET_BAD_ACTION = 2
523OFPET_BAD_INSTRUCTION = 3
524OFPET_BAD_MATCH = 4
525OFPET_FLOW_MOD_FAILED = 5
526OFPET_GROUP_MOD_FAILED = 6
527OFPET_PORT_MOD_FAILED = 7
528OFPET_TABLE_MOD_FAILED = 8
529OFPET_QUEUE_OP_FAILED = 9
530OFPET_SWITCH_CONFIG_FAILED = 10
531OFPET_ROLE_REQUEST_FAILED = 11
532OFPET_METER_MOD_FAILED = 12
533OFPET_TABLE_FEATURES_FAILED = 13
534OFPET_EXPERIMENTER = 65535
535
536ofp_error_type_map = {
537 0: 'OFPET_HELLO_FAILED',
538 1: 'OFPET_BAD_REQUEST',
539 2: 'OFPET_BAD_ACTION',
540 3: 'OFPET_BAD_INSTRUCTION',
541 4: 'OFPET_BAD_MATCH',
542 5: 'OFPET_FLOW_MOD_FAILED',
543 6: 'OFPET_GROUP_MOD_FAILED',
544 7: 'OFPET_PORT_MOD_FAILED',
545 8: 'OFPET_TABLE_MOD_FAILED',
546 9: 'OFPET_QUEUE_OP_FAILED',
547 10: 'OFPET_SWITCH_CONFIG_FAILED',
548 11: 'OFPET_ROLE_REQUEST_FAILED',
549 12: 'OFPET_METER_MOD_FAILED',
550 13: 'OFPET_TABLE_FEATURES_FAILED',
551 65535: 'OFPET_EXPERIMENTER',
552}
553
554# Identifiers from group ofp_flow_mod_command
555OFPFC_ADD = 0
556OFPFC_MODIFY = 1
557OFPFC_MODIFY_STRICT = 2
558OFPFC_DELETE = 3
559OFPFC_DELETE_STRICT = 4
560
561ofp_flow_mod_command_map = {
562 0: 'OFPFC_ADD',
563 1: 'OFPFC_MODIFY',
564 2: 'OFPFC_MODIFY_STRICT',
565 3: 'OFPFC_DELETE',
566 4: 'OFPFC_DELETE_STRICT',
567}
568
569# Identifiers from group ofp_flow_mod_failed_code
570OFPFMFC_UNKNOWN = 0
571OFPFMFC_TABLE_FULL = 1
572OFPFMFC_BAD_TABLE_ID = 2
573OFPFMFC_OVERLAP = 3
574OFPFMFC_EPERM = 4
575OFPFMFC_BAD_TIMEOUT = 5
576OFPFMFC_BAD_COMMAND = 6
577OFPFMFC_BAD_FLAGS = 7
578
579ofp_flow_mod_failed_code_map = {
580 0: 'OFPFMFC_UNKNOWN',
581 1: 'OFPFMFC_TABLE_FULL',
582 2: 'OFPFMFC_BAD_TABLE_ID',
583 3: 'OFPFMFC_OVERLAP',
584 4: 'OFPFMFC_EPERM',
585 5: 'OFPFMFC_BAD_TIMEOUT',
586 6: 'OFPFMFC_BAD_COMMAND',
587 7: 'OFPFMFC_BAD_FLAGS',
588}
589
590# Identifiers from group ofp_flow_mod_flags
591OFPFF_SEND_FLOW_REM = 1
592OFPFF_CHECK_OVERLAP = 2
593OFPFF_RESET_COUNTS = 4
594OFPFF_NO_PKT_COUNTS = 8
595OFPFF_NO_BYT_COUNTS = 16
Rich Lane6f4978c2013-10-20 21:33:52 -0700596OFPFF_BSN_SEND_IDLE = 128
Rich Lanec2ee4b82013-04-24 17:12:38 -0700597
598ofp_flow_mod_flags_map = {
599 1: 'OFPFF_SEND_FLOW_REM',
600 2: 'OFPFF_CHECK_OVERLAP',
601 4: 'OFPFF_RESET_COUNTS',
602 8: 'OFPFF_NO_PKT_COUNTS',
603 16: 'OFPFF_NO_BYT_COUNTS',
Rich Lane6f4978c2013-10-20 21:33:52 -0700604 128: 'OFPFF_BSN_SEND_IDLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700605}
606
607# Identifiers from group ofp_flow_removed_reason
608OFPRR_IDLE_TIMEOUT = 0
609OFPRR_HARD_TIMEOUT = 1
610OFPRR_DELETE = 2
611OFPRR_GROUP_DELETE = 3
612
613ofp_flow_removed_reason_map = {
614 0: 'OFPRR_IDLE_TIMEOUT',
615 1: 'OFPRR_HARD_TIMEOUT',
616 2: 'OFPRR_DELETE',
617 3: 'OFPRR_GROUP_DELETE',
618}
619
620# Identifiers from group ofp_group
621OFPG_MAX = 4294967040
622OFPG_ALL = 4294967292
623OFPG_ANY = 4294967295
624
625ofp_group_map = {
626 4294967040: 'OFPG_MAX',
627 4294967292: 'OFPG_ALL',
628 4294967295: 'OFPG_ANY',
629}
630
631# Identifiers from group ofp_group_capabilities
632OFPGFC_SELECT_WEIGHT = 1
633OFPGFC_SELECT_LIVENESS = 2
634OFPGFC_CHAINING = 4
635OFPGFC_CHAINING_CHECKS = 8
636
637ofp_group_capabilities_map = {
638 1: 'OFPGFC_SELECT_WEIGHT',
639 2: 'OFPGFC_SELECT_LIVENESS',
640 4: 'OFPGFC_CHAINING',
641 8: 'OFPGFC_CHAINING_CHECKS',
642}
643
644# Identifiers from group ofp_group_mod_command
645OFPGC_ADD = 0
646OFPGC_MODIFY = 1
647OFPGC_DELETE = 2
648
649ofp_group_mod_command_map = {
650 0: 'OFPGC_ADD',
651 1: 'OFPGC_MODIFY',
652 2: 'OFPGC_DELETE',
653}
654
655# Identifiers from group ofp_group_mod_failed_code
656OFPGMFC_GROUP_EXISTS = 0
657OFPGMFC_INVALID_GROUP = 1
658OFPGMFC_WEIGHT_UNSUPPORTED = 2
659OFPGMFC_OUT_OF_GROUPS = 3
660OFPGMFC_OUT_OF_BUCKETS = 4
661OFPGMFC_CHAINING_UNSUPPORTED = 5
662OFPGMFC_WATCH_UNSUPPORTED = 6
663OFPGMFC_LOOP = 7
664OFPGMFC_UNKNOWN_GROUP = 8
665OFPGMFC_CHAINED_GROUP = 9
666OFPGMFC_BAD_TYPE = 10
667OFPGMFC_BAD_COMMAND = 11
668OFPGMFC_BAD_BUCKET = 12
669OFPGMFC_BAD_WATCH = 13
670OFPGMFC_EPERM = 14
671
672ofp_group_mod_failed_code_map = {
673 0: 'OFPGMFC_GROUP_EXISTS',
674 1: 'OFPGMFC_INVALID_GROUP',
675 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
676 3: 'OFPGMFC_OUT_OF_GROUPS',
677 4: 'OFPGMFC_OUT_OF_BUCKETS',
678 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
679 6: 'OFPGMFC_WATCH_UNSUPPORTED',
680 7: 'OFPGMFC_LOOP',
681 8: 'OFPGMFC_UNKNOWN_GROUP',
682 9: 'OFPGMFC_CHAINED_GROUP',
683 10: 'OFPGMFC_BAD_TYPE',
684 11: 'OFPGMFC_BAD_COMMAND',
685 12: 'OFPGMFC_BAD_BUCKET',
686 13: 'OFPGMFC_BAD_WATCH',
687 14: 'OFPGMFC_EPERM',
688}
689
690# Identifiers from group ofp_group_type
691OFPGT_ALL = 0
692OFPGT_SELECT = 1
693OFPGT_INDIRECT = 2
694OFPGT_FF = 3
695
696ofp_group_type_map = {
697 0: 'OFPGT_ALL',
698 1: 'OFPGT_SELECT',
699 2: 'OFPGT_INDIRECT',
700 3: 'OFPGT_FF',
701}
702
703# Identifiers from group ofp_hello_elem_type
704OFPHET_VERSIONBITMAP = 1
705
706ofp_hello_elem_type_map = {
707 1: 'OFPHET_VERSIONBITMAP',
708}
709
710# Identifiers from group ofp_hello_failed_code
711OFPHFC_INCOMPATIBLE = 0
712OFPHFC_EPERM = 1
713
714ofp_hello_failed_code_map = {
715 0: 'OFPHFC_INCOMPATIBLE',
716 1: 'OFPHFC_EPERM',
717}
718
719# Identifiers from group ofp_instruction_type
720OFPIT_GOTO_TABLE = 1
721OFPIT_WRITE_METADATA = 2
722OFPIT_WRITE_ACTIONS = 3
723OFPIT_APPLY_ACTIONS = 4
724OFPIT_CLEAR_ACTIONS = 5
725OFPIT_METER = 6
726OFPIT_EXPERIMENTER = 65535
727
728ofp_instruction_type_map = {
729 1: 'OFPIT_GOTO_TABLE',
730 2: 'OFPIT_WRITE_METADATA',
731 3: 'OFPIT_WRITE_ACTIONS',
732 4: 'OFPIT_APPLY_ACTIONS',
733 5: 'OFPIT_CLEAR_ACTIONS',
734 6: 'OFPIT_METER',
735 65535: 'OFPIT_EXPERIMENTER',
736}
737
738# Identifiers from group ofp_ipv6exthdr_flags
739OFPIEH_NONEXT = 1
740OFPIEH_ESP = 2
741OFPIEH_AUTH = 4
742OFPIEH_DEST = 8
743OFPIEH_FRAG = 16
744OFPIEH_ROUTER = 32
745OFPIEH_HOP = 64
746OFPIEH_UNREP = 128
747OFPIEH_UNSEQ = 256
748
749ofp_ipv6exthdr_flags_map = {
750 1: 'OFPIEH_NONEXT',
751 2: 'OFPIEH_ESP',
752 4: 'OFPIEH_AUTH',
753 8: 'OFPIEH_DEST',
754 16: 'OFPIEH_FRAG',
755 32: 'OFPIEH_ROUTER',
756 64: 'OFPIEH_HOP',
757 128: 'OFPIEH_UNREP',
758 256: 'OFPIEH_UNSEQ',
759}
760
761# Identifiers from group ofp_match_type
762OFPMT_STANDARD = 0
763OFPMT_OXM = 1
764
765ofp_match_type_map = {
766 0: 'OFPMT_STANDARD',
767 1: 'OFPMT_OXM',
768}
769
770# Identifiers from group ofp_meter
771OFPM_MAX = 4294901760
772OFPM_SLOWPATH = 4294967293
773OFPM_CONTROLLER = 4294967294
774OFPM_ALL = 4294967295
775
776ofp_meter_map = {
777 4294901760: 'OFPM_MAX',
778 4294967293: 'OFPM_SLOWPATH',
779 4294967294: 'OFPM_CONTROLLER',
780 4294967295: 'OFPM_ALL',
781}
782
783# Identifiers from group ofp_meter_band_type
784OFPMBT_DROP = 1
785OFPMBT_DSCP_REMARK = 2
786OFPMBT_EXPERIMENTER = 65535
787
788ofp_meter_band_type_map = {
789 1: 'OFPMBT_DROP',
790 2: 'OFPMBT_DSCP_REMARK',
791 65535: 'OFPMBT_EXPERIMENTER',
792}
793
794# Identifiers from group ofp_meter_flags
795OFPMF_KBPS = 1
796OFPMF_PKTPS = 2
797OFPMF_BURST = 4
798OFPMF_STATS = 8
799
800ofp_meter_flags_map = {
801 1: 'OFPMF_KBPS',
802 2: 'OFPMF_PKTPS',
803 4: 'OFPMF_BURST',
804 8: 'OFPMF_STATS',
805}
806
807# Identifiers from group ofp_meter_mod_command
808OFPMC_ADD = 0
809OFPMC_MODIFY = 1
810OFPMC_DELETE = 2
811
812ofp_meter_mod_command_map = {
813 0: 'OFPMC_ADD',
814 1: 'OFPMC_MODIFY',
815 2: 'OFPMC_DELETE',
816}
817
818# Identifiers from group ofp_meter_mod_failed_code
819OFPMMFC_UNKNOWN = 0
820OFPMMFC_METER_EXISTS = 1
821OFPMMFC_INVALID_METER = 2
822OFPMMFC_UNKNOWN_METER = 3
823OFPMMFC_BAD_COMMAND = 4
824OFPMMFC_BAD_FLAGS = 5
825OFPMMFC_BAD_RATE = 6
826OFPMMFC_BAD_BURST = 7
827OFPMMFC_BAD_BAND = 8
828OFPMMFC_BAD_BAND_VALUE = 9
829OFPMMFC_OUT_OF_METERS = 10
830OFPMMFC_OUT_OF_BANDS = 11
831
832ofp_meter_mod_failed_code_map = {
833 0: 'OFPMMFC_UNKNOWN',
834 1: 'OFPMMFC_METER_EXISTS',
835 2: 'OFPMMFC_INVALID_METER',
836 3: 'OFPMMFC_UNKNOWN_METER',
837 4: 'OFPMMFC_BAD_COMMAND',
838 5: 'OFPMMFC_BAD_FLAGS',
839 6: 'OFPMMFC_BAD_RATE',
840 7: 'OFPMMFC_BAD_BURST',
841 8: 'OFPMMFC_BAD_BAND',
842 9: 'OFPMMFC_BAD_BAND_VALUE',
843 10: 'OFPMMFC_OUT_OF_METERS',
844 11: 'OFPMMFC_OUT_OF_BANDS',
845}
846
Rich Lanec2ee4b82013-04-24 17:12:38 -0700847# Identifiers from group ofp_oxm_class
848OFPXMC_NXM_0 = 0
849OFPXMC_NXM_1 = 1
850OFPXMC_OPENFLOW_BASIC = 32768
851OFPXMC_EXPERIMENTER = 65535
852
853ofp_oxm_class_map = {
854 0: 'OFPXMC_NXM_0',
855 1: 'OFPXMC_NXM_1',
856 32768: 'OFPXMC_OPENFLOW_BASIC',
857 65535: 'OFPXMC_EXPERIMENTER',
858}
859
860# Identifiers from group ofp_packet_in_reason
861OFPR_NO_MATCH = 0
862OFPR_ACTION = 1
863OFPR_INVALID_TTL = 2
Rich Laned9e3f7b2013-11-04 11:40:43 -0800864OFPR_BSN_NEW_HOST = 128
865OFPR_BSN_STATION_MOVE = 129
866OFPR_BSN_BAD_VLAN = 130
867OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
Rich Lane5454b682014-01-14 17:07:36 -0800868OFPR_BSN_NO_ROUTE = 132
Rich Lane95f7fc92014-01-27 17:08:16 -0800869OFPR_BSN_ICMP_ECHO_REQUEST = 133
870OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
871OFPR_BSN_DEST_HOST_UNREACHABLE = 135
872OFPR_BSN_DEST_PORT_UNREACHABLE = 136
873OFPR_BSN_FRAGMENTATION_REQUIRED = 137
874OFPR_BSN_ARP = 139
Rich Lane1b75abf2014-02-05 11:23:20 -0800875OFPR_BSN_DHCP = 140
Rich Lane9ec3fca2014-02-26 16:22:56 -0800876OFPR_BSN_DEBUG = 141
Rich Lanef50b7c32014-03-20 11:38:02 -0700877OFPR_BSN_PACKET_OF_DEATH = 142
Rich Lanec2ee4b82013-04-24 17:12:38 -0700878
879ofp_packet_in_reason_map = {
880 0: 'OFPR_NO_MATCH',
881 1: 'OFPR_ACTION',
882 2: 'OFPR_INVALID_TTL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800883 128: 'OFPR_BSN_NEW_HOST',
884 129: 'OFPR_BSN_STATION_MOVE',
885 130: 'OFPR_BSN_BAD_VLAN',
886 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
Rich Lane5454b682014-01-14 17:07:36 -0800887 132: 'OFPR_BSN_NO_ROUTE',
Rich Lane95f7fc92014-01-27 17:08:16 -0800888 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
889 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
890 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
891 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
892 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
893 139: 'OFPR_BSN_ARP',
Rich Lane1b75abf2014-02-05 11:23:20 -0800894 140: 'OFPR_BSN_DHCP',
Rich Lane9ec3fca2014-02-26 16:22:56 -0800895 141: 'OFPR_BSN_DEBUG',
Rich Lanef50b7c32014-03-20 11:38:02 -0700896 142: 'OFPR_BSN_PACKET_OF_DEATH',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700897}
898
899# Identifiers from group ofp_port
900OFPP_MAX = 4294967040
901OFPP_IN_PORT = 4294967288
902OFPP_TABLE = 4294967289
903OFPP_NORMAL = 4294967290
904OFPP_FLOOD = 4294967291
905OFPP_ALL = 4294967292
906OFPP_CONTROLLER = 4294967293
907OFPP_LOCAL = 4294967294
Rich Laned9e3f7b2013-11-04 11:40:43 -0800908OFPP_ANY = 4294967295
Rich Lanec2ee4b82013-04-24 17:12:38 -0700909
910ofp_port_map = {
911 4294967040: 'OFPP_MAX',
912 4294967288: 'OFPP_IN_PORT',
913 4294967289: 'OFPP_TABLE',
914 4294967290: 'OFPP_NORMAL',
915 4294967291: 'OFPP_FLOOD',
916 4294967292: 'OFPP_ALL',
917 4294967293: 'OFPP_CONTROLLER',
918 4294967294: 'OFPP_LOCAL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800919 4294967295: 'OFPP_ANY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700920}
921
922# Identifiers from group ofp_port_config
923OFPPC_PORT_DOWN = 1
924OFPPC_NO_RECV = 4
925OFPPC_NO_FWD = 32
926OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700927OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700928
929ofp_port_config_map = {
930 1: 'OFPPC_PORT_DOWN',
931 4: 'OFPPC_NO_RECV',
932 32: 'OFPPC_NO_FWD',
933 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700934 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700935}
936
937# Identifiers from group ofp_port_features
938OFPPF_10MB_HD = 1
939OFPPF_10MB_FD = 2
940OFPPF_100MB_HD = 4
941OFPPF_100MB_FD = 8
942OFPPF_1GB_HD = 16
943OFPPF_1GB_FD = 32
944OFPPF_10GB_FD = 64
945OFPPF_40GB_FD = 128
946OFPPF_100GB_FD = 256
947OFPPF_1TB_FD = 512
948OFPPF_OTHER = 1024
949OFPPF_COPPER = 2048
950OFPPF_FIBER = 4096
951OFPPF_AUTONEG = 8192
952OFPPF_PAUSE = 16384
953OFPPF_PAUSE_ASYM = 32768
Rich Laneccd32ed2014-11-10 17:48:24 -0800954OFPPF_BSN_BREAKOUT_CAPABLE = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700955
956ofp_port_features_map = {
957 1: 'OFPPF_10MB_HD',
958 2: 'OFPPF_10MB_FD',
959 4: 'OFPPF_100MB_HD',
960 8: 'OFPPF_100MB_FD',
961 16: 'OFPPF_1GB_HD',
962 32: 'OFPPF_1GB_FD',
963 64: 'OFPPF_10GB_FD',
964 128: 'OFPPF_40GB_FD',
965 256: 'OFPPF_100GB_FD',
966 512: 'OFPPF_1TB_FD',
967 1024: 'OFPPF_OTHER',
968 2048: 'OFPPF_COPPER',
969 4096: 'OFPPF_FIBER',
970 8192: 'OFPPF_AUTONEG',
971 16384: 'OFPPF_PAUSE',
972 32768: 'OFPPF_PAUSE_ASYM',
Rich Laneccd32ed2014-11-10 17:48:24 -0800973 2147483648: 'OFPPF_BSN_BREAKOUT_CAPABLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700974}
975
976# Identifiers from group ofp_port_mod_failed_code
977OFPPMFC_BAD_PORT = 0
978OFPPMFC_BAD_HW_ADDR = 1
979OFPPMFC_BAD_CONFIG = 2
980OFPPMFC_BAD_ADVERTISE = 3
981OFPPMFC_EPERM = 4
982
983ofp_port_mod_failed_code_map = {
984 0: 'OFPPMFC_BAD_PORT',
985 1: 'OFPPMFC_BAD_HW_ADDR',
986 2: 'OFPPMFC_BAD_CONFIG',
987 3: 'OFPPMFC_BAD_ADVERTISE',
988 4: 'OFPPMFC_EPERM',
989}
990
Rich Lanec2ee4b82013-04-24 17:12:38 -0700991# Identifiers from group ofp_port_reason
992OFPPR_ADD = 0
993OFPPR_DELETE = 1
994OFPPR_MODIFY = 2
995
996ofp_port_reason_map = {
997 0: 'OFPPR_ADD',
998 1: 'OFPPR_DELETE',
999 2: 'OFPPR_MODIFY',
1000}
1001
1002# Identifiers from group ofp_port_state
1003OFPPS_LINK_DOWN = 1
1004OFPPS_BLOCKED = 2
1005OFPPS_LIVE = 4
1006
1007ofp_port_state_map = {
1008 1: 'OFPPS_LINK_DOWN',
1009 2: 'OFPPS_BLOCKED',
1010 4: 'OFPPS_LIVE',
1011}
1012
1013# Identifiers from group ofp_queue_op_failed_code
1014OFPQOFC_BAD_PORT = 0
1015OFPQOFC_BAD_QUEUE = 1
1016OFPQOFC_EPERM = 2
1017
1018ofp_queue_op_failed_code_map = {
1019 0: 'OFPQOFC_BAD_PORT',
1020 1: 'OFPQOFC_BAD_QUEUE',
1021 2: 'OFPQOFC_EPERM',
1022}
1023
1024# Identifiers from group ofp_queue_properties
1025OFPQT_MIN_RATE = 1
1026OFPQT_MAX_RATE = 2
1027OFPQT_EXPERIMENTER = 65535
1028
1029ofp_queue_properties_map = {
1030 1: 'OFPQT_MIN_RATE',
1031 2: 'OFPQT_MAX_RATE',
1032 65535: 'OFPQT_EXPERIMENTER',
1033}
1034
1035# Identifiers from group ofp_role_request_failed_code
1036OFPRRFC_STALE = 0
1037OFPRRFC_UNSUP = 1
1038OFPRRFC_BAD_ROLE = 2
1039
1040ofp_role_request_failed_code_map = {
1041 0: 'OFPRRFC_STALE',
1042 1: 'OFPRRFC_UNSUP',
1043 2: 'OFPRRFC_BAD_ROLE',
1044}
1045
Rich Lane6f4978c2013-10-20 21:33:52 -07001046# Identifiers from group ofp_stats_reply_flags
1047OFPSF_REPLY_MORE = 1
1048
1049ofp_stats_reply_flags_map = {
1050 1: 'OFPSF_REPLY_MORE',
1051}
1052
1053# Identifiers from group ofp_stats_request_flags
1054OFPSF_REQ_MORE = 1
1055
1056ofp_stats_request_flags_map = {
1057 1: 'OFPSF_REQ_MORE',
1058}
1059
1060# Identifiers from group ofp_stats_type
1061OFPST_DESC = 0
1062OFPST_FLOW = 1
1063OFPST_AGGREGATE = 2
1064OFPST_TABLE = 3
1065OFPST_PORT = 4
1066OFPST_QUEUE = 5
1067OFPST_GROUP = 6
1068OFPST_GROUP_DESC = 7
1069OFPST_GROUP_FEATURES = 8
1070OFPST_METER = 9
1071OFPST_METER_CONFIG = 10
1072OFPST_METER_FEATURES = 11
1073OFPST_TABLE_FEATURES = 12
1074OFPST_PORT_DESC = 13
1075OFPST_EXPERIMENTER = 65535
1076
1077ofp_stats_type_map = {
1078 0: 'OFPST_DESC',
1079 1: 'OFPST_FLOW',
1080 2: 'OFPST_AGGREGATE',
1081 3: 'OFPST_TABLE',
1082 4: 'OFPST_PORT',
1083 5: 'OFPST_QUEUE',
1084 6: 'OFPST_GROUP',
1085 7: 'OFPST_GROUP_DESC',
1086 8: 'OFPST_GROUP_FEATURES',
1087 9: 'OFPST_METER',
1088 10: 'OFPST_METER_CONFIG',
1089 11: 'OFPST_METER_FEATURES',
1090 12: 'OFPST_TABLE_FEATURES',
1091 13: 'OFPST_PORT_DESC',
1092 65535: 'OFPST_EXPERIMENTER',
1093}
1094
Rich Lanec2ee4b82013-04-24 17:12:38 -07001095# Identifiers from group ofp_switch_config_failed_code
1096OFPSCFC_BAD_FLAGS = 0
1097OFPSCFC_BAD_LEN = 1
1098OFPSCFC_EPERM = 2
1099
1100ofp_switch_config_failed_code_map = {
1101 0: 'OFPSCFC_BAD_FLAGS',
1102 1: 'OFPSCFC_BAD_LEN',
1103 2: 'OFPSCFC_EPERM',
1104}
1105
1106# Identifiers from group ofp_table
1107OFPTT_MAX = 254
1108OFPTT_ALL = 255
1109
1110ofp_table_map = {
1111 254: 'OFPTT_MAX',
1112 255: 'OFPTT_ALL',
1113}
1114
1115# Identifiers from group ofp_table_config
1116OFPTC_DEPRECATED_MASK = 3
1117
1118ofp_table_config_map = {
1119 3: 'OFPTC_DEPRECATED_MASK',
1120}
1121
1122# Identifiers from group ofp_table_feature_prop_type
1123OFPTFPT_INSTRUCTIONS = 0
1124OFPTFPT_INSTRUCTIONS_MISS = 1
1125OFPTFPT_NEXT_TABLES = 2
1126OFPTFPT_NEXT_TABLES_MISS = 3
1127OFPTFPT_WRITE_ACTIONS = 4
1128OFPTFPT_WRITE_ACTIONS_MISS = 5
1129OFPTFPT_APPLY_ACTIONS = 6
1130OFPTFPT_APPLY_ACTIONS_MISS = 7
1131OFPTFPT_MATCH = 8
1132OFPTFPT_WILDCARDS = 10
1133OFPTFPT_WRITE_SETFIELD = 12
1134OFPTFPT_WRITE_SETFIELD_MISS = 13
1135OFPTFPT_APPLY_SETFIELD = 14
1136OFPTFPT_APPLY_SETFIELD_MISS = 15
1137OFPTFPT_EXPERIMENTER = 65534
1138OFPTFPT_EXPERIMENTER_MISS = 65535
1139
1140ofp_table_feature_prop_type_map = {
1141 0: 'OFPTFPT_INSTRUCTIONS',
1142 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1143 2: 'OFPTFPT_NEXT_TABLES',
1144 3: 'OFPTFPT_NEXT_TABLES_MISS',
1145 4: 'OFPTFPT_WRITE_ACTIONS',
1146 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1147 6: 'OFPTFPT_APPLY_ACTIONS',
1148 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1149 8: 'OFPTFPT_MATCH',
1150 10: 'OFPTFPT_WILDCARDS',
1151 12: 'OFPTFPT_WRITE_SETFIELD',
1152 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1153 14: 'OFPTFPT_APPLY_SETFIELD',
1154 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1155 65534: 'OFPTFPT_EXPERIMENTER',
1156 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1157}
1158
1159# Identifiers from group ofp_table_features_failed_code
1160OFPTFFC_BAD_TABLE = 0
1161OFPTFFC_BAD_METADATA = 1
1162OFPTFFC_BAD_TYPE = 2
1163OFPTFFC_BAD_LEN = 3
1164OFPTFFC_BAD_ARGUMENT = 4
1165OFPTFFC_EPERM = 5
1166
1167ofp_table_features_failed_code_map = {
1168 0: 'OFPTFFC_BAD_TABLE',
1169 1: 'OFPTFFC_BAD_METADATA',
1170 2: 'OFPTFFC_BAD_TYPE',
1171 3: 'OFPTFFC_BAD_LEN',
1172 4: 'OFPTFFC_BAD_ARGUMENT',
1173 5: 'OFPTFFC_EPERM',
1174}
1175
1176# Identifiers from group ofp_table_mod_failed_code
1177OFPTMFC_BAD_TABLE = 0
1178OFPTMFC_BAD_CONFIG = 1
1179OFPTMFC_EPERM = 2
1180
1181ofp_table_mod_failed_code_map = {
1182 0: 'OFPTMFC_BAD_TABLE',
1183 1: 'OFPTMFC_BAD_CONFIG',
1184 2: 'OFPTMFC_EPERM',
1185}
1186
1187# Identifiers from group ofp_type
1188OFPT_HELLO = 0
1189OFPT_ERROR = 1
1190OFPT_ECHO_REQUEST = 2
1191OFPT_ECHO_REPLY = 3
1192OFPT_EXPERIMENTER = 4
1193OFPT_FEATURES_REQUEST = 5
1194OFPT_FEATURES_REPLY = 6
1195OFPT_GET_CONFIG_REQUEST = 7
1196OFPT_GET_CONFIG_REPLY = 8
1197OFPT_SET_CONFIG = 9
1198OFPT_PACKET_IN = 10
1199OFPT_FLOW_REMOVED = 11
1200OFPT_PORT_STATUS = 12
1201OFPT_PACKET_OUT = 13
1202OFPT_FLOW_MOD = 14
1203OFPT_GROUP_MOD = 15
1204OFPT_PORT_MOD = 16
1205OFPT_TABLE_MOD = 17
Rich Lane6f4978c2013-10-20 21:33:52 -07001206OFPT_STATS_REQUEST = 18
1207OFPT_STATS_REPLY = 19
Rich Lanec2ee4b82013-04-24 17:12:38 -07001208OFPT_BARRIER_REQUEST = 20
1209OFPT_BARRIER_REPLY = 21
1210OFPT_QUEUE_GET_CONFIG_REQUEST = 22
1211OFPT_QUEUE_GET_CONFIG_REPLY = 23
1212OFPT_ROLE_REQUEST = 24
1213OFPT_ROLE_REPLY = 25
1214OFPT_GET_ASYNC_REQUEST = 26
1215OFPT_GET_ASYNC_REPLY = 27
1216OFPT_SET_ASYNC = 28
1217OFPT_METER_MOD = 29
1218
1219ofp_type_map = {
1220 0: 'OFPT_HELLO',
1221 1: 'OFPT_ERROR',
1222 2: 'OFPT_ECHO_REQUEST',
1223 3: 'OFPT_ECHO_REPLY',
1224 4: 'OFPT_EXPERIMENTER',
1225 5: 'OFPT_FEATURES_REQUEST',
1226 6: 'OFPT_FEATURES_REPLY',
1227 7: 'OFPT_GET_CONFIG_REQUEST',
1228 8: 'OFPT_GET_CONFIG_REPLY',
1229 9: 'OFPT_SET_CONFIG',
1230 10: 'OFPT_PACKET_IN',
1231 11: 'OFPT_FLOW_REMOVED',
1232 12: 'OFPT_PORT_STATUS',
1233 13: 'OFPT_PACKET_OUT',
1234 14: 'OFPT_FLOW_MOD',
1235 15: 'OFPT_GROUP_MOD',
1236 16: 'OFPT_PORT_MOD',
1237 17: 'OFPT_TABLE_MOD',
Rich Lane6f4978c2013-10-20 21:33:52 -07001238 18: 'OFPT_STATS_REQUEST',
1239 19: 'OFPT_STATS_REPLY',
Rich Lanec2ee4b82013-04-24 17:12:38 -07001240 20: 'OFPT_BARRIER_REQUEST',
1241 21: 'OFPT_BARRIER_REPLY',
1242 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
1243 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
1244 24: 'OFPT_ROLE_REQUEST',
1245 25: 'OFPT_ROLE_REPLY',
1246 26: 'OFPT_GET_ASYNC_REQUEST',
1247 27: 'OFPT_GET_ASYNC_REPLY',
1248 28: 'OFPT_SET_ASYNC',
1249 29: 'OFPT_METER_MOD',
1250}
1251
1252# Identifiers from group ofp_vlan_id
1253OFPVID_NONE = 0
1254OFPVID_PRESENT = 4096
1255
1256ofp_vlan_id_map = {
1257 0: 'OFPVID_NONE',
1258 4096: 'OFPVID_PRESENT',
1259}
1260