mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
lwip: Added support for configurable LwIP hooks
Added lwIP hooks which could be optionally overwritten in the application code. These three options are provided in Kconfig: * NONE: No hook support * DEFAULT: Default implementation is provided. If IDF doesn't have a specific hook implementation, an empty stub is provided, which could be overwritten by strong implementation in application code. * CUSTOM: Hooks are declared only to be implemented in application code. Merges https://github.com/espressif/esp-idf/pull/6034
This commit is contained in:

committed by
bot

parent
fc08ff8162
commit
cf60ec0ffc
@@ -420,17 +420,6 @@
|
||||
*/
|
||||
#define LWIP_TCP_RTO_TIME CONFIG_LWIP_TCP_RTO_TIME
|
||||
|
||||
/**
|
||||
* Set TCP hook for Initial Sequence Number (ISN)
|
||||
*/
|
||||
#ifdef CONFIG_LWIP_TCP_ISN_HOOK
|
||||
#include <lwip/arch.h>
|
||||
struct ip_addr;
|
||||
u32_t lwip_hook_tcp_isn(const struct ip_addr *local_ip, u16_t local_port,
|
||||
const struct ip_addr *remote_ip, u16_t remote_port);
|
||||
#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn
|
||||
#endif
|
||||
|
||||
/*
|
||||
----------------------------------
|
||||
---------- Pbuf options ----------
|
||||
@@ -778,7 +767,9 @@ u32_t lwip_hook_tcp_isn(const struct ip_addr *local_ip, u16_t local_port,
|
||||
---------- Hook options ---------------
|
||||
---------------------------------------
|
||||
*/
|
||||
#define LWIP_HOOK_FILENAME "lwip_default_hooks.h"
|
||||
#define LWIP_HOOK_IP4_ROUTE_SRC ip4_route_src_hook
|
||||
|
||||
/*
|
||||
---------------------------------------
|
||||
---------- Debugging options ----------
|
||||
|
Reference in New Issue
Block a user