lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] get dynamic ip on lwip-1.4.0.rc1


From: PHAM ANH THIEN
Subject: Re: [lwip-users] get dynamic ip on lwip-1.4.0.rc1
Date: Wed, 27 Oct 2010 08:56:40 +0700

i also got tcpip_thread running before i call these one, but as i told

dhcp_start --> dhcp_discover --> udp_sendto_if and low_level_input only receive one input packet (this packet not enough information to get ip address) then do dhcp_delete_msg, so it finish dhcp_discover then finish dhcp_start but do not get DHCP_ACK status.

So i think it need a dhcp timer is installed during dhcp start so that when timeout happen but till not get DHCP_ACK status it will call dhcp_discover again.

please correct me if i think wrong!
thanks,
Thien

On Tue, Oct 26, 2010 at 11:51 PM, address@hidden <address@hidden> wrote:
PHAM ANH THIEN wrote:
so you mean:

 netif_set_default(netif_add(&netif, &ipaddr, &netmask, &gw, NULL,pcapif_init, tcpip_input));
 dhcp_set_struct(&netif, &netif_dhcp);
 dhcp_start(&netif);

is enough?
You can even leave away dhcp_set_struct(): it's only a helper to prevent dhcp_start() calling mem_malloc() to allocate its struct. If you make sure the tcpip_thread is started after these calls (or you do these calls from the 'initialized' callback), it should run fine.

Simon


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


reply via email to

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