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