From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27017 invoked by alias); 6 Jun 2006 11:09:44 -0000 Received: (qmail 26212 invoked by uid 22791); 6 Jun 2006 11:09:42 -0000 X-Spam-Check-By: sourceware.org Received: from Unknown (HELO netic.com) (66.28.185.252) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Jun 2006 11:09:40 +0000 Received: from piii550 (203-206-167-254.perm.iinet.net.au [203.206.167.254]) by netic.com (8.12.10/8.11.0) with ESMTP id k56B9Zp1007859; Tue, 6 Jun 2006 05:09:36 -0600 Reply-To: From: "Laurie Gellatly" To: "'Andrew Lunn'" Cc: Date: Tue, 06 Jun 2006 11:09:00 -0000 Message-ID: <007701c68959$b316fa40$0101010a@netic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <20060606105606.GB15066@lunn.ch> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: RE: [ECOS] Dynamic IP/DHCP/Routing the 'right way' X-SW-Source: 2006-06/txt/msg00045.txt.bz2 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