The Pedigree Project  0.1
lwip/errno.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
25 /*
26  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
27  * All rights reserved.
28  *
29  * Redistribution and use in source and binary forms, with or without modification,
30  * are permitted provided that the following conditions are met:
31  *
32  * 1. Redistributions of source code must retain the above copyright notice,
33  * this list of conditions and the following disclaimer.
34  * 2. Redistributions in binary form must reproduce the above copyright notice,
35  * this list of conditions and the following disclaimer in the documentation
36  * and/or other materials provided with the distribution.
37  * 3. The name of the author may not be used to endorse or promote products
38  * derived from this software without specific prior written permission.
39  *
40  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
41  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
42  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
43  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
45  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
46  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
48  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
49  * OF SUCH DAMAGE.
50  *
51  * This file is part of the lwIP TCP/IP stack.
52  *
53  * Author: Adam Dunkels <adam@sics.se>
54  *
55  */
56 #ifndef LWIP_HDR_ERRNO_H
57 #define LWIP_HDR_ERRNO_H
58 
59 #include "lwip/opt.h"
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 #ifdef LWIP_PROVIDE_ERRNO
66 
67 #define EPERM 1 /* Operation not permitted */
68 #define ENOENT 2 /* No such file or directory */
69 #define ESRCH 3 /* No such process */
70 #define EINTR 4 /* Interrupted system call */
71 #define EIO 5 /* I/O error */
72 #define ENXIO 6 /* No such device or address */
73 #define E2BIG 7 /* Arg list too long */
74 #define ENOEXEC 8 /* Exec format error */
75 #define EBADF 9 /* Bad file number */
76 #define ECHILD 10 /* No child processes */
77 #define EAGAIN 11 /* Try again */
78 #define ENOMEM 12 /* Out of memory */
79 #define EACCES 13 /* Permission denied */
80 #define EFAULT 14 /* Bad address */
81 #define ENOTBLK 15 /* Block device required */
82 #define EBUSY 16 /* Device or resource busy */
83 #define EEXIST 17 /* File exists */
84 #define EXDEV 18 /* Cross-device link */
85 #define ENODEV 19 /* No such device */
86 #define ENOTDIR 20 /* Not a directory */
87 #define EISDIR 21 /* Is a directory */
88 #define EINVAL 22 /* Invalid argument */
89 #define ENFILE 23 /* File table overflow */
90 #define EMFILE 24 /* Too many open files */
91 #define ENOTTY 25 /* Not a typewriter */
92 #define ETXTBSY 26 /* Text file busy */
93 #define EFBIG 27 /* File too large */
94 #define ENOSPC 28 /* No space left on device */
95 #define ESPIPE 29 /* Illegal seek */
96 #define EROFS 30 /* Read-only file system */
97 #define EMLINK 31 /* Too many links */
98 #define EPIPE 32 /* Broken pipe */
99 #define EDOM 33 /* Math argument out of domain of func */
100 #define ERANGE 34 /* Math result not representable */
101 #define EDEADLK 35 /* Resource deadlock would occur */
102 #define ENAMETOOLONG 36 /* File name too long */
103 #define ENOLCK 37 /* No record locks available */
104 #define ENOSYS 38 /* Function not implemented */
105 #define ENOTEMPTY 39 /* Directory not empty */
106 #define ELOOP 40 /* Too many symbolic links encountered */
107 #define EWOULDBLOCK EAGAIN /* Operation would block */
108 #define ENOMSG 42 /* No message of desired type */
109 #define EIDRM 43 /* Identifier removed */
110 #define ECHRNG 44 /* Channel number out of range */
111 #define EL2NSYNC 45 /* Level 2 not synchronized */
112 #define EL3HLT 46 /* Level 3 halted */
113 #define EL3RST 47 /* Level 3 reset */
114 #define ELNRNG 48 /* Link number out of range */
115 #define EUNATCH 49 /* Protocol driver not attached */
116 #define ENOCSI 50 /* No CSI structure available */
117 #define EL2HLT 51 /* Level 2 halted */
118 #define EBADE 52 /* Invalid exchange */
119 #define EBADR 53 /* Invalid request descriptor */
120 #define EXFULL 54 /* Exchange full */
121 #define ENOANO 55 /* No anode */
122 #define EBADRQC 56 /* Invalid request code */
123 #define EBADSLT 57 /* Invalid slot */
124 
125 #define EDEADLOCK EDEADLK
126 
127 #define EBFONT 59 /* Bad font file format */
128 #define ENOSTR 60 /* Device not a stream */
129 #define ENODATA 61 /* No data available */
130 #define ETIME 62 /* Timer expired */
131 #define ENOSR 63 /* Out of streams resources */
132 #define ENONET 64 /* Machine is not on the network */
133 #define ENOPKG 65 /* Package not installed */
134 #define EREMOTE 66 /* Object is remote */
135 #define ENOLINK 67 /* Link has been severed */
136 #define EADV 68 /* Advertise error */
137 #define ESRMNT 69 /* Srmount error */
138 #define ECOMM 70 /* Communication error on send */
139 #define EPROTO 71 /* Protocol error */
140 #define EMULTIHOP 72 /* Multihop attempted */
141 #define EDOTDOT 73 /* RFS specific error */
142 #define EBADMSG 74 /* Not a data message */
143 #define EOVERFLOW 75 /* Value too large for defined data type */
144 #define ENOTUNIQ 76 /* Name not unique on network */
145 #define EBADFD 77 /* File descriptor in bad state */
146 #define EREMCHG 78 /* Remote address changed */
147 #define ELIBACC 79 /* Can not access a needed shared library */
148 #define ELIBBAD 80 /* Accessing a corrupted shared library */
149 #define ELIBSCN 81 /* .lib section in a.out corrupted */
150 #define ELIBMAX 82 /* Attempting to link in too many shared libraries */
151 #define ELIBEXEC 83 /* Cannot exec a shared library directly */
152 #define EILSEQ 84 /* Illegal byte sequence */
153 #define ERESTART 85 /* Interrupted system call should be restarted */
154 #define ESTRPIPE 86 /* Streams pipe error */
155 #define EUSERS 87 /* Too many users */
156 #define ENOTSOCK 88 /* Socket operation on non-socket */
157 #define EDESTADDRREQ 89 /* Destination address required */
158 #define EMSGSIZE 90 /* Message too long */
159 #define EPROTOTYPE 91 /* Protocol wrong type for socket */
160 #define ENOPROTOOPT 92 /* Protocol not available */
161 #define EPROTONOSUPPORT 93 /* Protocol not supported */
162 #define ESOCKTNOSUPPORT 94 /* Socket type not supported */
163 #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
164 #define EPFNOSUPPORT 96 /* Protocol family not supported */
165 #define EAFNOSUPPORT 97 /* Address family not supported by protocol */
166 #define EADDRINUSE 98 /* Address already in use */
167 #define EADDRNOTAVAIL 99 /* Cannot assign requested address */
168 #define ENETDOWN 100 /* Network is down */
169 #define ENETUNREACH 101 /* Network is unreachable */
170 #define ENETRESET 102 /* Network dropped connection because of reset */
171 #define ECONNABORTED 103 /* Software caused connection abort */
172 #define ECONNRESET 104 /* Connection reset by peer */
173 #define ENOBUFS 105 /* No buffer space available */
174 #define EISCONN 106 /* Transport endpoint is already connected */
175 #define ENOTCONN 107 /* Transport endpoint is not connected */
176 #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
177 #define ETOOMANYREFS 109 /* Too many references: cannot splice */
178 #define ETIMEDOUT 110 /* Connection timed out */
179 #define ECONNREFUSED 111 /* Connection refused */
180 #define EHOSTDOWN 112 /* Host is down */
181 #define EHOSTUNREACH 113 /* No route to host */
182 #define EALREADY 114 /* Operation already in progress */
183 #define EINPROGRESS 115 /* Operation now in progress */
184 #define ESTALE 116 /* Stale NFS file handle */
185 #define EUCLEAN 117 /* Structure needs cleaning */
186 #define ENOTNAM 118 /* Not a XENIX named type file */
187 #define ENAVAIL 119 /* No XENIX semaphores available */
188 #define EISNAM 120 /* Is a named type file */
189 #define EREMOTEIO 121 /* Remote I/O error */
190 #define EDQUOT 122 /* Quota exceeded */
191 
192 #define ENOMEDIUM 123 /* No medium found */
193 #define EMEDIUMTYPE 124 /* Wrong medium type */
194 
195 #ifndef errno
196 extern int errno;
197 #endif
198 
199 #else /* LWIP_PROVIDE_ERRNO */
200 
201 /* Define LWIP_ERRNO_INCLUDE to <errno.h> to include the error defines here */
202 #ifdef LWIP_ERRNO_INCLUDE
203 #include LWIP_ERRNO_INCLUDE
204 #endif /* LWIP_ERRNO_INCLUDE */
205 
206 #endif /* LWIP_PROVIDE_ERRNO */
207 
208 #ifdef __cplusplus
209 }
210 #endif
211 
212 #endif /* LWIP_HDR_ERRNO_H */