> Fabian Koch <address@hidden> writes:
> > My idea after looking at the code was to make a #define option
> opts.h (as always) and then decide in
> > dhcp_discover() to take the current IP of the netif and using
> > 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?