Date: Fri, 15 Sep 2000 00:04:52 -0600 From: Wes Peters <wes@softweyr.com> To: ptacek@dashmail.net Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Getting all the IP address for a machine from code... Message-ID: <39C1BC04.4A534A80@softweyr.com> References: <NEBBKLEDAJJJDAPGJFBIGENICNAA.ptacek@dashmail.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Chris Ptacek wrote:
>
> I am looking for a way to get all the IP addresses that are configured a
> machine. I need to do this in c source code, and without using DNS services
> (ie: gethostname/gethostbyname won't work). I am hoping there are some
> system calls I can use to get this information. Thanks in advance for any
> help.
Look in /usr/src/sbin/ifconfig/*.c and cut out the parts you don't need.
It's under a BSD license, so you are pretty much free to do as you wish.
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters Softweyr LLC
wes@softweyr.com http://softweyr.com/
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?39C1BC04.4A534A80>
