File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ IPAddress CWifi::localIP() { //FIXME
177
177
// return IPAddress(ni->getIpAdd());
178
178
// }
179
179
// return IPAddress((uint32_t)0);
180
+ return WiFiStation.localIP ();
180
181
}
181
182
182
183
/* -------------------------------------------------------------------------- */
@@ -186,6 +187,7 @@ IPAddress CWifi::subnetMask() { // FIXME
186
187
// return IPAddress(ni->getNmAdd());
187
188
// }
188
189
// return IPAddress((uint32_t)0);
190
+ return WiFiStation.subnetMask ();
189
191
}
190
192
191
193
/* -------------------------------------------------------------------------- */
@@ -195,6 +197,7 @@ IPAddress CWifi::gatewayIP() { // FIXME
195
197
// return IPAddress(ni->getGwAdd());
196
198
// }
197
199
// return IPAddress((uint32_t)0);
200
+ return WiFiStation.gatewayIP ();
198
201
}
199
202
200
203
/* -------------------------------------------------------------------------- */
Original file line number Diff line number Diff line change @@ -148,6 +148,13 @@ class CNetIf: public NetworkInterface {
148
148
uint32_t getNmAdd () { return ip4_addr_get_u32 (&(ni.netmask )); }
149
149
uint32_t getGwAdd () { return ip4_addr_get_u32 (&(ni.gw )); }
150
150
151
+ // FIXME when dhcp has not provided an ip address yet return IPADDR_NONE
152
+ IPAddress localIP () { return IPAddress (this ->getIpAdd ()); }
153
+ IPAddress subnetMask () { return IPAddress (this ->getNmAdd ()); }
154
+ IPAddress gatewayIP () { return IPAddress (this ->getGwAdd ()); }
155
+ IPAddress dnsServerIP () { /* FIXME understand where dns should be managed */ }
156
+
157
+ // FIXME hostname should be defined in the NetworkStack singleton
151
158
// void setHostname(const char* name)
152
159
// {
153
160
// memset(hostname, 0x00, MAX_HOSTNAME_DIM);
You can’t perform that action at this time.
0 commit comments