We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2aa4bba + d762543 commit 92571aaCopy full SHA for 92571aa
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(int dns_no)
374
+{
375
+ ip_addr_t dns_ip = dns_getserver(dns_no);
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(int dns_no = 0);
177
178
/*
179
* Return the current SSID associated with the network
180
*
0 commit comments