File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
libraries/ESP8266WiFi/src Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -370,6 +370,12 @@ IPAddress ESP8266WiFiClass::gatewayIP()
370
370
return IPAddress (ip.gw .addr );
371
371
}
372
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
+
373
379
String ESP8266WiFiClass::SSID () const
374
380
{
375
381
static struct station_config conf;
Original file line number Diff line number Diff line change @@ -168,6 +168,13 @@ class ESP8266WiFiClass
168
168
*/
169
169
IPAddress gatewayIP ();
170
170
171
+ /*
172
+ * Get the DNS ip address.
173
+ *
174
+ * return: DNS ip address value
175
+ */
176
+ IPAddress dnsIP (int dns_no = 0 );
177
+
171
178
/*
172
179
* Return the current SSID associated with the network
173
180
*
You can’t perform that action at this time.
0 commit comments