Skip to content

Commit 730de9e

Browse files
committed
WiFiC3- dnsIP(n) getter added
1 parent 9a838ba commit 730de9e

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
@@ -222,6 +222,11 @@ IPAddress CWifi::gatewayIP() {
222222
return IPAddress((uint32_t)0);
223223
}
224224

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

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

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

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

0 commit comments

Comments
 (0)