From owner-freebsd-net Mon Sep 16 21:53:12 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 70A2737B400 for ; Mon, 16 Sep 2002 21:53:11 -0700 (PDT) Received: from piglet.dstc.edu.au (piglet.dstc.edu.au [130.102.176.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 934BA43E72 for ; Mon, 16 Sep 2002 21:53:10 -0700 (PDT) (envelope-from freebsd-lists@lister.dnsalias.net) Received: from ilister.dialup.dstc.edu.au (ilister.dialup.dstc.edu.au [130.102.182.103]) by piglet.dstc.edu.au (8.12.3/8.12.3) with ESMTP id g8H4r4pl016685; Tue, 17 Sep 2002 14:53:05 +1000 (EST) Received: from localhost (ilister@localhost) by ilister.dialup.dstc.edu.au (8.11.1/8.11.1) with ESMTP id g8H4r2D82742; Tue, 17 Sep 2002 14:53:02 +1000 (EST) (envelope-from freebsd-lists@lister.dnsalias.net) Date: Tue, 17 Sep 2002 14:53:02 +1000 (EST) From: Ian Lister X-X-Sender: ilister@sapporo.home To: Bruce M Simpson Cc: freebsd-net@FreeBSD.ORG Subject: Re: Proposal: adopt SIOCGLIFNUM interface for enumerating iflist. In-Reply-To: <20020916164206.GN28076@spc.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checked: SPAMASSASSIN: This message probably not SPAM X-Spam-Score: -4.4, Required: 5 X-Virus-Scanned: Message: ok X-Scanned-By: MIMEDefang 2.9 (www dot roaringpenguin dot com slash mimedefang) 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 Mon, 16 Sep 2002, Bruce M Simpson wrote: >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(). NetBSD returns the required buffer size in ifc.ifc_len so you only need to call ioctl at most twice (once to determine the buffer size and once with a buffer large enough). Just another option (with precedent)... Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message