lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Best practice for DHCP/Static IP config


From: bob
Subject: Re: [lwip-users] Best practice for DHCP/Static IP config
Date: Tue, 22 Jan 2019 13:00:09 -0700

Thanks for your help Simon!

Bob

-----Original Message-----
Subject: Re: [lwip-users] Best practice for DHCP/Static IP config

There is 'contrib\examples\example_app\test.c', but this file is somewhat of
a bad example since it tries to include all possible code with ifdefs...

So:
netif_add() // either with satic IP address or call netif_set_addr() later
netif_set_default()
netif_set_up()
if (dhcp)
        dhcp_start();
else
        netif_set_addr(); // if not set with netif_add()

And remember that the netif has to set the link flag up
('netif_set_link_up()') for things to work.

> Thanks Simon, Sylvain,  Steve, Patrick, and others who are providing 
> such great help to this list! Most of my questions are answered by 
> just watching the emails on this list.

Good to know!

Regards,
Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]