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
49 * --------------------
51 * The comments below are parsed by the extract-ofp-errors program at build
52 * time and used to determine the mapping between "enum ofperr" constants and
53 * error type/code values used in the OpenFlow protocol:
55 * - The first part of each comment specifies the vendor, OpenFlow versions,
56 * type, and sometimes a code for each protocol that supports the error:
58 * # The vendor is OF for standard OpenFlow error codes. Otherwise it
59 * is one of the *_VENDOR_ID codes defined in openflow-common.h.
61 * # The version can specify a specific OpenFlow version, a version
62 * range delimited by "-", or an open-ended range with "+".
64 * # Standard OpenFlow errors have both a type and a code. Extension
65 * errors generally have only a type, no code. There is one
66 * exception: Nicira extension (NX) errors for OpenFlow 1.0 and 1.1
67 * have both a type and a code. (This means that the version
68 * specification for NX errors may not include version 1.0 or 1.1 (or
69 * both) along with version 1.2 or later, because the requirements
70 * for those versions are different.)
72 * - Additional text is a human-readable description of the meaning of each
73 * error, used to explain the error to the user. Any text enclosed in
74 * square brackets is omitted; this can be used to explain rationale for
75 * choice of error codes in the case where this is desirable.
78 * Expected duplications
79 * ---------------------
81 * Occasionally, in one version of OpenFlow a single named error can indicate
82 * two or more distinct errors, then a later version of OpenFlow splits those
83 * meanings into different error codes. When that happens, both errors are
84 * assigned the same value in the earlier version. That is ordinarily a
85 * mistake, so the build system reports an error. When that happens, add the
86 * error message to the list of "Expected duplications" below to suppress the
87 * error. In such a case, the named error defined earlier is how OVS
88 * interprets the earlier, merged form of the error.
90 * For example, OpenFlow 1.1 defined (3,5) as OFPBIC_UNSUP_EXP_INST, then
91 * OpenFlow 1.2 broke this error into OFPBIC_BAD_EXPERIMENTER as (3,5) and
92 * OFPBIC_BAD_EXT_TYPE as (3,6). To allow the OVS code to report just a single
93 * error code, instead of protocol version dependent errors, this list of
94 * errors only lists the latter two errors, giving both of them the same code
95 * (3,5) for OpenFlow 1.1. Then, when OVS serializes either error into
96 * OpenFlow 1.1, it uses the same code (3,5). In the other direction, when OVS
97 * deserializes (3,5) from OpenFlow 1.1, it translates it into
98 * OFPBIC_BAD_EXPERIMENTER (because its definition precedes that of
99 * OFPBIC_BAD_EXT_TYPE below). See the "encoding OFPBIC_* experimenter errors"
100 * and "decoding OFPBIC_* experimenter errors" tests in tests/ofp-errors.at for
104 /* Expected duplications. */
106 /* Expected: 0x0,3,5 in OF1.1 means both OFPBIC_BAD_EXPERIMENTER and
107 * OFPBIC_BAD_EXP_TYPE. */
109 /* ## ------------------ ## */
110 /* ## OFPET_HELLO_FAILED ## */
111 /* ## ------------------ ## */
113 /* OF1.0+(0,0). No compatible version. */
114 OFPERR_OFPHFC_INCOMPATIBLE = OFPERR_OFS,
116 /* OF1.0+(0,1). Permissions error. */
119 /* ## ----------------- ## */
120 /* ## OFPET_BAD_REQUEST ## */
121 /* ## ----------------- ## */
123 /* OF1.0+(1,0). ofp_header.version not supported. */
124 OFPERR_OFPBRC_BAD_VERSION,
126 /* OF1.0+(1,1). ofp_header.type not supported. */
127 OFPERR_OFPBRC_BAD_TYPE,
129 /* OF1.0+(1,2). ofp_stats_msg.type not supported. */
130 OFPERR_OFPBRC_BAD_STAT,
132 /* OF1.0+(1,3). Vendor not supported (in ofp_vendor_header or
134 OFPERR_OFPBRC_BAD_VENDOR,
136 /* OF1.0+(1,4). Vendor subtype not supported. */
137 OFPERR_OFPBRC_BAD_SUBTYPE,
139 /* OF1.0+(1,5). Permissions error. */
142 /* OF1.0+(1,6). Wrong request length for type. */
143 OFPERR_OFPBRC_BAD_LEN,
145 /* OF1.0+(1,7). Specified buffer has already been used. */
146 OFPERR_OFPBRC_BUFFER_EMPTY,
148 /* OF1.0+(1,8). Specified buffer does not exist. */
149 OFPERR_OFPBRC_BUFFER_UNKNOWN,
151 /* NX1.0(1,512), OF1.1+(1,9). Specified table-id invalid or does not exist.
152 * [ A non-standard error (1,512), formerly OFPERR_NXBRC_BAD_TABLE_ID,
153 * is used for OpenFlow 1.0 as there seems to be no appropriate error
154 * code defined the specification. ] */
155 OFPERR_OFPBRC_BAD_TABLE_ID,
157 /* OF1.2+(1,10). Denied because controller is slave. */
158 OFPERR_OFPBRC_IS_SLAVE,
160 /* NX1.0-1.1(1,514), OF1.2+(1,11). Invalid port. [ A non-standard error
161 * (1,514), formerly OFPERR_NXBRC_BAD_IN_PORT is used for OpenFlow 1.0 and
162 * 1.1 as there seems to be no appropriate error code defined the
163 * specifications. ] */
164 OFPERR_OFPBRC_BAD_PORT,
166 /* OF1.2+(1,12). Invalid packet in packet-out. */
167 OFPERR_OFPBRC_BAD_PACKET,
169 /* OF1.3+(1,13). Multipart request overflowed the assigned buffer. */
170 OFPERR_OFPBRC_MULTIPART_BUFFER_OVERFLOW,
172 /* NX1.0-1.1(1,256), NX1.2+(2). Invalid NXM flow match. */
173 OFPERR_NXBRC_NXM_INVALID,
175 /* NX1.0-1.1(1,257), NX1.2+(3). The nxm_type, or nxm_type taken in
176 * combination with nxm_hasmask or nxm_length or both, is invalid or not
178 OFPERR_NXBRC_NXM_BAD_TYPE,
180 /* NX1.0-1.1(1,515), NX1.2+(4). Must-be-zero field had nonzero value. */
181 OFPERR_NXBRC_MUST_BE_ZERO,
183 /* NX1.0-1.1(1,516), NX1.2+(5). The reason in an ofp_port_status message
185 OFPERR_NXBRC_BAD_REASON,
187 /* NX1.0-1.1(1,520), NX1.2+(9). The 'event' in an NXST_FLOW_MONITOR reply
188 * does not specify one of the NXFME_ABBREV, NXFME_ADD, NXFME_DELETE, or
190 OFPERR_NXBRC_FM_BAD_EVENT,
192 /* NX1.0-1.1(1,521), NX1.2+(10). The error that occurred cannot be
193 * represented in this OpenFlow version. */
194 OFPERR_NXBRC_UNENCODABLE_ERROR,
196 /* ## ---------------- ## */
197 /* ## OFPET_BAD_ACTION ## */
198 /* ## ---------------- ## */
200 /* OF1.0+(2,0). Unknown action type. */
201 OFPERR_OFPBAC_BAD_TYPE,
203 /* OF1.0+(2,1). Length problem in actions. */
204 OFPERR_OFPBAC_BAD_LEN,
206 /* OF1.0+(2,2). Unknown experimenter id specified. */
207 OFPERR_OFPBAC_BAD_VENDOR,
209 /* OF1.0+(2,3). Unknown action type for experimenter id. */
210 OFPERR_OFPBAC_BAD_VENDOR_TYPE,
212 /* OF1.0+(2,4). Problem validating output port. */
213 OFPERR_OFPBAC_BAD_OUT_PORT,
215 /* OF1.0+(2,5). Bad action argument. */
216 OFPERR_OFPBAC_BAD_ARGUMENT,
218 /* OF1.0+(2,6). Permissions error. */
221 /* OF1.0+(2,7). Can't handle this many actions. */
222 OFPERR_OFPBAC_TOO_MANY,
224 /* OF1.0+(2,8). Problem validating output queue. */
225 OFPERR_OFPBAC_BAD_QUEUE,
227 /* OF1.1+(2,9). Invalid group id in forward action. */
228 OFPERR_OFPBAC_BAD_OUT_GROUP,
230 /* NX1.0(1,522), OF1.1+(2,10). Action can't apply for this match or a
231 * prerequisite for use of this field is unmet. */
232 OFPERR_OFPBAC_MATCH_INCONSISTENT,
234 /* OF1.1+(2,11). Action order is unsupported for the action list in an
235 * Apply-Actions instruction */
236 OFPERR_OFPBAC_UNSUPPORTED_ORDER,
238 /* OF1.1+(2,12). Actions uses an unsupported tag/encap. */
239 OFPERR_OFPBAC_BAD_TAG,
241 /* NX1.0-1.1(1,523), OF1.2+(2,13). Action uses unknown or unsupported OXM
243 OFPERR_OFPBAC_BAD_SET_TYPE,
245 /* NX1.0-1.1(1,524), OF1.2+(2,14). Action references past the end of an
246 * OXM or NXM field, or uses a length of zero. */
247 OFPERR_OFPBAC_BAD_SET_LEN,
249 /* NX1.0-1.1(1,525), OF1.2+(2,15). Action sets a field to an invalid or
250 * unsupported value, or modifies a read-only field. */
251 OFPERR_OFPBAC_BAD_SET_ARGUMENT,
253 /* ONF1.3-1.4(4250), OF1.5+(2,16). Field in Set-Field action has Has-Mask
255 OFPERR_OFPBAC_BAD_SET_MASK,
257 /* NX1.0-1.1(2,256), NX1.2+(11). Must-be-zero action argument had nonzero
259 OFPERR_NXBAC_MUST_BE_ZERO,
261 /* NX1.0-1.1(2,526), NX1.2+(15). Conjunction action must be only action
262 * present. conjunction(id, k/n) must satisfy 1 <= k <= n and 2 <= n <=
264 OFPERR_NXBAC_BAD_CONJUNCTION,
266 /* ## --------------------- ## */
267 /* ## OFPET_BAD_INSTRUCTION ## */
268 /* ## --------------------- ## */
270 /* OF1.1+(3,0). Unknown instruction. */
271 OFPERR_OFPBIC_UNKNOWN_INST,
273 /* NX1.0(2,257), OF1.1+(3,1). Switch or table does not support the
275 OFPERR_OFPBIC_UNSUP_INST,
277 /* OF1.1+(3,2). Invalid Table-ID specified. */
278 OFPERR_OFPBIC_BAD_TABLE_ID,
280 /* OF1.1+(3,3). Metadata value unsupported by datapath. */
281 OFPERR_OFPBIC_UNSUP_METADATA,
283 /* OF1.1+(3,4). Metadata mask value unsupported by datapath. */
284 OFPERR_OFPBIC_UNSUP_METADATA_MASK,
286 /* OF1.1+(3,5). Unknown experimenter id specified. */
287 OFPERR_OFPBIC_BAD_EXPERIMENTER,
289 /* OF1.1(3,5), OF1.2+(3,6). Unknown instruction for experimenter id. */
290 OFPERR_OFPBIC_BAD_EXP_TYPE,
292 /* OF1.2+(3,7). Length problem in instructions. */
293 OFPERR_OFPBIC_BAD_LEN,
295 /* OF1.2+(3,8). Permissions error. */
298 /* NX1.1(3,256), ONF1.2-1.3(2600), OF1.4+(3,9). Duplicate instruction. */
299 OFPERR_OFPBIC_DUP_INST,
301 /* ## --------------- ## */
302 /* ## OFPET_BAD_MATCH ## */
303 /* ## --------------- ## */
305 /* OF1.1+(4,0). Unsupported match type specified by the match */
306 OFPERR_OFPBMC_BAD_TYPE,
308 /* OF1.1+(4,1). Length problem in match. */
309 OFPERR_OFPBMC_BAD_LEN,
311 /* OF1.1+(4,2). Match uses an unsupported tag/encap. */
312 OFPERR_OFPBMC_BAD_TAG,
314 /* OF1.1+(4,3). Unsupported datalink addr mask - switch does not support
315 * arbitrary datalink address mask. */
316 OFPERR_OFPBMC_BAD_DL_ADDR_MASK,
318 /* OF1.1+(4,4). Unsupported network addr mask - switch does not support
319 * arbitrary network address mask. */
320 OFPERR_OFPBMC_BAD_NW_ADDR_MASK,
322 /* NX1.0(1,262), OF1.1+(4,5). Unsupported wildcard specified in the
324 OFPERR_OFPBMC_BAD_WILDCARDS,
326 /* OF1.1+(4,6). Unsupported field in the match. */
327 OFPERR_OFPBMC_BAD_FIELD,
329 /* NX1.0(1,258), OF1.1+(4,7). Unsupported value in a match
331 OFPERR_OFPBMC_BAD_VALUE,
333 /* NX1.0-1.1(1,259), OF1.2+(4,8). Unsupported mask specified in the match,
334 * field is not dl-address or nw-address. */
335 OFPERR_OFPBMC_BAD_MASK,
337 /* NX1.0-1.1(1,260), OF1.2+(4,9). A prerequisite was not met. */
338 OFPERR_OFPBMC_BAD_PREREQ,
340 /* NX1.0-1.1(1,261), OF1.2+(4,10). A field type was duplicated. */
341 OFPERR_OFPBMC_DUP_FIELD,
343 /* OF1.2+(4,11). Permissions error. */
346 /* ## --------------------- ## */
347 /* ## OFPET_FLOW_MOD_FAILED ## */
348 /* ## --------------------- ## */
350 /* OF1.1+(5,0). Unspecified error. */
351 OFPERR_OFPFMFC_UNKNOWN,
353 /* OF1.0(3,0), OF1.1+(5,1). Flow not added because of full table(s). */
354 OFPERR_OFPFMFC_TABLE_FULL,
356 /* OF1.1+(5,2). Table does not exist */
357 OFPERR_OFPFMFC_BAD_TABLE_ID,
359 /* OF1.0(3,1), OF1.1+(5,3). Attempted to add overlapping flow with
360 * CHECK_OVERLAP flag set. */
361 OFPERR_OFPFMFC_OVERLAP,
363 /* OF1.0(3,2), OF1.1+(5,4). Permissions error. */
364 OFPERR_OFPFMFC_EPERM,
366 /* OF1.1+(5,5). Flow not added because of unsupported idle/hard
368 OFPERR_OFPFMFC_BAD_TIMEOUT,
370 /* OF1.0(3,3). Flow not added because of non-zero idle/hard timeout. */
371 OFPERR_OFPFMFC_BAD_EMERG_TIMEOUT,
373 /* OF1.0(3,4), OF1.1+(5,6). Unsupported or unknown command. */
374 OFPERR_OFPFMFC_BAD_COMMAND,
376 /* NX1.0(3,258), NX1.1(5,258), OF1.2+(5,7). Unsupported or unknown
378 OFPERR_OFPFMFC_BAD_FLAGS,
380 /* OF1.0(3,5). Unsupported action list - cannot process in the order
382 OFPERR_OFPFMFC_UNSUPPORTED,
384 /* NX1.0-1.1(5,256), NX1.2+(12). Generic hardware error. */
385 OFPERR_NXFMFC_HARDWARE,
387 /* NX1.0-1.1(5,257), NX1.2+(13). A nonexistent table ID was specified in
388 * the "command" field of struct ofp_flow_mod, when the
389 * nxt_flow_mod_table_id extension is enabled. */
390 OFPERR_NXFMFC_BAD_TABLE_ID,
392 /* ## ---------------------- ## */
393 /* ## OFPET_GROUP_MOD_FAILED ## */
394 /* ## ---------------------- ## */
396 /* OF1.1+(6,0). Group not added because a group ADD attempted to replace
397 * an already-present group. */
398 OFPERR_OFPGMFC_GROUP_EXISTS,
400 /* OF1.1+(6,1). Group not added because Group specified is invalid. */
401 OFPERR_OFPGMFC_INVALID_GROUP,
403 /* OF1.1+(6,2). Switch does not support unequal load sharing with select
405 OFPERR_OFPGMFC_WEIGHT_UNSUPPORTED,
407 /* OF1.1+(6,3). The group table is full. */
408 OFPERR_OFPGMFC_OUT_OF_GROUPS,
410 /* OF1.1+(6,4). The maximum number of action buckets for a group has been
412 OFPERR_OFPGMFC_OUT_OF_BUCKETS,
414 /* OF1.1+(6,5). Switch does not support groups that forward to groups. */
415 OFPERR_OFPGMFC_CHAINING_UNSUPPORTED,
417 /* OF1.1+(6,6). This group cannot watch the watch_port or watch_group
419 OFPERR_OFPGMFC_WATCH_UNSUPPORTED,
421 /* OF1.1+(6,7). Group entry would cause a loop. */
424 /* OF1.1+(6,8). Group not modified because a group MODIFY attempted to
425 * modify a non-existent group. */
426 OFPERR_OFPGMFC_UNKNOWN_GROUP,
428 /* OF1.2+(6,9). Group not deleted because another
429 group is forwarding to it. */
430 OFPERR_OFPGMFC_CHAINED_GROUP,
432 /* OF1.2+(6,10). Unsupported or unknown group type. */
433 OFPERR_OFPGMFC_BAD_TYPE,
435 /* OF1.2+(6,11). Unsupported or unknown command. */
436 OFPERR_OFPGMFC_BAD_COMMAND,
438 /* OF1.2+(6,12). Error in bucket. */
439 OFPERR_OFPGMFC_BAD_BUCKET,
441 /* OF1.2+(6,13). Error in watch port/group. */
442 OFPERR_OFPGMFC_BAD_WATCH,
444 /* OF1.2+(6,14). Permissions error. */
445 OFPERR_OFPGMFC_EPERM,
447 /* OF1.5+(6,15). Invalid bucket identifier used in
448 * INSERT BUCKET or REMOVE BUCKET command. */
449 OFPERR_OFPGMFC_UNKNOWN_BUCKET,
451 /* OF1.5+(6,16). Can't insert bucket because a bucket
452 * already exist with that bucket-id. */
453 OFPERR_OFPGMFC_BUCKET_EXISTS,
455 /* ## --------------------- ## */
456 /* ## OFPET_PORT_MOD_FAILED ## */
457 /* ## --------------------- ## */
459 /* OF1.0(4,0), OF1.1+(7,0). Specified port does not exist. */
460 OFPERR_OFPPMFC_BAD_PORT,
462 /* OF1.0(4,1), OF1.1+(7,1). Specified hardware address does not match the
464 OFPERR_OFPPMFC_BAD_HW_ADDR,
466 /* OF1.1+(7,2). Specified config is invalid. */
467 OFPERR_OFPPMFC_BAD_CONFIG,
469 /* OF1.1+(7,3). Specified advertise is invalid. */
470 OFPERR_OFPPMFC_BAD_ADVERTISE,
472 /* OF1.2+(7,4). Permissions error. */
473 OFPERR_OFPPMFC_EPERM,
475 /* ## ---------------------- ## */
476 /* ## OFPET_TABLE_MOD_FAILED ## */
477 /* ## ---------------------- ## */
479 /* OF1.1+(8,0). Specified table does not exist. */
480 OFPERR_OFPTMFC_BAD_TABLE,
482 /* OF1.1+(8,1). Specified config is invalid. */
483 OFPERR_OFPTMFC_BAD_CONFIG,
485 /* OF1.2+(8,2). Permissions error. */
486 OFPERR_OFPTMFC_EPERM,
488 /* ## --------------------- ## */
489 /* ## OFPET_QUEUE_OP_FAILED ## */
490 /* ## --------------------- ## */
492 /* OF1.0(5,0), OF1.1+(9,0). Invalid port (or port does not exist). */
493 OFPERR_OFPQOFC_BAD_PORT,
495 /* OF1.0(5,1), OF1.1+(9,1). Queue does not exist. */
496 OFPERR_OFPQOFC_BAD_QUEUE,
498 /* OF1.0(5,2), OF1.1+(9,2). Permissions error. */
499 OFPERR_OFPQOFC_EPERM,
501 /* ## -------------------------- ## */
502 /* ## OFPET_SWITCH_CONFIG_FAILED ## */
503 /* ## -------------------------- ## */
505 /* OF1.1+(10,0). Specified flags is invalid. */
506 OFPERR_OFPSCFC_BAD_FLAGS,
508 /* OF1.1+(10,1). Specified len is invalid. */
509 OFPERR_OFPSCFC_BAD_LEN,
511 /* OF1.2+(10,2). Permissions error. */
512 OFPERR_OFPSCFC_EPERM,
514 /* ## ------------------------- ## */
515 /* ## OFPET_ROLE_REQUEST_FAILED ## */
516 /* ## ------------------------- ## */
518 /* OF1.2+(11,0). Stale Message: old generation_id. */
519 OFPERR_OFPRRFC_STALE,
521 /* OF1.2+(11,1). Controller role change unsupported. */
522 OFPERR_OFPRRFC_UNSUP,
524 /* NX1.0-1.1(1,513), OF1.2+(11,2). Invalid role. */
525 OFPERR_OFPRRFC_BAD_ROLE,
527 /* ## ---------------------- ## */
528 /* ## OFPET_METER_MOD_FAILED ## */
529 /* ## ---------------------- ## */
531 /* OF1.3+(12,0). Unspecified error. */
532 OFPERR_OFPMMFC_UNKNOWN,
534 /* OF1.3+(12,1). Meter not added because a Meter ADD attempted to
535 * replace an existing Meter. */
536 OFPERR_OFPMMFC_METER_EXISTS,
538 /* OF1.3+(12,2). Meter not added because Meter specified is invalid. */
539 OFPERR_OFPMMFC_INVALID_METER,
541 /* OF1.3+(12,3). Meter not modified because a Meter MODIFY attempted
542 * to modify a non-existent Meter. */
543 OFPERR_OFPMMFC_UNKNOWN_METER,
545 /* OF1.3+(12,4). Unsupported or unknown command. */
546 OFPERR_OFPMMFC_BAD_COMMAND,
548 /* OF1.3+(12,5). Flag configuration unsupported. */
549 OFPERR_OFPMMFC_BAD_FLAGS,
551 /* OF1.3+(12,6). Rate unsupported. */
552 OFPERR_OFPMMFC_BAD_RATE,
554 /* OF1.3+(12,7). Burst size unsupported. */
555 OFPERR_OFPMMFC_BAD_BURST,
557 /* OF1.3+(12,8). Band unsupported. */
558 OFPERR_OFPMMFC_BAD_BAND,
560 /* OF1.3+(12,9). Band value unsupported. */
561 OFPERR_OFPMMFC_BAD_BAND_VALUE,
563 /* OF1.3+(12,10). No more meters available. */
564 OFPERR_OFPMMFC_OUT_OF_METERS,
566 /* OF1.3+(12,11). The maximum number of properties for a meter has
568 OFPERR_OFPMMFC_OUT_OF_BANDS,
570 /* ## --------------------------- ## */
571 /* ## OFPET_TABLE_FEATURES_FAILED ## */
572 /* ## --------------------------- ## */
574 /* OF1.3+(13,0). Specified table does not exist. */
575 OFPERR_OFPTFFC_BAD_TABLE,
577 /* OF1.3+(13,1). Invalid metadata mask. */
578 OFPERR_OFPTFFC_BAD_METADATA,
580 /* OF1.3+(13,5). Permissions error. */
581 OFPERR_OFPTFFC_EPERM,
583 /* ## ------------------ ## */
584 /* ## OFPET_BAD_PROPERTY ## */
585 /* ## ------------------ ## */
587 /* OF1.3(13,2), OF1.4+(14,0). Unknown property type.
589 * [Known as OFPTFFC_BAD_TYPE in OF1.3.] */
590 OFPERR_OFPBPC_BAD_TYPE,
592 /* OF1.3(13,3), OF1.4+(14,1). Length problem in property.
594 * [Known as OFPTFFC_BAD_LEN in OF1.3.] */
595 OFPERR_OFPBPC_BAD_LEN,
597 /* OF1.3(13,4), OF1.4+(14,2). Unsupported property value.
599 * [Known as OFPTFFC_BAD_ARGUMENT in OF1.3.] */
600 OFPERR_OFPBPC_BAD_VALUE,
602 /* ONF1.3(4443), OF1.4+(14,3). Can't handle this many properties. */
603 OFPERR_OFPBPC_TOO_MANY,
605 /* ONF1.3(4444), OF1.4+(14,4). A property type was duplicated. */
606 OFPERR_OFPBPC_DUP_TYPE,
608 /* ONF1.3(4445), OF1.4+(14,5). Unknown experimenter id specified. */
609 OFPERR_OFPBPC_BAD_EXPERIMENTER,
611 /* ONF1.3(4446), OF1.4+(14,6). Unknown exp_type for experimenter id. */
612 OFPERR_OFPBPC_BAD_EXP_TYPE,
614 /* ONF1.3(4447), OF1.4+(14,7). Unknown value for experimenter id. */
615 OFPERR_OFPBPC_BAD_EXP_VALUE,
617 /* ONF1.3(4448), OF1.4+(14,8). Permissions error. */
620 /* ## -------------------- ## */
621 /* ## OFPET_BUNDLE_FAILED ## */
622 /* ## -------------------- ## */
624 /* OF1.4+(17,0). Unspecified error. */
625 OFPERR_OFPBFC_UNKNOWN,
627 /* OF1.4+(17,1). Permissions error. */
630 /* OF1.4+(17,2). Bundle ID doesn't exist. */
631 OFPERR_OFPBFC_BAD_ID,
633 /* OF1.4+(17,3). Bundle ID already exists. */
634 OFPERR_OFPBFC_BUNDLE_EXIST,
636 /* OF1.4+(17,4). Bundle ID is closed. */
637 OFPERR_OFPBFC_BUNDLE_CLOSED,
639 /* OF1.4+(17,5). Too many bundle IDs. */
640 OFPERR_OFPBFC_OUT_OF_BUNDLES,
642 /* OF1.4+(17,6). Unsupported of unknown message control type. */
643 OFPERR_OFPBFC_BAD_TYPE,
645 /* OF1.4+(17,7). Unsupported, unknown, or inconsistent flags. */
646 OFPERR_OFPBFC_BAD_FLAGS,
648 /* OF1.4+(17,8). Length problem in included message. */
649 OFPERR_OFPBFC_MSG_BAD_LEN,
651 /* OF1.4+(17,9). Inconsistent or duplicate XID. */
652 OFPERR_OFPBFC_MSG_BAD_XID,
654 /* OF1.4+(17,10). Unsupported message in this bundle. */
655 OFPERR_OFPBFC_MSG_UNSUP,
657 /* OF1.4+(17,11). Unsupported message combination in this bundle. */
658 OFPERR_OFPBFC_MSG_CONFLICT,
660 /* OF1.4+(17,12). Cant handle this many messages in bundle. */
661 OFPERR_OFPBFC_MSG_TOO_MANY,
663 /* OF1.4+(17,13). One message in bundle failed. */
664 OFPERR_OFPBFC_MSG_FAILED,
666 /* OF1.4+(17,14). Bundle is taking too long. */
667 OFPERR_OFPBFC_TIMEOUT,
669 /* OF1.4+(17,15). Bundle is locking the resource. */
670 OFPERR_OFPBFC_BUNDLE_IN_PROGRESS,
672 /* ## ------------------------- ## */
673 /* ## OFPET_FLOW_MONITOR_FAILED ## */
674 /* ## ------------------------- ## */
676 /* OF1.4+(16,0). Unspecified error. */
677 OFPERR_OFPMOFC_UNKNOWN,
679 /* NX1.0-1.1(1,517), NX1.2-1.3(6), OF1.4+(16,1). Monitor not added
680 * because a Monitor ADD attempted to replace an existing Monitor. */
681 OFPERR_OFPMOFC_MONITOR_EXISTS,
683 /* OF1.4+(16,2). Monitor not added because
684 * Monitor specified is invalid. */
685 OFPERR_OFPMOFC_INVALID_MONITOR,
687 /* NX1.0-1.1(1,519), NX1.2-1.3(8), OF1.4+(16,3). Monitor not modified
688 * because a Monitor MODIFY attempted to modify a non-existent Monitor. */
689 OFPERR_OFPMOFC_UNKNOWN_MONITOR,
691 /* OF1.4+(16,4). Unsupported or unknown command. */
692 OFPERR_OFPMOFC_BAD_COMMAND,
694 /* NX1.0-1.1(1,518), NX1.2-1.3(7), OF1.4+(16,5). Flag configuration
696 OFPERR_OFPMOFC_BAD_FLAGS,
698 /* OF1.4+(16,6). Specified table does not exist. */
699 OFPERR_OFPMOFC_BAD_TABLE_ID,
701 /* OF1.4+(16,7). Error in output port/group. */
702 OFPERR_OFPMOFC_BAD_OUT,
704 /* ## ------------------ ## */
705 /* ## OFPET_EXPERIMENTER ## */
706 /* ## ------------------ ## */
709 const char *ofperr_domain_get_name(enum ofp_version);
711 bool ofperr_is_valid(enum ofperr);
713 enum ofperr ofperr_from_name(const char *);
715 enum ofperr ofperr_decode_msg(const struct ofp_header *,
716 struct ofpbuf *payload);
717 struct ofpbuf *ofperr_encode_reply(enum ofperr, const struct ofp_header *);
718 struct ofpbuf *ofperr_encode_hello(enum ofperr, enum ofp_version ofp_version,
720 int ofperr_get_vendor(enum ofperr, enum ofp_version);
721 int ofperr_get_type(enum ofperr, enum ofp_version);
722 int ofperr_get_code(enum ofperr, enum ofp_version);
724 const char *ofperr_get_name(enum ofperr);
725 const char *ofperr_get_description(enum ofperr);
727 void ofperr_format(struct ds *, enum ofperr);
728 const char *ofperr_to_string(enum ofperr);
730 #endif /* ofp-errors.h */