From 9cd85b5e4c0d63847efe3d172e51fa55bd9e3af3 Mon Sep 17 00:00:00 2001 From: kang Date: Mon, 17 Apr 2017 15:32:55 +0900 Subject: [PATCH] net: modify network Kconfig entries for System configurations Configuration sync with TizenRT Change-Id: Ic3870405503f212a368f23595b254cd406e83cc8 Signed-off-by: kang --- apps/system/utils/netcmd_ping.c | 1 + build/configs/artik053/nettest/defconfig | 123 +++--- .../configs/sidk_s5jt200/sidk_tash_wlan/defconfig | 123 +++--- os/include/net/lwip/lwipopts.h | 435 ++++++++++++--------- os/net/Kconfig | 3 - os/net/lwip/configs/Kconfig | 99 +++-- os/net/lwip/configs/arp/Kconfig | 13 +- os/net/lwip/configs/icmp/Kconfig | 12 - os/net/lwip/configs/ipv4/Kconfig | 14 +- os/net/lwip/configs/sys/Kconfig | 83 ++++ os/net/lwip/configs/tcp/Kconfig | 11 - os/net/lwip/configs/udp/Kconfig | 17 +- 12 files changed, 500 insertions(+), 434 deletions(-) create mode 100755 os/net/lwip/configs/sys/Kconfig diff --git a/apps/system/utils/netcmd_ping.c b/apps/system/utils/netcmd_ping.c index e27e97c..5870b1b 100644 --- a/apps/system/utils/netcmd_ping.c +++ b/apps/system/utils/netcmd_ping.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/build/configs/artik053/nettest/defconfig b/build/configs/artik053/nettest/defconfig index 023acef..f905ea9 100644 --- a/build/configs/artik053/nettest/defconfig +++ b/build/configs/artik053/nettest/defconfig @@ -619,39 +619,13 @@ CONFIG_NET_LWIP=y # LwIP options # CONFIG_NET_IPv4=y +CONFIG_NET_IP_DEFAULT_TTL=255 # CONFIG_NET_IP_FORWARD is not set CONFIG_NET_IP_OPTIONS_ALLOWED=y CONFIG_NET_IP_FRAG=y CONFIG_NET_IP_REASSEMBLY=y CONFIG_NET_IPV4_REASS_MAX_PBUFS=20 CONFIG_NET_IPV4_REASS_MAXAGE=5 -CONFIG_NET_IP_DEFAULT_TTL=255 - -# -# Memory Configurations -# -CONFIG_NET_MEM_ALIGNMENT=4 -# CONFIG_NET_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is not set -# CONFIG_NET_MEM_LIBC_MALLOC is not set -# CONFIG_NET_MEMP_MEM_MALLOC is not set -# CONFIG_NET_MEM_USE_POOLS is not set -CONFIG_NET_MEM_SIZE=153600 -CONFIG_NET_MEMP_OVERFLOW_CHECK=1 -CONFIG_NET_MEMP_SANITY_CHECK=y -# CONFIG_NET_MEMP_SEPARATE_POOLS is not set -CONFIG_NET_MEMP_NUM_PBUF=50 -CONFIG_NET_MEMP_NUM_RAW_PCB=4 -CONFIG_NET_MEMP_NUM_UDP_PCB=8 -CONFIG_NET_MEMP_NUM_TCP_PCB=8 -CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN=8 -CONFIG_NET_MEMP_NUM_TCP_SEG=80 -CONFIG_NET_MEMP_NUM_REASSDATA=5 -CONFIG_NET_MEMP_NUM_FRAG_PBUF=15 -CONFIG_NET_MEMP_NUM_ARP_QUEUE=30 -CONFIG_NET_MEMP_NUM_SYS_TIMEOUT=6 -CONFIG_NET_MEMP_NUM_TCPIP_MSG_API=8 -CONFIG_NET_MEMP_NUM_TCPIP_MSG_INPKT=8 -CONFIG_NET_PBUF_POOL_SIZE=16 # # Socket support @@ -667,29 +641,16 @@ CONFIG_NET_SO_RCVTIMEO=y # CONFIG_NET_SO_RCVBUF is not set CONFIG_NET_SO_REUSE=y # CONFIG_NET_SO_REUSE_RXTOALL is not set - -# -# ICMP Networking Support -# -CONFIG_NET_ICMP=y -CONFIG_NET_ICMP_TTL=255 -# CONFIG_NET_BROADCAST_PING is not set -# CONFIG_NET_MULTICAST_PING is not set - -# -# LWIP Mailbox Configurations -# -CONFIG_NET_TCPIP_MBOX_SIZE=64 -CONFIG_NET_DEFAULT_ACCEPTMBOX_SIZE=64 -CONFIG_NET_DEFAULT_RAW_RECVMBOX_SIZE=64 -CONFIG_NET_DEFAULT_TCP_RECVMBOX_SIZE=54 -CONFIG_NET_DEFAULT_UDP_RECVMBOX_SIZE=64 -CONFIG_NET_LWIP_IGMP=y -CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8 - -# -# TCP Networking -# +CONFIG_NET_ARP=y +CONFIG_NET_ARP_TABLESIZE=10 +CONFIG_NET_ARP_QUEUEING=y +CONFIG_NET_ETHARP_TRUST_IP_MAC=y +CONFIG_NET_ETH_PAD_SIZE=0 +# CONFIG_NET_ARP_STATIC_ENTRIES is not set +CONFIG_NET_UDP=y +# CONFIG_NET_NETBUF_RECVINFO is not set +CONFIG_NET_UDP_TTL=255 +# CONFIG_NET_UDPLITE is not set CONFIG_NET_TCP=y CONFIG_NET_TCP_TTL=255 CONFIG_NET_TCP_WND=58400 @@ -699,44 +660,50 @@ CONFIG_NET_TCP_QUEUE_OOSEQ=y CONFIG_NET_TCP_MSS=1460 CONFIG_NET_TCP_CALCULATE_EFF_SEND_MSS=y CONFIG_NET_TCP_SND_BUF=29200 -CONFIG_NET_TCP_SND_QUEUELEN=8 +CONFIG_NET_TCP_SND_QUEUELEN=80 # CONFIG_NET_TCP_LISTEN_BACKLOG is not set CONFIG_NET_TCP_OVERSIZE=536 # CONFIG_NET_TCP_TIMESTAMPS is not set CONFIG_NET_TCP_WND_UPDATE_THREASHOLD=536 +CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_TTL=255 +# CONFIG_NET_BROADCAST_PING is not set +# CONFIG_NET_MULTICAST_PING is not set +CONFIG_NET_LWIP_IGMP=y +CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8 # -# UDP Networking +# LWIP Mailbox Configurations # -CONFIG_NET_UDP=y -# CONFIG_NET_NETBUF_RECVINFO is not set -CONFIG_NET_UDP_TTL=255 -# CONFIG_NET_UDPLITE is not set +CONFIG_NET_TCPIP_MBOX_SIZE=64 +CONFIG_NET_DEFAULT_ACCEPTMBOX_SIZE=64 +CONFIG_NET_DEFAULT_RAW_RECVMBOX_SIZE=64 +CONFIG_NET_DEFAULT_TCP_RECVMBOX_SIZE=54 +CONFIG_NET_DEFAULT_UDP_RECVMBOX_SIZE=64 # -# ARP Configuration +# Memory Configurations # -CONFIG_NET_ARP=y -CONFIG_NET_ARP_TABLESIZE=10 -CONFIG_NET_ARP_QUEUEING=y -CONFIG_NET_ETHARP_TRUST_IP_MAC=y -CONFIG_NET_ETH_PAD_SIZE=0 -# CONFIG_NET_ARP_STATIC_ENTRIES is not set -# CONFIG_NET_LWIP_VLAN is not set +CONFIG_NET_MEM_ALIGNMENT=4 +# CONFIG_NET_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is not set +# CONFIG_NET_MEM_LIBC_MALLOC is not set +CONFIG_NET_MEMP_MEM_MALLOC=y +# CONFIG_NET_MEM_USE_POOLS is not set +CONFIG_NET_MEM_SIZE=153600 # -# Thread options +# LWIP Task Configurations # -CONFIG_NET_LWIP_TCPIP_THREAD_NAME="LWIP_TCP/IP" -CONFIG_NET_LWIP_TCPIP_THREAD_STACKSIZE=4096 -CONFIG_NET_LWIP_TCPIP_THREAD_PRIO=110 -CONFIG_NET_LWIP_DEFAULT_THREAD_NAME="lwIP" -CONFIG_NET_LWIP_DEFAULT_THREAD_STACKSIZE=1024 -CONFIG_NET_LWIP_DEFAULT_THREAD_PRIO=100 -CONFIG_NET_LWIP_LOOPBACK_INTERFACE=y -# CONFIG_NET_LWIP_SLIP_INTERFACE is not set -# CONFIG_NET_LWIP_PPP_SUPPORT is not set -# CONFIG_NET_LWIP_SNMP is not set +# CONFIG_NET_TCPIP_CORE_LOCKING is not set +# CONFIG_NET_TCPIP_CORE_LOCKING_INPUT is not set +CONFIG_NET_TCPIP_THREAD_NAME="LWIP_TCP/IP" +CONFIG_NET_TCPIP_THREAD_PRIO=110 +CONFIG_NET_TCPIP_THREAD_STACKSIZE=4096 +CONFIG_NET_COMPAT_MUTEX=y +CONFIG_NET_SYS_LIGHTWEIGHT_PROT=y +CONFIG_NET_DEFAULT_THREAD_NAME="lwIP" +CONFIG_NET_DEFAULT_THREAD_PRIO=1 +CONFIG_NET_DEFAULT_THREAD_STACKSIZE=0 # # Debug Options for Network @@ -756,8 +723,12 @@ CONFIG_NET_IP_STATS=y CONFIG_NET_UDP_STATS=y CONFIG_NET_TCP_STATS=y CONFIG_NET_MEM_STATS=y -# CONFIG_NET_MEMP_STATS is not set CONFIG_NET_SYS_STATS=y +# CONFIG_NET_LWIP_VLAN is not set +CONFIG_NET_LWIP_LOOPBACK_INTERFACE=y +# CONFIG_NET_LWIP_SLIP_INTERFACE is not set +# CONFIG_NET_LWIP_PPP_SUPPORT is not set +# CONFIG_NET_LWIP_SNMP is not set CONFIG_NET_SECURITY_TLS=y # CONFIG_TLS_WITH_SSS is not set diff --git a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig index 85807e8..81690e3 100644 --- a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig +++ b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig @@ -627,39 +627,13 @@ CONFIG_NET_LWIP=y # LwIP options # CONFIG_NET_IPv4=y +CONFIG_NET_IP_DEFAULT_TTL=255 # CONFIG_NET_IP_FORWARD is not set CONFIG_NET_IP_OPTIONS_ALLOWED=y CONFIG_NET_IP_FRAG=y CONFIG_NET_IP_REASSEMBLY=y CONFIG_NET_IPV4_REASS_MAX_PBUFS=20 CONFIG_NET_IPV4_REASS_MAXAGE=5 -CONFIG_NET_IP_DEFAULT_TTL=255 - -# -# Memory Configurations -# -CONFIG_NET_MEM_ALIGNMENT=4 -# CONFIG_NET_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is not set -# CONFIG_NET_MEM_LIBC_MALLOC is not set -# CONFIG_NET_MEMP_MEM_MALLOC is not set -# CONFIG_NET_MEM_USE_POOLS is not set -CONFIG_NET_MEM_SIZE=153600 -CONFIG_NET_MEMP_OVERFLOW_CHECK=1 -CONFIG_NET_MEMP_SANITY_CHECK=y -# CONFIG_NET_MEMP_SEPARATE_POOLS is not set -CONFIG_NET_MEMP_NUM_PBUF=50 -CONFIG_NET_MEMP_NUM_RAW_PCB=4 -CONFIG_NET_MEMP_NUM_UDP_PCB=8 -CONFIG_NET_MEMP_NUM_TCP_PCB=8 -CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN=8 -CONFIG_NET_MEMP_NUM_TCP_SEG=80 -CONFIG_NET_MEMP_NUM_REASSDATA=5 -CONFIG_NET_MEMP_NUM_FRAG_PBUF=15 -CONFIG_NET_MEMP_NUM_ARP_QUEUE=30 -CONFIG_NET_MEMP_NUM_SYS_TIMEOUT=6 -CONFIG_NET_MEMP_NUM_TCPIP_MSG_API=8 -CONFIG_NET_MEMP_NUM_TCPIP_MSG_INPKT=8 -CONFIG_NET_PBUF_POOL_SIZE=16 # # Socket support @@ -675,29 +649,16 @@ CONFIG_NET_SO_RCVTIMEO=y # CONFIG_NET_SO_RCVBUF is not set CONFIG_NET_SO_REUSE=y # CONFIG_NET_SO_REUSE_RXTOALL is not set - -# -# ICMP Networking Support -# -CONFIG_NET_ICMP=y -CONFIG_NET_ICMP_TTL=255 -# CONFIG_NET_BROADCAST_PING is not set -# CONFIG_NET_MULTICAST_PING is not set - -# -# LWIP Mailbox Configurations -# -CONFIG_NET_TCPIP_MBOX_SIZE=64 -CONFIG_NET_DEFAULT_ACCEPTMBOX_SIZE=64 -CONFIG_NET_DEFAULT_RAW_RECVMBOX_SIZE=64 -CONFIG_NET_DEFAULT_TCP_RECVMBOX_SIZE=54 -CONFIG_NET_DEFAULT_UDP_RECVMBOX_SIZE=64 -CONFIG_NET_LWIP_IGMP=y -CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8 - -# -# TCP Networking -# +CONFIG_NET_ARP=y +CONFIG_NET_ARP_TABLESIZE=10 +CONFIG_NET_ARP_QUEUEING=y +CONFIG_NET_ETHARP_TRUST_IP_MAC=y +CONFIG_NET_ETH_PAD_SIZE=0 +# CONFIG_NET_ARP_STATIC_ENTRIES is not set +CONFIG_NET_UDP=y +# CONFIG_NET_NETBUF_RECVINFO is not set +CONFIG_NET_UDP_TTL=255 +# CONFIG_NET_UDPLITE is not set CONFIG_NET_TCP=y CONFIG_NET_TCP_TTL=255 CONFIG_NET_TCP_WND=58400 @@ -707,44 +668,50 @@ CONFIG_NET_TCP_QUEUE_OOSEQ=y CONFIG_NET_TCP_MSS=1460 CONFIG_NET_TCP_CALCULATE_EFF_SEND_MSS=y CONFIG_NET_TCP_SND_BUF=29200 -CONFIG_NET_TCP_SND_QUEUELEN=8 +CONFIG_NET_TCP_SND_QUEUELEN=80 # CONFIG_NET_TCP_LISTEN_BACKLOG is not set CONFIG_NET_TCP_OVERSIZE=536 # CONFIG_NET_TCP_TIMESTAMPS is not set CONFIG_NET_TCP_WND_UPDATE_THREASHOLD=536 +CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_TTL=255 +# CONFIG_NET_BROADCAST_PING is not set +# CONFIG_NET_MULTICAST_PING is not set +CONFIG_NET_LWIP_IGMP=y +CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8 # -# UDP Networking +# LWIP Mailbox Configurations # -CONFIG_NET_UDP=y -# CONFIG_NET_NETBUF_RECVINFO is not set -CONFIG_NET_UDP_TTL=255 -# CONFIG_NET_UDPLITE is not set +CONFIG_NET_TCPIP_MBOX_SIZE=64 +CONFIG_NET_DEFAULT_ACCEPTMBOX_SIZE=64 +CONFIG_NET_DEFAULT_RAW_RECVMBOX_SIZE=64 +CONFIG_NET_DEFAULT_TCP_RECVMBOX_SIZE=54 +CONFIG_NET_DEFAULT_UDP_RECVMBOX_SIZE=64 # -# ARP Configuration +# Memory Configurations # -CONFIG_NET_ARP=y -CONFIG_NET_ARP_TABLESIZE=10 -CONFIG_NET_ARP_QUEUEING=y -CONFIG_NET_ETHARP_TRUST_IP_MAC=y -CONFIG_NET_ETH_PAD_SIZE=0 -# CONFIG_NET_ARP_STATIC_ENTRIES is not set -# CONFIG_NET_LWIP_VLAN is not set +CONFIG_NET_MEM_ALIGNMENT=4 +# CONFIG_NET_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT is not set +# CONFIG_NET_MEM_LIBC_MALLOC is not set +CONFIG_NET_MEMP_MEM_MALLOC=y +# CONFIG_NET_MEM_USE_POOLS is not set +CONFIG_NET_MEM_SIZE=153600 # -# Thread options +# LWIP Task Configurations # -CONFIG_NET_LWIP_TCPIP_THREAD_NAME="LWIP_TCP/IP" -CONFIG_NET_LWIP_TCPIP_THREAD_STACKSIZE=4096 -CONFIG_NET_LWIP_TCPIP_THREAD_PRIO=110 -CONFIG_NET_LWIP_DEFAULT_THREAD_NAME="lwIP" -CONFIG_NET_LWIP_DEFAULT_THREAD_STACKSIZE=1024 -CONFIG_NET_LWIP_DEFAULT_THREAD_PRIO=100 -CONFIG_NET_LWIP_LOOPBACK_INTERFACE=y -# CONFIG_NET_LWIP_SLIP_INTERFACE is not set -# CONFIG_NET_LWIP_PPP_SUPPORT is not set -# CONFIG_NET_LWIP_SNMP is not set +# CONFIG_NET_TCPIP_CORE_LOCKING is not set +# CONFIG_NET_TCPIP_CORE_LOCKING_INPUT is not set +CONFIG_NET_TCPIP_THREAD_NAME="LWIP_TCP/IP" +CONFIG_NET_TCPIP_THREAD_PRIO=110 +CONFIG_NET_TCPIP_THREAD_STACKSIZE=4096 +CONFIG_NET_COMPAT_MUTEX=y +CONFIG_NET_SYS_LIGHTWEIGHT_PROT=y +CONFIG_NET_DEFAULT_THREAD_NAME="lwIP" +CONFIG_NET_DEFAULT_THREAD_PRIO=1 +CONFIG_NET_DEFAULT_THREAD_STACKSIZE=0 # # Debug Options for Network @@ -764,8 +731,12 @@ CONFIG_NET_IPFRAG_STATS=y # CONFIG_NET_UDP_STATS is not set # CONFIG_NET_TCP_STATS is not set CONFIG_NET_MEM_STATS=y -CONFIG_NET_MEMP_STATS=y CONFIG_NET_SYS_STATS=y +# CONFIG_NET_LWIP_VLAN is not set +CONFIG_NET_LWIP_LOOPBACK_INTERFACE=y +# CONFIG_NET_LWIP_SLIP_INTERFACE is not set +# CONFIG_NET_LWIP_PPP_SUPPORT is not set +# CONFIG_NET_LWIP_SNMP is not set CONFIG_NET_SECURITY_TLS=y # CONFIG_TLS_WITH_SSS is not set diff --git a/os/include/net/lwip/lwipopts.h b/os/include/net/lwip/lwipopts.h index 596ea6e..e94ce47 100644 --- a/os/include/net/lwip/lwipopts.h +++ b/os/include/net/lwip/lwipopts.h @@ -56,22 +56,22 @@ #define __LWIP_LWIPOPTS_H__ #include -#include -#include -#include -#include -/* NO_SYS==1: Provides VERY minimal functionality. Otherwise, -* use lwIP facilities. -*/ -#define NO_SYS 0 -#define SYS_LIGHTWEIGHT_PROT 1 +/* --------- PreDefined Configurations -------------*/ +/* + * Note + * In this platform, DHCP client and server are supported through netutils + * Instead of using lwIP DHCP, please use netutils dhcpc and dhcpd + */ +#define LWIP_DHCPS 0 +#define LWIP_DHCP 0 +#define LWIP_NETIF_API 1 +/* --------- PreDefined Configurations -------------*/ + /* ---------- ARP options ---------- */ #ifdef CONFIG_NET_ARP -#define LWIP_ARP 1 -#else -#define LWIP_ARP 0 +#define LWIP_ARP CONFIG_NET_ARP #endif #if defined(CONFIG_NET_ARP) @@ -83,16 +83,12 @@ #endif #ifdef CONFIG_NET_ARP_QUEUEING -#define ARP_QUEUEING 1 -#else -#define ARP_QUEUEING 0 +#define ARP_QUEUEING CONFIG_NET_ARP_QUEUEING #endif #ifdef CONFIG_NET_ETHARP_TRUST_IP_MAC -#define ETHARP_TRUST_IP_MAC 1 -#else -#define ETHARP_TRUST_IP_MAC 0 +#define ETHARP_TRUST_IP_MAC CONFIG_NET_ETHARP_TRUST_IP_MAC #endif #ifdef CONFIG_NET_ETH_PAD_SIZE @@ -100,8 +96,9 @@ #endif #ifdef CONFIG_NET_ARP_STATIC_ENTRIES -#define ETHARP_SUPPORT_STATIC_ENTRIES 1 +#define ETHARP_SUPPORT_STATIC_ENTRIES CONFIG_NET_ARP_STATIC_ENTRIES #endif + /* ---------- ARP options ---------- */ @@ -128,7 +125,7 @@ #endif #ifdef CONFIG_NET_IP_FRAG -#define IP_FRAG CONFIG_NET_IP_FRAG +#define IP_FRAG CONFIG_NET_IP_FRAG #endif #ifdef CONFIG_NET_IP_REASSEMBLY @@ -152,124 +149,129 @@ /* ---------- ICMP options ---------- */ #ifdef CONFIG_NET_ICMP -#define LWIP_ICMP 1 -#else -#define LWIP_ICMP 0 +#define LWIP_ICMP CONFIG_NET_ICMP #endif #ifdef CONFIG_NET_BROADCAST_PING -#define LWIP_BROADCAST_PING 1 -#else -#define LWIP_BROADCAST_PING 0 +#define LWIP_BROADCAST_PING CONFIG_NET_BROADCAST_PING #endif #ifdef CONFIG_NET_MULTICAST_PING -#define LWIP_MULTICAST_PING 1 -#else -#define LWIP_MULTICAST_PING 0 +#define LWIP_MULTICAST_PING CONFIG_NET_MULTICAST_PING #endif /* ---------- ICMP options ---------- */ /* ---------- IGMP options ---------- */ #ifdef CONFIG_NET_LWIP_IGMP -#define LWIP_IGMP 1 -#else -#define LWIP_IGMP 0 +#define LWIP_IGMP CONFIG_NET_LWIP_IGMP #endif - +// pknet #ifdef CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP #define MEMP_NUM_IGMP_GROUP CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP #endif /* ---------- IGMP options ---------- */ -#define LWIP_RAND() rand() - /* ---------- TCP options ---------- */ #ifdef CONFIG_NET_TCP -#define LWIP_TCP 1 +#define LWIP_TCP CONFIG_NET_TCP +#define LWIP_EVENT_API 0 +#define LWIP_CALLBACK_API 1 +#endif + +#ifdef CONFIG_NET_TCP_TTL +#define TCP_TTL CONFIG_NET_TCP_TTL +#endif #ifdef CONFIG_NET_TCP_WND -#define TCP_WND CONFIG_NET_TCP_WND +#define TCP_WND CONFIG_NET_TCP_WND #endif #ifdef CONFIG_NET_TCP_MAXRTX -#define TCP_MAXRTX CONFIG_NET_TCP_MAXRTX +#define TCP_MAXRTX CONFIG_NET_TCP_MAXRTX #endif #ifdef CONFIG_NET_TCP_SYNMAXRTX -#define TCP_SYNMAXRTX CONFIG_NET_TCP_SYNMAXRTX +#define TCP_SYNMAXRTX CONFIG_NET_TCP_SYNMAXRTX #endif #ifdef CONFIG_NET_TCP_QUEUE_OOSEQ -#define TCP_QUEUE_OOSEQ 1 -#else -#define TCP_QUEUE_OOSEQ 0 +#define TCP_QUEUE_OOSEQ CONFIG_NET_TCP_QUEUE_OOSEQ #endif #ifdef CONFIG_NET_TCP_MSS -#define TCP_MSS CONFIG_NET_TCP_MSS +#define TCP_MSS CONFIG_NET_TCP_MSS +#endif + +#ifdef CONFIG_NET_TCP_CALCULATE_EFF_SEND_MSS +#define TCP_CALCULATE_EFF_SEND_MSS CONFIG_NET_TCP_CALCULATE_EFF_SEND_MSS #endif #ifdef CONFIG_NET_TCP_SND_BUF -#define TCP_SND_BUF CONFIG_NET_TCP_SND_BUF +#define TCP_SND_BUF CONFIG_NET_TCP_SND_BUF #endif -#ifdef CONFIG_NET_TCP_TIMESTAMPS -#define LWIP_TCP_TIMESTAMPS 1 -#else -#define LWIP_TCP_TIMESTAMPS 0 +#ifdef CONFIG_NET_TCP_SND_QUEUELEN +#define TCP_SND_QUEUELEN CONFIG_NET_TCP_SND_QUEUELEN #endif -#ifdef CONFIG_NET_TCP_KEEPALIVE -#define LWIP_TCP_KEEPALIVE 1 -#else -#define LWIP_TCP_KEEPALIVE 0 +#ifdef CONFIG_NET_TCP_OOSEQ_MAX_BYTES +#define TCP_OOSEQ_MAX_BYTES CONFIG_NET_TCP_OOSEQ_MAX_BYTES +#endif + +#ifdef CONFIG_NET_TCP_OOSEQ_MAX_PBUFS +#define TCP_OOSEQ_MAX_PBUFS CONFIG_NET_TCP_OOSEQ_MAX_PBUFS #endif #ifdef CONFIG_NET_TCP_LISTEN_BACKLOG -#define TCP_LISTEN_BACKLOG 1 -#else -#define TCP_LISTEN_BACKLOG 0 +#define TCP_LISTEN_BACKLOG CONFIG_NET_TCP_LISTEN_BACKLOG #endif -#else -#define LWIP_TCP 0 +#ifdef CONFIG_NET_TCP_DEFAULT_LISTEN_BACKLOG +#define TCP_DEFAULT_LISTEN_BACKLOG CONFIG_NET_TCP_DEFAULT_LISTEN_BACKLOG +#endif + +#ifdef CONFIG_NET_TCP_OVERSIZE +#define TCP_OVERSIZE CONFIG_NET_TCP_OVERSIZE +#endif + +#ifdef CONFIG_NET_TCP_TIMESTAMPS +#define TCP_TIMESTAMPS CONFIG_NET_TCP_TIMESTAMPS +#endif + +#ifdef CONFIG_NET_TCP_KEEPALIVE +#define LWIP_TCP_KEEPALIVE CONFIG_NET_TCP_KEEPALIVE +#endif + +#ifdef CONFIG_NET_TCP_WND_UPDATE_THREASHOLD +#define TCP_WND_UPDATE_THREASHOLD CONFIG_NET_TCP_WND_UPDATE_THREASHOLD #endif -#define TCP_TTL 255 -#define LWIP_TCPIP_CORE_LOCKING_INPUT 0 -#define LWIP_TCPIP_CORE_LOCKING 0 /* ---------- TCP options ---------- */ /* ---------- UDP options ---------- */ + #ifdef CONFIG_NET_UDP -#define LWIP_UDP 1 -#else -#define LWIP_UDP 0 +#define LWIP_UDP CONFIG_NET_UDP +#define LWIP_UDP_TODO 1 +#endif + +#ifdef CONFIG_NET_UDP_TTL +#define UDP_TTL CONFIG_NET_UDP_TTL #endif #ifdef CONFIG_NET_UDPLITE -#define LWIP_UDPLITE 1 -#else -#define LWIP_UDPLITE 0 +#define LWIP_UDPLITE CONFIG_NET_UDPLITE +#endif + +#ifdef CONFIG_NET_NETBUF_RECVINFO +#define LWIP_NETBUF_RECVINFO CONFIG_NET_NETBUF_RECVINFO #endif -#define UDP_TTL 255 -#define LWIP_UDP_TODO 1 /* ---------- UDP options ---------- */ -/* ---------- DHCP options ---------- */ -/* - * Note - * In this platform, DHCP client and server are supported through netutils - * Instead of using lwIP DHCP, please use netutils dhcpc and dhcpd - */ -#define LWIP_DHCPS 0 -#define LWIP_DHCP 0 -/* ---------- DHCP options ---------- */ /* ---------- SNMP options ---------- */ #ifdef CONFIG_NET_LWIP_SNMP @@ -297,169 +299,208 @@ #endif /* ---------- SNMP options ---------- */ -/* - ---------------------------------------------- - ---------- Sequential layer options ---------- - ---------------------------------------------- -*/ -/** - * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) - */ -#define LWIP_NETCONN 1 -#define MEMP_NUM_NETCONN CONFIG_NSOCKET_DESCRIPTORS -#define MEMP_NUM_SYS_TIMEOUT 16 -/* - * MEMP_NUM_NETBUF: the number of struct netbufs. - * (only needed if you use the sequential API, like api_lib.c) - */ +/* ---------- Memory options ---------- */ -#define MEMP_NUM_NETBUF 16 -#define MEMP_NUM_TCPIP_MSG_API 16 -#define MEMP_NUM_TCPIP_INPKT 16 +#ifdef CONFIG_NET_MEM_ALIGNMENT +#define MEM_ALIGNMENT CONFIG_NET_MEM_ALIGNMENT +#endif -/* ---------- Memory options ---------- */ -#if !defined(CONFIG_NET_MEM_ALIGNMENT) -#error "CONFIG_NET_MEM_ALIGNMENT is undefined" -#else -#define MEM_ALIGNMENT CONFIG_NET_MEM_ALIGNMENT +#ifdef CONFIG_NET_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT +#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT CONFIG_NET_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT #endif -#if !defined(CONFIG_NET_MEM_SIZE) -#error "CONFIG_NET_MEM_SIZE is undefined" -#else -#define MEM_SIZE CONFIG_NET_MEM_SIZE +#ifdef CONFIG_NET_MEM_LIBC_MALLOC +#define MEM_LIBC_MALLOC CONFIG_NET_MEM_LIBC_MALLOC +#endif + +#ifdef CONFIG_NET_MEM_USE_POOLS +#define MEM_USE_POOLS CONFIG_NET_MEM_USE_POOLS +#endif + +#ifdef CONFIG_NET_MEM_SIZE +#define MEM_SIZE CONFIG_NET_MEM_SIZE +#endif + +#ifdef CONFIG_NET_MEMP_MEM_MALLOC +#define MEMP_MEM_MALLOC CONFIG_NET_MEMP_MEM_MALLOC #endif #ifdef CONFIG_NET_MEMP_OVERFLOW_CHECK -#define MEMP_OVERFLOW_CHECK CONFIG_NET_MEMP_OVERFLOW_CHECK -#else -#define MEMP_OVERFLOW_CHECK 0 +#define MEMP_OVERFLOW_CHECK CONFIG_NET_MEMP_OVERFLOW_CHECK #endif #ifdef CONFIG_NET_MEMP_SANITY_CHECK -#define MEMP_SANITY_CHECK 1 -#else -#define MEMP_SANITY_CHECK 0 +#define MEMP_SANITY_CHECK CONFIG_NET_MEMP_SANITY_CHECK #endif -#define MEMP_MEM_MALLOC 1 +#ifdef CONFIG_NET_MEMP_SEPARATE_POOLS +#define MEMP_SEPARATE_POOLS CONFIG_NET_MEMP_SEPARATE_POOLS +#endif + +/* ---------- Memory options ---------- */ + +/*---------- Interanl Memory Pool Sizes ----*/ #ifdef CONFIG_NET_MEMP_NUM_PBUF -#define MEMP_NUM_PBUF CONFIG_NET_MEMP_NUM_PBUF +#define MEMP_NUM_PBUF CONFIG_NET_MEMP_NUM_PBUF #endif +#ifndef MEMP_NUM_RAW_PCB #ifdef CONFIG_NET_MEMP_NUM_RAW_PCB -#define MEMP_NUM_RAW_PCB CONFIG_NET_MEMP_NUM_RAW_PCB +#define MEMP_NUM_RAW_PCB CONFIG_NET_MEMP_NUM_RAW_PCB +#endif #endif #ifdef CONFIG_NET_MEMP_NUM_UDP_PCB -#define MEMP_NUM_UDP_PCB CONFIG_NET_MEMP_NUM_UDP_PCB +#define MEMP_NUM_UDP_PCB CONFIG_NET_MEMP_NUM_UDP_PCB #endif - #ifdef CONFIG_NET_MEMP_NUM_TCP_PCB -#define MEMP_NUM_TCP_PCB CONFIG_NET_MEMP_NUM_TCP_PCB +#define MEMP_NUM_TCP_PCB CONFIG_NET_MEMP_NUM_TCP_PCB #endif #ifdef CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN -#define MEMP_NUM_TCP_PCB_LISTEN CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN +#define MEMP_NUM_TCP_PCB_LISTEN CONFIG_NET_MEMP_NUM_TCP_PCB_LISTEN #endif #ifdef CONFIG_NET_MEMP_NUM_TCP_SEG -#define MEMP_NUM_TCP_SEG CONFIG_NET_MEMP_NUM_TCP_SEG +#define MEMP_NUM_TCP_SEG CONFIG_NET_MEMP_NUM_TCP_SEG #endif #ifdef CONFIG_NET_MEMP_NUM_REASSDATA -#define MEMP_NUM_REASSDATA CONFIG_NET_MEMP_NUM_REASSDATA +#define MEMP_NUM_REASSDATA CONFIG_NET_MEMP_NUM_REASSDATA #endif #ifdef CONFIG_NET_MEMP_NUM_FRAG_PBUF -#define MEMP_NUM_FRAG_PBUF CONFIG_NET_MEMP_NUM_FRAG_PBUF +#define MEMP_NUM_FRAG_PBUF CONFIG_NET_MEMP_NUM_FRAG_PBUF #endif #ifdef CONFIG_NET_MEMP_NUM_ARP_QUEUE -#define MEMP_NUM_ARP_QUEUE CONFIG_NET_MEMP_NUM_ARP_QUEUE +#define MEMP_NUM_ARP_QUEUE CONFIG_NET_MEMP_NUM_ARP_QUEUE #endif -/* ---------- Memory options ---------- */ - -/* ---------- Pbuf options ---------- */ -/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#define PBUF_POOL_SIZE 50 +#ifdef CONFIG_NET_MEMP_NUM_IGMP_GROUP +#define MEMP_NUM_IGMP_GROUP CONFIG_NET_MEMP_NUM_IGMP_GROUP +#endif +#ifdef CONFIG_NET_MEMP_NUM_SYS_TIMEOUT +#define MEMP_NUM_SYS_TIMEOUT CONFIG_NET_MEMP_NUM_SYS_TIMEOUT +#endif -/* ---------- Socket options ---------- */ -#ifdef CONFIG_NET_SOCKET -#define LWIP_SOCKET 1 +#ifdef CONFIG_NET_MEMP_NUM_NETBUF +#define MEMP_NUM_NETBUF CONFIG_NET_MEMP_NUM_NETBUF +#endif +/* +#ifdef CONFIG_NET_MEMP_NUM_NETCONN +#define MEMP_NUM_NETCONN CONFIG_NET_MEMP_NUM_NETCONN +#endif +*/ +#ifdef CONFIG_NET_MEMP_NUM_TCPIP_MSG_API +#define MEMP_NUM_TCPIP_MSG_API CONFIG_NET_MEMP_NUM_TCPIP_MSG_API +#endif -#ifdef CONFIG_NET_RAW -#define LWIP_RAW 1 -#else -#define LWIP_RAW 0 +#ifdef CONFIG_NET_MEMP_NUM_TCPIP_MSG_INPKT +#define MEMP_NUM_TCPIP_MSG_INPKT CONFIG_NET_MEMP_NUM_TCPIP_MSG_INPKT #endif -#ifdef CONFIG_NET_SOCKET_OPTION_BROADCAST -#define IP_SOF_BROADCAST 1 -#else -#define IP_SOF_BROADCAST 0 +#ifdef CONFIG_NET_MEMP_NUM_SNMP_NODE +#define MEMP_NUM_SNMP_NODE CONFIG_NET_MEMP_NUM_SNMP_NODE #endif +#ifdef CONFIG_NET_MEMP_NUM_SNMP_ROOTNODE +#define MEMP_NUM_SNMP_ROOTNODE CONFIG_NET_MEMP_NUM_SNMP_ROOTNODE +#endif -#ifdef CONFIG_NET_RANDOMIZE_INITIAL_LOCAL_PORTS -#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 -#else -#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 +#ifdef CONFIG_NET_MEMP_NUM_SNMP_VARBIND +#define MEMP_NUM_SNMP_VARBIND CONFIG_NET_MEMP_NUM_SNMP_VARBIND #endif -#ifdef CONFIG_NET_SO_SNDTIMEO -#define LWIP_SO_SNDTIMEO 1 -#else -#define LWIP_SO_SNDTIMEO 0 +#ifdef CONFIG_NET_MEMP_NUM_SNMP_VALUE +#define MEMP_NUM_SNMP_VALUE CONFIG_NET_MEMP_NUM_SNMP_VALUE #endif -#ifdef CONFIG_NET_SO_RCVTIMEO -#define LWIP_SO_RCVTIMEO 1 -#else -#define LWIP_SO_RCVTIMEO 0 +#ifdef CONFIG_NET_MEMP_NUM_PPPOE_INTERFACES +#define MEMP_NUM_PPPOE_INTERFACES CONFIG_NET_MEMP_NUM_PPPOE_INTERFACES #endif -#ifdef CONFIG_NET_SO_RCVBUF -#define LWIP_SO_RCVBUF 1 -#else -#define LWIP_SO_RCVBUF 0 +#ifdef CONFIG_NET_PBUF_POOL_SIZE +#define PBUF_POOL_SIZE CONFIG_NET_PBUF_POOL_SIZE #endif -#ifdef CONFIG_NET_SO_REUSE -#define SO_REUSE 1 -#else -#define SO_REUSE 0 +/*---------- Interanl Memory Pool Sizes ----*/ + + +/* ---------- Raw Socket options ---------- */ +#ifdef CONFIG_NET_RAW +#define LWIP_RAW CONFIG_NET_RAW #endif -#else -#define LWIP_SOCKET 0 +#ifdef CONFIG_NET_RAW_TTL +#define RAW_TTL CONFIG_NET_RAW_TTL #endif + + /* ---------- Socket options ---------- */ +#define SOCKLEN_T_DEFINED 1 +#define LWIP_TIMEVAL_PRIVATE 0 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + #ifdef CONFIG_DISABLE_POLL #define LWIP_SELECT 1 #else #define LWIP_SELECT 0 #endif -#define LWIP_POSIX_SOCKETS_IO_NAMES 0 -#define LWIP_SOCKET_OFFSET CONFIG_NFILE_DESCRIPTORS +#ifdef CONFIG_NET_SOCKET +#define LWIP_SOCKET CONFIG_NET_SOCKET +#endif -#define SOCKLEN_T_DEFINED 1 +#ifdef CONFIG_NET_SOCKET_OPTION_BROADCAST +#define IP_SOF_BROADCAST CONFIG_NET_SOCKET_OPTION_BROADCAST +#endif -#define LWIP_TIMEVAL_PRIVATE 0 +#ifdef CONFIG_NET_RANDOMIZE_INITIAL_LOCAL_PORTS +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS CONFIG_NET_RANDOMIZE_INITIAL_LOCAL_PORTS +#endif -#ifdef CONFIG_NET_LWIP_LOOPBACK_INTERFACE -#define LWIP_HAVE_LOOPIF 1 -#else -#define LWIP_HAVE_LOOPIF 0 +#ifdef CONFIG_NFILE_DESCRIPTORS +#define LWIP_SOCKET_OFFSET CONFIG_NFILE_DESCRIPTORS +#endif + +#ifdef CONFIG_NSOCKET_DESCRIPTORS +#define MEMP_NUM_NETCONN CONFIG_NSOCKET_DESCRIPTORS +#define MEMP_NUM_RAW_PCB CONFIG_NSOCKET_DESCRIPTORS +#endif + +#ifdef CONFIG_NET_TCP_KEEPALIVE +#define LWIP_TCP_KEEPALIVE CONFIG_NET_TCP_KEEPALIVE +#endif + +#ifdef CONFIG_NET_SO_SNDTIMEO +#define LWIP_SO_SNDTIMEO CONFIG_NET_SO_SNDTIMEO +#endif + +#ifdef CONFIG_NET_SO_RCVTIMEO +#define LWIP_SO_RCVTIMEO CONFIG_NET_SO_RCVTIMEO +#endif + +#ifdef CONFIG_NET_SO_RCVBUF +#define LWIP_SO_RCVBUF CONFIG_NET_SO_RCVBUF +#endif + +#ifdef CONFIG_NET_SO_REUSE +#define SO_REUSE CONFIG_NET_SO_REUSE +#endif + +#ifdef CONFIG_NET_SO_REUSE_RXTOALL +#define SO_REUSE_RXTOALL CONFIG_NET_SO_REUSE_RXTOALL #endif +/* ---------- Socket options ---------- */ + + /* ---------- SLIP options ---------- */ #ifdef CONFIG_NET_LWIP_SLIP_INTERFACE #define LWIP_HAVE_SLIPIF 1 @@ -535,35 +576,58 @@ /* ---------- PPP options ---------- */ -/* Thread options */ +/* ---------- System options ---------- */ + +/* NO_SYS==1: Provides VERY minimal functionality. Otherwise, + * use lwIP facilities. + * It should be set NO_SYS for TizenRT. + */ +#define NO_SYS 0 +#define LWIP_RAND() rand() -#ifdef CONFIG_NET_LWIP_TCPIP_THREAD_NAME -#define TCPIP_THREAD_NAME CONFIG_NET_LWIP_TCPIP_THREAD_NAME +#ifdef CONFIG_NET_TCPIP_CORE_LOCKING +#define TCPIP_CORE_LOCKING CONFIG_NET_TCPIP_CORE_LOCKING #endif -#ifdef CONFIG_NET_LWIP_TCPIP_THREAD_STACKSIZE -#define TCPIP_THREAD_STACKSIZE CONFIG_NET_LWIP_TCPIP_THREAD_STACKSIZE +#ifdef CONFIG_NET_TCPIP_CORE_LOCKING_INPUT +#define TCPIP_CORE_LOCKING_INPUT CONFIG_NET_TCPIP_CORE_LOCKING_INPUT #endif -#ifdef CONFIG_NET_LWIP_TCPIP_THREAD_PRIO -#define TCPIP_THREAD_PRIO CONFIG_NET_LWIP_TCPIP_THREAD_PRIO +#ifdef CONFIG_NET_TCPIP_THREAD_NAME +#define TCPIP_THREAD_NAME CONFIG_NET_TCPIP_THREAD_NAME #endif -#ifdef CONFIG_NET_LWIP_DEFAULT_THREAD_NAME -#define DEFAULT_THREAD_NAME CONFIG_NET_LWIP_DEFAULT_THREAD_NAME +#ifdef CONFIG_NET_TCPIP_THREAD_PRIO +#define TCPIP_THREAD_PRIO CONFIG_NET_TCPIP_THREAD_PRIO #endif -#ifdef CONFIG_NET_LWIP_DEFAULT_THREAD_STACKSIZE -#define DEFAULT_THREAD_STACKSIZE CONFIG_NET_LWIP_DEFAULT_THREAD_STACKSIZE +#ifdef CONFIG_NET_TCPIP_THREAD_STACKSIZE +#define TCPIP_THREAD_STACKSIZE CONFIG_NET_TCPIP_THREAD_STACKSIZE #endif -#ifdef CONFIG_NET_LWIP_DEFAULT_THREAD_PRIO -#define DEFAULT_THREAD_PRIO CONFIG_NET_LWIP_DEFAULT_THREAD_PRIO +#ifdef CONFIG_NET_COMPAT_MUTEX +#define LWIP_COMPAT_MUTEX CONFIG_NET_COMPAT_MUTEX +#endif + +#ifdef CONFIG_NET_SYS_LIGHTWEIGHT_PROT +#define SYS_LIGHTWEIGHT_PROT CONFIG_NET_SYS_LIGHTWEIGHT_PROT +#endif + +#ifdef CONFIG_NET_DEFAULT_THREAD_NAME +#define DEFAULT_THREAD_NAME CONFIG_NET_DEFAULT_THREAD_NAME +#endif + +#ifdef CONFIG_NET_DEFAULT_THREAD_PRIO +#define DEFAULT_THREAD_PRIO CONFIG_NET_DEFAULT_THREAD_PRIO +#endif + +#ifdef CONFIG_NET_DEFAULT_THREAD_STACKSIZE +#define DEFAULT_THREAD_STACKSIZE CONFIG_NET_DEFAULT_THREAD_STACKSIZE #endif -/* Thread options */ /* ---------- Mailbox options ---------- */ + #ifdef CONFIG_NET_DEFAULT_ACCEPTMBOX_SIZE #define DEFAULT_ACCEPTMBOX_SIZE CONFIG_NET_DEFAULT_ACCEPTMBOX_SIZE #endif @@ -586,6 +650,7 @@ /* ---------- Mailbox options ---------- */ + /* ---------- Debug options ---------- */ #ifdef CONFIG_NET_LWIP_DEBUG #define LWIP_DEBUG CONFIG_LWIP_DEBUG @@ -763,7 +828,11 @@ /* ---------- Stat options ---------- */ -#define LWIP_COMPAT_MUTEX 1 -#define LWIP_NETIF_API 1 +/* ----------Else ----------------*/ +#ifdef CONFIG_NET_LWIP_LOOPBACK_INTERFACE +#define LWIP_HAVE_LOOPIF CONFIG_NET_LWIP_LOOPBACK_INTERFACE +#endif + + #endif /* __LWIP_LWIPOPTS_H__ */ diff --git a/os/net/Kconfig b/os/net/Kconfig index 85da0b6..0fa9d9b 100644 --- a/os/net/Kconfig +++ b/os/net/Kconfig @@ -106,9 +106,6 @@ config NET_ETHERNET endmenu # Data link support -config NET_IPv4 - bool - source net/netdev/Kconfig source net/route/Kconfig diff --git a/os/net/lwip/configs/Kconfig b/os/net/lwip/configs/Kconfig index 42364a2..4c8176c 100644 --- a/os/net/lwip/configs/Kconfig +++ b/os/net/lwip/configs/Kconfig @@ -6,24 +6,58 @@ menu "LwIP options" menuconfig NET_IPv4 - bool "IPv4" + bool "IPv4 support" default y ---help--- Build in support for IPv4. -if NET_IPv4 - source "net/lwip/configs/ipv4/Kconfig" -endif #NET_IPv4 - -source "net/lwip/configs/mem/Kconfig" source "net/lwip/configs/socket/Kconfig" + +menuconfig NET_ARP + bool "ARP Support" + default y + depends on NET_ETHERNET && NET_IPv4 + ---help--- + This setting is currently overridden by logic in include/nuttx/net + +source "net/lwip/configs/arp/Kconfig" + + +menuconfig NET_UDP + bool "UDP Support" + depends on NET_IPv4 + default y + ---help--- + UDP support on or off + +source "net/lwip/configs/udp/Kconfig" + + +menuconfig NET_TCP + bool "TCP Support" + depends on NET_IPv4 + default y + ---help--- + TCP support on or off + +source "net/lwip/configs/tcp/Kconfig" + + +menuconfig NET_ICMP + bool "ICMP Support" + default n + ---help--- + Enable minimal ICMP support. Includes built-in support + for sending replies to received ECHO (ping) requests. + source "net/lwip/configs/icmp/Kconfig" -source "net/lwip/configs/mbox/Kconfig" + menuconfig NET_LWIP_IGMP - bool "IGMP support" + bool "IGMP Support" + depends on NET_IPv4 default n if NET_LWIP_IGMP @@ -37,10 +71,11 @@ config NET_LWIP_MEMP_NUM_IGMP_GROUP endif #NET_LWIP_IGMP -source "net/lwip/configs/tcp/Kconfig" -source "net/lwip/configs/udp/Kconfig" -source "net/lwip/configs/arp/Kconfig" - +source "net/lwip/configs/mbox/Kconfig" +source "net/lwip/configs/mem/Kconfig" +source "net/lwip/configs/sys/Kconfig" +source "net/lwip/configs/debug/Kconfig" +source "net/lwip/configs/stats/Kconfig" config NET_LWIP_VLAN bool "Support VLAN" @@ -60,40 +95,15 @@ config NET_LWIP_VLAN_CHECK_ID default 1 depends on NET_LWIP_VLAN_CHECK -menu "Thread options" - -config NET_LWIP_TCPIP_THREAD_NAME - string "The name assigned to the main tcpip thread" - default "tcpip_thread" - -config NET_LWIP_TCPIP_THREAD_STACKSIZE - int "The stack size used by the main tcpip thread" - default 1024 - -config NET_LWIP_TCPIP_THREAD_PRIO - int "The priority assigned to the main tcpip thread" - default 100 - -config NET_LWIP_DEFAULT_THREAD_NAME - string "The name assigned to any other lwIP thread" - default "lwIP" - -config NET_LWIP_DEFAULT_THREAD_STACKSIZE - int "The stack size used by any other lwIP thread" - default 1024 - -config NET_LWIP_DEFAULT_THREAD_PRIO - int "The priority assigned to any other lwIP thread" - default 100 - -endmenu #Thread options - config NET_LWIP_LOOPBACK_INTERFACE bool "Support loopback interface" default n ---help--- Support loop interface (127.0.0.1). + +################# SLIP ####################### + menuconfig NET_LWIP_SLIP_INTERFACE bool "Support serial line IP interface" default n @@ -114,6 +124,9 @@ config NET_LWIP_SLIPIF_THREAD_PRIO endif #NET_LWIP_SLIP_INTERFACE + +################# PPP ####################### + menuconfig NET_LWIP_PPP_SUPPORT bool "Enable PPP" default n @@ -158,6 +171,9 @@ config NET_LWIP_PPP_THREAD_PRIO endif #NET_LWIP_PPP_SUPPORT + +################# SNMP ####################### + menuconfig NET_LWIP_SNMP bool "Enable SNMP" default n @@ -197,7 +213,4 @@ config NET_LWIP_SNMP_MAX_TREE_DEPTH endif #NET_LWIP_SNMP -source "net/lwip/configs/debug/Kconfig" -source "net/lwip/configs/stats/Kconfig" - endmenu #LwIP options diff --git a/os/net/lwip/configs/arp/Kconfig b/os/net/lwip/configs/arp/Kconfig index 5e19f98..c7f0625 100644 --- a/os/net/lwip/configs/arp/Kconfig +++ b/os/net/lwip/configs/arp/Kconfig @@ -3,15 +3,6 @@ # see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt # -menu "ARP Configuration" - -config NET_ARP - bool "ARP enable" - default y - depends on NET_ETHERNET && NET_IPv4 - ---help--- - This setting is currently overridden by logic in include/nuttx/net - if NET_ARP config NET_ARP_TABLESIZE @@ -49,6 +40,4 @@ config NET_ARP_STATIC_ENTRIES Enable code to support static ARP table entries (using etharp_add_static_entry/etharp_remove_static_entry). -endif # NET_ARP - -endmenu # ARP Configuration +endif #NET_ARP diff --git a/os/net/lwip/configs/icmp/Kconfig b/os/net/lwip/configs/icmp/Kconfig index 3356ab3..4c33c7e 100644 --- a/os/net/lwip/configs/icmp/Kconfig +++ b/os/net/lwip/configs/icmp/Kconfig @@ -3,16 +3,6 @@ # see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt # -if NET_IPv4 -menu "ICMP Networking Support" - -config NET_ICMP - bool "Enable ICMP networking" - default n - ---help--- - Enable minimal ICMP support. Includes built-in support - for sending replies to received ECHO (ping) requests. - if NET_ICMP config NET_ICMP_TTL @@ -34,5 +24,3 @@ config NET_MULTICAST_PING Respond to multicast pings (default is unicast only) endif # NET_ICMP -endmenu # ICMP Networking Support -endif # NET_IPv4 diff --git a/os/net/lwip/configs/ipv4/Kconfig b/os/net/lwip/configs/ipv4/Kconfig index c1dca4f..0ce22a9 100644 --- a/os/net/lwip/configs/ipv4/Kconfig +++ b/os/net/lwip/configs/ipv4/Kconfig @@ -2,8 +2,12 @@ # For a description of the syntax of this configuration file, # see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt # - if NET_IPv4 +config NET_IP_DEFAULT_TTL + int "Default value for Time-To-Live" + default 255 + ---help--- + Default value for Time-To-Live used by transport layers. config NET_IP_FORWARD bool "Support IP packet forwarding" @@ -29,6 +33,7 @@ config NET_IP_FRAG controlled via IP_REASSEMBLY. + config NET_IP_REASSEMBLY bool "IP reassembly support" default y @@ -36,6 +41,7 @@ config NET_IP_REASSEMBLY Reassemble incoming fragmented IP packets. Note that this option does not affect outgoing packet sizes, which can be controlled via IP_FRAG. + if NET_IP_REASSEMBLY config NET_IPV4_REASS_MAX_PBUFS @@ -57,10 +63,4 @@ config NET_IPV4_REASS_MAXAGE endif #NET_IP_REASSEMBLY -config NET_IP_DEFAULT_TTL - int "Default value for Time-To-Live" - default 255 - ---help--- - Default value for Time-To-Live used by transport layers. - endif #NET_IPv4 diff --git a/os/net/lwip/configs/sys/Kconfig b/os/net/lwip/configs/sys/Kconfig new file mode 100755 index 0000000..e44614a --- /dev/null +++ b/os/net/lwip/configs/sys/Kconfig @@ -0,0 +1,83 @@ +menu "LWIP Task Configurations" + +config NET_TCPIP_CORE_LOCKING + bool "Enable TCPIP Core Locking" + default n + ---help--- + Creates a global mutex that is held during TCPIP thread operations. + Can be locked by client code to perform lwIP operations without changing into TCPIP thread + using callbacks. See LOCK_TCPIP_CORE() and UNLOCK_TCPIP_CORE(). + Your system should provide mutexes supporting priority inversion to use this. + +config NET_TCPIP_CORE_LOCKING_INPUT + bool "Enable TCPIP Core Locking Input" + default n + ---help--- + When LWIP_TCPIP_CORE_LOCKING is enabled, this lets tcpip_input() grab the mutex + for input packets as well, instead of allocating a message and passing it to tcpip_thread. + + ATTENTION: this does not work when tcpip_input() is called from interrupt context! + +config NET_TCPIP_THREAD_NAME + string "LWIP Task Name" + default "LWIP_TCP/IP" + ---help--- + The name assigned to the main tcpip thread. + +config NET_TCPIP_THREAD_PRIO + int "LWIP Task Priority" + default 110 + range 0 255 + ---help--- + The priority assigned to the main tcpip thread. + The priority value itself is platform-dependent, + but is passed to sys_thread_new() when the thread is created. + +config NET_TCPIP_THREAD_STACKSIZE + int "LWIP Task Stack Size" + default 4096 + ---help--- + The stack size used by the main tcpip thread. + The stack size value itself is platform-dependent, + but is passed to sys_thread_new() when the thread is created. + +config NET_COMPAT_MUTEX + bool "Enable Compat Mutex" + default y + ---help--- + Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary semaphores should be used instead. + +config NET_SYS_LIGHTWEIGHT_PROT + bool "Enable Inter-task Protection" + default y + ---help--- + Enable inter-task protection (and task-vs-interrupt protection) for certain critical regions + during buffer allocation, deallocation and memory allocation and deallocation. + + ATTENTION: This is required when using lwIP from more than one context! + If you disable this, you must be sure what you are doing! + +config NET_DEFAULT_THREAD_NAME + string "LWIP Default Thread Name" + default "lwIP" + ---help--- + The name assigned to any other lwIP thread. + +config NET_DEFAULT_THREAD_PRIO + int "LWIP Default Thread Priority" + default 1 + range 0 255 + ---help--- + The priority assigned to any other lwIP thread. + The priority value itself is platform-dependent, + but is passed to sys_thread_new() when the thread is created. + +config NET_DEFAULT_THREAD_STACKSIZE + int "LWIP Default Thread Stack Size" + default 0 + ---help--- + The stack size used by any other lwIP thread. + The stack size value itself is platform-dependent, + but is passed to sys_thread_new() when the thread is created. + +endmenu #"LWIP Task Configurations" diff --git a/os/net/lwip/configs/tcp/Kconfig b/os/net/lwip/configs/tcp/Kconfig index 7431f2f..daca657 100644 --- a/os/net/lwip/configs/tcp/Kconfig +++ b/os/net/lwip/configs/tcp/Kconfig @@ -3,15 +3,6 @@ # see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt # -menu "TCP Networking" - -config NET_TCP - bool "Enable TCP" - depends on NET_IPv4 - default y - ---help--- - TCP support on or off - if NET_TCP config NET_TCP_TTL @@ -153,5 +144,3 @@ config NET_TCP_WND_UPDATE_THREASHOLD Difference in window to trigger an explicit window update endif #NET_TCP - -endmenu #TCP Networking diff --git a/os/net/lwip/configs/udp/Kconfig b/os/net/lwip/configs/udp/Kconfig index 7aac9dd..cc67cdf 100644 --- a/os/net/lwip/configs/udp/Kconfig +++ b/os/net/lwip/configs/udp/Kconfig @@ -1,13 +1,9 @@ -menu "UDP Networking" - -config NET_UDP - bool "Enable UDP" - depends on NET_IPv4 - default y - ---help--- - UDP support on or off - +# +# For a description of the syntax of this configuration file, +# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt +# if NET_UDP + config NET_NETBUF_RECVINFO bool "Append Destination Infomation" default n @@ -26,5 +22,4 @@ config NET_UDPLITE ---help--- Turn on UDP-Lite. (Requires LWIP_UDP) -endif #NET_UDP -endmenu #"UDP Networking" +endif -- 2.7.4