LwIP with PPP & Ethernet integration

Dependents:   NetworkingCoreLib

This is the mbed port of the LwIP stack: http://savannah.nongnu.org/projects/lwip/

It includes contributed content from NXP's port for LPCxxxx devices: http://www.lpcware.com/content/project/lightweight-ip-lwip-networking-stack

Licence

LwIP is licenced under the BSD licence:

Copyright (c) 2001-2004 Swedish Institute of Computer Science. 
All rights reserved. 
Redistribution and use in source and binary forms, with or without modification, 
are permitted provided that the following conditions are met: 
1. Redistributions of source code must retain the above copyright notice, 
this list of conditions and the following disclaimer. 
2. Redistributions in binary form must reproduce the above copyright notice, 
this list of conditions and the following disclaimer in the documentation 
and/or other materials provided with the distribution. 
3. The name of the author may not be used to endorse or promote products 
derived from this software without specific prior written permission. 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
OF SUCH DAMAGE.
Committer:
donatien
Date:
Thu May 24 15:53:48 2012 +0000
Revision:
0:8e01dca41002
Merge with Emilio's LwIp

Who changed what in which revision?

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