From owner-freebsd-net Fri Jun 4 19:54:19 1999 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id B1C3B14BFD for ; Fri, 4 Jun 1999 19:54:03 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.1/8.9.1) id WAA13064; Fri, 4 Jun 1999 22:53:59 -0400 (EDT) (envelope-from wollman) Date: Fri, 4 Jun 1999 22:53:59 -0400 (EDT) From: Garrett Wollman Message-Id: <199906050253.WAA13064@khavrinen.lcs.mit.edu> To: Barney Wolff Cc: freebsd-net@FreeBSD.ORG Subject: Re: subtle SIOCGIFCONF bug In-Reply-To: <375888260.660a@databus.databus.com> References: <375888260.660a@databus.databus.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > Gee, I just ran the same .c file on each of them, and it retrieved > the interface names, addresses and netmasks of every interface. > Same ioctl's on each system, no ifdefs among 'em. Obviously you didn't have any other protocols configured. Oh, and what did you do skip the link-layer addresses? Depending on the implementation, long addresses will either be truncated or not, have padding or not, have a way to tell how long they are or not, in short cannot be portably parsed or even skipped past. > Are you saying that SIOCGIFCONF has a fixed maximum number of interfaces > it will return, even if you give it a big buffer? There is no a priori way to know how big a buffer one should use. The interface is fundamentally broken. > Or that you have to get aliases separately? What's an `alias'? -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message