Official mbed lwIP library (version 1.4.0)
Dependents: LwIPNetworking NetServicesMin EthernetInterface EthernetInterface_RSF ... more
Legacy Networking Libraries
This is an mbed 2 networking library. For mbed OS 5, lwip has been integrated with built-in networking interfaces. The networking libraries have been revised to better support additional network stacks and thread safety here.
This library is based on the code of lwIP v1.4.0
Copyright (c) 2001, 2002 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.
Revision 10:42a34d63b218, committed 2013-05-30
- Comitter:
- emilmont
- Date:
- Thu May 30 17:11:58 2013 +0100
- Parent:
- 9:5bba32bf3eb6
- Child:
- 11:4b3f6f8b92d2
- Commit message:
- Add LPC4088 target
Changed in this revision
--- a/core/dhcp.c Fri Mar 01 15:35:46 2013 +0000 +++ b/core/dhcp.c Thu May 30 17:11:58 2013 +0100 @@ -115,7 +115,7 @@ #define DHCP_OPTION_IDX_T2 5 #define DHCP_OPTION_IDX_SUBNET_MASK 6 #define DHCP_OPTION_IDX_ROUTER 7 -#define DHCP_OPTION_IDX_DNS_SERVER 8 +#define DHCP_OPTION_IDX_DNS_SERVER 8 #define DHCP_OPTION_IDX_MAX (DHCP_OPTION_IDX_DNS_SERVER + DNS_MAX_SERVERS) /** Holds the decoded option values, only valid while in dhcp_recv.
--- a/core/mem.c Fri Mar 01 15:35:46 2013 +0000 +++ b/core/mem.c Thu May 30 17:11:58 2013 +0100 @@ -177,8 +177,21 @@ * If so, make sure the memory at that location is big enough (see below on * how that space is calculated). */ #ifndef LWIP_RAM_HEAP_POINTER + +#if defined(TARGET_LPC4088) +# if defined (__ICCARM__) +# define ETHMEM_SECTION +# elif defined(TOOLCHAIN_GCC_CR) +# define ETHMEM_SECTION __attribute__((section(".data.$RamPeriph32"))) +# else +# define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned)) +# endif +#else +# define ETHMEM_SECTION __attribute((section("AHBSRAM0"))) +#endif + /** the heap. we need one struct mem at the end and some room for alignment */ -u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT]__attribute((section("AHBSRAM0"))); +u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT] ETHMEM_SECTION; #define LWIP_RAM_HEAP_POINTER ram_heap #endif /* LWIP_RAM_HEAP_POINTER */
--- a/core/memp.c Fri Mar 01 15:35:46 2013 +0000 +++ b/core/memp.c Thu May 30 17:11:58 2013 +0100 @@ -166,11 +166,17 @@ #else /* MEMP_SEPARATE_POOLS */ +#if defined(TARGET_LPC1768) +# define ETHMEM_SECTION __attribute((section("AHBSRAM1"))) +#elif defined(TARGET_LPC4088) +# define ETHMEM_SECTION +#endif + /** This is the actual memory used by the pools (all pools in one big block). */ static u8_t memp_memory[MEM_ALIGNMENT - 1 #define LWIP_MEMPOOL(name,num,size,desc) + ( (num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size) ) ) #include "lwip/memp_std.h" -] __attribute((section("AHBSRAM1"))); +] ETHMEM_SECTION; #endif /* MEMP_SEPARATE_POOLS */
--- a/netif/ppp/pap.c Fri Mar 01 15:35:46 2013 +0000 +++ b/netif/ppp/pap.c Thu May 30 17:11:58 2013 +0100 @@ -218,7 +218,7 @@ u->us_unit, u->us_timeouttime, u->us_clientstate)); if (u->us_clientstate != UPAPCS_AUTHREQ) { - UPAPDEBUG(LOG_INFO, ("upap_timeout: not in AUTHREQ state!\n")); + UPAPDEBUG(LOG_INFO, ("upap_timeout: not in AUTHREQ state!\n")); return; }