[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] DHCP callback was removed - Correct way to obtain new a
From: |
Sergio R. Caprile |
Subject: |
Re: [lwip-users] DHCP callback was removed - Correct way to obtain new address? |
Date: |
Fri, 29 Aug 2014 15:02:47 -0300 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
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.
- Re: [lwip-users] DHCP callback was removed - Correct way to obtain new address?,
Sergio R. Caprile <=