From 09294dada444193fa67e4f916776181122d13750 Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Tue, 21 Mar 2017 12:47:24 +0900 Subject: [PATCH] net: add config menus for LwIP SNMP options This patch adds for config menu for LwIP SNMP options. Change-Id: Ib0758518d95ce5cb6f760e327f28df37e71ba3ec Signed-off-by: EunBong Song --- .../configs/sidk_s5jt200/sidk_tash_wlan/defconfig | 1 + os/include/net/lwip/lwipopts.h | 25 ++++++++++++++ os/net/lwip/Kconfig | 39 ++++++++++++++++++++++ 3 files changed, 65 insertions(+) diff --git a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig index 8bbe251..6ce9ae7 100755 --- a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig +++ b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig @@ -701,6 +701,7 @@ 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_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 ab2d69b..908a551 100644 --- a/os/include/net/lwip/lwipopts.h +++ b/os/include/net/lwip/lwipopts.h @@ -269,6 +269,31 @@ /* ---------- UDP options ---------- */ +/* ---------- SNMP options ---------- */ +#ifdef CONFIG_NET_LWIP_SNMP +#define LWIP_SNMP 1 +#else +#define LWIP_SNMP 0 +#endif + +#ifdef CONFIG_NET_LWIP_SNMP_CONCURRENT_REQUESTS +#define SNMP_CONCURRENT_REQUESTS CONFIG_NET_LWIP_SNMP_CONCURRENT_REQUESTS +#endif + +#ifdef CONFIG_NET_LWIP_SNMP_TRAP_DESTINATIONS +#define SNMP_TRAP_DESTINATIONS CONFIG_NET_LWIP_SNMP_TRAP_DESTINATIONS +#endif + +#ifdef CONFIG_NET_LWIP_SNMP_PRIVATE_MIB +#define SNMP_PRIVATE_MIB 1 +#else +#define SNMP_PRIVATE_MIB 0 +#endif + +#ifdef CONFIG_NET_LWIP_SNMP_MAX_TREE_DEPTH +#define SNMP_MAX_TREE_DEPTH CONFIG_NET_LWIP_SNMP_MAX_TREE_DEPTH +#endif +/* ---------- SNMP options ---------- */ /* ---------------------------------------------- diff --git a/os/net/lwip/Kconfig b/os/net/lwip/Kconfig index 7fe81fe..ad967bd 100644 --- a/os/net/lwip/Kconfig +++ b/os/net/lwip/Kconfig @@ -489,4 +489,43 @@ config NET_LWIP_PPP_THREAD_PRIO default 100 endif #NET_LWIP_PPP_SUPPORT + +menuconfig NET_LWIP_SNMP + bool "Enable SNMP" + default n + depends on NET_LWIP_UDP + +if NET_LWIP_SNMP + +config NET_LWIP_SNMP_CONCURRENT_REQUESTS + int "Number of concurrent requests" + default 1 + ---help--- + Number of concurrent requests the module will allow. + At least one request buffer is required. + Does not have to be changed unless external MIBs answer + request asynchronously + +config NET_LWIP_SNMP_TRAP_DESTINATIONS + int "Number of trap destinations" + default 1 + ---help--- + Number of trap destinations. At least one trap destination + is required + +config NET_LWIP_SNMP_PRIVATE_MIB + bool "Supports Private MIB" + default n + ---help--- + When using a private MIB, you have to create a file 'private_mib.h' + that contains a 'struct mib_array_node mib_private' which contains your MIB. + +config NET_LWIP_SNMP_MAX_TREE_DEPTH + int "The maximum depth of the SNMP tree" + default 15 + ---help--- + The maximum depth of the SNMP tree. With private MIBs enabled, + this depends on your MIB! This affects the size of MEMP_SNMP_VALUE elements. + +endif #NET_LWIP_SNMP endmenu #LwIP options -- 2.7.4