From owner-freebsd-hackers Wed Apr 18 18:31:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from relay2.net.com (relay2.net.com [134.56.3.108]) by hub.freebsd.org (Postfix) with ESMTP id 070EA37B424 for ; Wed, 18 Apr 2001 18:31:33 -0700 (PDT) (envelope-from shankar_agarwal@net.com) Received: from unet.net.com (fremont-ns2.net.com [134.56.112.30]) by relay2.net.com (8.11.3/8.9.3) with ESMTP id f3J1VA616484 for ; Wed, 18 Apr 2001 18:31:10 -0700 (PDT) Received: from west-mail.net.com by unet.net.com (8.9.3/SMI-SVR4) id SAA18246; Wed, 18 Apr 2001 18:31:10 -0700 (PDT) Received: from net.com ([134.56.103.239]) by west-mail.net.com (Netscape Messaging Server 3.6) with ESMTP id AAA4997; Wed, 18 Apr 2001 18:32:34 -0700 Message-ID: <3ADE3FDB.E082BC69@net.com> Date: Wed, 18 Apr 2001 18:31:07 -0700 From: Shankar Agarwal Organization: N.E.T. http://www.net.com X-Mailer: Mozilla 4.61C-NETv45 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en, en-GB, fr, de MIME-Version: 1.0 Cc: tech-kern@netbsd.org, bsd hackers Subject: Question regarding ifconfig. References: <3AB7A76B.2BCF5D6E@net.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi All, I have a doubt about the ifconfig file. when i am trying to configure or change ip address on the interface. The main calls setifaddr function which calls ioctl function with command as SIOCGIFADDR by the following lines ifr->ifr_addr.sa_family = afp->af_af; if (ioctl(s, afp->af_gifaddr, afp->af_ridreq) == 0) clearaddr = 1; Now i don't understand why the ioctl is called by SIOCGIFADDR when i am configuring an ip address on the interface. Moreover i believe that when ioctl returns successfully it returns 0 so the clearaddr will be set and later on the ip address will be deleted. Please help me out if i am interpreting it wrong as i am not able to assign an ip address to the interface in my ported code. Thanks Regards Shankar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message