lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] DNS lookup table or dynamic local hostlist?


From: Roman Lwip
Subject: [lwip-users] DNS lookup table or dynamic local hostlist?
Date: Sat, 16 Feb 2019 20:58:43 +0100

Hi,

I am using lwip as part of the espressif/arduino-esp32 library and there is something I don't understand.

My question is about DNS implementation of lwip:
https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/lwip/lwip/dns.h

If I understand correctly there is a lookup table, which contains the host names, which have been queried before and their ip adress. Can I add a host to that lookup table during runtime?

So what I want is this: The ESP32 wakes up and only does the DNS query (dns_gethostbyname), if the IP address of an MQTT server has changed, because an IP change of that server is not likely to happen often. So I would save the IP address over deep sleep and use it again, when the ESP wakes up. Do I need a dynamic host list for that (the DNS_LOCAL_HOSTLIST macro is undefined now)? Or can I edit the lookup table directly?

Best,

Roman






reply via email to

[Prev in Thread] Current Thread [Next in Thread]