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