Skip to content

Commit 4cb8171

Browse files
dealing with retrocompatibility
1 parent 2c10e0e commit 4cb8171

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

libraries/lwIpWrapper/src/CNetIf.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ CEth::CEth(NetworkDriver *driver)
428428
// driver.stats = &this->stats;
429429
}
430430

431-
int CEth::begin(const IPAddress &ip, const IPAddress &nm, const IPAddress &gw) {
431+
int CEth::begin(const IPAddress &ip, const IPAddress &nm, const IPAddress &gw, const IPAddress &dns) {
432432
// The driver needs a callback to consume the incoming buffer
433433
this->driver->setConsumeCallback(
434434
std::bind(&CEth::consume_callback,
@@ -438,10 +438,11 @@ int CEth::begin(const IPAddress &ip, const IPAddress &nm, const IPAddress &gw) {
438438
CNetIf::begin(ip, nm, gw);
439439
netif_set_link_up(&this->ni); // TODO test that moving this here still makes ethernet work
440440

441+
// TODO set dns server
442+
441443
return 0;
442444
}
443445

444-
445446
err_t CEth::init(struct netif* ni) {
446447
// Setting up netif
447448
#if LWIP_NETIF_HOSTNAME

libraries/lwIpWrapper/src/CNetIf.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,22 @@ class CEth : public CNetIf {
202202
virtual int begin(
203203
const IPAddress &ip = INADDR_NONE,
204204
const IPAddress &nm = INADDR_NONE,
205-
const IPAddress &gw = INADDR_NONE) override;
205+
const IPAddress &gw = INADDR_NONE,
206+
const IPAddress &dns = INADDR_NONE);
207+
208+
// virtual int begin(
209+
// const IPAddress &ip = INADDR_NONE,
210+
// const IPAddress &nm = INADDR_NONE,
211+
// const IPAddress &gw = INADDR_NONE,
212+
// const IPAddress &dns = INADDR_NONE);
206213

207214
virtual int getMacAddress(uint8_t* mac) override {
208215
UNUSED(mac); // FIXME not implemented
209216
return 1;
210217
}
218+
219+
int maintain() {} // Deprecated method for retrocompatibility
220+
void schedule(void) {} // Deprecated method for retrocompatibility
211221
protected:
212222
/*
213223
* this function is used to initialize the netif structure of lwip

0 commit comments

Comments
 (0)