Date: Fri, 01 Jun 2007 14:53:22 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: bsenthil@adventnet.com Cc: freebsd-questions@freebsd.org, freebsd-embedded@freebsd.org Subject: Re: get/set ifconfig entries through by programmatically Message-ID: <20070601.145322.1169729966.imp@bsdimp.com> In-Reply-To: <46607E95.4030409@adventnet.com> References: <46607E95.4030409@adventnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <46607E95.4030409@adventnet.com> bsenthil <bsenthil@adventnet.com> writes: : Is it possible to get/set ifconfig entries through by programmatically. : If yes, please send me the code snippet ... : : I am trying to get/set ipaddress by executing the command "ifconfig" . To get the addresses, use the ifconfig-in-a-box interface getifaddrs(3). To set the address, you'll need to use the functions described in networking(4), specifically the SIOCAIFADDR and SIOCDIFADDR ioctls. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070601.145322.1169729966.imp>