From owner-freebsd-net Thu Jul 18 11: 2:44 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79CB237B400 for ; Thu, 18 Jul 2002 11:02:41 -0700 (PDT) Received: from hotmail.com (f273.law9.hotmail.com [64.4.8.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C36543E5E for ; Thu, 18 Jul 2002 11:02:41 -0700 (PDT) (envelope-from freebsdfan@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 18 Jul 2002 11:02:41 -0700 Received: from 68.4.57.222 by lw9fd.law9.hotmail.msn.com with HTTP; Thu, 18 Jul 2002 18:02:40 GMT X-Originating-IP: [68.4.57.222] From: "Chuck T." To: ertr1013@student.uu.se Cc: bjones@emergecore.com, net@FreeBSD.ORG Subject: Re: programatically list all local IP addresses ? Date: Thu, 18 Jul 2002 11:02:40 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 18 Jul 2002 18:02:41.0185 (UTC) FILETIME=[4F113110:01C22E85] Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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. > > >-- > >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