Date: Sat, 16 Sep 2000 04:11:10 +0100 From: Brian Somers <brian@Awfulhak.org> To: ptacek@dashmail.net Cc: freebsd-hackers@FreeBSD.org, brian@Awfulhak.org Subject: Re: Getting all the IP address for a machine from code... Message-ID: <200009160311.e8G3BAn15495@hak.lan.Awfulhak.org> In-Reply-To: Message from "Chris Ptacek" <ptacek@dashmail.net> of "Wed, 13 Sep 2000 20:12:47 PDT." <NEBBKLEDAJJJDAPGJFBIGENICNAA.ptacek@dashmail.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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. This is a bit late.... I'd favour copying src/usr.sbin/portmap/from_local.c (a reasonably recent version of the code). It can be built as a main program that literally just outputs a list of local IP numbers. > - Chris -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! 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?200009160311.e8G3BAn15495>