DHCP: renewal when cable is plugged out/in
Chris Johns
chrisj at rtems.org
Sat Apr 5 22:20:31 UTC 2008
Arnout Vandecappelle wrote:
> Actually also on my laptop it would be useful: I sometimes move to the
> meeting room, which is on a separately routed network, so my IP address
> should be updated... But that's of no concern on this forum :-)
It is not the concern of the IP stack or DHCP client rather an application
around them. For example you could script something around the existing
ifconfig and lease renew commands on a Linux box.
>
>>> * any suggestions on how to implement the network cable plug-in
>>> detection? My Ethernet driver detects cable (dis)connects, how should
>>> these be propagated to the DHCP task?
>>> - By setting the struct ifnet's if_flags and have the DHCP task poll
>>> on them; or
>> Yes this would seem to be the best path.
> Nice, that's also the easiest!
>
>
> So, you're suggestion is not to integrate this with the existing DHCP
> client?
No not really. This is not the default or expected behavior of DHCP so we
cannot change this.
This functionality is an application that polls the interface flags and
registers the change of state of the interface and then instructs the DHCP
client to request a new lease. If you can simply integrate it into the
existing DHCP task in such a way that it is disabled by default and can be
controlled by the user with a poll rate great.
If the RTEMS DHCP client does not have a way to renew a lease a patch with an
API that provides a way would be most welcome.
Well, I'm going to do that anyway. I'll send in the patch and
> you can see if it's worthwhile to merge in.
Please do not get me wrong. I think this is a useful feature for embedded
users. It just cannot become the default way the DHCP client operates.
Regards
Chris
More information about the users
mailing list