Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jul 2002 11:02:40 -0700
From:      "Chuck T." <freebsdfan@hotmail.com>
To:        ertr1013@student.uu.se
Cc:        bjones@emergecore.com, net@FreeBSD.ORG
Subject:   Re: programatically list all local IP addresses ?
Message-ID:  <F2731T9EDcrnbwM4nQd00019349@hotmail.com>

next in thread | raw e-mail | index | archive | help
Yes portablity is a concern, unfortunately my program will probably
be used on Linux more than FreeBSD, sigh.  I starting to read about
ioctl() and SIOCGIFADDR which appears to be portable (and a pain).

It looks like the Linux crowd is adding getifaddrs(3) as part of their
ipv6 effort, but I'd rather not depend on that.

>On Thu, Jul 18, 2002 at 09:52:14AM -0700, Chuck T. wrote:
> > Excellent, that's just what I was looking for!  Thanks.
> > >do a man getifaddrs(3)
> > >
> > >Bruce
>
>Just be aware that getifaddrs(3) (which does seem to be a quite useful
>function) is not very portable.
>It appears to be available on recent releases of all the *BSDs, but it
>does not seem to exist on Solaris or Linux.
>
>Now, if you don't need your program to be portable this is of course
>not a problem, but writing unportable code should be an informed
>decision rather than done out of ignorance.
>
>
>--
><Insert your favourite quote here.>
>Erik Trulsson
>ertr1013@student.uu.se




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F2731T9EDcrnbwM4nQd00019349>