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