lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] DHCP callback was removed - Correct way to obtainnew ad


From: Noam weissman
Subject: Re: [lwip-users] DHCP callback was removed - Correct way to obtainnew address?
Date: Sat, 30 Aug 2014 01:15:53 +0300

Hi,

ST micro has an example on how to use it. Check their latest examples for 
STM32F4

Hope that helped,
Noam.


-----Original Message-----
From: address@hidden on behalf of Sergio R. Caprile
Sent: Fri 8/29/2014 9:02 PM
To: address@hidden
Subject: Re: [lwip-users] DHCP callback was removed - Correct way to obtainnew 
address?
 
When I did it, I basically polled for
    netif.dhcp->state == DHCP_BOUND
and read
        ipaddr = netif.ip_addr;
        netmask = netif.netmask;
        gw = netif.gw;

but now I realize the dhcp code calls netif_set_up() when it reaches
that state, which also calls NETIF_STATUS_CALLBACK if
LWIP_NETIF_STATUS_CALLBACK is defined.

Now, I've been calling netif_set_up() before dhcp_start() cause I though
the ifc needed to be somehow "up" before UDP/IP would be sent through
it... looks like I was wrong and that was not necessary, or worse, not
correct.


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************







************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************



<<winmail.dat>>


reply via email to

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