merge ROS Shell without integrated explorer part into trunk
[reactos.git] / reactos / drivers / lib / oskittcp / include / oskiterrno.h
1 /*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)errno.h 8.5 (Berkeley) 1/21/94
39 */
40
41 #ifndef _OSK_SYS_ERRNO_H_
42 #define _OSK_SYS_ERRNO_H_
43
44 #ifndef __REACTOS__
45 #ifndef KERNEL
46 extern int errno; /* global error number */
47 #endif
48 #undef _POSIX_SOURCE
49 #endif
50
51 #ifdef _POSIX_SOURCE
52 #error yuck
53 #endif
54
55 #define OSK_EPERM 1 /* Operation not permitted */
56 #define OSK_ENOENT 2 /* No such file or directory */
57 #define OSK_ESRCH 3 /* No such process */
58 #define OSK_EINTR 4 /* Interrupted system call */
59 #define OSK_EIO 5 /* Input/output error */
60 #define OSK_ENXIO 6 /* Device not configured */
61 #define OSK_E2BIG 7 /* Argument list too long */
62 #define OSK_ENOEXEC 8 /* Exec format error */
63 #define OSK_EBADF 9 /* Bad file descriptor */
64 #define OSK_ECHILD 10 /* No child processes */
65 #define OSK_EDEADLK 11 /* Resource deadlock avoided */
66 /* 11 was OSK_EAGAIN */
67 #define OSK_ENOMEM 12 /* Cannot allocate memory */
68 #define OSK_EACCES 13 /* Permission denied */
69 #define OSK_EFAULT 14 /* Bad address */
70 #ifndef _POSIX_SOURCE
71 #define OSK_ENOTBLK 15 /* Block device required */
72 #endif
73 #define OSK_EBUSY 16 /* Device busy */
74 #define OSK_EEXIST 17 /* File exists */
75 #define OSK_EXDEV 18 /* Cross-device link */
76 #define OSK_ENODEV 19 /* Operation not supported by device */
77 #define OSK_ENOTDIR 20 /* Not a directory */
78 #define OSK_EISDIR 21 /* Is a directory */
79 #define OSK_EINVAL 22 /* Invalid argument */
80 #define OSK_ENFILE 23 /* Too many open files in system */
81 #define OSK_EMFILE 24 /* Too many open files */
82 #define OSK_ENOTTY 25 /* Inappropriate ioctl for device */
83 #ifndef _POSIX_SOURCE
84 #define OSK_ETXTBSY 26 /* Text file busy */
85 #endif
86 #define OSK_EFBIG 27 /* File too large */
87 #define OSK_ENOSPC 28 /* No space left on device */
88 #define OSK_ESPIPE 29 /* Illegal seek */
89 #define OSK_EROFS 30 /* Read-only file system */
90 #define OSK_EMLINK 31 /* Too many links */
91 #define OSK_EPIPE 32 /* Broken pipe */
92
93 /* math software */
94 #define OSK_EDOM 33 /* Numerical argument out of domain */
95 #define OSK_ERANGE 34 /* Result too large */
96
97 /* non-blocking and interrupt i/o */
98 #define OSK_EAGAIN 35 /* Resource temporarily unavailable */
99 #ifndef _POSIX_SOURCE
100 #define OSK_EWOULDBLOCK EAGAIN /* Operation would block */
101 #define OSK_EINPROGRESS 36 /* Operation now in progress */
102 #define OSK_EALREADY 37 /* Operation already in progress */
103
104 /* ipc/network software -- argument errors */
105 #define OSK_ENOTSOCK 38 /* Socket operation on non-socket */
106 #define OSK_EDESTADDRREQ 39 /* Destination address required */
107 #define OSK_EMSGSIZE 40 /* Message too long */
108 #define OSK_EPROTOTYPE 41 /* Protocol wrong type for socket */
109 #define OSK_ENOPROTOOPT 42 /* Protocol not available */
110 #define OSK_EPROTONOSUPPORT 43 /* Protocol not supported */
111 #define OSK_ESOCKTNOSUPPORT 44 /* Socket type not supported */
112 #define OSK_EOPNOTSUPP 45 /* Operation not supported */
113 #define OSK_EPFNOSUPPORT 46 /* Protocol family not supported */
114 #define OSK_EAFNOSUPPORT 47 /* Address family not supported by protocol family */
115 #define OSK_EADDRINUSE 48 /* Address already in use */
116 #define OSK_EADDRNOTAVAIL 49 /* Can't assign requested address */
117
118 /* ipc/network software -- operational errors */
119 #define OSK_ENETDOWN 50 /* Network is down */
120 #define OSK_ENETUNREACH 51 /* Network is unreachable */
121 #define OSK_ENETRESET 52 /* Network dropped connection on reset */
122 #define OSK_ECONNABORTED 53 /* Software caused connection abort */
123 #define OSK_ECONNRESET 54 /* Connection reset by peer */
124 #define OSK_ENOBUFS 55 /* No buffer space available */
125 #define OSK_EISCONN 56 /* Socket is already connected */
126 #define OSK_ENOTCONN 57 /* Socket is not connected */
127 #define OSK_ESHUTDOWN 58 /* Can't send after socket shutdown */
128 #define OSK_ETOOMANYREFS 59 /* Too many references: can't splice */
129 #define OSK_ETIMEDOUT 60 /* Operation timed out */
130 #define OSK_ECONNREFUSED 61 /* Connection refused */
131
132 #define OSK_ELOOP 62 /* Too many levels of symbolic links */
133 #endif /* _POSIX_SOURCE */
134 #define OSK_ENAMETOOLONG 63 /* File name too long */
135
136 /* should be rearranged */
137 #ifndef _POSIX_SOURCE
138 #define OSK_EHOSTDOWN 64 /* Host is down */
139 #define OSK_EHOSTUNREACH 65 /* No route to host */
140 #endif /* _POSIX_SOURCE */
141 #define OSK_ENOTEMPTY 66 /* Directory not empty */
142
143 /* quotas & mush */
144 #ifndef _POSIX_SOURCE
145 #define OSK_EPROCLIM 67 /* Too many processes */
146 #define OSK_EUSERS 68 /* Too many users */
147 #define OSK_EDQUOT 69 /* Disc quota exceeded */
148
149 /* Network File System */
150 #define OSK_ESTALE 70 /* Stale NFS file handle */
151 #define OSK_EREMOTE 71 /* Too many levels of remote in path */
152 #define OSK_EBADRPC 72 /* RPC struct is bad */
153 #define OSK_ERPCMISMATCH 73 /* RPC version wrong */
154 #define OSK_EPROGUNAVAIL 74 /* RPC prog. not avail */
155 #define OSK_EPROGMISMATCH 75 /* Program version wrong */
156 #define OSK_EPROCUNAVAIL 76 /* Bad procedure for program */
157 #endif /* _POSIX_SOURCE */
158
159 #define OSK_ENOLCK 77 /* No locks available */
160 #define OSK_ENOSYS 78 /* Function not implemented */
161
162 #ifndef _POSIX_SOURCE
163 #define OSK_EFTYPE 79 /* Inappropriate file type or format */
164 #define OSK_EAUTH 80 /* Authentication error */
165 #define OSK_ENEEDAUTH 81 /* Need authenticator */
166 #define OSK_ELAST 81 /* Must be equal largest errno */
167 #endif /* _POSIX_SOURCE */
168
169 #ifdef KERNEL
170 /* pseudo-errors returned inside kernel to modify return to process */
171 #define OSK_ERESTART -1 /* restart syscall */
172 #define OSK_EJUSTRETURN -2 /* don't modify regs, just return */
173 #endif
174
175 #endif/*OSK_SYS_ERRNO*/