From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8584 invoked by alias); 6 Jun 2006 10:56:48 -0000 Received: (qmail 7963 invoked by uid 22791); 6 Jun 2006 10:56:46 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Jun 2006 10:56:21 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1FnZEE-0006xt-00; Tue, 06 Jun 2006 12:56:06 +0200 Date: Tue, 06 Jun 2006 10:56:00 -0000 To: Laurie Gellatly Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20060606105606.GB15066@lunn.ch> Mail-Followup-To: Laurie Gellatly , ecos-discuss@ecos.sourceware.org References: <671c20540606051007m7769418ek587cce4ce4c2f7e@mail.gmail.com> <007601c68955$2422be40$0101010a@netic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <007601c68955$2422be40$0101010a@netic.com> User-Agent: Mutt/1.5.11+cvs20060403 From: Andrew Lunn 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/msg00044.txt.bz2 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