mirror of
https://github.com/espressif/esp-lwip.git
synced 2025-08-06 18:23:42 +08:00
dns: Add API to clear dns cache
This commit is contained in:
@ -396,6 +396,12 @@ dns_clear_servers(bool keep_fallback)
|
||||
dns_setserver(numdns, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dns_clear_cache(void)
|
||||
{
|
||||
memset(dns_table, 0, sizeof(struct dns_table_entry) * DNS_TABLE_SIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -113,6 +113,7 @@ err_t dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *add
|
||||
u8_t dns_addrtype);
|
||||
#if ESP_DNS
|
||||
void dns_clear_servers(bool keep_fallback);
|
||||
void dns_clear_cache(void);
|
||||
#endif
|
||||
|
||||
#if DNS_LOCAL_HOSTLIST
|
||||
|
Reference in New Issue
Block a user