Skip to content

Commit b99dca4

Browse files
authored
Merge pull request #176 from JAndrassy/wific3_wifi_dnsip
WiFiC3 - dnsIP(n) getter added
2 parents c0f158f + 730de9e commit b99dca4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: libraries/WiFi/src/WiFi.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ IPAddress CWifi::gatewayIP() {
223223
return IPAddress((uint32_t)0);
224224
}
225225

226+
/* -------------------------------------------------------------------------- */
227+
IPAddress CWifi::dnsIP(int n) {
228+
return CLwipIf::getInstance().getDns(n);
229+
}
230+
226231
/* -------------------------------------------------------------------------- */
227232
const char* CWifi::SSID(uint8_t networkItem) {
228233
return CLwipIf::getInstance().getSSID(networkItem);

Diff for: libraries/WiFi/src/WiFiC3.h

+7
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ class CWifi {
137137
*/
138138
IPAddress gatewayIP();
139139

140+
/*
141+
* Get the DNS server IP address.
142+
*
143+
* return: DNS server IP address value
144+
*/
145+
IPAddress dnsIP(int n = 0);
146+
140147
/*
141148
* Return the current SSID associated with the network
142149
*

0 commit comments

Comments
 (0)