[PATCH rtems-lwip 1/2] rtemslwip: Use common lwipopts for all BSPs
Kinsey Moore
kinsey.moore at oarcorp.com
Wed Mar 29 20:51:11 UTC 2023
This reworks all BSPs to use a shared lwipopts.h that includes
lwipbspopts.h for per-BSP configuration instead of having lwIP
configuration scattered everywhere for individual BSPs. This also
consolidates the shared portions of ZynqMP BSP-specific configuration
and Xilinx-specific configuration into shared files for reuse.
---
defs/bsps/arm/tms570_base.json | 1 +
rtemslwip/beaglebone/lwipbspopts.h | 1 +
rtemslwip/beaglebone/lwipopts.h | 276 -----------------------
rtemslwip/include/legacy_lwipopts.h | 53 +++++
rtemslwip/include/lwipopts.h | 281 ++++++++++++++++++++++++
rtemslwip/tms570/lwipbspopts.h | 1 +
rtemslwip/xilinx/xlwipopts.h | 35 +++
rtemslwip/zynqmp/common_lwipopts.h | 3 +
rtemslwip/zynqmp/lwipopts.h | 128 -----------
rtemslwip/zynqmp_cfc400x/lwipbspopts.h | 2 +-
rtemslwip/zynqmp_hardware/lwipbspopts.h | 2 +-
rtemslwip/zynqmp_qemu/lwipbspopts.h | 2 +-
uLan/ports/os/lwipopts.h | 272 -----------------------
13 files changed, 378 insertions(+), 679 deletions(-)
create mode 100644 rtemslwip/beaglebone/lwipbspopts.h
delete mode 100644 rtemslwip/beaglebone/lwipopts.h
create mode 100644 rtemslwip/include/legacy_lwipopts.h
create mode 100644 rtemslwip/include/lwipopts.h
create mode 100644 rtemslwip/tms570/lwipbspopts.h
create mode 100644 rtemslwip/xilinx/xlwipopts.h
create mode 100644 rtemslwip/zynqmp/common_lwipopts.h
delete mode 100644 rtemslwip/zynqmp/lwipopts.h
delete mode 100644 uLan/ports/os/lwipopts.h
diff --git a/defs/bsps/arm/tms570_base.json b/defs/bsps/arm/tms570_base.json
index a1d1e24..e618d5c 100644
--- a/defs/bsps/arm/tms570_base.json
+++ b/defs/bsps/arm/tms570_base.json
@@ -2,6 +2,7 @@
"header-paths-to-import": [
"uLan/ports/driver/tms570_emac",
"uLan/ports/os",
+ "rtemslwip/tms570",
"cpsw/src/include"
],
"source-files-to-import": [
diff --git a/rtemslwip/beaglebone/lwipbspopts.h b/rtemslwip/beaglebone/lwipbspopts.h
new file mode 100644
index 0000000..85b08af
--- /dev/null
+++ b/rtemslwip/beaglebone/lwipbspopts.h
@@ -0,0 +1 @@
+#include <legacy_lwipopts.h>
diff --git a/rtemslwip/beaglebone/lwipopts.h b/rtemslwip/beaglebone/lwipopts.h
deleted file mode 100644
index 888fae4..0000000
--- a/rtemslwip/beaglebone/lwipopts.h
+++ /dev/null
@@ -1,276 +0,0 @@
-#if 0
-/*
- * Copyright (c) 2001-2003 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.
- *
- * This file is part of the lwIP TCP/IP stack.
- *
- * Author: Simon Goldschmidt
- *
- */
-#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 0
-#define LWIP_NETCONN 1
-#define LWIP_SOCKET 1
-#define LWIP_DNS 1
-
-#define LWIP_IPV6 1
-#define LWIP_IPV4 1
-
-#define LWIP_ETHERNET 1
-#define LWIP_NETIF_API 1
-#define LWIP_AUTOIP 1
-/* Enable DHCP to test it, disable UDP checksum to easier inject packets */
-#define LWIP_DHCP 1
-#define LWIP_TIMEVAL_PRIVATE 0
-#define LWIP_POSIX_SOCKETS_IO_NAMES 1
-//#define LWIP_COMPAT_SOCKETS 2
-#ifndef FIONREAD
-#define FIONREAD 1
-#endif
-#ifndef FIONBIO
-#define FIONBIO 1
-#endif
-#define THREAD_STACK_SIZE 4096
-
-#define LWIP_TIMERS 1
-/* Minimal changes to opt.h required for tcp unit tests: */
-
-#define MEM_SIZE 16000
-#define TCP_SND_QUEUELEN 40
-#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
-
-/* Minimal changes to opt.h required for etharp unit tests: */
-#define ETHARP_SUPPORT_STATIC_ENTRIES 1
-
-#endif /* LWIP_HDR_LWIPOPTS_H__ */
-
-#endif /* 0 */
-
-/**
- * \file lwipopts.h - Configuration options for lwIP
- *
- * Copyright (c) 2010 Texas Instruments Incorporated
- */
-/*
- * 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.
- *
- * This file is part of the lwIP TCP/IP stack.
- *
- * Author: Adam Dunkels <adam at sics.se>
- *
- */
-
-#ifndef __LWIPOPTS_H__
-#define __LWIPOPTS_H__
-
-/*****************************************************************************
-** CONFIGURATIONS
-*****************************************************************************/
-
-/*
-** The macro CPSW_DUAL_MAC_MODE shall be defined for using CPSW ports in
-** Dual MAC mode.
-*/
-#define CPSW_DUAL_MAC_MODE
-
-/*
-** The below macro should be defined for using lwIP with cache. For cache
-** enabling, pbuf pool shall be cache line aligned. This is done by using
-** separate pool for each memory. The alignment of pbuf pool to cache line
-** size is done in /ports/cpsw/include/arch/cc.h.
-*/
-/*#define LWIP_CACHE_ENABLED*/
-
-#define SOC_CACHELINE_SIZE_BYTES 64 /* Number of bytes in
- a cache line */
-/*
-** The timeout for DHCP completion. lwIP library will wait for DHCP
-** completion for (LWIP_DHCP_TIMEOUT / 100) seconds.
-*/
-#define LWIP_DHCP_TIMEOUT 1000
-
-/*
-** The number of times DHCP is attempted. Each time, the library will wait
-** for (LWIP_DHCP_TIMEOUT / 100) seconds for DHCP completion.
-*/
-#define NUM_DHCP_TRIES 5
-
-#define LWIP_ETHERNET 1
-#define LWIP_ARP 1
-#define LWIP_DNS 1
-
-/*****************************************************************************
-** lwIP SPECIFIC DEFINITIONS - To be used by lwIP stack
-*****************************************************************************/
-#define HOST_TMR_INTERVAL 0
-#define DYNAMIC_HTTP_HEADERS
-
-/*****************************************************************************
-** Platform specific locking
-*****************************************************************************/
-#define SYS_LIGHTWEIGHT_PROT 1
-#define NO_SYS 0
-#define NO_SYS_NO_TIMERS 0
-
-/*****************************************************************************
-** Memory Options
-*****************************************************************************/
-#define MEM_ALIGNMENT 4
-#define MEM_SIZE (1024 * 1024) /* 4K */
-
-#define MEMP_NUM_PBUF 96
-#define MEMP_NUM_TCP_PCB 32
-#define MEMP_NUM_TCP_SEG 32
-#define PBUF_POOL_SIZE 512
-#define MEMP_MEM_MALLOC 1
-#define MEMP_MEM_INIT 1
-#define MEMP_OVERFLOW_CHECK 0
-
-#ifdef LWIP_CACHE_ENABLED
-#define MEMP_SEPARATE_POOLS 1 /* We want the pbuf
- pool cache line
- aligned*/
-#endif
-
-//#define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT)
-
-/*****************************************************************************
-** IP Options
-*****************************************************************************/
-#define IP_REASSEMBLY 0
-#define IP_FRAG 0
-#define LWIP_IPV4 1
-#define LWIP_IPV6 1
-
-/*****************************************************************************
-** DHCP Options
-*****************************************************************************/
-#define LWIP_DHCP 1
-#define DHCP_DOES_ARP_CHECK 0
-
-/*****************************************************************************
-** Auto IP Options
-*****************************************************************************/
-#define LWIP_AUTOIP 1
-#define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
-
-/*****************************************************************************
-** TCP Options
-*****************************************************************************/
-#define TCP_MSS 1500
-#define TCP_WND (8 * TCP_MSS)
-#define TCP_SND_BUF (8 * TCP_MSS)
-#define TCP_OVERSIZE TCP_MSS
-#define LWIP_TCPIP_CORE_LOCKING 1
-
-/*****************************************************************************
-** PBUF Options
-*****************************************************************************/
-#define PBUF_LINK_HLEN 14
-#define PBUF_POOL_BUFSIZE 1520 /* + size of struct pbuf
- shall be cache line
- aligned be enabled */
-#define ETH_PAD_SIZE 0
-#define LWIP_NETCONN 1
-
-/*****************************************************************************
-** Socket Options
-*****************************************************************************/
-#define LWIP_SOCKET 1
-#define SO_REUSE 1
-
-/*****************************************************************************
-** Debugging options
-*****************************************************************************/
-#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
-#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON | LWIP_DBG_TRACE \
- |LWIP_DBG_STATE | LWIP_DBG_FRESH)
-#define DHCP_DEBUG LWIP_DBG_OFF
-#define NETIF_DEBUG LWIP_DBG_OFF
-#define IP_DEBUG LWIP_DBG_OFF
-#define UDP_DEBUG LWIP_DBG_OFF
-#define ETHARP_DEBUG LWIP_DBG_OFF
-#define SYS_DEBUG LWIP_DBG_OFF
-#define RAW_DEBUG LWIP_DBG_OFF
-#define MEM_DEBUG LWIP_DBG_OFF
-#define MEMP_DEBUG LWIP_DBG_OFF
-#define PBUF_DEBUG LWIP_DBG_OFF
-#define TCPIP_DEBUG LWIP_DBG_OFF
-#define APP_DEBUG LWIP_DBG_OFF
-#define SOCKETS_DEBUG LWIP_DBG_OFF
-#define LWIP_STATS 0
-#define LWIP_STATS_DISPLAY 0
-#define LWIP_STATS_POSIX 0
-#define LWIP_DNS_API_DEFINE_ERRORS 1
-
-
-
-/**
- * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
- * (only used if you use sockets.c)
- */
-#define LWIP_COMPAT_SOCKETS 1
-
- #define LWIP_TIMEVAL_PRIVATE 0
-
- #define LWIP_RAW 0
-
-#define tskIDLE_PRIORITY RTEMS_MAXIMUM_PRIORITY
-#define portTICK_RATE_MS (rtems_clock_get_ticks_per_second() * 1000)
-#define vTaskDelay(x) sys_arch_delay(x)
-
-#endif /* __LWIPOPTS_H__ */
diff --git a/rtemslwip/include/legacy_lwipopts.h b/rtemslwip/include/legacy_lwipopts.h
new file mode 100644
index 0000000..322b87d
--- /dev/null
+++ b/rtemslwip/include/legacy_lwipopts.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2023 On-Line Applications Research Corporation (OAR)
+ * Written by Kinsey Moore <kinsey.moore at oarcorp.com>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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.
+ */
+
+/*
+ * The options here are pruned down, but roughly equivalent to the original set
+ * of options configured for the BeagleBone and TMS570 BSPs originally pulled
+ * from the uLan repository.
+ */
+
+#ifndef __LEGACY_LWIPOPTS_H__
+#define __LEGACY_LWIPOPTS_H__
+
+#define CPSW_DUAL_MAC_MODE
+
+#define NUM_DHCP_TRIES 5
+
+#define LWIP_ETHERNET 1
+
+#define LWIP_TCPIP_CORE_LOCKING 1
+
+/*****************************************************************************
+** Memory Options
+*****************************************************************************/
+#define MEM_ALIGNMENT 4
+#define MEM_SIZE (1024 * 1024) /* 4K */
+#define MEMP_NUM_TCP_SEG 32
+#define MEMP_MEM_MALLOC 1
+#define MEMP_MEM_INIT 1
+
+#endif /* __LEGACY_LWIPOPTS_H__ */
diff --git a/rtemslwip/include/lwipopts.h b/rtemslwip/include/lwipopts.h
new file mode 100644
index 0000000..157cce8
--- /dev/null
+++ b/rtemslwip/include/lwipopts.h
@@ -0,0 +1,281 @@
+/*
+ * Copyright (C) 2023 On-Line Applications Research Corporation (OAR)
+ * Written by Kinsey Moore <kinsey.moore at oarcorp.com>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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.
+ */
+
+#ifndef __LWIPOPTS_H__
+#define __LWIPOPTS_H__
+
+/* Critical items that all BSPs must use for full functionality */
+#define SYS_LIGHTWEIGHT_PROT 1
+#define NO_SYS 0
+#define LWIP_SOCKET 1
+#define SO_REUSE 1
+#define LWIP_COMPAT_SOCKETS 1
+#define LWIP_NETCONN 1
+#define LWIP_NETIF_LOOPBACK 1 /* Required for socketpair implementation */
+#define LWIP_NETIF_API 1
+#define LWIP_TIMEVAL_PRIVATE 0
+#define LWIP_CALLBACK_API 1
+#define NO_SYS_NO_TIMERS 1
+#define LWIP_COMPAT_MUTEX 0
+#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
+
+#include <lwipbspopts.h>
+
+/* Sane defaults that the configuration or BSP can override */
+
+#ifndef ARP_QUEUEING
+#define ARP_QUEUEING 1
+#endif
+
+#ifndef ARP_TABLE_SIZE
+#define ARP_TABLE_SIZE 10
+#endif
+
+#ifndef CHECKSUM_CHECK_IP
+#define CHECKSUM_CHECK_IP 1
+#endif
+
+#ifndef CHECKSUM_CHECK_TCP
+#define CHECKSUM_CHECK_TCP 1
+#endif
+
+#ifndef CHECKSUM_CHECK_UDP
+#define CHECKSUM_CHECK_UDP 1
+#endif
+
+#ifndef CHECKSUM_GEN_IP
+#define CHECKSUM_GEN_IP 1
+#endif
+
+#ifndef CHECKSUM_GEN_TCP
+#define CHECKSUM_GEN_TCP 1
+#endif
+
+#ifndef CHECKSUM_GEN_UDP
+#define CHECKSUM_GEN_UDP 1
+#endif
+
+#ifndef CONFIG_LINKSPEED_AUTODETECT
+#define CONFIG_LINKSPEED_AUTODETECT 1
+#endif
+
+#ifndef DEFAULT_ACCEPTMBOX_SIZE
+#define DEFAULT_ACCEPTMBOX_SIZE 5
+#endif
+
+#ifndef DEFAULT_TCP_RECVMBOX_SIZE
+#define DEFAULT_TCP_RECVMBOX_SIZE 20
+#endif
+
+#ifndef DEFAULT_UDP_RECVMBOX_SIZE
+#define DEFAULT_UDP_RECVMBOX_SIZE 20
+#endif
+
+#ifndef DHCP_DOES_ARP_CHECK
+#define DHCP_DOES_ARP_CHECK 1
+#endif
+
+#ifndef ICMP_TTL
+#define ICMP_TTL 255
+#endif
+
+#ifndef IP_DEFAULT_TTL
+#define IP_DEFAULT_TTL 255
+#endif
+
+#ifndef IP_FORWARD
+#define IP_FORWARD 0
+#endif
+
+#ifndef IP_FRAG
+#define IP_FRAG 1
+#endif
+
+#ifndef IP_FRAG_MAX_MTU
+#define IP_FRAG_MAX_MTU 1500
+#endif
+
+#ifndef IP_OPTIONS
+#define IP_OPTIONS 1
+#endif
+
+#ifndef IP_OPTIONS_ALLOWED
+#define IP_OPTIONS_ALLOWED 0
+#endif
+
+#ifndef IP_REASS_BUFSIZE
+#define IP_REASS_BUFSIZE 5760
+#endif
+
+#ifndef IP_REASSEMBLY
+#define IP_REASSEMBLY 1
+#endif
+
+#ifndef LWIP_ARP
+#define LWIP_ARP 1
+#endif
+
+#ifndef LWIP_AUTOIP
+#define LWIP_AUTOIP 1
+#endif
+
+#ifndef LWIP_CHKSUM_ALGORITHM
+#define LWIP_CHKSUM_ALGORITHM 3
+#endif
+
+#ifndef LWIP_DHCP
+#define LWIP_DHCP 1
+#endif
+
+#ifndef LWIP_DHCP_AUTOIP_COOP
+#define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
+#endif
+
+#ifndef LWIP_DNS
+#define LWIP_DNS 1
+#endif
+
+#ifndef LWIP_IPV4
+#define LWIP_IPV4 1
+#endif
+
+#ifndef LWIP_IPV6
+#define LWIP_IPV6 1
+#endif
+
+#ifndef LWIP_TCP
+#define LWIP_TCP 1
+#endif
+
+#ifndef LWIP_UDP
+#define LWIP_UDP 1
+#endif
+
+#ifndef MEMP_NUM_FRAG_PBUF
+#define MEMP_NUM_FRAG_PBUF 256
+#endif
+
+#ifndef MEMP_NUM_NETCONN
+#define MEMP_NUM_NETCONN 16
+#endif
+
+#ifndef MEMP_NUM_PBUF
+#define MEMP_NUM_PBUF 96
+#endif
+
+#ifndef MEMP_NUM_TCP_PCB
+#define MEMP_NUM_TCP_PCB 32
+#endif
+
+#ifndef MEMP_NUM_TCP_PCB_LISTEN
+#define MEMP_NUM_TCP_PCB_LISTEN 8
+#endif
+
+#ifndef MEMP_NUM_TCP_SEG
+#define MEMP_NUM_TCP_SEG 256
+#endif
+
+#ifndef MEMP_NUM_UDP_PCB
+#define MEMP_NUM_UDP_PCB 16
+#endif
+
+#ifndef MEMP_SEPARATE_POOLS
+#define MEMP_SEPARATE_POOLS 1
+#endif
+
+#ifndef MEM_SIZE
+#define MEM_SIZE 2 * 1024 * 1024
+#endif
+
+#ifndef PBUF_LINK_HLEN
+#define PBUF_LINK_HLEN 16
+#endif
+
+#ifndef PBUF_POOL_BUFSIZE
+#define PBUF_POOL_BUFSIZE 1600
+#endif
+
+#ifndef PBUF_POOL_SIZE
+#define PBUF_POOL_SIZE 512
+#endif
+
+#ifndef TCP_FAST_INTERVAL
+#define TCP_FAST_INTERVAL 250
+#endif
+
+#ifndef TCPIP_MBOX_SIZE
+#define TCPIP_MBOX_SIZE 20
+#endif
+
+#ifndef TCP_MAXRTX
+#define TCP_MAXRTX 12
+#endif
+
+#ifndef TCP_MSS
+#define TCP_MSS 1576
+#endif
+
+#ifndef TCP_OVERSIZE
+#define TCP_OVERSIZE TCP_MSS
+#endif
+
+#ifndef TCP_QUEUE_OOSEQ
+#define TCP_QUEUE_OOSEQ 1
+#endif
+
+#ifndef TCP_SLOW_INTERVAL
+#define TCP_SLOW_INTERVAL 500
+#endif
+
+#ifndef TCP_SND_BUF
+#define TCP_SND_BUF (8 * TCP_MSS)
+#endif
+
+#ifndef TCP_SND_QUEUELEN
+#define TCP_SND_QUEUELEN 16 * TCP_SND_BUF / TCP_MSS
+#endif
+
+#ifndef TCP_SYNMAXRTX
+#define TCP_SYNMAXRTX 4
+#endif
+
+#ifndef TCP_TMR_INTERVAL
+#define TCP_TMR_INTERVAL 250
+#endif
+
+#ifndef TCP_TTL
+#define TCP_TTL 255
+#endif
+
+#ifndef TCP_WND
+#define TCP_WND (8 * TCP_MSS)
+#endif
+
+#ifndef UDP_TTL
+#define UDP_TTL 255
+#endif
+
+#endif /* __LWIPOPTS_H__ */
diff --git a/rtemslwip/tms570/lwipbspopts.h b/rtemslwip/tms570/lwipbspopts.h
new file mode 100644
index 0000000..85b08af
--- /dev/null
+++ b/rtemslwip/tms570/lwipbspopts.h
@@ -0,0 +1 @@
+#include <legacy_lwipopts.h>
diff --git a/rtemslwip/xilinx/xlwipopts.h b/rtemslwip/xilinx/xlwipopts.h
new file mode 100644
index 0000000..d915c3c
--- /dev/null
+++ b/rtemslwip/xilinx/xlwipopts.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2023 On-Line Applications Research Corporation (OAR)
+ * Written by Kinsey Moore <kinsey.moore at oarcorp.com>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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.
+ */
+
+#ifndef __XLWIPOPTS_H__
+#define __XLWIPOPTS_H__
+
+/* These macros allow RTEMS to pretend to be FreeRTOS for Xilinx drivers */
+#define tskIDLE_PRIORITY RTEMS_MAXIMUM_PRIORITY
+#define portTICK_RATE_MS (rtems_clock_get_ticks_per_second() * 1000)
+#define vTaskDelay(x) sys_arch_delay(x)
+
+#endif /* __XLWIPOPTS_H__ */
diff --git a/rtemslwip/zynqmp/common_lwipopts.h b/rtemslwip/zynqmp/common_lwipopts.h
new file mode 100644
index 0000000..8b7d870
--- /dev/null
+++ b/rtemslwip/zynqmp/common_lwipopts.h
@@ -0,0 +1,3 @@
+#include <xparameters_ps.h>
+#include <xlwipopts.h>
+#define MEM_ALIGNMENT 64
diff --git a/rtemslwip/zynqmp/lwipopts.h b/rtemslwip/zynqmp/lwipopts.h
deleted file mode 100644
index feabe73..0000000
--- a/rtemslwip/zynqmp/lwipopts.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2022 On-Line Applications Research Corporation (OAR)
- * Written by Kinsey Moore <kinsey.moore at oarcorp.com>
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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.
- */
-
-#ifndef __LWIPOPTS_H__
-#define __LWIPOPTS_H__
-
-#define SYS_LIGHTWEIGHT_PROT 1
-
-#define NO_SYS 0
-#define LWIP_SOCKET 1
-#define SO_REUSE 1
-#define LWIP_COMPAT_SOCKETS 1
-#define LWIP_NETCONN 1
-
-#define LWIP_ARP 1
-#define LWIP_NETIF_API 1
-/* Required for socketpair implementation */
-#define LWIP_NETIF_LOOPBACK 1
-#define LWIP_IPV6 1
-#define LWIP_IPV4 1
-#define LWIP_TIMEVAL_PRIVATE 0
-#define LWIP_DNS 1
-
-#define LWIP_CALLBACK_API 1
-
-#define MEM_ALIGNMENT 64
-#define MEM_SIZE 2 * 1024 * 1024
-#define MEMP_NUM_PBUF 32
-#define MEMP_NUM_NETCONN 16
-#define MEMP_NUM_UDP_PCB 16
-#define MEMP_NUM_TCP_PCB 32
-#define MEMP_NUM_TCP_PCB_LISTEN 8
-#define MEMP_NUM_TCP_SEG 256
-
-#define PBUF_POOL_SIZE 256
-#define PBUF_POOL_BUFSIZE 1600
-#define PBUF_LINK_HLEN 16
-
-#define ARP_TABLE_SIZE 10
-#define ARP_QUEUEING 1
-
-#define ICMP_TTL 255
-
-#define IP_OPTIONS 1
-#define IP_FORWARD 0
-#define IP_REASSEMBLY 1
-#define IP_FRAG 1
-#define IP_REASS_BUFSIZE 5760
-#define IP_FRAG_MAX_MTU 1500
-#define IP_DEFAULT_TTL 255
-#define LWIP_CHKSUM_ALGORITHM 3
-
-#define LWIP_UDP 1
-#define UDP_TTL 255
-
-#define LWIP_TCP 1
-#define TCP_MSS 1576
-#define TCP_SND_BUF 16 * 1024
-#define TCP_WND 6 * 1024
-#define TCP_TTL 255
-#define TCP_MAXRTX 12
-#define TCP_SYNMAXRTX 4
-#define TCP_QUEUE_OOSEQ 1
-#define TCP_SND_QUEUELEN 16 * TCP_SND_BUF / TCP_MSS
-#define CHECKSUM_GEN_TCP 1
-#define CHECKSUM_GEN_UDP 1
-#define CHECKSUM_GEN_IP 1
-#define CHECKSUM_CHECK_TCP 1
-#define CHECKSUM_CHECK_UDP 1
-#define CHECKSUM_CHECK_IP 1
-
-#define TCP_TMR_INTERVAL 250
-#define TCP_FAST_INTERVAL 250
-#define TCP_SLOW_INTERVAL 500
-
-#define NO_SYS_NO_TIMERS 1
-#define MEMP_SEPARATE_POOLS 1
-#define MEMP_NUM_FRAG_PBUF 256
-#define IP_OPTIONS_ALLOWED 0
-#define TCP_OVERSIZE TCP_MSS
-#define LWIP_COMPAT_MUTEX 0
-#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
-
-#define LWIP_DHCP 1
-#define DHCP_DOES_ARP_CHECK 1
-
-#define DBG_TYPES_ON DBG_LEVEL_WARNING
-
-#define LWIP_STATS 0
-#define LWIP_STATS_DISPLAY 0
-#define LWIP_STATS_POSIX 0
-
-#define CONFIG_LINKSPEED_AUTODETECT 1
-#define TCPIP_MBOX_SIZE 20
-#define DEFAULT_TCP_RECVMBOX_SIZE 20
-#define DEFAULT_UDP_RECVMBOX_SIZE 20
-#define DEFAULT_ACCEPTMBOX_SIZE 5
-
-#define tskIDLE_PRIORITY RTEMS_MAXIMUM_PRIORITY
-#define portTICK_RATE_MS ( rtems_clock_get_ticks_per_second() * 1000 )
-#define vTaskDelay( x ) sys_arch_delay( x )
-
-#include <lwipbspopts.h>
-
-#endif /* __LWIPOPTS_H__ */
diff --git a/rtemslwip/zynqmp_cfc400x/lwipbspopts.h b/rtemslwip/zynqmp_cfc400x/lwipbspopts.h
index 00f8077..b119b7d 100644
--- a/rtemslwip/zynqmp_cfc400x/lwipbspopts.h
+++ b/rtemslwip/zynqmp_cfc400x/lwipbspopts.h
@@ -27,7 +27,7 @@
#ifndef RTEMSLWIP_LWIPBSPOPTS_H
#define RTEMSLWIP_LWIPBSPOPTS_H
-#include <xparameters_ps.h>
+#include <common_lwipopts.h>
/* Use SGMII mode for all interfaces on the CFC-400X */
#define ZYNQMP_USE_SGMII
diff --git a/rtemslwip/zynqmp_hardware/lwipbspopts.h b/rtemslwip/zynqmp_hardware/lwipbspopts.h
index a3acc19..143e302 100644
--- a/rtemslwip/zynqmp_hardware/lwipbspopts.h
+++ b/rtemslwip/zynqmp_hardware/lwipbspopts.h
@@ -1 +1 @@
-#include <xparameters_ps.h>
+#include <common_lwipopts.h>
diff --git a/rtemslwip/zynqmp_qemu/lwipbspopts.h b/rtemslwip/zynqmp_qemu/lwipbspopts.h
index a3acc19..143e302 100644
--- a/rtemslwip/zynqmp_qemu/lwipbspopts.h
+++ b/rtemslwip/zynqmp_qemu/lwipbspopts.h
@@ -1 +1 @@
-#include <xparameters_ps.h>
+#include <common_lwipopts.h>
diff --git a/uLan/ports/os/lwipopts.h b/uLan/ports/os/lwipopts.h
deleted file mode 100644
index 6e4287a..0000000
--- a/uLan/ports/os/lwipopts.h
+++ /dev/null
@@ -1,272 +0,0 @@
-#if 0
-/*
- * Copyright (c) 2001-2003 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.
- *
- * This file is part of the lwIP TCP/IP stack.
- *
- * Author: Simon Goldschmidt
- *
- */
-#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 0
-#define LWIP_NETCONN 1
-#define LWIP_SOCKET 1
-#define LWIP_DNS 1
-
-#define LWIP_IPV6 1
-#define LWIP_IPV4 1
-
-#define LWIP_ETHERNET 1
-#define LWIP_NETIF_API 1
-#define LWIP_AUTOIP 1
-/* Enable DHCP to test it, disable UDP checksum to easier inject packets */
-#define LWIP_DHCP 1
-#define LWIP_TIMEVAL_PRIVATE 0
-#define LWIP_POSIX_SOCKETS_IO_NAMES 1
-//#define LWIP_COMPAT_SOCKETS 2
-#ifndef FIONREAD
-#define FIONREAD 1
-#endif
-#ifndef FIONBIO
-#define FIONBIO 1
-#endif
-#define THREAD_STACK_SIZE 4096
-
-#define LWIP_TIMERS 1
-/* Minimal changes to opt.h required for tcp unit tests: */
-
-#define MEM_SIZE 16000
-#define TCP_SND_QUEUELEN 40
-#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
-
-/* Minimal changes to opt.h required for etharp unit tests: */
-#define ETHARP_SUPPORT_STATIC_ENTRIES 1
-
-#endif /* LWIP_HDR_LWIPOPTS_H__ */
-
-#endif /* 0 */
-
-/**
- * \file lwipopts.h - Configuration options for lwIP
- *
- * Copyright (c) 2010 Texas Instruments Incorporated
- */
-/*
- * 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.
- *
- * This file is part of the lwIP TCP/IP stack.
- *
- * Author: Adam Dunkels <adam at sics.se>
- *
- */
-
-#ifndef __LWIPOPTS_H__
-#define __LWIPOPTS_H__
-
-/*****************************************************************************
-** CONFIGURATIONS
-*****************************************************************************/
-
-/*
-** The macro CPSW_DUAL_MAC_MODE shall be defined for using CPSW ports in
-** Dual MAC mode.
-*/
-#define CPSW_DUAL_MAC_MODE
-
-/*
-** The below macro should be defined for using lwIP with cache. For cache
-** enabling, pbuf pool shall be cache line aligned. This is done by using
-** separate pool for each memory. The alignment of pbuf pool to cache line
-** size is done in /ports/cpsw/include/arch/cc.h.
-*/
-/*#define LWIP_CACHE_ENABLED*/
-
-#define SOC_CACHELINE_SIZE_BYTES 64 /* Number of bytes in
- a cache line */
-/*
-** The timeout for DHCP completion. lwIP library will wait for DHCP
-** completion for (LWIP_DHCP_TIMEOUT / 100) seconds.
-*/
-#define LWIP_DHCP_TIMEOUT 1000
-
-/*
-** The number of times DHCP is attempted. Each time, the library will wait
-** for (LWIP_DHCP_TIMEOUT / 100) seconds for DHCP completion.
-*/
-#define NUM_DHCP_TRIES 5
-
-#define LWIP_ETHERNET 1
-#define LWIP_ARP 1
-#define LWIP_DNS 1
-
-/*****************************************************************************
-** lwIP SPECIFIC DEFINITIONS - To be used by lwIP stack
-*****************************************************************************/
-#define HOST_TMR_INTERVAL 0
-#define DYNAMIC_HTTP_HEADERS
-
-/*****************************************************************************
-** Platform specific locking
-*****************************************************************************/
-#define SYS_LIGHTWEIGHT_PROT 1
-#define NO_SYS 0
-#define NO_SYS_NO_TIMERS 0
-
-/*****************************************************************************
-** Memory Options
-*****************************************************************************/
-#define MEM_ALIGNMENT 4
-#define MEM_SIZE (1024 * 1024) /* 4K */
-
-#define MEMP_NUM_PBUF 96
-#define MEMP_NUM_TCP_PCB 32
-#define MEMP_NUM_TCP_SEG 32
-#define PBUF_POOL_SIZE 512
-#define MEMP_MEM_MALLOC 1
-#define MEMP_MEM_INIT 1
-#define MEMP_OVERFLOW_CHECK 0
-
-#ifdef LWIP_CACHE_ENABLED
-#define MEMP_SEPARATE_POOLS 1 /* We want the pbuf
- pool cache line
- aligned*/
-#endif
-
-//#define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT)
-
-/*****************************************************************************
-** IP Options
-*****************************************************************************/
-#define IP_REASSEMBLY 0
-#define IP_FRAG 0
-#define LWIP_IPV4 1
-#define LWIP_IPV6 1
-
-/*****************************************************************************
-** DHCP Options
-*****************************************************************************/
-#define LWIP_DHCP 1
-#define DHCP_DOES_ARP_CHECK 0
-
-/*****************************************************************************
-** Auto IP Options
-*****************************************************************************/
-#define LWIP_AUTOIP 1
-#define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
-
-/*****************************************************************************
-** TCP Options
-*****************************************************************************/
-#define TCP_MSS 1500
-#define TCP_WND (8 * TCP_MSS)
-#define TCP_SND_BUF (8 * TCP_MSS)
-#define TCP_OVERSIZE TCP_MSS
-#define LWIP_TCPIP_CORE_LOCKING 1
-
-/*****************************************************************************
-** PBUF Options
-*****************************************************************************/
-#define PBUF_LINK_HLEN 14
-#define PBUF_POOL_BUFSIZE 1520 /* + size of struct pbuf
- shall be cache line
- aligned be enabled */
-#define ETH_PAD_SIZE 0
-#define LWIP_NETCONN 1
-
-/*****************************************************************************
-** Socket Options
-*****************************************************************************/
-#define LWIP_SOCKET 1
-#define SO_REUSE 1
-
-/*****************************************************************************
-** Debugging options
-*****************************************************************************/
-#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
-#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON | LWIP_DBG_TRACE \
- |LWIP_DBG_STATE | LWIP_DBG_FRESH)
-#define DHCP_DEBUG LWIP_DBG_OFF
-#define NETIF_DEBUG LWIP_DBG_OFF
-#define IP_DEBUG LWIP_DBG_OFF
-#define UDP_DEBUG LWIP_DBG_OFF
-#define ETHARP_DEBUG LWIP_DBG_OFF
-#define SYS_DEBUG LWIP_DBG_OFF
-#define RAW_DEBUG LWIP_DBG_OFF
-#define MEM_DEBUG LWIP_DBG_OFF
-#define MEMP_DEBUG LWIP_DBG_OFF
-#define PBUF_DEBUG LWIP_DBG_OFF
-#define TCPIP_DEBUG LWIP_DBG_OFF
-#define APP_DEBUG LWIP_DBG_OFF
-#define SOCKETS_DEBUG LWIP_DBG_OFF
-#define LWIP_STATS 0
-#define LWIP_STATS_DISPLAY 0
-#define LWIP_STATS_POSIX 0
-#define LWIP_DNS_API_DEFINE_ERRORS 1
-
-
-
-/**
- * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
- * (only used if you use sockets.c)
- */
-#define LWIP_COMPAT_SOCKETS 0
-
- #define LWIP_TIMEVAL_PRIVATE 0
-
- #define LWIP_RAW 0
-
-#endif /* __LWIPOPTS_H__ */
--
2.30.2
More information about the devel
mailing list