2 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #define OFP_ERRORS_H 1
24 #include "openflow/openflow.h"
31 * We embed system errno values and OpenFlow standard and vendor extension
32 * error codes into the positive range of "int":
34 * - Errno values are assumed to use the range 1 through 2**30 - 1.
36 * (C and POSIX say that errno values are positive. We assume that they
37 * are less than 2**29. They are actually less than 65536 on at least
38 * Linux, FreeBSD, OpenBSD, and Windows.)
40 * - OpenFlow standard and vendor extension error codes use the range
41 * starting at 2**30 (OFPERR_OFS).
43 * Zero and negative values are not used.
46 #define OFPERR_OFS (1 << 30)
48 /* OpenFlow error codes.
50 * The comments below are parsed by the extract-ofp-errors program at build
51 * time and used to determine the mapping between "enum ofperr" constants and
52 * error type/code values used in the OpenFlow protocol:
54 * - The first part of each comment specifies the vendor, OpenFlow versions,
55 * type, and sometimes a code for each protocol that supports the error:
57 * # The vendor is OF for standard OpenFlow error codes. Otherwise it
58 * is one of the *_VENDOR_ID codes defined in openflow-common.h.
60 * # The version can specify a specific OpenFlow version, a version
61 * range delimited by "-", or an open-ended range with "+".
63 * # Standard OpenFlow errors have both a type and a code. Extension
64 * errors generally have only a type, no code. There is one
65 * exception: Nicira extension (NX) errors for OpenFlow 1.0 and 1.1
66 * have both a type and a code. (This means that the version
67 * specification for NX errors may not include version 1.0 or 1.1 (or
68 * both) along with version 1.2 or later, because the requirements
69 * for those versions are different.)
71 * - Additional text is a human-readable description of the meaning of each
72 * error, used to explain the error to the user. Any text enclosed in
73 * square brackets is omitted; this can be used to explain rationale for
74 * choice of error codes in the case where this is desirable. */
76 /* Expected duplications. */
78 /* Expected: 0x0,3,5 in OF1.1 means both OFPBIC_BAD_EXPERIMENTER and
79 * OFPBIC_BAD_EXP_TYPE. */
81 /* ## ------------------ ## */
82 /* ## OFPET_HELLO_FAILED ## */
83 /* ## ------------------ ## */
85 /* OF1.0+(0,0). No compatible version. */
86 OFPERR_OFPHFC_INCOMPATIBLE
= OFPERR_OFS
,
88 /* OF1.0+(0,1). Permissions error. */
91 /* ## ----------------- ## */
92 /* ## OFPET_BAD_REQUEST ## */
93 /* ## ----------------- ## */
95 /* OF1.0+(1,0). ofp_header.version not supported. */
96 OFPERR_OFPBRC_BAD_VERSION
,
98 /* OF1.0+(1,1). ofp_header.type not supported. */
99 OFPERR_OFPBRC_BAD_TYPE
,
101 /* OF1.0+(1,2). ofp_stats_msg.type not supported. */
102 OFPERR_OFPBRC_BAD_STAT
,
104 /* OF1.0+(1,3). Vendor not supported (in ofp_vendor_header or
106 OFPERR_OFPBRC_BAD_VENDOR
,
108 /* OF1.0+(1,4). Vendor subtype not supported. */
109 OFPERR_OFPBRC_BAD_SUBTYPE
,
111 /* OF1.0+(1,5). Permissions error. */
114 /* OF1.0+(1,6). Wrong request length for type. */
115 OFPERR_OFPBRC_BAD_LEN
,
117 /* OF1.0+(1,7). Specified buffer has already been used. */
118 OFPERR_OFPBRC_BUFFER_EMPTY
,
120 /* OF1.0+(1,8). Specified buffer does not exist. */
121 OFPERR_OFPBRC_BUFFER_UNKNOWN
,
123 /* NX1.0(1,512), OF1.1+(1,9). Specified table-id invalid or does not exist.
124 * [ A non-standard error (1,512), formerly OFPERR_NXBRC_BAD_TABLE_ID,
125 * is used for OpenFlow 1.0 as there seems to be no appropriate error
126 * code defined the specification. ] */
127 OFPERR_OFPBRC_BAD_TABLE_ID
,
129 /* OF1.2+(1,10). Denied because controller is slave. */
130 OFPERR_OFPBRC_IS_SLAVE
,
132 /* NX1.0-1.1(1,514), OF1.2+(1,11). Invalid port. [ A non-standard error
133 * (1,514), formerly OFPERR_NXBRC_BAD_IN_PORT is used for OpenFlow 1.0 and
134 * 1.1 as there seems to be no appropriate error code defined the
135 * specifications. ] */
136 OFPERR_OFPBRC_BAD_PORT
,
138 /* OF1.2+(1,12). Invalid packet in packet-out. */
139 OFPERR_OFPBRC_BAD_PACKET
,
141 /* OF1.3+(1,13). Multipart request overflowed the assigned buffer. */
142 OFPERR_OFPBRC_MULTIPART_BUFFER_OVERFLOW
,
144 /* NX1.0-1.1(1,256), NX1.2+(2). Invalid NXM flow match. */
145 OFPERR_NXBRC_NXM_INVALID
,
147 /* NX1.0-1.1(1,257), NX1.2+(3). The nxm_type, or nxm_type taken in
148 * combination with nxm_hasmask or nxm_length or both, is invalid or not
150 OFPERR_NXBRC_NXM_BAD_TYPE
,
152 /* NX1.0-1.1(1,515), NX1.2+(4). Must-be-zero field had nonzero value. */
153 OFPERR_NXBRC_MUST_BE_ZERO
,
155 /* NX1.0-1.1(1,516), NX1.2+(5). The reason in an ofp_port_status message
157 OFPERR_NXBRC_BAD_REASON
,
159 /* NX1.0-1.1(1,520), NX1.2+(9). The 'event' in an NXST_FLOW_MONITOR reply
160 * does not specify one of the NXFME_ABBREV, NXFME_ADD, NXFME_DELETE, or
162 OFPERR_NXBRC_FM_BAD_EVENT
,
164 /* NX1.0-1.1(1,521), NX1.2+(10). The error that occurred cannot be
165 * represented in this OpenFlow version. */
166 OFPERR_NXBRC_UNENCODABLE_ERROR
,
168 /* ## ---------------- ## */
169 /* ## OFPET_BAD_ACTION ## */
170 /* ## ---------------- ## */
172 /* OF1.0+(2,0). Unknown action type. */
173 OFPERR_OFPBAC_BAD_TYPE
,
175 /* OF1.0+(2,1). Length problem in actions. */
176 OFPERR_OFPBAC_BAD_LEN
,
178 /* OF1.0+(2,2). Unknown experimenter id specified. */
179 OFPERR_OFPBAC_BAD_VENDOR
,
181 /* OF1.0+(2,3). Unknown action type for experimenter id. */
182 OFPERR_OFPBAC_BAD_VENDOR_TYPE
,
184 /* OF1.0+(2,4). Problem validating output port. */
185 OFPERR_OFPBAC_BAD_OUT_PORT
,
187 /* OF1.0+(2,5). Bad action argument. */
188 OFPERR_OFPBAC_BAD_ARGUMENT
,
190 /* OF1.0+(2,6). Permissions error. */
193 /* OF1.0+(2,7). Can't handle this many actions. */
194 OFPERR_OFPBAC_TOO_MANY
,
196 /* OF1.0+(2,8). Problem validating output queue. */
197 OFPERR_OFPBAC_BAD_QUEUE
,
199 /* OF1.1+(2,9). Invalid group id in forward action. */
200 OFPERR_OFPBAC_BAD_OUT_GROUP
,
202 /* NX1.0(1,522), OF1.1+(2,10). Action can't apply for this match or a
203 * prerequisite for use of this field is unmet. */
204 OFPERR_OFPBAC_MATCH_INCONSISTENT
,
206 /* OF1.1+(2,11). Action order is unsupported for the action list in an
207 * Apply-Actions instruction */
208 OFPERR_OFPBAC_UNSUPPORTED_ORDER
,
210 /* OF1.1+(2,12). Actions uses an unsupported tag/encap. */
211 OFPERR_OFPBAC_BAD_TAG
,
213 /* NX1.0-1.1(1,523), OF1.2+(2,13). Action uses unknown or unsupported OXM
215 OFPERR_OFPBAC_BAD_SET_TYPE
,
217 /* NX1.0-1.1(1,524), OF1.2+(2,14). Action references past the end of an
218 * OXM or NXM field, or uses a length of zero. */
219 OFPERR_OFPBAC_BAD_SET_LEN
,
221 /* NX1.0-1.1(1,525), OF1.2+(2,15). Action sets a field to an invalid or
222 * unsupported value, or modifies a read-only field. */
223 OFPERR_OFPBAC_BAD_SET_ARGUMENT
,
225 /* ONF1.3-1.4(4250), OF1.5+(2,16). Field in Set-Field action has Has-Mask
227 OFPERR_OFPBAC_BAD_SET_MASK
,
229 /* NX1.0-1.1(2,256), NX1.2+(11). Must-be-zero action argument had nonzero
231 OFPERR_NXBAC_MUST_BE_ZERO
,
233 /* NX1.0-1.1(2,526), NX1.2+(15). Conjunction action must be only action
234 * present. conjunction(id, k/n) must satisfy 1 <= k <= n and 2 <= n <=
236 OFPERR_NXBAC_BAD_CONJUNCTION
,
238 /* ## --------------------- ## */
239 /* ## OFPET_BAD_INSTRUCTION ## */
240 /* ## --------------------- ## */
242 /* OF1.1+(3,0). Unknown instruction. */
243 OFPERR_OFPBIC_UNKNOWN_INST
,
245 /* NX1.0(2,257), OF1.1+(3,1). Switch or table does not support the
247 OFPERR_OFPBIC_UNSUP_INST
,
249 /* OF1.1+(3,2). Invalid Table-ID specified. */
250 OFPERR_OFPBIC_BAD_TABLE_ID
,
252 /* OF1.1+(3,3). Metadata value unsupported by datapath. */
253 OFPERR_OFPBIC_UNSUP_METADATA
,
255 /* OF1.1+(3,4). Metadata mask value unsupported by datapath. */
256 OFPERR_OFPBIC_UNSUP_METADATA_MASK
,
258 /* OF1.1+(3,5). Unknown experimenter id specified. */
259 OFPERR_OFPBIC_BAD_EXPERIMENTER
,
261 /* OF1.1(3,5), OF1.2+(3,6). Unknown instruction for experimenter id. */
262 OFPERR_OFPBIC_BAD_EXP_TYPE
,
264 /* OF1.2+(3,7). Length problem in instructions. */
265 OFPERR_OFPBIC_BAD_LEN
,
267 /* OF1.2+(3,8). Permissions error. */
270 /* NX1.1(3,256), ONF1.2-1.3(2600), OF1.4+(3,9). Duplicate instruction. */
271 OFPERR_OFPBIC_DUP_INST
,
273 /* ## --------------- ## */
274 /* ## OFPET_BAD_MATCH ## */
275 /* ## --------------- ## */
277 /* OF1.1+(4,0). Unsupported match type specified by the match */
278 OFPERR_OFPBMC_BAD_TYPE
,
280 /* OF1.1+(4,1). Length problem in match. */
281 OFPERR_OFPBMC_BAD_LEN
,
283 /* OF1.1+(4,2). Match uses an unsupported tag/encap. */
284 OFPERR_OFPBMC_BAD_TAG
,
286 /* OF1.1+(4,3). Unsupported datalink addr mask - switch does not support
287 * arbitrary datalink address mask. */
288 OFPERR_OFPBMC_BAD_DL_ADDR_MASK
,
290 /* OF1.1+(4,4). Unsupported network addr mask - switch does not support
291 * arbitrary network address mask. */
292 OFPERR_OFPBMC_BAD_NW_ADDR_MASK
,
294 /* NX1.0(1,262), OF1.1+(4,5). Unsupported wildcard specified in the
296 OFPERR_OFPBMC_BAD_WILDCARDS
,
298 /* OF1.1+(4,6). Unsupported field in the match. */
299 OFPERR_OFPBMC_BAD_FIELD
,
301 /* NX1.0(1,258), OF1.1+(4,7). Unsupported value in a match
303 OFPERR_OFPBMC_BAD_VALUE
,
305 /* NX1.0-1.1(1,259), OF1.2+(4,8). Unsupported mask specified in the match,
306 * field is not dl-address or nw-address. */
307 OFPERR_OFPBMC_BAD_MASK
,
309 /* NX1.0-1.1(1,260), OF1.2+(4,9). A prerequisite was not met. */
310 OFPERR_OFPBMC_BAD_PREREQ
,
312 /* NX1.0-1.1(1,261), OF1.2+(4,10). A field type was duplicated. */
313 OFPERR_OFPBMC_DUP_FIELD
,
315 /* OF1.2+(4,11). Permissions error. */
318 /* ## --------------------- ## */
319 /* ## OFPET_FLOW_MOD_FAILED ## */
320 /* ## --------------------- ## */
322 /* OF1.1+(5,0). Unspecified error. */
323 OFPERR_OFPFMFC_UNKNOWN
,
325 /* OF1.0(3,0), OF1.1+(5,1). Flow not added because of full table(s). */
326 OFPERR_OFPFMFC_TABLE_FULL
,
328 /* OF1.1+(5,2). Table does not exist */
329 OFPERR_OFPFMFC_BAD_TABLE_ID
,
331 /* OF1.0(3,1), OF1.1+(5,3). Attempted to add overlapping flow with
332 * CHECK_OVERLAP flag set. */
333 OFPERR_OFPFMFC_OVERLAP
,
335 /* OF1.0(3,2), OF1.1+(5,4). Permissions error. */
336 OFPERR_OFPFMFC_EPERM
,
338 /* OF1.1+(5,5). Flow not added because of unsupported idle/hard
340 OFPERR_OFPFMFC_BAD_TIMEOUT
,
342 /* OF1.0(3,3). Flow not added because of non-zero idle/hard timeout. */
343 OFPERR_OFPFMFC_BAD_EMERG_TIMEOUT
,
345 /* OF1.0(3,4), OF1.1+(5,6). Unsupported or unknown command. */
346 OFPERR_OFPFMFC_BAD_COMMAND
,
348 /* NX1.0(3,258), NX1.1(5,258), OF1.2+(5,7). Unsupported or unknown
350 OFPERR_OFPFMFC_BAD_FLAGS
,
352 /* OF1.0(3,5). Unsupported action list - cannot process in the order
354 OFPERR_OFPFMFC_UNSUPPORTED
,
356 /* NX1.0-1.1(5,256), NX1.2+(12). Generic hardware error. */
357 OFPERR_NXFMFC_HARDWARE
,
359 /* NX1.0-1.1(5,257), NX1.2+(13). A nonexistent table ID was specified in
360 * the "command" field of struct ofp_flow_mod, when the
361 * nxt_flow_mod_table_id extension is enabled. */
362 OFPERR_NXFMFC_BAD_TABLE_ID
,
364 /* ## ---------------------- ## */
365 /* ## OFPET_GROUP_MOD_FAILED ## */
366 /* ## ---------------------- ## */
368 /* OF1.1+(6,0). Group not added because a group ADD attempted to replace
369 * an already-present group. */
370 OFPERR_OFPGMFC_GROUP_EXISTS
,
372 /* OF1.1+(6,1). Group not added because Group specified is invalid. */
373 OFPERR_OFPGMFC_INVALID_GROUP
,
375 /* OF1.1+(6,2). Switch does not support unequal load sharing with select
377 OFPERR_OFPGMFC_WEIGHT_UNSUPPORTED
,
379 /* OF1.1+(6,3). The group table is full. */
380 OFPERR_OFPGMFC_OUT_OF_GROUPS
,
382 /* OF1.1+(6,4). The maximum number of action buckets for a group has been
384 OFPERR_OFPGMFC_OUT_OF_BUCKETS
,
386 /* OF1.1+(6,5). Switch does not support groups that forward to groups. */
387 OFPERR_OFPGMFC_CHAINING_UNSUPPORTED
,
389 /* OF1.1+(6,6). This group cannot watch the watch_port or watch_group
391 OFPERR_OFPGMFC_WATCH_UNSUPPORTED
,
393 /* OF1.1+(6,7). Group entry would cause a loop. */
396 /* OF1.1+(6,8). Group not modified because a group MODIFY attempted to
397 * modify a non-existent group. */
398 OFPERR_OFPGMFC_UNKNOWN_GROUP
,
400 /* OF1.2+(6,9). Group not deleted because another
401 group is forwarding to it. */
402 OFPERR_OFPGMFC_CHAINED_GROUP
,
404 /* OF1.2+(6,10). Unsupported or unknown group type. */
405 OFPERR_OFPGMFC_BAD_TYPE
,
407 /* OF1.2+(6,11). Unsupported or unknown command. */
408 OFPERR_OFPGMFC_BAD_COMMAND
,
410 /* OF1.2+(6,12). Error in bucket. */
411 OFPERR_OFPGMFC_BAD_BUCKET
,
413 /* OF1.2+(6,13). Error in watch port/group. */
414 OFPERR_OFPGMFC_BAD_WATCH
,
416 /* OF1.2+(6,14). Permissions error. */
417 OFPERR_OFPGMFC_EPERM
,
419 /* OF1.5+(6,15). Invalid bucket identifier used in
420 * INSERT BUCKET or REMOVE BUCKET command. */
421 OFPERR_OFPGMFC_UNKNOWN_BUCKET
,
423 /* OF1.5+(6,16). Can't insert bucket because a bucket
424 * already exist with that bucket-id. */
425 OFPERR_OFPGMFC_BUCKET_EXISTS
,
427 /* ## --------------------- ## */
428 /* ## OFPET_PORT_MOD_FAILED ## */
429 /* ## --------------------- ## */
431 /* OF1.0(4,0), OF1.1+(7,0). Specified port does not exist. */
432 OFPERR_OFPPMFC_BAD_PORT
,
434 /* OF1.0(4,1), OF1.1+(7,1). Specified hardware address does not match the
436 OFPERR_OFPPMFC_BAD_HW_ADDR
,
438 /* OF1.1+(7,2). Specified config is invalid. */
439 OFPERR_OFPPMFC_BAD_CONFIG
,
441 /* OF1.1+(7,3). Specified advertise is invalid. */
442 OFPERR_OFPPMFC_BAD_ADVERTISE
,
444 /* OF1.2+(7,4). Permissions error. */
445 OFPERR_OFPPMFC_EPERM
,
447 /* ## ---------------------- ## */
448 /* ## OFPET_TABLE_MOD_FAILED ## */
449 /* ## ---------------------- ## */
451 /* OF1.1+(8,0). Specified table does not exist. */
452 OFPERR_OFPTMFC_BAD_TABLE
,
454 /* OF1.1+(8,1). Specified config is invalid. */
455 OFPERR_OFPTMFC_BAD_CONFIG
,
457 /* OF1.2+(8,2). Permissions error. */
458 OFPERR_OFPTMFC_EPERM
,
460 /* ## --------------------- ## */
461 /* ## OFPET_QUEUE_OP_FAILED ## */
462 /* ## --------------------- ## */
464 /* OF1.0(5,0), OF1.1+(9,0). Invalid port (or port does not exist). */
465 OFPERR_OFPQOFC_BAD_PORT
,
467 /* OF1.0(5,1), OF1.1+(9,1). Queue does not exist. */
468 OFPERR_OFPQOFC_BAD_QUEUE
,
470 /* OF1.0(5,2), OF1.1+(9,2). Permissions error. */
471 OFPERR_OFPQOFC_EPERM
,
473 /* ## -------------------------- ## */
474 /* ## OFPET_SWITCH_CONFIG_FAILED ## */
475 /* ## -------------------------- ## */
477 /* OF1.1+(10,0). Specified flags is invalid. */
478 OFPERR_OFPSCFC_BAD_FLAGS
,
480 /* OF1.1+(10,1). Specified len is invalid. */
481 OFPERR_OFPSCFC_BAD_LEN
,
483 /* OF1.2+(10,2). Permissions error. */
484 OFPERR_OFPSCFC_EPERM
,
486 /* ## ------------------------- ## */
487 /* ## OFPET_ROLE_REQUEST_FAILED ## */
488 /* ## ------------------------- ## */
490 /* OF1.2+(11,0). Stale Message: old generation_id. */
491 OFPERR_OFPRRFC_STALE
,
493 /* OF1.2+(11,1). Controller role change unsupported. */
494 OFPERR_OFPRRFC_UNSUP
,
496 /* NX1.0-1.1(1,513), OF1.2+(11,2). Invalid role. */
497 OFPERR_OFPRRFC_BAD_ROLE
,
499 /* ## ---------------------- ## */
500 /* ## OFPET_METER_MOD_FAILED ## */
501 /* ## ---------------------- ## */
503 /* OF1.3+(12,0). Unspecified error. */
504 OFPERR_OFPMMFC_UNKNOWN
,
506 /* OF1.3+(12,1). Meter not added because a Meter ADD attempted to
507 * replace an existing Meter. */
508 OFPERR_OFPMMFC_METER_EXISTS
,
510 /* OF1.3+(12,2). Meter not added because Meter specified is invalid. */
511 OFPERR_OFPMMFC_INVALID_METER
,
513 /* OF1.3+(12,3). Meter not modified because a Meter MODIFY attempted
514 * to modify a non-existent Meter. */
515 OFPERR_OFPMMFC_UNKNOWN_METER
,
517 /* OF1.3+(12,4). Unsupported or unknown command. */
518 OFPERR_OFPMMFC_BAD_COMMAND
,
520 /* OF1.3+(12,5). Flag configuration unsupported. */
521 OFPERR_OFPMMFC_BAD_FLAGS
,
523 /* OF1.3+(12,6). Rate unsupported. */
524 OFPERR_OFPMMFC_BAD_RATE
,
526 /* OF1.3+(12,7). Burst size unsupported. */
527 OFPERR_OFPMMFC_BAD_BURST
,
529 /* OF1.3+(12,8). Band unsupported. */
530 OFPERR_OFPMMFC_BAD_BAND
,
532 /* OF1.3+(12,9). Band value unsupported. */
533 OFPERR_OFPMMFC_BAD_BAND_VALUE
,
535 /* OF1.3+(12,10). No more meters available. */
536 OFPERR_OFPMMFC_OUT_OF_METERS
,
538 /* OF1.3+(12,11). The maximum number of properties for a meter has
540 OFPERR_OFPMMFC_OUT_OF_BANDS
,
542 /* ## --------------------------- ## */
543 /* ## OFPET_TABLE_FEATURES_FAILED ## */
544 /* ## --------------------------- ## */
546 /* OF1.3+(13,0). Specified table does not exist. */
547 OFPERR_OFPTFFC_BAD_TABLE
,
549 /* OF1.3+(13,1). Invalid metadata mask. */
550 OFPERR_OFPTFFC_BAD_METADATA
,
552 /* OF1.3+(13,5). Permissions error. */
553 OFPERR_OFPTFFC_EPERM
,
555 /* ## ------------------ ## */
556 /* ## OFPET_BAD_PROPERTY ## */
557 /* ## ------------------ ## */
559 /* OF1.3(13,2), OF1.4+(14,0). Unknown property type.
561 * [Known as OFPTFFC_BAD_TYPE in OF1.3.] */
562 OFPERR_OFPBPC_BAD_TYPE
,
564 /* OF1.3(13,3), OF1.4+(14,1). Length problem in property.
566 * [Known as OFPTFFC_BAD_LEN in OF1.3.] */
567 OFPERR_OFPBPC_BAD_LEN
,
569 /* OF1.3(13,4), OF1.4+(14,2). Unsupported property value.
571 * [Known as OFPTFFC_BAD_ARGUMENT in OF1.3.] */
572 OFPERR_OFPBPC_BAD_VALUE
,
574 /* ONF1.3(4443), OF1.4+(14,3). Can't handle this many properties. */
575 OFPERR_OFPBPC_TOO_MANY
,
577 /* ONF1.3(4444), OF1.4+(14,4). A property type was duplicated. */
578 OFPERR_OFPBPC_DUP_TYPE
,
580 /* ONF1.3(4445), OF1.4+(14,5). Unknown experimenter id specified. */
581 OFPERR_OFPBPC_BAD_EXPERIMENTER
,
583 /* ONF1.3(4446), OF1.4+(14,6). Unknown exp_type for experimenter id. */
584 OFPERR_OFPBPC_BAD_EXP_TYPE
,
586 /* ONF1.3(4447), OF1.4+(14,7). Unknown value for experimenter id. */
587 OFPERR_OFPBPC_BAD_EXP_VALUE
,
589 /* ONF1.3(4448), OF1.4+(14,8). Permissions error. */
592 /* ## -------------------- ## */
593 /* ## OFPET_BUNDLE_FAILED ## */
594 /* ## -------------------- ## */
596 /* OF1.4+(17,0). Unspecified error. */
597 OFPERR_OFPBFC_UNKNOWN
,
599 /* OF1.4+(17,1). Permissions error. */
602 /* OF1.4+(17,2). Bundle ID doesn't exist. */
603 OFPERR_OFPBFC_BAD_ID
,
605 /* OF1.4+(17,3). Bundle ID already exists. */
606 OFPERR_OFPBFC_BUNDLE_EXIST
,
608 /* OF1.4+(17,4). Bundle ID is closed. */
609 OFPERR_OFPBFC_BUNDLE_CLOSED
,
611 /* OF1.4+(17,5). Too many bundle IDs. */
612 OFPERR_OFPBFC_OUT_OF_BUNDLES
,
614 /* OF1.4+(17,6). Unsupported of unknown message control type. */
615 OFPERR_OFPBFC_BAD_TYPE
,
617 /* OF1.4+(17,7). Unsupported, unknown, or inconsistent flags. */
618 OFPERR_OFPBFC_BAD_FLAGS
,
620 /* OF1.4+(17,8). Length problem in included message. */
621 OFPERR_OFPBFC_MSG_BAD_LEN
,
623 /* OF1.4+(17,9). Inconsistent or duplicate XID. */
624 OFPERR_OFPBFC_MSG_BAD_XID
,
626 /* OF1.4+(17,10). Unsupported message in this bundle. */
627 OFPERR_OFPBFC_MSG_UNSUP
,
629 /* OF1.4+(17,11). Unsupported message combination in this bundle. */
630 OFPERR_OFPBFC_MSG_CONFLICT
,
632 /* OF1.4+(17,12). Cant handle this many messages in bundle. */
633 OFPERR_OFPBFC_MSG_TOO_MANY
,
635 /* OF1.4+(17,13). One message in bundle failed. */
636 OFPERR_OFPBFC_MSG_FAILED
,
638 /* OF1.4+(17,14). Bundle is taking too long. */
639 OFPERR_OFPBFC_TIMEOUT
,
641 /* OF1.4+(17,15). Bundle is locking the resource. */
642 OFPERR_OFPBFC_BUNDLE_IN_PROGRESS
,
644 /* ## ------------------------- ## */
645 /* ## OFPET_FLOW_MONITOR_FAILED ## */
646 /* ## ------------------------- ## */
648 /* OF1.4+(16,0). Unspecified error. */
649 OFPERR_OFPMOFC_UNKNOWN
,
651 /* NX1.0-1.1(1,517), NX1.2-1.3(6), OF1.4+(16,1). Monitor not added
652 * because a Monitor ADD attempted to replace an existing Monitor. */
653 OFPERR_OFPMOFC_MONITOR_EXISTS
,
655 /* OF1.4+(16,2). Monitor not added because
656 * Monitor specified is invalid. */
657 OFPERR_OFPMOFC_INVALID_MONITOR
,
659 /* NX1.0-1.1(1,519), NX1.2-1.3(8), OF1.4+(16,3). Monitor not modified
660 * because a Monitor MODIFY attempted to modify a non-existent Monitor. */
661 OFPERR_OFPMOFC_UNKNOWN_MONITOR
,
663 /* OF1.4+(16,4). Unsupported or unknown command. */
664 OFPERR_OFPMOFC_BAD_COMMAND
,
666 /* NX1.0-1.1(1,518), NX1.2-1.3(7), OF1.4+(16,5). Flag configuration
668 OFPERR_OFPMOFC_BAD_FLAGS
,
670 /* OF1.4+(16,6). Specified table does not exist. */
671 OFPERR_OFPMOFC_BAD_TABLE_ID
,
673 /* OF1.4+(16,7). Error in output port/group. */
674 OFPERR_OFPMOFC_BAD_OUT
,
676 /* ## ------------------ ## */
677 /* ## OFPET_EXPERIMENTER ## */
678 /* ## ------------------ ## */
681 const char *ofperr_domain_get_name(enum ofp_version
);
683 bool ofperr_is_valid(enum ofperr
);
685 enum ofperr
ofperr_from_name(const char *);
687 enum ofperr
ofperr_decode_msg(const struct ofp_header
*,
688 struct ofpbuf
*payload
);
689 struct ofpbuf
*ofperr_encode_reply(enum ofperr
, const struct ofp_header
*);
690 struct ofpbuf
*ofperr_encode_hello(enum ofperr
, enum ofp_version ofp_version
,
692 int ofperr_get_vendor(enum ofperr
, enum ofp_version
);
693 int ofperr_get_type(enum ofperr
, enum ofp_version
);
694 int ofperr_get_code(enum ofperr
, enum ofp_version
);
696 const char *ofperr_get_name(enum ofperr
);
697 const char *ofperr_get_description(enum ofperr
);
699 void ofperr_format(struct ds
*, enum ofperr
);
700 const char *ofperr_to_string(enum ofperr
);
702 #endif /* ofp-errors.h */