We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bda5cff commit f6fde0cCopy full SHA for f6fde0c
hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFi.cpp
@@ -370,6 +370,12 @@ IPAddress ESP8266WiFiClass::gatewayIP()
370
return IPAddress(ip.gw.addr);
371
}
372
373
+IPAddress ESP8266WiFiClass::dnsIP()
374
+{
375
+ ip_addr_t dns_ip = dns_getserver(0);
376
+ return IPAddress(dns_ip.addr);
377
+}
378
+
379
String ESP8266WiFiClass::SSID() const
380
{
381
static struct station_config conf;
hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/ESP8266WiFi.h
@@ -168,6 +168,13 @@ class ESP8266WiFiClass
168
*/
169
IPAddress gatewayIP();
170
171
+ /*
172
+ * Get the DNS ip address.
173
+ *
174
+ * return: DNS ip address value
175
+ */
176
+ IPAddress dnsIP();
177
178
/*
179
* Return the current SSID associated with the network
180
*
0 commit comments