From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27954 invoked by alias); 9 May 2005 10:11:17 -0000 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 Received: (qmail 27903 invoked by uid 22791); 9 May 2005 10:11:11 -0000 Received: from [213.149.45.94] (HELO abc.xylon.local) (213.149.45.94) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 09 May 2005 10:11:11 +0000 Date: Mon, 09 May 2005 15:53:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message-ID: <9D79B9A9194389468A922F618415D0A4020435@abc.xylon.local> Content-class: urn:content-classes:message From: "Goran Pantar" To: Subject: [ECOS] Runtime network reinit X-SW-Source: 2005-05/txt/msg00124.txt.bz2 Hi, I have initialised the Network stack using fixed IP adresses. I would now like the possibility to change the IP address at runtime. Is this possible in eCos? Parts of my network intialisation procedure: .. s =3D socket(AF_INET, SOCK_DGRAM, 0); .. ioctl(s, SIOCSIFHWADDR, &ifr); close(s); .. eth0_bootp_data.bp_op =3D BOOTREPLY; eth0_bootp_data.bp_htype =3D HTYPE_ETHERNET; eth0_bootp_data.bp_hlen =3D ETHER_ADDR_LEN; for(i =3D 0; i < eth0_bootp_data.bp_hlen; i++) { eth0_bootp_data.bp_chaddr[i] =3D 0xFF; } eth0_bootp_data.bp_ciaddr.s_addr =3D *(in_addr_t *)NetHeader.addr_ip; eth0_bootp_data.bp_yiaddr.s_addr =3D *(in_addr_t *)NetHeader.addr_ip; eth0_bootp_data.bp_siaddr.s_addr =3D *(in_addr_t *)NetHeader.addr_server; eth0_bootp_data.bp_giaddr.s_addr =3D *(in_addr_t *)NetHeader.addr_gateway; .. init_net(eth0_name, ð0_bootp_data); .. The obove procedure initializes the network sucessfully and all the services are working. But when I run the same procedure (with changed IP addresses) init_net fails with a diag print: SIOCIFADDR: File exist. Thanks, Goran Pantar=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss