blob: 22fc76e5ca68057aa876ef922fce919d76ecf090 [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 Lane93b33132014-04-21 12:20:58 -0700398
399ofp_bsn_vport_l2gre_flags_map = {
400 1: 'OF_BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID',
401 2: 'OF_BSN_VPORT_L2GRE_DSCP_ASSIGN',
402 4: 'OF_BSN_VPORT_L2GRE_DSCP_COPY',
Rich Lane5587ab12014-06-30 11:19:09 -0700403 8: 'OF_BSN_VPORT_L2GRE_LOOPBACK_IS_VALID',
Rich Lane93b33132014-04-21 12:20:58 -0700404}
405
Dan Talaycof6202252013-07-02 01:00:29 -0700406# Identifiers from group ofp_bsn_vport_q_in_q_untagged
407OF_BSN_VPORT_Q_IN_Q_UNTAGGED = 65535
408
409ofp_bsn_vport_q_in_q_untagged_map = {
410 65535: 'OF_BSN_VPORT_Q_IN_Q_UNTAGGED',
411}
412
Rich Laned53156a2013-08-05 17:17:33 -0700413# Identifiers from group ofp_bsn_vport_status
414OF_BSN_VPORT_STATUS_OK = 0
415OF_BSN_VPORT_STATUS_FAILED = 1
416
417ofp_bsn_vport_status_map = {
418 0: 'OF_BSN_VPORT_STATUS_OK',
419 1: 'OF_BSN_VPORT_STATUS_FAILED',
420}
421
Rich Lane5587ab12014-06-30 11:19:09 -0700422# Identifiers from group ofp_bsn_vrf_counter_constants
423OFP_BSN_VRF_ALL = 4294967295
424
425ofp_bsn_vrf_counter_constants_map = {
426 4294967295: 'OFP_BSN_VRF_ALL',
427}
428
Rich Lanec2ee4b82013-04-24 17:12:38 -0700429# Identifiers from group ofp_capabilities
430OFPC_FLOW_STATS = 1
431OFPC_TABLE_STATS = 2
432OFPC_PORT_STATS = 4
433OFPC_GROUP_STATS = 8
434OFPC_IP_REASM = 32
435OFPC_QUEUE_STATS = 64
436OFPC_PORT_BLOCKED = 256
437
438ofp_capabilities_map = {
439 1: 'OFPC_FLOW_STATS',
440 2: 'OFPC_TABLE_STATS',
441 4: 'OFPC_PORT_STATS',
442 8: 'OFPC_GROUP_STATS',
443 32: 'OFPC_IP_REASM',
444 64: 'OFPC_QUEUE_STATS',
445 256: 'OFPC_PORT_BLOCKED',
446}
447
448# Identifiers from group ofp_config_flags
449OFPC_FRAG_NORMAL = 0
450OFPC_FRAG_DROP = 1
451OFPC_FRAG_REASM = 2
452OFPC_FRAG_MASK = 3
453
454ofp_config_flags_map = {
455 0: 'OFPC_FRAG_NORMAL',
456 1: 'OFPC_FRAG_DROP',
457 2: 'OFPC_FRAG_REASM',
458 3: 'OFPC_FRAG_MASK',
459}
460
461# Identifiers from group ofp_controller_max_len
462OFPCML_MAX = 65509
463OFPCML_NO_BUFFER = 65535
464
465ofp_controller_max_len_map = {
466 65509: 'OFPCML_MAX',
467 65535: 'OFPCML_NO_BUFFER',
468}
469
470# Identifiers from group ofp_controller_role
471OFPCR_ROLE_NOCHANGE = 0
472OFPCR_ROLE_EQUAL = 1
473OFPCR_ROLE_MASTER = 2
474OFPCR_ROLE_SLAVE = 3
475
476ofp_controller_role_map = {
477 0: 'OFPCR_ROLE_NOCHANGE',
478 1: 'OFPCR_ROLE_EQUAL',
479 2: 'OFPCR_ROLE_MASTER',
480 3: 'OFPCR_ROLE_SLAVE',
481}
482
483# Identifiers from group ofp_error_type
484OFPET_HELLO_FAILED = 0
485OFPET_BAD_REQUEST = 1
486OFPET_BAD_ACTION = 2
487OFPET_BAD_INSTRUCTION = 3
488OFPET_BAD_MATCH = 4
489OFPET_FLOW_MOD_FAILED = 5
490OFPET_GROUP_MOD_FAILED = 6
491OFPET_PORT_MOD_FAILED = 7
492OFPET_TABLE_MOD_FAILED = 8
493OFPET_QUEUE_OP_FAILED = 9
494OFPET_SWITCH_CONFIG_FAILED = 10
495OFPET_ROLE_REQUEST_FAILED = 11
496OFPET_METER_MOD_FAILED = 12
497OFPET_TABLE_FEATURES_FAILED = 13
498OFPET_EXPERIMENTER = 65535
499
500ofp_error_type_map = {
501 0: 'OFPET_HELLO_FAILED',
502 1: 'OFPET_BAD_REQUEST',
503 2: 'OFPET_BAD_ACTION',
504 3: 'OFPET_BAD_INSTRUCTION',
505 4: 'OFPET_BAD_MATCH',
506 5: 'OFPET_FLOW_MOD_FAILED',
507 6: 'OFPET_GROUP_MOD_FAILED',
508 7: 'OFPET_PORT_MOD_FAILED',
509 8: 'OFPET_TABLE_MOD_FAILED',
510 9: 'OFPET_QUEUE_OP_FAILED',
511 10: 'OFPET_SWITCH_CONFIG_FAILED',
512 11: 'OFPET_ROLE_REQUEST_FAILED',
513 12: 'OFPET_METER_MOD_FAILED',
514 13: 'OFPET_TABLE_FEATURES_FAILED',
515 65535: 'OFPET_EXPERIMENTER',
516}
517
518# Identifiers from group ofp_flow_mod_command
519OFPFC_ADD = 0
520OFPFC_MODIFY = 1
521OFPFC_MODIFY_STRICT = 2
522OFPFC_DELETE = 3
523OFPFC_DELETE_STRICT = 4
524
525ofp_flow_mod_command_map = {
526 0: 'OFPFC_ADD',
527 1: 'OFPFC_MODIFY',
528 2: 'OFPFC_MODIFY_STRICT',
529 3: 'OFPFC_DELETE',
530 4: 'OFPFC_DELETE_STRICT',
531}
532
533# Identifiers from group ofp_flow_mod_failed_code
534OFPFMFC_UNKNOWN = 0
535OFPFMFC_TABLE_FULL = 1
536OFPFMFC_BAD_TABLE_ID = 2
537OFPFMFC_OVERLAP = 3
538OFPFMFC_EPERM = 4
539OFPFMFC_BAD_TIMEOUT = 5
540OFPFMFC_BAD_COMMAND = 6
541OFPFMFC_BAD_FLAGS = 7
542
543ofp_flow_mod_failed_code_map = {
544 0: 'OFPFMFC_UNKNOWN',
545 1: 'OFPFMFC_TABLE_FULL',
546 2: 'OFPFMFC_BAD_TABLE_ID',
547 3: 'OFPFMFC_OVERLAP',
548 4: 'OFPFMFC_EPERM',
549 5: 'OFPFMFC_BAD_TIMEOUT',
550 6: 'OFPFMFC_BAD_COMMAND',
551 7: 'OFPFMFC_BAD_FLAGS',
552}
553
554# Identifiers from group ofp_flow_mod_flags
555OFPFF_SEND_FLOW_REM = 1
556OFPFF_CHECK_OVERLAP = 2
557OFPFF_RESET_COUNTS = 4
558OFPFF_NO_PKT_COUNTS = 8
559OFPFF_NO_BYT_COUNTS = 16
Rich Lane6f4978c2013-10-20 21:33:52 -0700560OFPFF_BSN_SEND_IDLE = 128
Rich Lanec2ee4b82013-04-24 17:12:38 -0700561
562ofp_flow_mod_flags_map = {
563 1: 'OFPFF_SEND_FLOW_REM',
564 2: 'OFPFF_CHECK_OVERLAP',
565 4: 'OFPFF_RESET_COUNTS',
566 8: 'OFPFF_NO_PKT_COUNTS',
567 16: 'OFPFF_NO_BYT_COUNTS',
Rich Lane6f4978c2013-10-20 21:33:52 -0700568 128: 'OFPFF_BSN_SEND_IDLE',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700569}
570
571# Identifiers from group ofp_flow_removed_reason
572OFPRR_IDLE_TIMEOUT = 0
573OFPRR_HARD_TIMEOUT = 1
574OFPRR_DELETE = 2
575OFPRR_GROUP_DELETE = 3
576
577ofp_flow_removed_reason_map = {
578 0: 'OFPRR_IDLE_TIMEOUT',
579 1: 'OFPRR_HARD_TIMEOUT',
580 2: 'OFPRR_DELETE',
581 3: 'OFPRR_GROUP_DELETE',
582}
583
584# Identifiers from group ofp_group
585OFPG_MAX = 4294967040
586OFPG_ALL = 4294967292
587OFPG_ANY = 4294967295
588
589ofp_group_map = {
590 4294967040: 'OFPG_MAX',
591 4294967292: 'OFPG_ALL',
592 4294967295: 'OFPG_ANY',
593}
594
595# Identifiers from group ofp_group_capabilities
596OFPGFC_SELECT_WEIGHT = 1
597OFPGFC_SELECT_LIVENESS = 2
598OFPGFC_CHAINING = 4
599OFPGFC_CHAINING_CHECKS = 8
600
601ofp_group_capabilities_map = {
602 1: 'OFPGFC_SELECT_WEIGHT',
603 2: 'OFPGFC_SELECT_LIVENESS',
604 4: 'OFPGFC_CHAINING',
605 8: 'OFPGFC_CHAINING_CHECKS',
606}
607
608# Identifiers from group ofp_group_mod_command
609OFPGC_ADD = 0
610OFPGC_MODIFY = 1
611OFPGC_DELETE = 2
612
613ofp_group_mod_command_map = {
614 0: 'OFPGC_ADD',
615 1: 'OFPGC_MODIFY',
616 2: 'OFPGC_DELETE',
617}
618
619# Identifiers from group ofp_group_mod_failed_code
620OFPGMFC_GROUP_EXISTS = 0
621OFPGMFC_INVALID_GROUP = 1
622OFPGMFC_WEIGHT_UNSUPPORTED = 2
623OFPGMFC_OUT_OF_GROUPS = 3
624OFPGMFC_OUT_OF_BUCKETS = 4
625OFPGMFC_CHAINING_UNSUPPORTED = 5
626OFPGMFC_WATCH_UNSUPPORTED = 6
627OFPGMFC_LOOP = 7
628OFPGMFC_UNKNOWN_GROUP = 8
629OFPGMFC_CHAINED_GROUP = 9
630OFPGMFC_BAD_TYPE = 10
631OFPGMFC_BAD_COMMAND = 11
632OFPGMFC_BAD_BUCKET = 12
633OFPGMFC_BAD_WATCH = 13
634OFPGMFC_EPERM = 14
635
636ofp_group_mod_failed_code_map = {
637 0: 'OFPGMFC_GROUP_EXISTS',
638 1: 'OFPGMFC_INVALID_GROUP',
639 2: 'OFPGMFC_WEIGHT_UNSUPPORTED',
640 3: 'OFPGMFC_OUT_OF_GROUPS',
641 4: 'OFPGMFC_OUT_OF_BUCKETS',
642 5: 'OFPGMFC_CHAINING_UNSUPPORTED',
643 6: 'OFPGMFC_WATCH_UNSUPPORTED',
644 7: 'OFPGMFC_LOOP',
645 8: 'OFPGMFC_UNKNOWN_GROUP',
646 9: 'OFPGMFC_CHAINED_GROUP',
647 10: 'OFPGMFC_BAD_TYPE',
648 11: 'OFPGMFC_BAD_COMMAND',
649 12: 'OFPGMFC_BAD_BUCKET',
650 13: 'OFPGMFC_BAD_WATCH',
651 14: 'OFPGMFC_EPERM',
652}
653
654# Identifiers from group ofp_group_type
655OFPGT_ALL = 0
656OFPGT_SELECT = 1
657OFPGT_INDIRECT = 2
658OFPGT_FF = 3
659
660ofp_group_type_map = {
661 0: 'OFPGT_ALL',
662 1: 'OFPGT_SELECT',
663 2: 'OFPGT_INDIRECT',
664 3: 'OFPGT_FF',
665}
666
667# Identifiers from group ofp_hello_elem_type
668OFPHET_VERSIONBITMAP = 1
669
670ofp_hello_elem_type_map = {
671 1: 'OFPHET_VERSIONBITMAP',
672}
673
674# Identifiers from group ofp_hello_failed_code
675OFPHFC_INCOMPATIBLE = 0
676OFPHFC_EPERM = 1
677
678ofp_hello_failed_code_map = {
679 0: 'OFPHFC_INCOMPATIBLE',
680 1: 'OFPHFC_EPERM',
681}
682
683# Identifiers from group ofp_instruction_type
684OFPIT_GOTO_TABLE = 1
685OFPIT_WRITE_METADATA = 2
686OFPIT_WRITE_ACTIONS = 3
687OFPIT_APPLY_ACTIONS = 4
688OFPIT_CLEAR_ACTIONS = 5
689OFPIT_METER = 6
690OFPIT_EXPERIMENTER = 65535
691
692ofp_instruction_type_map = {
693 1: 'OFPIT_GOTO_TABLE',
694 2: 'OFPIT_WRITE_METADATA',
695 3: 'OFPIT_WRITE_ACTIONS',
696 4: 'OFPIT_APPLY_ACTIONS',
697 5: 'OFPIT_CLEAR_ACTIONS',
698 6: 'OFPIT_METER',
699 65535: 'OFPIT_EXPERIMENTER',
700}
701
702# Identifiers from group ofp_ipv6exthdr_flags
703OFPIEH_NONEXT = 1
704OFPIEH_ESP = 2
705OFPIEH_AUTH = 4
706OFPIEH_DEST = 8
707OFPIEH_FRAG = 16
708OFPIEH_ROUTER = 32
709OFPIEH_HOP = 64
710OFPIEH_UNREP = 128
711OFPIEH_UNSEQ = 256
712
713ofp_ipv6exthdr_flags_map = {
714 1: 'OFPIEH_NONEXT',
715 2: 'OFPIEH_ESP',
716 4: 'OFPIEH_AUTH',
717 8: 'OFPIEH_DEST',
718 16: 'OFPIEH_FRAG',
719 32: 'OFPIEH_ROUTER',
720 64: 'OFPIEH_HOP',
721 128: 'OFPIEH_UNREP',
722 256: 'OFPIEH_UNSEQ',
723}
724
725# Identifiers from group ofp_match_type
726OFPMT_STANDARD = 0
727OFPMT_OXM = 1
728
729ofp_match_type_map = {
730 0: 'OFPMT_STANDARD',
731 1: 'OFPMT_OXM',
732}
733
734# Identifiers from group ofp_meter
735OFPM_MAX = 4294901760
736OFPM_SLOWPATH = 4294967293
737OFPM_CONTROLLER = 4294967294
738OFPM_ALL = 4294967295
739
740ofp_meter_map = {
741 4294901760: 'OFPM_MAX',
742 4294967293: 'OFPM_SLOWPATH',
743 4294967294: 'OFPM_CONTROLLER',
744 4294967295: 'OFPM_ALL',
745}
746
747# Identifiers from group ofp_meter_band_type
748OFPMBT_DROP = 1
749OFPMBT_DSCP_REMARK = 2
750OFPMBT_EXPERIMENTER = 65535
751
752ofp_meter_band_type_map = {
753 1: 'OFPMBT_DROP',
754 2: 'OFPMBT_DSCP_REMARK',
755 65535: 'OFPMBT_EXPERIMENTER',
756}
757
758# Identifiers from group ofp_meter_flags
759OFPMF_KBPS = 1
760OFPMF_PKTPS = 2
761OFPMF_BURST = 4
762OFPMF_STATS = 8
763
764ofp_meter_flags_map = {
765 1: 'OFPMF_KBPS',
766 2: 'OFPMF_PKTPS',
767 4: 'OFPMF_BURST',
768 8: 'OFPMF_STATS',
769}
770
771# Identifiers from group ofp_meter_mod_command
772OFPMC_ADD = 0
773OFPMC_MODIFY = 1
774OFPMC_DELETE = 2
775
776ofp_meter_mod_command_map = {
777 0: 'OFPMC_ADD',
778 1: 'OFPMC_MODIFY',
779 2: 'OFPMC_DELETE',
780}
781
782# Identifiers from group ofp_meter_mod_failed_code
783OFPMMFC_UNKNOWN = 0
784OFPMMFC_METER_EXISTS = 1
785OFPMMFC_INVALID_METER = 2
786OFPMMFC_UNKNOWN_METER = 3
787OFPMMFC_BAD_COMMAND = 4
788OFPMMFC_BAD_FLAGS = 5
789OFPMMFC_BAD_RATE = 6
790OFPMMFC_BAD_BURST = 7
791OFPMMFC_BAD_BAND = 8
792OFPMMFC_BAD_BAND_VALUE = 9
793OFPMMFC_OUT_OF_METERS = 10
794OFPMMFC_OUT_OF_BANDS = 11
795
796ofp_meter_mod_failed_code_map = {
797 0: 'OFPMMFC_UNKNOWN',
798 1: 'OFPMMFC_METER_EXISTS',
799 2: 'OFPMMFC_INVALID_METER',
800 3: 'OFPMMFC_UNKNOWN_METER',
801 4: 'OFPMMFC_BAD_COMMAND',
802 5: 'OFPMMFC_BAD_FLAGS',
803 6: 'OFPMMFC_BAD_RATE',
804 7: 'OFPMMFC_BAD_BURST',
805 8: 'OFPMMFC_BAD_BAND',
806 9: 'OFPMMFC_BAD_BAND_VALUE',
807 10: 'OFPMMFC_OUT_OF_METERS',
808 11: 'OFPMMFC_OUT_OF_BANDS',
809}
810
Rich Lanec2ee4b82013-04-24 17:12:38 -0700811# Identifiers from group ofp_oxm_class
812OFPXMC_NXM_0 = 0
813OFPXMC_NXM_1 = 1
814OFPXMC_OPENFLOW_BASIC = 32768
815OFPXMC_EXPERIMENTER = 65535
816
817ofp_oxm_class_map = {
818 0: 'OFPXMC_NXM_0',
819 1: 'OFPXMC_NXM_1',
820 32768: 'OFPXMC_OPENFLOW_BASIC',
821 65535: 'OFPXMC_EXPERIMENTER',
822}
823
824# Identifiers from group ofp_packet_in_reason
825OFPR_NO_MATCH = 0
826OFPR_ACTION = 1
827OFPR_INVALID_TTL = 2
Rich Laned9e3f7b2013-11-04 11:40:43 -0800828OFPR_BSN_NEW_HOST = 128
829OFPR_BSN_STATION_MOVE = 129
830OFPR_BSN_BAD_VLAN = 130
831OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131
Rich Lane5454b682014-01-14 17:07:36 -0800832OFPR_BSN_NO_ROUTE = 132
Rich Lane95f7fc92014-01-27 17:08:16 -0800833OFPR_BSN_ICMP_ECHO_REQUEST = 133
834OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134
835OFPR_BSN_DEST_HOST_UNREACHABLE = 135
836OFPR_BSN_DEST_PORT_UNREACHABLE = 136
837OFPR_BSN_FRAGMENTATION_REQUIRED = 137
838OFPR_BSN_ARP = 139
Rich Lane1b75abf2014-02-05 11:23:20 -0800839OFPR_BSN_DHCP = 140
Rich Lane9ec3fca2014-02-26 16:22:56 -0800840OFPR_BSN_DEBUG = 141
Rich Lanef50b7c32014-03-20 11:38:02 -0700841OFPR_BSN_PACKET_OF_DEATH = 142
Rich Lanec2ee4b82013-04-24 17:12:38 -0700842
843ofp_packet_in_reason_map = {
844 0: 'OFPR_NO_MATCH',
845 1: 'OFPR_ACTION',
846 2: 'OFPR_INVALID_TTL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800847 128: 'OFPR_BSN_NEW_HOST',
848 129: 'OFPR_BSN_STATION_MOVE',
849 130: 'OFPR_BSN_BAD_VLAN',
850 131: 'OFPR_BSN_DESTINATION_LOOKUP_FAILURE',
Rich Lane5454b682014-01-14 17:07:36 -0800851 132: 'OFPR_BSN_NO_ROUTE',
Rich Lane95f7fc92014-01-27 17:08:16 -0800852 133: 'OFPR_BSN_ICMP_ECHO_REQUEST',
853 134: 'OFPR_BSN_DEST_NETWORK_UNREACHABLE',
854 135: 'OFPR_BSN_DEST_HOST_UNREACHABLE',
855 136: 'OFPR_BSN_DEST_PORT_UNREACHABLE',
856 137: 'OFPR_BSN_FRAGMENTATION_REQUIRED',
857 139: 'OFPR_BSN_ARP',
Rich Lane1b75abf2014-02-05 11:23:20 -0800858 140: 'OFPR_BSN_DHCP',
Rich Lane9ec3fca2014-02-26 16:22:56 -0800859 141: 'OFPR_BSN_DEBUG',
Rich Lanef50b7c32014-03-20 11:38:02 -0700860 142: 'OFPR_BSN_PACKET_OF_DEATH',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700861}
862
863# Identifiers from group ofp_port
864OFPP_MAX = 4294967040
865OFPP_IN_PORT = 4294967288
866OFPP_TABLE = 4294967289
867OFPP_NORMAL = 4294967290
868OFPP_FLOOD = 4294967291
869OFPP_ALL = 4294967292
870OFPP_CONTROLLER = 4294967293
871OFPP_LOCAL = 4294967294
Rich Laned9e3f7b2013-11-04 11:40:43 -0800872OFPP_ANY = 4294967295
Rich Lanec2ee4b82013-04-24 17:12:38 -0700873
874ofp_port_map = {
875 4294967040: 'OFPP_MAX',
876 4294967288: 'OFPP_IN_PORT',
877 4294967289: 'OFPP_TABLE',
878 4294967290: 'OFPP_NORMAL',
879 4294967291: 'OFPP_FLOOD',
880 4294967292: 'OFPP_ALL',
881 4294967293: 'OFPP_CONTROLLER',
882 4294967294: 'OFPP_LOCAL',
Rich Laned9e3f7b2013-11-04 11:40:43 -0800883 4294967295: 'OFPP_ANY',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700884}
885
886# Identifiers from group ofp_port_config
887OFPPC_PORT_DOWN = 1
888OFPPC_NO_RECV = 4
889OFPPC_NO_FWD = 32
890OFPPC_NO_PACKET_IN = 64
Rich Lane6f4978c2013-10-20 21:33:52 -0700891OFPPC_BSN_MIRROR_DEST = 2147483648
Rich Lanec2ee4b82013-04-24 17:12:38 -0700892
893ofp_port_config_map = {
894 1: 'OFPPC_PORT_DOWN',
895 4: 'OFPPC_NO_RECV',
896 32: 'OFPPC_NO_FWD',
897 64: 'OFPPC_NO_PACKET_IN',
Rich Lane6f4978c2013-10-20 21:33:52 -0700898 2147483648: 'OFPPC_BSN_MIRROR_DEST',
Rich Lanec2ee4b82013-04-24 17:12:38 -0700899}
900
901# Identifiers from group ofp_port_features
902OFPPF_10MB_HD = 1
903OFPPF_10MB_FD = 2
904OFPPF_100MB_HD = 4
905OFPPF_100MB_FD = 8
906OFPPF_1GB_HD = 16
907OFPPF_1GB_FD = 32
908OFPPF_10GB_FD = 64
909OFPPF_40GB_FD = 128
910OFPPF_100GB_FD = 256
911OFPPF_1TB_FD = 512
912OFPPF_OTHER = 1024
913OFPPF_COPPER = 2048
914OFPPF_FIBER = 4096
915OFPPF_AUTONEG = 8192
916OFPPF_PAUSE = 16384
917OFPPF_PAUSE_ASYM = 32768
918
919ofp_port_features_map = {
920 1: 'OFPPF_10MB_HD',
921 2: 'OFPPF_10MB_FD',
922 4: 'OFPPF_100MB_HD',
923 8: 'OFPPF_100MB_FD',
924 16: 'OFPPF_1GB_HD',
925 32: 'OFPPF_1GB_FD',
926 64: 'OFPPF_10GB_FD',
927 128: 'OFPPF_40GB_FD',
928 256: 'OFPPF_100GB_FD',
929 512: 'OFPPF_1TB_FD',
930 1024: 'OFPPF_OTHER',
931 2048: 'OFPPF_COPPER',
932 4096: 'OFPPF_FIBER',
933 8192: 'OFPPF_AUTONEG',
934 16384: 'OFPPF_PAUSE',
935 32768: 'OFPPF_PAUSE_ASYM',
936}
937
938# Identifiers from group ofp_port_mod_failed_code
939OFPPMFC_BAD_PORT = 0
940OFPPMFC_BAD_HW_ADDR = 1
941OFPPMFC_BAD_CONFIG = 2
942OFPPMFC_BAD_ADVERTISE = 3
943OFPPMFC_EPERM = 4
944
945ofp_port_mod_failed_code_map = {
946 0: 'OFPPMFC_BAD_PORT',
947 1: 'OFPPMFC_BAD_HW_ADDR',
948 2: 'OFPPMFC_BAD_CONFIG',
949 3: 'OFPPMFC_BAD_ADVERTISE',
950 4: 'OFPPMFC_EPERM',
951}
952
Rich Lanec2ee4b82013-04-24 17:12:38 -0700953# Identifiers from group ofp_port_reason
954OFPPR_ADD = 0
955OFPPR_DELETE = 1
956OFPPR_MODIFY = 2
957
958ofp_port_reason_map = {
959 0: 'OFPPR_ADD',
960 1: 'OFPPR_DELETE',
961 2: 'OFPPR_MODIFY',
962}
963
964# Identifiers from group ofp_port_state
965OFPPS_LINK_DOWN = 1
966OFPPS_BLOCKED = 2
967OFPPS_LIVE = 4
968
969ofp_port_state_map = {
970 1: 'OFPPS_LINK_DOWN',
971 2: 'OFPPS_BLOCKED',
972 4: 'OFPPS_LIVE',
973}
974
975# Identifiers from group ofp_queue_op_failed_code
976OFPQOFC_BAD_PORT = 0
977OFPQOFC_BAD_QUEUE = 1
978OFPQOFC_EPERM = 2
979
980ofp_queue_op_failed_code_map = {
981 0: 'OFPQOFC_BAD_PORT',
982 1: 'OFPQOFC_BAD_QUEUE',
983 2: 'OFPQOFC_EPERM',
984}
985
986# Identifiers from group ofp_queue_properties
987OFPQT_MIN_RATE = 1
988OFPQT_MAX_RATE = 2
989OFPQT_EXPERIMENTER = 65535
990
991ofp_queue_properties_map = {
992 1: 'OFPQT_MIN_RATE',
993 2: 'OFPQT_MAX_RATE',
994 65535: 'OFPQT_EXPERIMENTER',
995}
996
997# Identifiers from group ofp_role_request_failed_code
998OFPRRFC_STALE = 0
999OFPRRFC_UNSUP = 1
1000OFPRRFC_BAD_ROLE = 2
1001
1002ofp_role_request_failed_code_map = {
1003 0: 'OFPRRFC_STALE',
1004 1: 'OFPRRFC_UNSUP',
1005 2: 'OFPRRFC_BAD_ROLE',
1006}
1007
Rich Lane6f4978c2013-10-20 21:33:52 -07001008# Identifiers from group ofp_stats_reply_flags
1009OFPSF_REPLY_MORE = 1
1010
1011ofp_stats_reply_flags_map = {
1012 1: 'OFPSF_REPLY_MORE',
1013}
1014
1015# Identifiers from group ofp_stats_request_flags
1016OFPSF_REQ_MORE = 1
1017
1018ofp_stats_request_flags_map = {
1019 1: 'OFPSF_REQ_MORE',
1020}
1021
1022# Identifiers from group ofp_stats_type
1023OFPST_DESC = 0
1024OFPST_FLOW = 1
1025OFPST_AGGREGATE = 2
1026OFPST_TABLE = 3
1027OFPST_PORT = 4
1028OFPST_QUEUE = 5
1029OFPST_GROUP = 6
1030OFPST_GROUP_DESC = 7
1031OFPST_GROUP_FEATURES = 8
1032OFPST_METER = 9
1033OFPST_METER_CONFIG = 10
1034OFPST_METER_FEATURES = 11
1035OFPST_TABLE_FEATURES = 12
1036OFPST_PORT_DESC = 13
1037OFPST_EXPERIMENTER = 65535
1038
1039ofp_stats_type_map = {
1040 0: 'OFPST_DESC',
1041 1: 'OFPST_FLOW',
1042 2: 'OFPST_AGGREGATE',
1043 3: 'OFPST_TABLE',
1044 4: 'OFPST_PORT',
1045 5: 'OFPST_QUEUE',
1046 6: 'OFPST_GROUP',
1047 7: 'OFPST_GROUP_DESC',
1048 8: 'OFPST_GROUP_FEATURES',
1049 9: 'OFPST_METER',
1050 10: 'OFPST_METER_CONFIG',
1051 11: 'OFPST_METER_FEATURES',
1052 12: 'OFPST_TABLE_FEATURES',
1053 13: 'OFPST_PORT_DESC',
1054 65535: 'OFPST_EXPERIMENTER',
1055}
1056
Rich Lanec2ee4b82013-04-24 17:12:38 -07001057# Identifiers from group ofp_switch_config_failed_code
1058OFPSCFC_BAD_FLAGS = 0
1059OFPSCFC_BAD_LEN = 1
1060OFPSCFC_EPERM = 2
1061
1062ofp_switch_config_failed_code_map = {
1063 0: 'OFPSCFC_BAD_FLAGS',
1064 1: 'OFPSCFC_BAD_LEN',
1065 2: 'OFPSCFC_EPERM',
1066}
1067
1068# Identifiers from group ofp_table
1069OFPTT_MAX = 254
1070OFPTT_ALL = 255
1071
1072ofp_table_map = {
1073 254: 'OFPTT_MAX',
1074 255: 'OFPTT_ALL',
1075}
1076
1077# Identifiers from group ofp_table_config
1078OFPTC_DEPRECATED_MASK = 3
1079
1080ofp_table_config_map = {
1081 3: 'OFPTC_DEPRECATED_MASK',
1082}
1083
1084# Identifiers from group ofp_table_feature_prop_type
1085OFPTFPT_INSTRUCTIONS = 0
1086OFPTFPT_INSTRUCTIONS_MISS = 1
1087OFPTFPT_NEXT_TABLES = 2
1088OFPTFPT_NEXT_TABLES_MISS = 3
1089OFPTFPT_WRITE_ACTIONS = 4
1090OFPTFPT_WRITE_ACTIONS_MISS = 5
1091OFPTFPT_APPLY_ACTIONS = 6
1092OFPTFPT_APPLY_ACTIONS_MISS = 7
1093OFPTFPT_MATCH = 8
1094OFPTFPT_WILDCARDS = 10
1095OFPTFPT_WRITE_SETFIELD = 12
1096OFPTFPT_WRITE_SETFIELD_MISS = 13
1097OFPTFPT_APPLY_SETFIELD = 14
1098OFPTFPT_APPLY_SETFIELD_MISS = 15
1099OFPTFPT_EXPERIMENTER = 65534
1100OFPTFPT_EXPERIMENTER_MISS = 65535
1101
1102ofp_table_feature_prop_type_map = {
1103 0: 'OFPTFPT_INSTRUCTIONS',
1104 1: 'OFPTFPT_INSTRUCTIONS_MISS',
1105 2: 'OFPTFPT_NEXT_TABLES',
1106 3: 'OFPTFPT_NEXT_TABLES_MISS',
1107 4: 'OFPTFPT_WRITE_ACTIONS',
1108 5: 'OFPTFPT_WRITE_ACTIONS_MISS',
1109 6: 'OFPTFPT_APPLY_ACTIONS',
1110 7: 'OFPTFPT_APPLY_ACTIONS_MISS',
1111 8: 'OFPTFPT_MATCH',
1112 10: 'OFPTFPT_WILDCARDS',
1113 12: 'OFPTFPT_WRITE_SETFIELD',
1114 13: 'OFPTFPT_WRITE_SETFIELD_MISS',
1115 14: 'OFPTFPT_APPLY_SETFIELD',
1116 15: 'OFPTFPT_APPLY_SETFIELD_MISS',
1117 65534: 'OFPTFPT_EXPERIMENTER',
1118 65535: 'OFPTFPT_EXPERIMENTER_MISS',
1119}
1120
1121# Identifiers from group ofp_table_features_failed_code
1122OFPTFFC_BAD_TABLE = 0
1123OFPTFFC_BAD_METADATA = 1
1124OFPTFFC_BAD_TYPE = 2
1125OFPTFFC_BAD_LEN = 3
1126OFPTFFC_BAD_ARGUMENT = 4
1127OFPTFFC_EPERM = 5
1128
1129ofp_table_features_failed_code_map = {
1130 0: 'OFPTFFC_BAD_TABLE',
1131 1: 'OFPTFFC_BAD_METADATA',
1132 2: 'OFPTFFC_BAD_TYPE',
1133 3: 'OFPTFFC_BAD_LEN',
1134 4: 'OFPTFFC_BAD_ARGUMENT',
1135 5: 'OFPTFFC_EPERM',
1136}
1137
1138# Identifiers from group ofp_table_mod_failed_code
1139OFPTMFC_BAD_TABLE = 0
1140OFPTMFC_BAD_CONFIG = 1
1141OFPTMFC_EPERM = 2
1142
1143ofp_table_mod_failed_code_map = {
1144 0: 'OFPTMFC_BAD_TABLE',
1145 1: 'OFPTMFC_BAD_CONFIG',
1146 2: 'OFPTMFC_EPERM',
1147}
1148
1149# Identifiers from group ofp_type
1150OFPT_HELLO = 0
1151OFPT_ERROR = 1
1152OFPT_ECHO_REQUEST = 2
1153OFPT_ECHO_REPLY = 3
1154OFPT_EXPERIMENTER = 4
1155OFPT_FEATURES_REQUEST = 5
1156OFPT_FEATURES_REPLY = 6
1157OFPT_GET_CONFIG_REQUEST = 7
1158OFPT_GET_CONFIG_REPLY = 8
1159OFPT_SET_CONFIG = 9
1160OFPT_PACKET_IN = 10
1161OFPT_FLOW_REMOVED = 11
1162OFPT_PORT_STATUS = 12
1163OFPT_PACKET_OUT = 13
1164OFPT_FLOW_MOD = 14
1165OFPT_GROUP_MOD = 15
1166OFPT_PORT_MOD = 16
1167OFPT_TABLE_MOD = 17
Rich Lane6f4978c2013-10-20 21:33:52 -07001168OFPT_STATS_REQUEST = 18
1169OFPT_STATS_REPLY = 19
Rich Lanec2ee4b82013-04-24 17:12:38 -07001170OFPT_BARRIER_REQUEST = 20
1171OFPT_BARRIER_REPLY = 21
1172OFPT_QUEUE_GET_CONFIG_REQUEST = 22
1173OFPT_QUEUE_GET_CONFIG_REPLY = 23
1174OFPT_ROLE_REQUEST = 24
1175OFPT_ROLE_REPLY = 25
1176OFPT_GET_ASYNC_REQUEST = 26
1177OFPT_GET_ASYNC_REPLY = 27
1178OFPT_SET_ASYNC = 28
1179OFPT_METER_MOD = 29
1180
1181ofp_type_map = {
1182 0: 'OFPT_HELLO',
1183 1: 'OFPT_ERROR',
1184 2: 'OFPT_ECHO_REQUEST',
1185 3: 'OFPT_ECHO_REPLY',
1186 4: 'OFPT_EXPERIMENTER',
1187 5: 'OFPT_FEATURES_REQUEST',
1188 6: 'OFPT_FEATURES_REPLY',
1189 7: 'OFPT_GET_CONFIG_REQUEST',
1190 8: 'OFPT_GET_CONFIG_REPLY',
1191 9: 'OFPT_SET_CONFIG',
1192 10: 'OFPT_PACKET_IN',
1193 11: 'OFPT_FLOW_REMOVED',
1194 12: 'OFPT_PORT_STATUS',
1195 13: 'OFPT_PACKET_OUT',
1196 14: 'OFPT_FLOW_MOD',
1197 15: 'OFPT_GROUP_MOD',
1198 16: 'OFPT_PORT_MOD',
1199 17: 'OFPT_TABLE_MOD',
Rich Lane6f4978c2013-10-20 21:33:52 -07001200 18: 'OFPT_STATS_REQUEST',
1201 19: 'OFPT_STATS_REPLY',
Rich Lanec2ee4b82013-04-24 17:12:38 -07001202 20: 'OFPT_BARRIER_REQUEST',
1203 21: 'OFPT_BARRIER_REPLY',
1204 22: 'OFPT_QUEUE_GET_CONFIG_REQUEST',
1205 23: 'OFPT_QUEUE_GET_CONFIG_REPLY',
1206 24: 'OFPT_ROLE_REQUEST',
1207 25: 'OFPT_ROLE_REPLY',
1208 26: 'OFPT_GET_ASYNC_REQUEST',
1209 27: 'OFPT_GET_ASYNC_REPLY',
1210 28: 'OFPT_SET_ASYNC',
1211 29: 'OFPT_METER_MOD',
1212}
1213
1214# Identifiers from group ofp_vlan_id
1215OFPVID_NONE = 0
1216OFPVID_PRESENT = 4096
1217
1218ofp_vlan_id_map = {
1219 0: 'OFPVID_NONE',
1220 4096: 'OFPVID_PRESENT',
1221}
1222