lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] DHCP client release 22-1-2002


From: Horst Garnetzke
Subject: [lwip-users] Re: [lwip] DHCP client release 22-1-2002
Date: Thu, 09 Jan 2003 00:15:40 -0000

Hi Leon,

thanks for the pre-release of your dhcp client. I adapted it to my
lwip port (embedded 68302 target) and it works fine! The first tests
against linux-2.4.4 are ok.

As Adam I think it would be great to remove your special 32-bit timers
from sys_arch.c (it takes me some time because our kernel uses
16-bit timer only)!

If you could use Adam's 16-bit msec timer there is no need for special
porting dhcp timer. An it should give no problems with single and multi
threaded lwip.

Perhaps you can expand your "struct dhcp_state" by a timer-recall to
generate delays greater than 16-bit.

Additional:
For going working I had to add two statements (you saved the offered ip
address to "state->offered_ip_addr" only and not back to
"netif->ip_addr").

In static void dhcp_handle_offer(struct dhcp_state *state):
         ip_addr_set(&state->offered_ip_addr, (struct ip_addr 
*)&state->msg_in->yiaddr);
         DEBUGF(DHCP_DEBUG, (" offer for 0x%08lx\r\n", 
state->offered_ip_addr.addr));
         ip_addr_set(&state->netif->ip_addr, &state->offered_ip_addr); 
/*+hg*/

And in static void dhcp_handle_ack(struct dhcp_state *state)
   ip_addr_set(&state->offered_ip_addr, &state->msg_in->yiaddr);
   ip_addr_set(&state->netif->ip_addr, &state->offered_ip_addr); /*+hg*/

I'm not sure - is this correct? Is this all?

Thanks for DHCP!

/Horst

-- 
Horst Garnetzke                      address@hidden
PULSAR GmbH,  Sorbenstrasse 45,   D-20537 Hamburg
++49 40 251546-11 (-17 FAX)  http://www.pulsar.de

[This message was sent through the lwip discussion list.]




reply via email to

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