UbixOS V2 2.0

err.h
Go to the documentation of this file.
1
5 /*
6 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
11 *
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.
19 *
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
29 * OF SUCH DAMAGE.
30 *
31 * This file is part of the lwIP TCP/IP stack.
32 *
33 * Author: Adam Dunkels <adam@sics.se>
34 *
35 */
36 #ifndef LWIP_HDR_ERR_H
37 #define LWIP_HDR_ERR_H
38
39 #include <net/opt.h>
40 #include <net/arch.h>
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
54 #ifdef LWIP_ERR_T
55 typedef LWIP_ERR_T err_t;
56 #else /* LWIP_ERR_T */
57 typedef s8_t err_t;
58 #endif /* LWIP_ERR_T*/
59
61 typedef enum {
63 ERR_OK = 0,
65 ERR_MEM = -1,
67 ERR_BUF = -2,
69 ERR_TIMEOUT = -3,
71 ERR_RTE = -4,
73 ERR_INPROGRESS = -5,
75 ERR_VAL = -6,
77 ERR_WOULDBLOCK = -7,
79 ERR_USE = -8,
81 ERR_ALREADY = -9,
83 ERR_ISCONN = -10,
85 ERR_CONN = -11,
87 ERR_IF = -12,
88
90 ERR_ABRT = -13,
92 ERR_RST = -14,
94 ERR_CLSD = -15,
96 ERR_ARG = -16
97 } err_enum_t;
98
99 #define ERR_IS_FATAL(e) ((e) <= ERR_ABRT)
100
105 #ifdef LWIP_DEBUG
106 extern const char *lwip_strerr(err_t err);
107 #else
108 #define lwip_strerr(x) ""
109 #endif /* LWIP_DEBUG */
110
111 #if !NO_SYS
112 int err_to_errno(err_t err);
113 #endif /* !NO_SYS */
114
115 #ifdef __cplusplus
116 }
117 #endif
118
119 #endif /* LWIP_HDR_ERR_H */
opt.h
ERR_ABRT
Definition: err.h:90
ERR_BUF
Definition: err.h:67
err_enum_t
err_enum_t
Definition: err.h:61
arch.h
ERR_INPROGRESS
Definition: err.h:73
ERR_TIMEOUT
Definition: err.h:69
ERR_MEM
Definition: err.h:65
ERR_ISCONN
Definition: err.h:83
ERR_CLSD
Definition: err.h:94
ERR_CONN
Definition: err.h:85
ERR_ARG
Definition: err.h:96
ERR_IF
Definition: err.h:87
ERR_WOULDBLOCK
Definition: err.h:77
s8_t
int8_t s8_t
Definition: arch.h:123
ERR_OK
Definition: err.h:63
err_t
s8_t err_t
Definition: err.h:57
ERR_RST
Definition: err.h:92
ERR_ALREADY
Definition: err.h:81
ERR_USE
Definition: err.h:79
ERR_RTE
Definition: err.h:71
err_to_errno
int err_to_errno(err_t err)
Definition: err.c:71
ERR_VAL
Definition: err.h:75
LWIP_ERR_T
#define LWIP_ERR_T
Definition: cc.h:11
lwip_strerr
#define lwip_strerr(x)
Definition: err.h:108