DHCP: renewal when cable is plugged out/in
Arnout Vandecappelle
arnout at mind.be
Thu Apr 3 13:42:22 UTC 2008
Hoi,
I have an RTEMS-based system which normally is not connected to the
(Ether)network, but occasionally a user comes a long and plugs in a
cable. I need DHCP to get a new address whenever the network cable is
plugged in, even if it's previous lease hasn't expired yet. I also need
DHCP to fall back to a statically configured address if no reply comes.
My questions:
* does anyone have these features already? I expect not, so
* 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
- by sending an event to the DHCP task; or
- by configuring a hook similar to the network taps, and having the
DHCP task register a function to it; or
- by calling BSDnet's if_down() from the driver, make the DHCP task
listen on the routing input socket.
I guess the last option is the best, but it requires a bit of BSDnet
insight...
And one final question: is it OK to make changes to BSDnet itself, or
is that to be avoided because it makes tracking the real BSDnet
development more difficult?
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Mind Embedded Development (an Essensium division)
More information about the users
mailing list