6 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
12 * 1. Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright notice,
15 * this list of conditions and the following disclaimer in the documentation
16 * and/or other materials provided with the distribution.
17 * 3. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
21 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
23 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
25 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31 * This file is part of the lwIP TCP/IP stack.
33 * Author: Adam Dunkels <adam@sics.se>
36 #ifndef LWIP_HDR_ERR_H
37 #define LWIP_HDR_ERR_H
40 #include "lwip/arch.h"
47 * @defgroup infrastructure_errors Error codes
48 * @ingroup infrastructure
52 /** Define LWIP_ERR_T in cc.h if you want to use
53 * a different type for your platform (must be signed). */
55 typedef LWIP_ERR_T err_t
;
56 #else /* LWIP_ERR_T */
58 #endif /* LWIP_ERR_T*/
60 /** Definitions for error constants. */
62 /** No error, everything OK. */
64 /** Out of memory error. */
70 /** Routing problem. */
72 /** Operation in progress */
76 /** Operation would block. */
78 /** Address in use. */
80 /** Already connecting. */
82 /** Conn already established.*/
86 /** Low-level netif error */
89 /** Connection aborted. */
91 /** Connection reset. */
93 /** Connection closed. */
95 /** Illegal argument. */
99 #define ERR_IS_FATAL(e) ((e) <= ERR_ABRT)
106 extern const char *lwip_strerr(err_t err
);
108 #define lwip_strerr(x) ""
109 #endif /* LWIP_DEBUG */
112 int err_to_errno(err_t err
);
119 #endif /* LWIP_HDR_ERR_H */