This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 2009-09-25, Laurie Gellatly <laurie.gellatly@netic.com> wrote:It's a little time ago now but from memory I changed the client behaviour.
With my project I found some interesting things with DHCP and network cables. If the network cable was unplugged at startup then there is no IP address. I found that I could run out of file handles
Does that happen because of something the DHCP client task is doing?
So I did change that but the solution required more. So first I had to make it return even if no address could be obtained (not doing so made the watchdog bark).
and that DHCPinit call would never return even if the cable was later inserted. I had to work around that and then regularly call init_all_network_interfaces in the main TCP listening task just after it also fed the watchdog if the IP address was 0.0.0.0.
Wouldn't fixing the DHCP client code be a better approach?
Once i'd made these changes my web server (main TCP task) then knew it could not do it's work and instead tries to obtain an address on a regular basis. The net result is that switching DHCP on or off can be achieved without a reboot.
Switching in and out of DHCP or static addressing was also coded.
Most of our products require you to reboot the device after changing the IP configuration.
...Laurie:{)-- Grant
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos- discuss
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |