From owner-freebsd-net Mon Sep 16 15:15: 5 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 F040437B400 for ; Mon, 16 Sep 2002 15:15:03 -0700 (PDT) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72FB143E65 for ; Mon, 16 Sep 2002 15:15:03 -0700 (PDT) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id PAA10399; Mon, 16 Sep 2002 15:00:45 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g8GLxfe88208; Mon, 16 Sep 2002 14:59:41 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200209162159.g8GLxfe88208@arch20m.dellroad.org> Subject: Re: Proposal: adopt SIOCGLIFNUM interface for enumerating iflist. In-Reply-To: <200209161712.g8GHCWak023802@khavrinen.lcs.mit.edu> "from Garrett Wollman at Sep 16, 2002 01:12:32 pm" To: Garrett Wollman Date: Mon, 16 Sep 2002 14:59:41 -0700 (PDT) Cc: Bruce M Simpson , freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 Garrett Wollman writes: > > At this time these applications have to play 'elastic buffer' games with the > > SIOCGIFCONF ioctl in order to get all of the relevant information. By allowing > > userland applications to determine the size of this buffer at runtime, we > > eliminate the need for repeated calls to ifioctl(). > > We have already done so: sysctl net.route.iflist. FYI, libpdel (ports:devel/libpdel) has code that shows how to do this and makes it easier. Install the port and type 'man if_get_list' for details. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message