A version of LWIP, provided for backwards compatibility.

Dependents:   AA_DemoBoard DemoBoard HelloServerDemo DemoBoard_RangeIndicator ... more

Committer:
root@mbed.org
Date:
Tue May 08 15:32:10 2012 +0100
Revision:
0:5e1631496985
initial commit

Who changed what in which revision?

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