From 5bdc5720769a7a6602933c28ec407a83b3caeb35 Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Tue, 21 Mar 2017 12:41:33 +0900 Subject: [PATCH] net: add config menus for LwIP PPP options This patch adds for config menu for LwIP PPP options. Change-Id: I7f5c9072d0f43b0c839f7432c62a478f9e8ff6a6 Signed-off-by: EunBong Song --- .../configs/sidk_s5jt200/sidk_tash_wlan/defconfig | 2 + os/include/net/lwip/lwipopts.h | 74 ++++++++++++++++++++++ os/net/lwip/Kconfig | 63 ++++++++++++++++++ 3 files changed, 139 insertions(+) diff --git a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig index d6e509d..8bbe251 100755 --- a/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig +++ b/build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig @@ -699,6 +699,8 @@ 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_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 1139f61..ab2d69b 100644 --- a/os/include/net/lwip/lwipopts.h +++ b/os/include/net/lwip/lwipopts.h @@ -433,6 +433,80 @@ #define LWIP_HAVE_LOOPIF 0 #endif +/* ---------- SLIP options ---------- */ +#ifdef CONFIG_NET_LWIP_SLIP_INTERFACE +#define LWIP_HAVE_SLIPIF 1 + +#ifdef CONFIG_NET_LWIP_SLIPIF_THREAD_NAME +#define SLIPIF_THREAD_NAME CONFIG_NET_LWIP_SLIPIF_THREAD_NAME +#endif + +#ifdef CONFIG_NET_LWIP_SLIPIF_THREAD_STACKSIZE +#define SLIPIF_THREAD_STACKSIZE CONFIG_NET_LWIP_SLIPIF_THREAD_STACKSIZE +#endif + +#ifdef CONFIG_NET_LWIP_SLIPIF_THREAD_PRIO +#define SLIPIF_THREAD_PRIO CONFIG_NET_LWIP_SLIPIF_THREAD_PRIO +#endif + +#else +#define LWIP_HAVE_SLIPIF 0 +#endif +/* ---------- SLIP options ---------- */ + +/* ---------- PPP options ---------- */ +#ifdef CONFIG_NET_LWIP_PPP_SUPPORT +#define PPP_SUPPORT 1 + +#ifdef CONFIG_NET_LWIP_PPP_SESSIONS +#define NUM_PPP CONFIG_NET_LWIP_PPP_SESSIONS +#endif + +#ifdef CONFIG_NET_LWIP_PAP_SUPPORT +#define PAP_SUPPORT 1 +#else +#define PAP_SUPPORT 0 +#endif + +#ifdef CONFIG_NET_LWIP_CHAP_SUPPORT +#define CHAP_SUPPORT 1 +#else +#define CHAP_SUPPORT 0 +#endif + +#ifdef CONFIG_NET_LWIP_VJ_SUPPORT +#define VJ_SUPPORT 1 +#else +#define VJ_SUPPORT 0 +#endif + +#ifdef CONFIG_NET_LWIP_MD5_SUPPORT +#define MD5_SUPPORT 1 +#else +#define MD5_SUPPORT 0 +#endif + +#ifdef CONFIG_NET_LWIP_MD5_SUPPORT +#define PPP_MTU CONFIG_NET_LWIP_MD5_SUPPORT +#endif + +#ifdef CONFIG_NET_LWIP_PPP_THREAD_NAME +#define PPP_THREAD_NAME CONFIG_NET_LWIP_PPP_THREAD_NAME +#endif + +#ifdef CONFIG_NET_LWIP_PPP_THREAD_STACKSIZE +#define PPP_THREAD_STACKSIZE CONFIG_NET_LWIP_PPP_THREAD_STACKSIZE +#endif + +#ifdef CONFIG_NET_LWIP_PPP_THREAD_PRIO +#define PPP_THREAD_PRIO CONFIG_NET_LWIP_PPP_THREAD_PRIO +#endif + +#else +#define PPP_SUPPORT 0 +#endif +/* ---------- PPP options ---------- */ + /* ----------------------------------- diff --git a/os/net/lwip/Kconfig b/os/net/lwip/Kconfig index 18b5398..7fe81fe 100644 --- a/os/net/lwip/Kconfig +++ b/os/net/lwip/Kconfig @@ -426,4 +426,67 @@ config NET_LWIP_LOOPBACK_INTERFACE ---help--- Support loop interface (127.0.0.1). +menuconfig NET_LWIP_SLIP_INTERFACE + bool "Support serial line IP interface" + default n + +if NET_LWIP_SLIP_INTERFACE + +config NET_LWIP_SLIPIF_THREAD_NAME + string "The name assigned to the slipif_loop thread" + default "slipif_loop" + +config NET_LWIP_SLIPIF_THREAD_STACKSIZE + int "The stack size used by the slipif_loop thread" + default 1024 + +config NET_LWIP_SLIPIF_THREAD_PRIO + int "The priority assigned to the slipif_loop thread" + default 100 + +endif #NET_LWIP_SLIP_INTERFACE + +menuconfig NET_LWIP_PPP_SUPPORT + bool "Enable PPP" + default n + +if NET_LWIP_PPP_SUPPORT + +config NET_LWIP_PPP_SESSIONS + int "Max PPP sessions" + default 1 + +config NET_LWIP_PAP_SUPPORT + bool "Support PAP" + default n + +config NET_LWIP_CHAP_SUPPORT + bool "Support CHAP" + default n + +config NET_LWIP_VJ_SUPPORT + bool "Support VJ header compression" + default n + +config NET_LWIP_MD5_SUPPORT + bool "Support MD5" + default n + +config NET_LWIP_PPP_MTU + int "PPP MTU size in bytes" + default 1500 + +config NET_LWIP_PPP_THREAD_NAME + string "The name assigned to the pppInputThread" + default "pppInputThread" + +config NET_LWIP_PPP_THREAD_STACKSIZE + int "The stack size used by the pppInputThread" + default 1024 + +config NET_LWIP_PPP_THREAD_PRIO + int "The priority assigned to the pppInputThread" + default 100 + +endif #NET_LWIP_PPP_SUPPORT endmenu #LwIP options -- 2.7.4