lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] DHCP - getting address works but not responding


From: Pettinato, Jim
Subject: RE: [lwip-users] DHCP - getting address works but not responding
Date: Mon, 14 May 2007 15:13:59 -0400

Okay, now I'm confused also... I took a look through the DHCP code and
it appears that all it does is set up the dhcp member sub-structure in
the netif... so what is supposed to update the netif's actual address
and gateway variables??? And where should it be done if it isn't already
handled somewhere?? I would have expected (since we're passing the netif
to the DHCP code) that once the negotiation was successful that the
offered address would be set in the netif... but I can't find that
happening anywhere?? Obviously I'm missing something...


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Pettinato, Jim
Sent: Monday, May 14, 2007 1:37 PM
To: Mailing list for lwIP users
Subject: RE: [lwip-users] DHCP - getting address works but not
responding



First of all, apologies for not changing the subject line on my previous
message which is unrelated to this thread (but I was being lazy and just
replied to populate the 'To' address).


To take a stab at your problem... I assume you've already added your
interfaces to the stack's list prior to DHCP negotiation? And if you're
using DHCP, you are allowing the DHCP code to set the interface 'up' (so
you shouldn't be doing it explicitly?)

I'm assuming you are using lwIP 1.2.0...


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Spies, Dominik
Sent: Monday, May 14, 2007 11:02 AM
To: address@hidden
Subject: [lwip-users] DHCP - getting address works but not responding


Hi!

I use a LPC2368 with FreeRTOS. I set up lwIP this way:

stats_init();
sys_init();
mem_init();
memp_init();
pbuf_init();
etharp_init();
ip_init();
udp_init();
tcp_init(); 
IP4_ADDR(&my_ipaddr_data,  0, 0, 0, 0); IP4_ADDR(&my_netmask_data, 0, 0,
0, 0); IP4_ADDR(&my_gw_data, 0, 0, 0, 0); 
netif_eth0->flags &= NETIF_FLAG_DHCP;
netif_add(netif_eth0, &my_ipaddr_data, &my_netmask_data, &my_gw_data,
NULL, ethernetif_init, ip_input); netif_set_default(netif_eth0);
dhcp_start(netif_eth0);

After that the task goes in a loop which calls the 2 dhcp functions all
500ms and all 60s (and some other stuff to, webserver and so on..)

So with some debug output and packet-sniffing i found out the retrieving
works, and dhcp_bind works and after dhcp_bind netif->ip_addr is set
correctly, but the device does not more answer on pings, nor it answers
on arp-requests.

When I set the address manually this all works. Where's my mistake?

Kind Ragards,

Dominik


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


_______________________________________________
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]