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: address@hidden
Subject: Re: [lwip-users] get dynamic ip on lwip-1.4.0.rc1
Date: Tue, 26 Oct 2010 18:51:08 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5

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



reply via email to

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