From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27908 invoked by alias); 27 Jan 2003 07:49:09 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 27901 invoked from network); 27 Jan 2003 07:49:08 -0000 Received: from unknown (HELO iv.ro) (194.105.28.94) by 172.16.49.205 with SMTP; 27 Jan 2003 07:49:08 -0000 Received: (qmail 26736 invoked from network); 26 Jan 2003 12:31:08 -0000 Received: from unknown (HELO cow) (192.168.1.4) by 192.168.1.1 with SMTP; 26 Jan 2003 12:31:08 -0000 Date: Mon, 27 Jan 2003 13:56:00 -0000 From: Jani Monoses To: ecos-discuss@sources.redhat.com Message-Id: <20030127095032.312f04c0.jani@iv.ro> In-Reply-To: <200301242138.16890.bbbalb@essex.ac.uk> References: <200301242138.16890.bbbalb@essex.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [ECOS] How to run lwip on 2 network interfaces? X-SW-Source: 2003-01/txt/msg00353.txt.bz2 Hi the lwip_init() helper adds the default network interface by doing something like IP_ADDR(&gw, 192,168,0,3); IP_ADDR(&netmask, CYGPKG_LWIP_NETMASK); IP_ADDR(&ipaddr, 192,168,0,4); temp = netif_add(&ipaddr, &netmask, &gw, slipif_init, tcpip_input); however if you want to have multiple interfaces you'll need to call netif_add multiple times look at how lwip_init in src/ecos/init.c does it.And since the .cdl only assumes one interface you'll probably have to tweak that too for the second IP address or harcode it in the source. For slip you have to enable the serial driver in ecos select the same comm parameters as the host side (baudrate parity etc). and call netif_add like above passing slipif_init. For ethernet you'll use ecosif_init instead.slipif init will use "/dev/ser0" by default you need to change that depending on the serial port you're using. I have never used lwip with 2 interfaces so maybe you'll have some things to sort out. Feel free to ask if anything unusual happens :) Jani. -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss