From ece7cb45450b3b6f5103e201749c6207a8a66acd Mon Sep 17 00:00:00 2001 From: Jiri Schiebel Date: Mon, 15 Feb 2021 10:23:32 +0100 Subject: [PATCH] lwip: added configuration values for echo interval --- components/lwip/Kconfig | 18 ++++++++++++++++++ components/lwip/port/esp32/include/lwipopts.h | 18 +++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 39cb3e25ee..826815b82e 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -768,6 +768,24 @@ menu "LWIP" endmenu # SNTP + menu "LCP" + + config LCP_ECHOINTERVAL + int "Echo interval (s)" + range 0 1000000 + default 0 + help + Interval in seconds between keepalive LCP echo requests, 0 to disable. + + config LCP_MAXECHOFAILS + int "Maximum echo failures" + range 0 100000 + default 3 + help + Number of consecutive unanswered echo requests before failure is indicated. + + endmenu # LCP + config LWIP_ESP_LWIP_ASSERT bool "Enable LWIP ASSERT checks" default y diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index d3ceca640c..400248a38f 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -733,7 +733,23 @@ #define PPP_DEBUG LWIP_DBG_OFF #endif -#endif +#endif /* PPP SUPPORT */ + +/* + ------------------------------------ + --------- LCP Echo options --------- + ------------------------------------ +*/ +/** + * LCP_ECHOINTERVAL: Interval in seconds between keepalive LCP echo requests, 0 to disable. + */ +#define LCP_ECHOINTERVAL CONFIG_LCP_ECHOINTERVAL + +/** + * LCP_MAXECHOFAILS: Number of consecutive unanswered echo requests before failure is indicated. + */ +#define LCP_MAXECHOFAILS CONFIG_LCP_MAXECHOFAILS + /* --------------------------------------