From adc4bbd663f89ed652493cc2f58cceb556d0a402 Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Tue, 21 Mar 2017 10:22:11 +0900 Subject: [PATCH] net: add config menus for LwIP IGMP options This patch adds for config menu for LwIP IGMP options. Change-Id: I093a13999a925914f9245b477edb79bd8f66637a Signed-off-by: EunBong Song --- build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig | 2 ++ os/include/net/lwip/lwipopts.h | 12 +++++++++++- os/net/lwip/Kconfig | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig index 8daa4ee..140d520 100755 --- a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig +++ b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig @@ -655,6 +655,8 @@ 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_LWIP_IGMP=y +CONFIG_NET_LWIP_MEMP_NUM_IGMP_GROUP=8 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 4e861b7..532987a 100644 --- a/os/include/net/lwip/lwipopts.h +++ b/os/include/net/lwip/lwipopts.h @@ -98,8 +98,18 @@ /* ---------- ICMP options ---------- */ /* ---------- IGMP options ---------- */ - +#ifdef CONFIG_NET_LWIP_IGMP #define LWIP_IGMP 1 +#else +#define LWIP_IGMP 0 +#endif + +#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 ---------- */ diff --git a/os/net/lwip/Kconfig b/os/net/lwip/Kconfig index 9c25b22..3d9ad31 100644 --- a/os/net/lwip/Kconfig +++ b/os/net/lwip/Kconfig @@ -167,4 +167,19 @@ config NET_LWIP_ICMP_MULTICAST_PING endif #NET_LWIP_ICMP + +menuconfig NET_LWIP_IGMP + bool "IGMP support" + default n + +if NET_LWIP_IGMP + +config NET_LWIP_MEMP_NUM_IGMP_GROUP + int "Maximum number of IGMP group" + default 8 + ---help--- + Number of multicast groups whose network interfaces + can be members at the same time +endif #NET_LWIP_IGMP + endmenu #LwIP options -- 2.7.4