From owner-freebsd-hackers Tue Jan 9 9:33:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from haali.cs.msu.ru (haali.po.cs.msu.su [158.250.16.1]) by hub.freebsd.org (Postfix) with ESMTP id 67E3E37B69D for ; Tue, 9 Jan 2001 09:33:21 -0800 (PST) Received: (from mike@localhost) by haali.cs.msu.ru (8.9.3/8.9.3) id UAA10578; Tue, 9 Jan 2001 20:32:54 +0300 (MSK) (envelope-from mike) Date: Tue, 9 Jan 2001 20:32:53 +0300 From: "Mike E. Matsnev" To: Graham Wheeler Cc: David Malone , freebsd-hackers@FreeBSD.ORG, markster@marko.net Subject: Re: Size of struct ifreq/returned buffer of SIOCGIFCONF Message-ID: <20010109203253.A10537@haali.cs.msu.ru> References: <3A5AE854.F769B86C@cequrux.com> <20010109142043.B52761@walton.maths.tcd.ie> <3A5B148A.5F139188@cequrux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3A5B148A.5F139188@cequrux.com>; from gram@cequrux.com on Tue, Jan 09, 2001 at 03:39:22PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jan 09, 2001 at 03:39:22PM +0200, Graham Wheeler wrote: > David Malone wrote: > > > > If you read the paragraph below that code, it notes that the ifreq > > structures are of variable length. The spacing depends on the size > > of the returned info. > > That's true. In which case the cheops code is wrong, as it iterates > through the list by incrementing a pointer to a struct ifreq. I'll try > fix that and get Mark to test under Linux and hopefully get a portable > solution. You can get the portable code from BIND, where it looks at the interface list. /Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message