From owner-freebsd-net Thu Jul 18 10:18:48 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 1BEFA37B400 for ; Thu, 18 Jul 2002 10:18:44 -0700 (PDT) Received: from mailc.telia.com (mailc.telia.com [194.22.190.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E05043E64 for ; Thu, 18 Jul 2002 10:18:42 -0700 (PDT) (envelope-from erikt@midgard.homeip.net) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailc.telia.com (8.12.5/8.12.5) with ESMTP id g6IHIdt3015852 for ; Thu, 18 Jul 2002 19:18:40 +0200 (CEST) X-Original-Recipient: Received: from falcon.midgard.homeip.net (h187n3fls20o913.telia.com [213.67.148.187]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id TAA13803 for ; Thu, 18 Jul 2002 19:18:39 +0200 (CEST) Received: (qmail 40299 invoked by uid 1001); 18 Jul 2002 17:18:34 -0000 Date: Thu, 18 Jul 2002 19:18:33 +0200 From: Erik Trulsson To: "Chuck T." Cc: bjones@emergecore.com, net@FreeBSD.ORG Subject: Re: programatically list all local IP addresses ? Message-ID: <20020718171833.GA40200@falcon.midgard.homeip.net> Mail-Followup-To: "Chuck T." , bjones@emergecore.com, net@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i 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 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message