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