mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
feat(lwip): Add DNS external hook in TCPIP context(v5.2)
This commit is contained in:
committed by
Wang Qixiang
parent
e186bba371
commit
88198777f8
@@ -1265,6 +1265,21 @@ menu "LWIP"
|
|||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
choice LWIP_HOOK_DNS_EXTERNAL_RESOLVE
|
||||||
|
prompt "DNS external resolve Hook"
|
||||||
|
default LWIP_HOOK_DNS_EXT_RESOLVE_NONE
|
||||||
|
help
|
||||||
|
Enables custom DNS resolve hook.
|
||||||
|
Setting this to "custom" provides hook's declaration
|
||||||
|
only and expects the application to implement it.
|
||||||
|
|
||||||
|
config LWIP_HOOK_DNS_EXT_RESOLVE_NONE
|
||||||
|
bool "No hook declared"
|
||||||
|
config LWIP_HOOK_DNS_EXT_RESOLVE_CUSTOM
|
||||||
|
bool "Custom implementation"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
choice LWIP_HOOK_IP6_INPUT
|
choice LWIP_HOOK_IP6_INPUT
|
||||||
prompt "IPv6 packet input"
|
prompt "IPv6 packet input"
|
||||||
depends on LWIP_IPV6
|
depends on LWIP_IPV6
|
||||||
|
Submodule components/lwip/lwip updated: 6bc36ec020...0606eed9d8
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "lwip/ip_addr.h"
|
#include "lwip/ip_addr.h"
|
||||||
#include "lwip/arch.h"
|
#include "lwip/arch.h"
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
#include "lwip/dns.h"
|
||||||
#include "lwip/pbuf.h"
|
#include "lwip/pbuf.h"
|
||||||
#include "netif/dhcp_state.h"
|
#include "netif/dhcp_state.h"
|
||||||
|
|
||||||
@@ -55,6 +56,14 @@ int lwip_hook_netconn_external_resolve(const char *name, ip_addr_t *addr, u8_t a
|
|||||||
#define LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE lwip_hook_netconn_external_resolve
|
#define LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE lwip_hook_netconn_external_resolve
|
||||||
#endif /* CONFIG_LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE... */
|
#endif /* CONFIG_LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE... */
|
||||||
|
|
||||||
|
#if defined(CONFIG_LWIP_HOOK_DNS_EXT_RESOLVE_CUSTOM)
|
||||||
|
int lwip_hook_dns_external_resolve(const char *name, ip_addr_t *addr, dns_found_callback found, void *callback_arg,
|
||||||
|
u8_t addrtype, err_t *err);
|
||||||
|
|
||||||
|
#define LWIP_HOOK_DNS_EXTERNAL_RESOLVE lwip_hook_dns_external_resolve
|
||||||
|
#endif /* CONFIG_LWIP_HOOK_DNS_EXT_RESOLVE_CUSTOM */
|
||||||
|
|
||||||
|
|
||||||
#if defined(CONFIG_LWIP_HOOK_IP6_INPUT_CUSTOM) || defined(CONFIG_LWIP_HOOK_IP6_INPUT_DEFAULT)
|
#if defined(CONFIG_LWIP_HOOK_IP6_INPUT_CUSTOM) || defined(CONFIG_LWIP_HOOK_IP6_INPUT_DEFAULT)
|
||||||
int lwip_hook_ip6_input(struct pbuf *p, struct netif *inp);
|
int lwip_hook_ip6_input(struct pbuf *p, struct netif *inp);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user