[TCPIP] Synchronize LWIP code to 2.2.0

- take code from STABLE-2_2_0_RELEASE commit on https://git.savannah.gnu.org/git/lwip.git
- remove lwip/contrib directory
- do required changes due to upgrade in
  * CMakeLists.txt
  * include/lwip/arch/cc.h
  * include/lwip/arch/sys_arch.h
  * include/lwip/lwipopts.h
  * include/tcpip.h
  * ip/CMakeLists.txt
  * ip/lwip_glue/lwip_glue.h
  * ip/lwip_glue/tcp.c
  * ip/transport/tcp/if.c
  * tcpip/icmp.c

CORE-13098
This commit is contained in:
Hervé Poussineau 2024-04-20 20:26:04 +02:00
parent bc94df7288
commit d6eebaa47a
449 changed files with 132870 additions and 38788 deletions

View file

@ -29,13 +29,34 @@
* Author: Simon Goldschmidt
*
*/
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
#ifndef LWIP_HDR_LWIPOPTS_H
#define LWIP_HDR_LWIPOPTS_H
/* Prevent having to link sys_arch.c (we don't test the API layers in unit tests) */
#define NO_SYS 1
#define LWIP_NETCONN 0
#define LWIP_SOCKET 0
#define LWIP_TESTMODE 1
#define LWIP_IPV6 1
#define LWIP_CHECKSUM_ON_COPY 1
#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK 1
#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL(printfmsg) LWIP_ASSERT("TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL", 0)
/* We link to special sys_arch.c (for basic non-waiting API layers unit tests) */
#define NO_SYS 0
#define SYS_LIGHTWEIGHT_PROT 0
#define LWIP_NETCONN !NO_SYS
#define LWIP_SOCKET !NO_SYS
#define LWIP_NETCONN_FULLDUPLEX LWIP_SOCKET
#define LWIP_NETCONN_SEM_PER_THREAD 1
#define LWIP_NETBUF_RECVINFO 1
#define LWIP_HAVE_LOOPIF 1
#define TCPIP_THREAD_TEST
/* Enable DHCP to test it */
#define LWIP_DHCP 1
/* Enable DNS, with random source port to avoid alloc in dns_init */
#define LWIP_DNS 1
#define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_RAND_SRC_PORT)
/* Minimal changes to opt.h required for tcp unit tests: */
#define MEM_SIZE 16000
@ -43,8 +64,31 @@
#define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
#define TCP_SND_BUF (12 * TCP_MSS)
#define TCP_WND (10 * TCP_MSS)
#define LWIP_WND_SCALE 1
#define TCP_RCV_SCALE 0
#define PBUF_POOL_SIZE 400 /* pbuf tests need ~200KByte */
/* Enable IGMP and MDNS for MDNS tests */
#define LWIP_IGMP 1
#define LWIP_MDNS_RESPONDER 1
#define LWIP_NUM_NETIF_CLIENT_DATA (LWIP_MDNS_RESPONDER)
/* Enable PPP and PPPOS support for PPPOS test suites */
#define PPP_SUPPORT 1
#define PPPOS_SUPPORT 1
/* Minimal changes to opt.h required for etharp unit tests: */
#define ETHARP_SUPPORT_STATIC_ENTRIES 1
#endif /* __LWIPOPTS_H__ */
#define MEMP_NUM_SYS_TIMEOUT (LWIP_NUM_SYS_TIMEOUT_INTERNAL + 8)
/* MIB2 stats are required to check IPv4 reassembly results */
#define MIB2_STATS 1
/* netif tests want to test this, so enable: */
#define LWIP_NETIF_EXT_STATUS_CALLBACK 1
/* Check lwip_stats.mem.illegal instead of asserting */
#define LWIP_MEM_ILLEGAL_FREE(msg) /* to nothing */
#endif /* LWIP_HDR_LWIPOPTS_H */