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