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]

Re: Can I switch from DHCP mode to STATIC IP mode during run time to attain IP


On Fri, Oct 28, 2005 at 11:48:16AM +0530, JUFAIL KAPOOR wrote:
> 
> Hi
> Please help me to clarify my doubts.
> I had read that we can configure ecos to attain IP either by DHCP/BOOTP or
> by statically by specifying through configuration tool.
> 
> Can i change the mode from DHCP/BOOTP to Static mode uring run time.
> 
> My requirement is during runtime I want to Configure the interface to a
> static IP, but at the same time I may need to switch back to DHCP also(vise
> versa also). Does ecos supports this switching?.

Looking at the source code is the easiest way to answer this question.

Currently there is no clean way to stop the DHCP client. But it looks
very easy for you to add this functionality. You need to extend
dhcp_mgt_entry() in dhcp_support.c to allow you to break the thread
out and exit. Once the thread is dead you can then call init_net with
a bootp record you create using your static IP addresses.

        Andrew

-- 
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]