Date: Wed, 18 Apr 2001 18:31:07 -0700 From: Shankar Agarwal <shankar_agarwal@net.com> Cc: tech-kern@netbsd.org, bsd hackers <freebsd-hackers@FreeBSD.ORG> Subject: Question regarding ifconfig. Message-ID: <3ADE3FDB.E082BC69@net.com> References: <Pine.NEB.4.33.0103122044290.498-100000@fiona.amberites.invalid> <3AB7A76B.2BCF5D6E@net.com> <xofhf0ouurd.fsf@blubb.pdc.kth.se>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ADE3FDB.E082BC69>