File tree 4 files changed +25
-1
lines changed
4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ class EthernetClient : public lwipClient {
14
14
this ->bindCNetIf (Ethernet);
15
15
}
16
16
17
+ int connect (const char * host, uint16_t port) {
18
+ auto res = lwipClient::connect (host, port);
19
+
20
+ this ->bindCNetIf (Ethernet);
21
+
22
+ return res;
23
+ }
24
+
17
25
int connect (IPAddress ip, uint16_t port) {
18
26
auto res = lwipClient::connect (ip, port);
19
27
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ class WiFiClient: public lwipClient {
14
14
this ->bindCNetIf (WiFiStation);
15
15
}
16
16
17
+ int connect (const char * host, uint16_t port) {
18
+ auto res = lwipClient::connect (host, port);
19
+
20
+ this ->bindCNetIf (WiFiStation);
21
+
22
+ return res;
23
+ }
24
+
17
25
int connect (IPAddress ip, uint16_t port) {
18
26
auto res = lwipClient::connect (ip, port);
19
27
Original file line number Diff line number Diff line change @@ -459,6 +459,14 @@ bool CNetIf::dhcpRenew() {
459
459
460
460
#endif
461
461
462
+ IPAddress CNetIf::dnsServerIP () {
463
+ #if LWIP_DNS
464
+ return CLwipIf::getInstance ().getDns (0 );
465
+ #else
466
+ return INADDR_NONE;
467
+ #endif
468
+ }
469
+
462
470
/* ##########################################################################
463
471
* ETHERNET NETWORK INTERFACE CLASS
464
472
* ########################################################################## */
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ class CNetIf: public NetworkInterface {
167
167
IPAddress localIP () { return IPAddress (this ->getIpAdd ()); }
168
168
IPAddress subnetMask () { return IPAddress (this ->getNmAdd ()); }
169
169
IPAddress gatewayIP () { return IPAddress (this ->getGwAdd ()); }
170
- IPAddress dnsServerIP () { /* FIXME understand where dns should be managed */ }
170
+ IPAddress dnsServerIP ();
171
171
172
172
void config (IPAddress _ip, IPAddress _gw, IPAddress _nm);
173
173
You can’t perform that action at this time.
0 commit comments