From 053a0f5a113a8ad7dfafdcf01a9e09cfc70db6e7 Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Tue, 21 Mar 2017 10:13:32 +0900 Subject: [PATCH] net: add config menus for LwIP ICMP options This patch adds for config menu for LwIP ICMP options. Change-Id: Ie98478bc38a014f94c3b25d2a30a15a34b9ca11d Signed-off-by: EunBong Song --- build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig | 3 +++ os/include/net/lwip/lwipopts.h | 18 ++++++++++++++++++ os/net/lwip/Kconfig | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+) diff --git a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig index ae5dae6..8daa4ee 100755 --- a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig +++ b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig @@ -652,6 +652,9 @@ CONFIG_NET_LWIP_RAW=y CONFIG_NET_LWIP_SOCKET_RECVTIMEOUT=y # CONFIG_NET_LWIP_SOCKET_RCVBUF is not set CONFIG_NET_LWIP_SOCKET_REUSE=y +CONFIG_NET_LWIP_ICMP=y +# CONFIG_NET_LWIP_ICMP_BROADCAST_PING is not set +# CONFIG_NET_LWIP_ICMP_MULTICAST_PING is not set CONFIG_NET_SECURITY_TLS=y # CONFIG_TLS_WITH_SSS is not set CONFIG_NET_NOINTS=y diff --git a/os/include/net/lwip/lwipopts.h b/os/include/net/lwip/lwipopts.h index becee84..4e861b7 100644 --- a/os/include/net/lwip/lwipopts.h +++ b/os/include/net/lwip/lwipopts.h @@ -76,8 +76,26 @@ #define IP_REASS_MAXAGE 5 #define IP_REASS_MAX_PBUFS 20 + /* ---------- ICMP options ---------- */ +#ifdef CONFIG_NET_LWIP_ICMP #define LWIP_ICMP 1 +#else +#define LWIP_ICMP 0 +#endif + +#ifdef CONFIG_NET_LWIP_ICMP_BROADCAST_PING +#define LWIP_BROADCAST_PING 1 +#else +#define LWIP_BROADCAST_PING 0 +#endif + +#ifdef CONFIG_NET_LWIP_ICMP_MULTICAST_PING +#define LWIP_MULTICAST_PING 1 +#else +#define LWIP_MULTICAST_PING 0 +#endif +/* ---------- ICMP options ---------- */ /* ---------- IGMP options ---------- */ diff --git a/os/net/lwip/Kconfig b/os/net/lwip/Kconfig index 6a044f3..9c25b22 100644 --- a/os/net/lwip/Kconfig +++ b/os/net/lwip/Kconfig @@ -147,4 +147,24 @@ config NET_LWIP_SOCKET_REUSE endif #NET_LWIP_SOCKET +menuconfig NET_LWIP_ICMP + bool "ICMP support" + default y + +if NET_LWIP_ICMP + +config NET_LWIP_ICMP_BROADCAST_PING + bool "Enable respond to broadcast pings" + default n + ---help--- + respond to broadcast pings (default is unicast only) + +config NET_LWIP_ICMP_MULTICAST_PING + bool "Enable respond to multicast pings" + default n + ---help--- + respond to multicast pings (default is unicast only) + +endif #NET_LWIP_ICMP + endmenu #LwIP options -- 2.7.4