Date: Fri, 4 Jun 1999 22:53:59 -0400 (EDT) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: Barney Wolff <barney@databus.com> Cc: freebsd-net@FreeBSD.ORG Subject: Re: subtle SIOCGIFCONF bug Message-ID: <199906050253.WAA13064@khavrinen.lcs.mit.edu> In-Reply-To: <375888260.660a@databus.databus.com> References: <375888260.660a@databus.databus.com>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Fri, 4 Jun 1999 22:01 EDT, Barney Wolff <barney@databus.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906050253.WAA13064>