Merge branch 'lwip/multi_dns_ip_support' into 'master'

feat(lwip): Added multiple dns ip support

Closes IDF-8345 and IDF-9699

See merge request espressif/esp-idf!30326
This commit is contained in:
Abhik Roy
2024-05-27 23:09:18 +08:00
4 changed files with 20 additions and 6 deletions
+10 -4
View File
@@ -669,7 +669,7 @@ menu "LWIP"
LWIP_TCP_RECCVMBOX_SIZE packets for each TCP socket, so the maximum possible cached TCP packets
for all TCP sockets is LWIP_TCP_RECCVMBOX_SIZE multiples the maximum TCP socket number. In other
words, the bigger LWIP_TCP_RECVMBOX_SIZE means more memory.
On the other hand, if the receiv mail box is too small, the mail box may be full. If the
On the other hand, if the receive mail box is too small, the mail box may be full. If the
mail box is full, the LWIP drops the packets. So generally we need to make sure the TCP
receive mail box is big enough to avoid packet drop between LWIP core and application.
@@ -813,7 +813,7 @@ menu "LWIP"
UDP_RECCVMBOX_SIZE packets for each UDP socket, so the maximum possible cached UDP packets
for all UDP sockets is UDP_RECCVMBOX_SIZE multiples the maximum UDP socket number. In other
words, the bigger UDP_RECVMBOX_SIZE means more memory.
On the other hand, if the receiv mail box is too small, the mail box may be full. If the
On the other hand, if the receive mail box is too small, the mail box may be full. If the
mail box is full, the LWIP drops the packets. So generally we need to make sure the UDP
receive mail box is big enough to avoid packet drop between LWIP core and application.
@@ -1060,12 +1060,12 @@ menu "LWIP"
SNTP callback for such replies should be set accordingly (see sntp_servermode_dhcp() func.)
config LWIP_DHCP_MAX_NTP_SERVERS
int "Maximum number of NTP servers aquired via DHCP"
int "Maximum number of NTP servers acquired via DHCP"
default 1
range 1 16
depends on LWIP_DHCP_GET_NTP_SRV
help
Set maximum number of NTP servers aquired via DHCP-offer.
Set maximum number of NTP servers acquired via DHCP-offer.
Should be less or equal to "Maximum number of NTP servers", any extra servers would be just ignored.
config LWIP_SNTP_UPDATE_DELAY
@@ -1101,6 +1101,12 @@ menu "LWIP"
menu "DNS"
config LWIP_DNS_MAX_HOST_IP
int "Maximum number of IP addresses per host"
default 1
help
Maximum number of IP addresses that can be returned by DNS queries for a single host.
config LWIP_DNS_MAX_SERVERS
int "Maximum number of DNS servers"
default 3
+5 -1
View File
@@ -470,6 +470,10 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
*/
#define LWIP_DNS 1
/** The maximum number of IP addresses per host
*/
#define DNS_MAX_HOST_IP CONFIG_LWIP_DNS_MAX_HOST_IP
/** The maximum of DNS servers
*/
#define DNS_MAX_SERVERS CONFIG_LWIP_DNS_MAX_SERVERS
@@ -1103,7 +1107,7 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
/**
* PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char.
* TODO: If PPP_MAXIDLEFLAG > 0 and next package is send during PPP_MAXIDLEFLAG time,
* then 0x7E is not added at the begining of PPP package but 0x7E termination
* then 0x7E is not added at the beginning of PPP package but 0x7E termination
* is always at the end. This behaviour brokes PPP dial with GSM (PPPoS).
* The PPP package should always start and end with 0x7E.
*/