mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-16 00:43:00 +03:00
IPAddress updates (#5409)
* restore definition of ip_addr (=ipv4_addr) when IPv6 is not enabled * overload IPAddress:operator == and != to avoid ambiguousness * brings lwIP's INADDR_NONE (which is IPv4 255.255.255.255, suposed to be invalid address but it is) * inet_aton is a lwIP define, rename Ethernet DNS implementation of this to prevent name collision that's because IPAddress now includes lwip/inet.h
This commit is contained in:
@ -55,7 +55,7 @@ void DNSClient::begin(const IPAddress& aDNSServer)
|
||||
}
|
||||
|
||||
|
||||
int DNSClient::inet_aton(const char* aIPAddrString, IPAddress& aResult)
|
||||
int DNSClient::inet_aton_ethlib(const char* aIPAddrString, IPAddress& aResult)
|
||||
{
|
||||
// See if we've been given a valid IP address
|
||||
const char* p =aIPAddrString;
|
||||
@ -120,7 +120,7 @@ int DNSClient::getHostByName(const char* aHostname, IPAddress& aResult)
|
||||
int ret =0;
|
||||
|
||||
// See if it's a numeric IP address
|
||||
if (inet_aton(aHostname, aResult))
|
||||
if (inet_aton_ethlib(aHostname, aResult))
|
||||
{
|
||||
// It is, our work here is done
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user