]> git.proxmox.com Git - mirror_ovs.git/blame - lib/ofp-errors.h
netdev-linux, netdev-bsd: Make access to AF_INET socket thread-safe.
[mirror_ovs.git] / lib / ofp-errors.h
CommitLineData
dc4762ed 1/*
4fff3fac 2 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
dc4762ed
BP
3 *
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:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef OFP_ERRORS_H
18#define OFP_ERRORS_H 1
19
90bf1e07
BP
20#include <stdbool.h>
21#include <stddef.h>
dc4762ed
BP
22#include <stdint.h>
23
9b7e2112
SH
24#include "openflow/openflow.h"
25
90bf1e07 26struct ds;
982697a4 27struct ofpbuf;
90bf1e07
BP
28
29/* Error codes.
30 *
31 * We embed system errno values and OpenFlow standard and vendor extension
32 * error codes into the positive range of "int":
33 *
34 * - Errno values are assumed to use the range 1 through 2**30 - 1.
35 *
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.)
39 *
40 * - OpenFlow standard and vendor extension error codes use the range
41 * starting at 2**30 (OFPERR_OFS).
42 *
43 * Zero and negative values are not used.
44 */
45
46#define OFPERR_OFS (1 << 30)
47
4b83c93f
SH
48/* OpenFlow error codes.
49 *
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:
53 *
514887ee
BP
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:
56 *
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.
59 *
60 * # The version can specify a specific OpenFlow version, a version
61 * range delimited by "-", or an open-ended range with "+".
62 *
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.)
4b83c93f
SH
70 *
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. */
90bf1e07 75enum ofperr {
2e0525bc
SH
76/* Expected duplications. */
77
514887ee 78 /* Expected: 0x0,3,5 in OF1.1 means both OFPBIC_BAD_EXPERIMENTER and
2e0525bc
SH
79 * OFPBIC_BAD_EXP_TYPE. */
80
90bf1e07
BP
81/* ## ------------------ ## */
82/* ## OFPET_HELLO_FAILED ## */
83/* ## ------------------ ## */
84
4000658b 85 /* OF1.0+(0,0). No compatible version. */
df30f9b1 86 OFPERR_OFPHFC_INCOMPATIBLE = OFPERR_OFS,
90bf1e07 87
4000658b 88 /* OF1.0+(0,1). Permissions error. */
90bf1e07
BP
89 OFPERR_OFPHFC_EPERM,
90
91/* ## ----------------- ## */
92/* ## OFPET_BAD_REQUEST ## */
93/* ## ----------------- ## */
94
4000658b 95 /* OF1.0+(1,0). ofp_header.version not supported. */
90bf1e07
BP
96 OFPERR_OFPBRC_BAD_VERSION,
97
4000658b 98 /* OF1.0+(1,1). ofp_header.type not supported. */
90bf1e07
BP
99 OFPERR_OFPBRC_BAD_TYPE,
100
4000658b 101 /* OF1.0+(1,2). ofp_stats_msg.type not supported. */
90bf1e07
BP
102 OFPERR_OFPBRC_BAD_STAT,
103
4000658b 104 /* OF1.0+(1,3). Vendor not supported (in ofp_vendor_header or
90bf1e07
BP
105 * ofp_stats_msg). */
106 OFPERR_OFPBRC_BAD_VENDOR,
107
4000658b 108 /* OF1.0+(1,4). Vendor subtype not supported. */
90bf1e07
BP
109 OFPERR_OFPBRC_BAD_SUBTYPE,
110
4000658b 111 /* OF1.0+(1,5). Permissions error. */
90bf1e07
BP
112 OFPERR_OFPBRC_EPERM,
113
4000658b 114 /* OF1.0+(1,6). Wrong request length for type. */
90bf1e07
BP
115 OFPERR_OFPBRC_BAD_LEN,
116
4000658b 117 /* OF1.0+(1,7). Specified buffer has already been used. */
90bf1e07
BP
118 OFPERR_OFPBRC_BUFFER_EMPTY,
119
4000658b 120 /* OF1.0+(1,8). Specified buffer does not exist. */
90bf1e07
BP
121 OFPERR_OFPBRC_BUFFER_UNKNOWN,
122
c22c56bd
SH
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,
4fff3fac 125 * is used for OpenFlow 1.0 as there seems to be no appropriate error
c22c56bd 126 * code defined the specification. ] */
90bf1e07
BP
127 OFPERR_OFPBRC_BAD_TABLE_ID,
128
2e0525bc
SH
129 /* OF1.2+(1,10). Denied because controller is slave. */
130 OFPERR_OFPBRC_IS_SLAVE,
131
514887ee
BP
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. ] */
2e0525bc
SH
136 OFPERR_OFPBRC_BAD_PORT,
137
138 /* OF1.2+(1,12). Invalid packet in packet-out. */
139 OFPERR_OFPBRC_BAD_PACKET,
140
2e1ae200
JR
141 /* OF1.3+(1,13). Multipart request overflowed the assigned buffer. */
142 OFPERR_OFPBRC_MULTIPART_BUFFER_OVERFLOW,
143
514887ee 144 /* NX1.0-1.1(1,256), NX1.2+(2). Invalid NXM flow match. */
90bf1e07
BP
145 OFPERR_NXBRC_NXM_INVALID,
146
514887ee
BP
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
149 * implemented. */
90bf1e07
BP
150 OFPERR_NXBRC_NXM_BAD_TYPE,
151
514887ee 152 /* NX1.0-1.1(1,515), NX1.2+(4). Must-be-zero field had nonzero value. */
a7349929
BP
153 OFPERR_NXBRC_MUST_BE_ZERO,
154
514887ee
BP
155 /* NX1.0-1.1(1,516), NX1.2+(5). The reason in an ofp_port_status message
156 * is not valid. */
9e1fd49b
BP
157 OFPERR_NXBRC_BAD_REASON,
158
514887ee
BP
159 /* NX1.0-1.1(1,517), NX1.2+(6). The 'id' in an NXST_FLOW_MONITOR request
160 * is the same as an existing monitor id (or two monitors in the same
161 * NXST_FLOW_MONITOR request have the same 'id'). */
2b07c8b1
BP
162 OFPERR_NXBRC_FM_DUPLICATE_ID,
163
514887ee
BP
164 /* NX1.0-1.1(1,518), NX1.2+(7). The 'flags' in an NXST_FLOW_MONITOR
165 * request either does not specify at least one of the NXFMF_ADD,
166 * NXFMF_DELETE, or NXFMF_MODIFY flags, or specifies a flag bit that is not
167 * defined. */
2b07c8b1
BP
168 OFPERR_NXBRC_FM_BAD_FLAGS,
169
514887ee
BP
170 /* NX1.0-1.1(1,519), NX1.2+(8). The 'id' in an NXT_FLOW_MONITOR_CANCEL
171 * request is not the id of any existing monitor. */
2b07c8b1
BP
172 OFPERR_NXBRC_FM_BAD_ID,
173
514887ee
BP
174 /* NX1.0-1.1(1,520), NX1.2+(9). The 'event' in an NXST_FLOW_MONITOR reply
175 * does not specify one of the NXFME_ABBREV, NXFME_ADD, NXFME_DELETE, or
15549878
JR
176 * NXFME_MODIFY. */
177 OFPERR_NXBRC_FM_BAD_EVENT,
178
514887ee
BP
179 /* NX1.0-1.1(1,521), NX1.2+(10). The error that occurred cannot be
180 * represented in this OpenFlow version. */
07c8ec21
BP
181 OFPERR_NXBRC_UNENCODABLE_ERROR,
182
90bf1e07
BP
183/* ## ---------------- ## */
184/* ## OFPET_BAD_ACTION ## */
185/* ## ---------------- ## */
186
4000658b 187 /* OF1.0+(2,0). Unknown action type. */
90bf1e07
BP
188 OFPERR_OFPBAC_BAD_TYPE,
189
4000658b 190 /* OF1.0+(2,1). Length problem in actions. */
90bf1e07
BP
191 OFPERR_OFPBAC_BAD_LEN,
192
4000658b 193 /* OF1.0+(2,2). Unknown experimenter id specified. */
90bf1e07
BP
194 OFPERR_OFPBAC_BAD_VENDOR,
195
4000658b 196 /* OF1.0+(2,3). Unknown action type for experimenter id. */
90bf1e07
BP
197 OFPERR_OFPBAC_BAD_VENDOR_TYPE,
198
4000658b 199 /* OF1.0+(2,4). Problem validating output port. */
90bf1e07
BP
200 OFPERR_OFPBAC_BAD_OUT_PORT,
201
4000658b 202 /* OF1.0+(2,5). Bad action argument. */
90bf1e07
BP
203 OFPERR_OFPBAC_BAD_ARGUMENT,
204
4000658b 205 /* OF1.0+(2,6). Permissions error. */
90bf1e07
BP
206 OFPERR_OFPBAC_EPERM,
207
4000658b 208 /* OF1.0+(2,7). Can't handle this many actions. */
90bf1e07
BP
209 OFPERR_OFPBAC_TOO_MANY,
210
4000658b 211 /* OF1.0+(2,8). Problem validating output queue. */
90bf1e07
BP
212 OFPERR_OFPBAC_BAD_QUEUE,
213
44356551 214 /* OF1.1+(2,9). Invalid group id in forward action. */
90bf1e07
BP
215 OFPERR_OFPBAC_BAD_OUT_GROUP,
216
44356551 217 /* OF1.1+(2,10). Action can't apply for this match. */
90bf1e07
BP
218 OFPERR_OFPBAC_MATCH_INCONSISTENT,
219
44356551 220 /* OF1.1+(2,11). Action order is unsupported for the action list in an
90bf1e07
BP
221 * Apply-Actions instruction */
222 OFPERR_OFPBAC_UNSUPPORTED_ORDER,
223
44356551 224 /* OF1.1+(2,12). Actions uses an unsupported tag/encap. */
90bf1e07
BP
225 OFPERR_OFPBAC_BAD_TAG,
226
2e0525bc
SH
227 /* OF1.2+(2,13). Unsupported type in SET_FIELD action. */
228 OFPERR_OFPBAC_SET_TYPE,
229
230 /* OF1.2+(2,14). Length problem in SET_FIELD action. */
231 OFPERR_OFPBAC_SET_LEN,
232
233 /* OF1.2+(2,15). Bad argument in SET_FIELD action. */
234 OFPERR_OFPBAC_ARGUMENT,
235
514887ee
BP
236 /* NX1.0-1.1(2,256), NX1.2+(11). Must-be-zero action argument had nonzero
237 * value. */
a7349929
BP
238 OFPERR_NXBAC_MUST_BE_ZERO,
239
90bf1e07
BP
240/* ## --------------------- ## */
241/* ## OFPET_BAD_INSTRUCTION ## */
242/* ## --------------------- ## */
243
44356551 244 /* OF1.1+(3,0). Unknown instruction. */
90bf1e07
BP
245 OFPERR_OFPBIC_UNKNOWN_INST,
246
44356551 247 /* OF1.1+(3,1). Switch or table does not support the instruction. */
90bf1e07
BP
248 OFPERR_OFPBIC_UNSUP_INST,
249
44356551 250 /* OF1.1+(3,2). Invalid Table-ID specified. */
90bf1e07
BP
251 OFPERR_OFPBIC_BAD_TABLE_ID,
252
44356551 253 /* OF1.1+(3,3). Metadata value unsupported by datapath. */
90bf1e07
BP
254 OFPERR_OFPBIC_UNSUP_METADATA,
255
44356551 256 /* OF1.1+(3,4). Metadata mask value unsupported by datapath. */
90bf1e07
BP
257 OFPERR_OFPBIC_UNSUP_METADATA_MASK,
258
2e0525bc
SH
259 /* OF1.1+(3,5). Unknown experimenter id specified. */
260 OFPERR_OFPBIC_BAD_EXPERIMENTER,
261
262 /* OF1.1(3,5), OF1.2+(3,6). Unknown instruction for experimenter id. */
263 OFPERR_OFPBIC_BAD_EXP_TYPE,
264
265 /* OF1.2+(3,7). Length problem in instructions. */
266 OFPERR_OFPBIC_BAD_LEN,
267
268 /* OF1.2+(3,8). Permissions error. */
269 OFPERR_OFPBIC_EPERM,
90bf1e07 270
f4104c68
BP
271 /* ONF1.1+(2600). Duplicate instruction. */
272 OFPERR_ONFBIC_DUP_INSTRUCTION,
273
90bf1e07
BP
274/* ## --------------- ## */
275/* ## OFPET_BAD_MATCH ## */
276/* ## --------------- ## */
277
44356551 278 /* OF1.1+(4,0). Unsupported match type specified by the match */
90bf1e07
BP
279 OFPERR_OFPBMC_BAD_TYPE,
280
44356551 281 /* OF1.1+(4,1). Length problem in match. */
90bf1e07
BP
282 OFPERR_OFPBMC_BAD_LEN,
283
44356551 284 /* OF1.1+(4,2). Match uses an unsupported tag/encap. */
90bf1e07
BP
285 OFPERR_OFPBMC_BAD_TAG,
286
44356551 287 /* OF1.1+(4,3). Unsupported datalink addr mask - switch does not support
90bf1e07
BP
288 * arbitrary datalink address mask. */
289 OFPERR_OFPBMC_BAD_DL_ADDR_MASK,
290
44356551 291 /* OF1.1+(4,4). Unsupported network addr mask - switch does not support
90bf1e07
BP
292 * arbitrary network address mask. */
293 OFPERR_OFPBMC_BAD_NW_ADDR_MASK,
294
44356551 295 /* OF1.1+(4,5). Unsupported wildcard specified in the match. */
90bf1e07
BP
296 OFPERR_OFPBMC_BAD_WILDCARDS,
297
44356551 298 /* OF1.1+(4,6). Unsupported field in the match. */
90bf1e07
BP
299 OFPERR_OFPBMC_BAD_FIELD,
300
130b77cd 301 /* NX1.0(1,258), OF1.1+(4,7). Unsupported value in a match
2e0525bc 302 * field. */
90bf1e07
BP
303 OFPERR_OFPBMC_BAD_VALUE,
304
514887ee
BP
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. */
2e0525bc
SH
307 OFPERR_OFPBMC_BAD_MASK,
308
514887ee 309 /* NX1.0-1.1(1,260), OF1.2+(4,9). A prerequisite was not met. */
2e0525bc
SH
310 OFPERR_OFPBMC_BAD_PREREQ,
311
514887ee 312 /* NX1.0-1.1(1,261), OF1.2+(4,10). A field type was duplicated. */
2e0525bc
SH
313 OFPERR_OFPBMC_DUP_FIELD,
314
315 /* OF1.2+(4,11). Permissions error. */
316 OFPERR_OFPBMC_EPERM,
317
90bf1e07
BP
318/* ## --------------------- ## */
319/* ## OFPET_FLOW_MOD_FAILED ## */
320/* ## --------------------- ## */
321
44356551 322 /* OF1.1+(5,0). Unspecified error. */
90bf1e07
BP
323 OFPERR_OFPFMFC_UNKNOWN,
324
be2b69d1 325 /* OF1.0(3,0), OF1.1+(5,1). Flow not added because of full table(s). */
90bf1e07
BP
326 OFPERR_OFPFMFC_TABLE_FULL,
327
44356551 328 /* OF1.1+(5,2). Table does not exist */
90bf1e07
BP
329 OFPERR_OFPFMFC_BAD_TABLE_ID,
330
44356551 331 /* OF1.0(3,1), OF1.1+(5,3). Attempted to add overlapping flow with
90bf1e07
BP
332 * CHECK_OVERLAP flag set. */
333 OFPERR_OFPFMFC_OVERLAP,
334
44356551 335 /* OF1.0(3,2), OF1.1+(5,4). Permissions error. */
90bf1e07
BP
336 OFPERR_OFPFMFC_EPERM,
337
44356551
BP
338 /* OF1.1+(5,5). Flow not added because of unsupported idle/hard
339 * timeout. */
90bf1e07
BP
340 OFPERR_OFPFMFC_BAD_TIMEOUT,
341
342 /* OF1.0(3,3). Flow not added because of non-zero idle/hard timeout. */
343 OFPERR_OFPFMFC_BAD_EMERG_TIMEOUT,
344
44356551 345 /* OF1.0(3,4), OF1.1+(5,6). Unsupported or unknown command. */
90bf1e07
BP
346 OFPERR_OFPFMFC_BAD_COMMAND,
347
2e0525bc
SH
348 /* OF1.2+(5,7). Unsupported or unknown flags. */
349 OFPERR_OFPFMFC_BAD_FLAGS,
350
90bf1e07
BP
351 /* OF1.0(3,5). Unsupported action list - cannot process in the order
352 * specified. */
353 OFPERR_OFPFMFC_UNSUPPORTED,
354
514887ee 355 /* NX1.0-1.1(5,256), NX1.2+(12). Generic hardware error. */
90bf1e07
BP
356 OFPERR_NXFMFC_HARDWARE,
357
514887ee
BP
358 /* NX1.0-1.1(5,257), NX1.2+(13). A nonexistent table ID was specified in
359 * the "command" field of struct ofp_flow_mod, when the
360 * nxt_flow_mod_table_id extension is enabled. */
90bf1e07
BP
361 OFPERR_NXFMFC_BAD_TABLE_ID,
362
363/* ## ---------------------- ## */
364/* ## OFPET_GROUP_MOD_FAILED ## */
365/* ## ---------------------- ## */
366
44356551
BP
367 /* OF1.1+(6,0). Group not added because a group ADD attempted to replace
368 * an already-present group. */
90bf1e07
BP
369 OFPERR_OFPGMFC_GROUP_EXISTS,
370
44356551 371 /* OF1.1+(6,1). Group not added because Group specified is invalid. */
90bf1e07
BP
372 OFPERR_OFPGMFC_INVALID_GROUP,
373
44356551 374 /* OF1.1+(6,2). Switch does not support unequal load sharing with select
90bf1e07
BP
375 * groups. */
376 OFPERR_OFPGMFC_WEIGHT_UNSUPPORTED,
377
44356551 378 /* OF1.1+(6,3). The group table is full. */
90bf1e07
BP
379 OFPERR_OFPGMFC_OUT_OF_GROUPS,
380
44356551 381 /* OF1.1+(6,4). The maximum number of action buckets for a group has been
90bf1e07
BP
382 * exceeded. */
383 OFPERR_OFPGMFC_OUT_OF_BUCKETS,
384
44356551 385 /* OF1.1+(6,5). Switch does not support groups that forward to groups. */
90bf1e07
BP
386 OFPERR_OFPGMFC_CHAINING_UNSUPPORTED,
387
44356551 388 /* OF1.1+(6,6). This group cannot watch the watch_port or watch_group
90bf1e07
BP
389 * specified. */
390 OFPERR_OFPGMFC_WATCH_UNSUPPORTED,
391
44356551 392 /* OF1.1+(6,7). Group entry would cause a loop. */
90bf1e07
BP
393 OFPERR_OFPGMFC_LOOP,
394
44356551 395 /* OF1.1+(6,8). Group not modified because a group MODIFY attempted to
90bf1e07
BP
396 * modify a non-existent group. */
397 OFPERR_OFPGMFC_UNKNOWN_GROUP,
398
2e0525bc
SH
399 /* OF1.2+(6,9). Group not deleted because another
400 group is forwarding to it. */
401 OFPERR_OFPGMFC_CHAINED_GROUP,
402
403 /* OF1.2+(6,10). Unsupported or unknown group type. */
404 OFPERR_OFPGMFC_BAD_TYPE,
405
406 /* OF1.2+(6,11). Unsupported or unknown command. */
407 OFPERR_OFPGMFC_BAD_COMMAND,
408
409 /* OF1.2+(6,12). Error in bucket. */
07f265eb 410 OFPERR_OFPGMFC_BAD_BUCKET,
2e0525bc
SH
411
412 /* OF1.2+(6,13). Error in watch port/group. */
07f265eb 413 OFPERR_OFPGMFC_BAD_WATCH,
2e0525bc
SH
414
415 /* OF1.2+(6,14). Permissions error. */
07f265eb 416 OFPERR_OFPGMFC_EPERM,
2e0525bc 417
90bf1e07
BP
418/* ## --------------------- ## */
419/* ## OFPET_PORT_MOD_FAILED ## */
420/* ## --------------------- ## */
421
44356551 422 /* OF1.0(4,0), OF1.1+(7,0). Specified port does not exist. */
90bf1e07
BP
423 OFPERR_OFPPMFC_BAD_PORT,
424
44356551 425 /* OF1.0(4,1), OF1.1+(7,1). Specified hardware address does not match the
90bf1e07
BP
426 * port number. */
427 OFPERR_OFPPMFC_BAD_HW_ADDR,
428
44356551 429 /* OF1.1+(7,2). Specified config is invalid. */
90bf1e07
BP
430 OFPERR_OFPPMFC_BAD_CONFIG,
431
44356551 432 /* OF1.1+(7,3). Specified advertise is invalid. */
90bf1e07
BP
433 OFPERR_OFPPMFC_BAD_ADVERTISE,
434
2e0525bc
SH
435 /* OF1.2+(7,4). Permissions error. */
436 OFPERR_OFPPMFC_EPERM,
437
90bf1e07
BP
438/* ## ---------------------- ## */
439/* ## OFPET_TABLE_MOD_FAILED ## */
440/* ## ---------------------- ## */
441
44356551 442 /* OF1.1+(8,0). Specified table does not exist. */
90bf1e07
BP
443 OFPERR_OFPTMFC_BAD_TABLE,
444
44356551 445 /* OF1.1+(8,1). Specified config is invalid. */
90bf1e07
BP
446 OFPERR_OFPTMFC_BAD_CONFIG,
447
2e0525bc
SH
448 /* OF1.2+(8,2). Permissions error. */
449 OFPERR_OFPTMFC_EPERM,
450
90bf1e07
BP
451/* ## --------------------- ## */
452/* ## OFPET_QUEUE_OP_FAILED ## */
453/* ## --------------------- ## */
454
44356551 455 /* OF1.0(5,0), OF1.1+(9,0). Invalid port (or port does not exist). */
90bf1e07
BP
456 OFPERR_OFPQOFC_BAD_PORT,
457
44356551 458 /* OF1.0(5,1), OF1.1+(9,1). Queue does not exist. */
90bf1e07
BP
459 OFPERR_OFPQOFC_BAD_QUEUE,
460
44356551 461 /* OF1.0(5,2), OF1.1+(9,2). Permissions error. */
90bf1e07
BP
462 OFPERR_OFPQOFC_EPERM,
463
464/* ## -------------------------- ## */
465/* ## OFPET_SWITCH_CONFIG_FAILED ## */
466/* ## -------------------------- ## */
467
44356551 468 /* OF1.1+(10,0). Specified flags is invalid. */
90bf1e07
BP
469 OFPERR_OFPSCFC_BAD_FLAGS,
470
44356551 471 /* OF1.1+(10,1). Specified len is invalid. */
90bf1e07 472 OFPERR_OFPSCFC_BAD_LEN,
2e0525bc
SH
473
474 /* OF1.2+(10,2). Permissions error. */
475 OFPERR_OFPSCFC_EPERM,
476
477/* ## ------------------------- ## */
478/* ## OFPET_ROLE_REQUEST_FAILED ## */
479/* ## ------------------------- ## */
480
2e0525bc
SH
481 /* OF1.2+(11,0). Stale Message: old generation_id. */
482 OFPERR_OFPRRFC_STALE,
483
484 /* OF1.2+(11,1). Controller role change unsupported. */
485 OFPERR_OFPRRFC_UNSUP,
486
514887ee 487 /* NX1.0-1.1(1,513), OF1.2+(11,2). Invalid role. */
2e0525bc
SH
488 OFPERR_OFPRRFC_BAD_ROLE,
489
2e1ae200
JR
490/* ## ---------------------- ## */
491/* ## OFPET_METER_MOD_FAILED ## */
492/* ## ---------------------- ## */
493
2e1ae200
JR
494 /* OF1.3+(12,0). Unspecified error. */
495 OFPERR_OFPMMFC_UNKNOWN,
496
497 /* OF1.3+(12,1). Meter not added because a Meter ADD attempted to
498 * replace an existing Meter. */
499 OFPERR_OFPMMFC_METER_EXISTS,
500
501 /* OF1.3+(12,2). Meter not added because Meter specified is invalid. */
502 OFPERR_OFPMMFC_INVALID_METER,
503
504 /* OF1.3+(12,3). Meter not modified because a Meter MODIFY attempted
505 * to modify a non-existent Meter. */
506 OFPERR_OFPMMFC_UNKNOWN_METER,
507
508 /* OF1.3+(12,4). Unsupported or unknown command. */
509 OFPERR_OFPMMFC_BAD_COMMAND,
510
511 /* OF1.3+(12,5). Flag configuration unsupported. */
512 OFPERR_OFPMMFC_BAD_FLAGS,
513
514 /* OF1.3+(12,6). Rate unsupported. */
515 OFPERR_OFPMMFC_BAD_RATE,
516
517 /* OF1.3+(12,7). Burst size unsupported. */
518 OFPERR_OFPMMFC_BAD_BURST,
519
520 /* OF1.3+(12,8). Band unsupported. */
521 OFPERR_OFPMMFC_BAD_BAND,
522
523 /* OF1.3+(12,9). Band value unsupported. */
524 OFPERR_OFPMMFC_BAD_BAND_VALUE,
525
526 /* OF1.3+(12,10). No more meters available. */
527 OFPERR_OFPMMFC_OUT_OF_METERS,
528
529 /* OF1.3+(12,11). The maximum number of properties for a meter has
530 * been exceeded. */
531 OFPERR_OFPMMFC_OUT_OF_BANDS,
532
533/* ## --------------------------- ## */
534/* ## OFPET_TABLE_FEATURES_FAILED ## */
535/* ## --------------------------- ## */
536
2e1ae200
JR
537 /* OF1.3+(13,0). Specified table does not exist. */
538 OFPERR_OFPTFFC_BAD_TABLE,
539
540 /* OF1.3+(13,1). Invalid metadata mask. */
541 OFPERR_OFPTFFC_BAD_METADATA,
542
543 /* OF1.3+(13,2). Unknown property type. */
544 OFPERR_OFPTFFC_BAD_TYPE,
545
546 /* OF1.3+(13,3). Length problem in properties. */
547 OFPERR_OFPTFFC_BAD_LEN,
548
549 /* OF1.3+(13,4). Unsupported property value. */
550 OFPERR_OFPTFFC_BAD_ARGUMENT,
551
552 /* OF1.3+(13,5). Permissions error. */
553 OFPERR_OFPTFFC_EPERM,
554
2e0525bc
SH
555/* ## ------------------ ## */
556/* ## OFPET_EXPERIMENTER ## */
557/* ## ------------------ ## */
90bf1e07
BP
558};
559
688e86e1 560const char *ofperr_domain_get_name(enum ofp_version);
90bf1e07
BP
561
562bool ofperr_is_valid(enum ofperr);
90bf1e07 563
2e0525bc 564enum ofperr ofperr_from_name(const char *);
90bf1e07 565
982697a4
BP
566enum ofperr ofperr_decode_msg(const struct ofp_header *,
567 struct ofpbuf *payload);
90bf1e07 568struct ofpbuf *ofperr_encode_reply(enum ofperr, const struct ofp_header *);
9b7e2112 569struct ofpbuf *ofperr_encode_hello(enum ofperr, enum ofp_version ofp_version,
90bf1e07 570 const char *);
514887ee 571int ofperr_get_vendor(enum ofperr, enum ofp_version);
688e86e1
SH
572int ofperr_get_type(enum ofperr, enum ofp_version);
573int ofperr_get_code(enum ofperr, enum ofp_version);
90bf1e07
BP
574
575const char *ofperr_get_name(enum ofperr);
576const char *ofperr_get_description(enum ofperr);
577
578void ofperr_format(struct ds *, enum ofperr);
579const char *ofperr_to_string(enum ofperr);
dc4762ed
BP
580
581#endif /* ofp-errors.h */