This library is stripped down version of NetServices library. HTTP server and client function is NOT supported.
lwip/include/lwip/err.h@0:dcf3c92487ca, 2011-07-20 (annotated)
- Committer:
- idinor
- Date:
- Wed Jul 20 11:45:39 2011 +0000
- Revision:
- 0:dcf3c92487ca
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
idinor | 0:dcf3c92487ca | 1 | /* |
idinor | 0:dcf3c92487ca | 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. |
idinor | 0:dcf3c92487ca | 3 | * All rights reserved. |
idinor | 0:dcf3c92487ca | 4 | * |
idinor | 0:dcf3c92487ca | 5 | * Redistribution and use in source and binary forms, with or without modification, |
idinor | 0:dcf3c92487ca | 6 | * are permitted provided that the following conditions are met: |
idinor | 0:dcf3c92487ca | 7 | * |
idinor | 0:dcf3c92487ca | 8 | * 1. Redistributions of source code must retain the above copyright notice, |
idinor | 0:dcf3c92487ca | 9 | * this list of conditions and the following disclaimer. |
idinor | 0:dcf3c92487ca | 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
idinor | 0:dcf3c92487ca | 11 | * this list of conditions and the following disclaimer in the documentation |
idinor | 0:dcf3c92487ca | 12 | * and/or other materials provided with the distribution. |
idinor | 0:dcf3c92487ca | 13 | * 3. The name of the author may not be used to endorse or promote products |
idinor | 0:dcf3c92487ca | 14 | * derived from this software without specific prior written permission. |
idinor | 0:dcf3c92487ca | 15 | * |
idinor | 0:dcf3c92487ca | 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
idinor | 0:dcf3c92487ca | 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
idinor | 0:dcf3c92487ca | 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
idinor | 0:dcf3c92487ca | 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
idinor | 0:dcf3c92487ca | 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
idinor | 0:dcf3c92487ca | 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
idinor | 0:dcf3c92487ca | 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
idinor | 0:dcf3c92487ca | 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
idinor | 0:dcf3c92487ca | 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
idinor | 0:dcf3c92487ca | 25 | * OF SUCH DAMAGE. |
idinor | 0:dcf3c92487ca | 26 | * |
idinor | 0:dcf3c92487ca | 27 | * This file is part of the lwIP TCP/IP stack. |
idinor | 0:dcf3c92487ca | 28 | * |
idinor | 0:dcf3c92487ca | 29 | * Author: Adam Dunkels <adam@sics.se> |
idinor | 0:dcf3c92487ca | 30 | * |
idinor | 0:dcf3c92487ca | 31 | */ |
idinor | 0:dcf3c92487ca | 32 | #ifndef __LWIP_ERR_H__ |
idinor | 0:dcf3c92487ca | 33 | #define __LWIP_ERR_H__ |
idinor | 0:dcf3c92487ca | 34 | |
idinor | 0:dcf3c92487ca | 35 | #include "lwip/opt.h" |
idinor | 0:dcf3c92487ca | 36 | #include "lwip/arch.h" |
idinor | 0:dcf3c92487ca | 37 | |
idinor | 0:dcf3c92487ca | 38 | #ifdef __cplusplus |
idinor | 0:dcf3c92487ca | 39 | extern "C" { |
idinor | 0:dcf3c92487ca | 40 | #endif |
idinor | 0:dcf3c92487ca | 41 | |
idinor | 0:dcf3c92487ca | 42 | /** Define LWIP_ERR_T in cc.h if you want to use |
idinor | 0:dcf3c92487ca | 43 | * a different type for your platform (must be signed). */ |
idinor | 0:dcf3c92487ca | 44 | #ifdef LWIP_ERR_T |
idinor | 0:dcf3c92487ca | 45 | typedef LWIP_ERR_T err_t; |
idinor | 0:dcf3c92487ca | 46 | #else /* LWIP_ERR_T */ |
idinor | 0:dcf3c92487ca | 47 | typedef s8_t err_t; |
idinor | 0:dcf3c92487ca | 48 | #endif /* LWIP_ERR_T*/ |
idinor | 0:dcf3c92487ca | 49 | |
idinor | 0:dcf3c92487ca | 50 | /* Definitions for error constants. */ |
idinor | 0:dcf3c92487ca | 51 | |
idinor | 0:dcf3c92487ca | 52 | #define ERR_OK 0 /* No error, everything OK. */ |
idinor | 0:dcf3c92487ca | 53 | #define ERR_MEM -1 /* Out of memory error. */ |
idinor | 0:dcf3c92487ca | 54 | #define ERR_BUF -2 /* Buffer error. */ |
idinor | 0:dcf3c92487ca | 55 | #define ERR_TIMEOUT -3 /* Timeout. */ |
idinor | 0:dcf3c92487ca | 56 | #define ERR_RTE -4 /* Routing problem. */ |
idinor | 0:dcf3c92487ca | 57 | #define ERR_INPROGRESS -5 /* Operation in progress */ |
idinor | 0:dcf3c92487ca | 58 | #define ERR_VAL -6 /* Illegal value. */ |
idinor | 0:dcf3c92487ca | 59 | #define ERR_WOULDBLOCK -7 /* Operation would block. */ |
idinor | 0:dcf3c92487ca | 60 | |
idinor | 0:dcf3c92487ca | 61 | #define ERR_IS_FATAL(e) ((e) < ERR_VAL) |
idinor | 0:dcf3c92487ca | 62 | |
idinor | 0:dcf3c92487ca | 63 | #define ERR_ABRT -8 /* Connection aborted. */ |
idinor | 0:dcf3c92487ca | 64 | #define ERR_RST -9 /* Connection reset. */ |
idinor | 0:dcf3c92487ca | 65 | #define ERR_CLSD -10 /* Connection closed. */ |
idinor | 0:dcf3c92487ca | 66 | #define ERR_CONN -11 /* Not connected. */ |
idinor | 0:dcf3c92487ca | 67 | |
idinor | 0:dcf3c92487ca | 68 | #define ERR_ARG -12 /* Illegal argument. */ |
idinor | 0:dcf3c92487ca | 69 | |
idinor | 0:dcf3c92487ca | 70 | #define ERR_USE -13 /* Address in use. */ |
idinor | 0:dcf3c92487ca | 71 | |
idinor | 0:dcf3c92487ca | 72 | #define ERR_IF -14 /* Low-level netif error */ |
idinor | 0:dcf3c92487ca | 73 | #define ERR_ISCONN -15 /* Already connected. */ |
idinor | 0:dcf3c92487ca | 74 | |
idinor | 0:dcf3c92487ca | 75 | |
idinor | 0:dcf3c92487ca | 76 | #ifdef LWIP_DEBUG |
idinor | 0:dcf3c92487ca | 77 | extern const char *lwip_strerr(err_t err); |
idinor | 0:dcf3c92487ca | 78 | #else |
idinor | 0:dcf3c92487ca | 79 | #define lwip_strerr(x) "" |
idinor | 0:dcf3c92487ca | 80 | #endif /* LWIP_DEBUG */ |
idinor | 0:dcf3c92487ca | 81 | |
idinor | 0:dcf3c92487ca | 82 | #ifdef __cplusplus |
idinor | 0:dcf3c92487ca | 83 | } |
idinor | 0:dcf3c92487ca | 84 | #endif |
idinor | 0:dcf3c92487ca | 85 | |
idinor | 0:dcf3c92487ca | 86 | #endif /* __LWIP_ERR_H__ */ |