1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

add dnsIP() to ESP8266WiFi class

This commit is contained in:
Martin Ayotte 2015-10-18 14:18:14 -04:00
parent 000e762af3
commit 7f318d72cf
2 changed files with 13 additions and 0 deletions

View File

@ -370,6 +370,12 @@ IPAddress ESP8266WiFiClass::gatewayIP()
return IPAddress(ip.gw.addr);
}
IPAddress ESP8266WiFiClass::dnsIP()
{
ip_addr_t dns_ip = dns_getserver(0);
return IPAddress(dns_ip.addr);
}
String ESP8266WiFiClass::SSID() const
{
static struct station_config conf;

View File

@ -168,6 +168,13 @@ public:
*/
IPAddress gatewayIP();
/*
* Get the DNS ip address.
*
* return: DNS ip address value
*/
IPAddress dnsIP();
/*
* Return the current SSID associated with the network
*