Skip to content

add dnsIP() to ESP8266WiFi class #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ IPAddress ESP8266WiFiClass::gatewayIP()
return IPAddress(ip.gw.addr);
}

IPAddress ESP8266WiFiClass::dnsIP(int dns_no)
{
ip_addr_t dns_ip = dns_getserver(dns_no);
return IPAddress(dns_ip.addr);
}

String ESP8266WiFiClass::SSID() const
{
static struct station_config conf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ class ESP8266WiFiClass
*/
IPAddress gatewayIP();

/*
* Get the DNS ip address.
*
* return: DNS ip address value
*/
IPAddress dnsIP(int dns_no = 0);

/*
* Return the current SSID associated with the network
*
Expand Down