[ECOS] Dynamic IP/DHCP/Routing the 'right way'
Laurie Gellatly
laurie.gellatly@netic.com
Tue Jun 6 11:09:00 GMT 2006
Hi Andrew,
Thanks for the swift response.
SNTP - yes. Thanks for the tips there and with DNS, I'll look at those.
init_net() was not sufficient. It left the old addresses active. I've
combined StackInit and IP_SetIP, IP_SetMask to remove the old address
and mask. Still think the routing is not being updated, but before I
launched into debugging all that I wanted to ensure I wasn't
re-inventing the wheel.
Thanks ...Laurie:{)
-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: Tuesday, 6 June 2006 8:56 PM
To: Laurie Gellatly
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Dynamic IP/DHCP/Routing the 'right way'
On Tue, Jun 06, 2006 at 08:36:52PM +1000, Laurie Gellatly wrote:
> Hi All,
> I'll be working with the PHYTEC2294 board in preparation to using the
> Philips LPC2210 and LPC2102 in production.
>
> My project will allow the user to change the various IP settings
> (Address/Mask/gateway/DHCP) while the system is running. I.E. address
> and mask are updated (old addresses are deleted). Gateway changes
> cause the default route to be updated. DHCP can be turned off/on.
>
> I've found some older posts about this and tried them. Maybe I missed
> something but so far I've not found a single solution that covers all
> my needs. Is there such a solution or is there a 'right way' to
> achieve this?
You might need to write your own dhcp management thread which calls the
dhcp state machine as needed, or calls the init_net() function with your
static addressing information.
> After these I'll need to do the same for NTP and DNS.
By NTP you mean SNTP? You should be able to call
cyg_sntp_set_servers() at anytime to tell it about a change of unicast
SNTP server.
With DNS similarly cyg_dns_res_start() can be called at any time to
indicate a new server.
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
More information about the Ecos-discuss
mailing list