root / Whitix / branches / network / include / error.h
| Revision 100, 2.3 kB (checked in by mwhitworth, 10 months ago) |
|---|
| Line | |
|---|---|
| 1 | /* This file is part of Whitix. |
| 2 | * |
| 3 | * Whitix is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * Whitix is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with Whitix; if not, write to the Free Software |
| 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 16 | * |
| 17 | */ |
| 18 | |
| 19 | #ifndef ERROR_H |
| 20 | #define ERROR_H |
| 21 | |
| 22 | /* |
| 23 | * Follows roughly standard Unix error codes |
| 24 | * If this is updated, update errno.h in libc |
| 25 | */ |
| 26 | |
| 27 | #define ESUCCESS 0 /* Success */ |
| 28 | #define EPERM 1 /* No permission, operation not permitted */ |
| 29 | #define ENOENT 2 /* No such file or directory */ |
| 30 | #define EIO 3 /* Low-level I/O error */ |
| 31 | #define EBADF 4 /* Bad file descriptor */ |
| 32 | #define ENOMEM 5 /* Out of memory */ |
| 33 | #define EACCES 6 /* Not allowed access */ |
| 34 | #define EBUSY 7 /* Device busy */ |
| 35 | #define EFAULT 8 /* Bad address */ |
| 36 | #define EEXIST 9 /* Already exists */ |
| 37 | #define EMFILE 10 /* Out of file handles */ |
| 38 | #define ENOSPC 11 /* No space on device */ |
| 39 | #define EROFS 12 /* Read only filesystem/device */ |
| 40 | #define ENOSYS 13 /* No such system call */ |
| 41 | #define ENOTIMPL 14 /* Not implemented yet */ |
| 42 | #define ENOTDIR 15 /* The file descriptor is not a directory */ |
| 43 | #define SIOPENDING 16 /* An I/O operation is pending completion */ |
| 44 | #define EISDIR 17 /* Is a directory - cannot read or write to it */ |
| 45 | #define EINVAL 18 /* Invalid value */ |
| 46 | #define EINTR 19 /* Operation interrupted by signal */ |
| 47 | |
| 48 | /* Network errors */ |
| 49 | #define EWOULDBLOCK 20 /* No new connections to accept etc. */ |
| 50 | #define EPROTO 21 /* Protocol error */ |
| 51 | #define EDESTADDRREQ 22 /* Destination address required */ |
| 52 | #define EFAMILY 23 /* Socket family not supported. */ |
| 53 | #define ESOCKTYPE 24 /* Socket type not supported. */ |
| 54 | #define EOPNOTSUPP 25 /* Operation not supported on socket. */ |
| 55 | #define ECONNRESET 26 /* Connection reset by peer. */ |
| 56 | #define ETIMEDOUT 27 /* Operation timed out. */ |
| 57 | |
| 58 | #endif |
Note: See TracBrowser
for help on using the browser.