lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Re: DHCP option "Requested IP"


From: Fabian Koch
Subject: Re: [lwip-devel] Re: DHCP option "Requested IP"
Date: Mon, 21 Sep 2009 17:30:45 +0200


address@hidden wrote on 21.09.2009 17:04:19:

> Fabian Koch <address@hidden> writes:
>
> > My idea after looking at the code was to make a #define option in
> opts.h (as always) and then decide in
> > dhcp_discover() to take the current IP of the netif and using that as
> > the DHCP option code 50 "request IP addr"
>
> How does this compare to using the existing REBOOT procedure?
>
> Are you trying to reuse a DCHP lease after reboot? If so, you should
> probably force the netif to a DHCP_BOUND state with the stored lease
> parameters, and call dhcp_reboot().

No I explicitly want to use the DHCP Option Code 50, which suggests an IP to the DHCP server while doing DISCOVER and REQUEST.
This is explained in RFC 2132. I'm just looking for a smooth way to integrate this into LwIP without changing too much code and especially any APIs.
So I figured it would be nice to get your netif set up and give it the desired IP and send it to dhcp_start(), which calls dhcp_discover() and then the set IP is used for the DISCOVER and REQUEST packets inside the options field.

So if the Server agrees with your desired IP and it's free, he will OFFER it and ACK it.

Doesn't have to do anything with a reboot or lease.

My question was: is the LwIP crew okay with that approach?

regards,
Fabian

reply via email to

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