BOOTP/DHCP client panics
arnout at mind.be
Fri Apr 18 03:43:12 CDT 2008
Still struggling to get DHCP to re-acquire an address when migrating to
In my network driver, I've implemented the IFF_RUNNING flags the way I
think it is supposed to be: the IFF_RUNNING flag is only on when the
Ethernet interface is able to send and receive packets, i.e. the chip
has booted and the cable is plugged in. I've implemented the booting of
the Ethernet chip asynchronously, i.e. rtems_bsdnet_initialize_network
() returns before the Ethernet chip is ready, because this takes up to 2
seconds and that's too long for the rest of the application to wait.
However, bootpc_call() does a sosend() on the interface immediately.
This is fine, except that sosend() returns ENETDOWN because the
interface isn't running. bootpc_call() therefore gives up.
dhcp_init(), when it detects the failed bootpc_call(), issues a panic!
Clearly, this behaviour is undesirable. My question is, what should I
* Make my driver set the IFF_RUNNING flag even if it isn't running?
* Change bootpc_call() so it doesn't give up on sosend() error, but just
tries again (like it does when it doesn't receive a reply)?
* Change dhcp_init() so it doesn't panic when bootpc_call() returns an
My personal preference is a combination of the last two, but I'd like
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Mind Embedded Development (an Essensium division)
More information about the rtems-users