From owner-freebsd-net Fri Jun 4 19:15:27 1999 Delivered-To: freebsd-net@freebsd.org Received: from databus.databus.com (databus.databus.com [198.186.154.34]) by hub.freebsd.org (Postfix) with SMTP id 969A514F29 for ; Fri, 4 Jun 1999 19:15:07 -0700 (PDT) (envelope-from barney@databus.databus.com) From: Barney Wolff To: freebsd-net@FreeBSD.ORG Date: Fri, 4 Jun 1999 22:01 EDT Subject: Re: subtle SIOCGIFCONF bug Content-Length: 1636 Content-Type: text/plain Message-ID: <375888260.660a@databus.databus.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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. Are you saying that SIOCGIFCONF has a fixed maximum number of interfaces it will return, even if you give it a big buffer? Or that you have to get aliases separately? Or that it's buggy - on which systems? Barney > Date: Fri, 4 Jun 1999 22:00:50 -0400 (EDT) > From: Garrett Wollman > Content-Length: 958 > To: Barney Wolff > Cc: freebsd-net@FreeBSD.ORG > Subject: Re: subtle SIOCGIFCONF bug > > < said: > > > You have not said specifically what about SIOCGIFCONF is bad, that > > could possibly justify the incredible statement that one should > > use a non-portable technique when a portable technique is available. > > SIOGIFCONF works on Unixware, Solaris, HP-UX, Irix and FreeBSD, just > > to list systems I can access right now. > > No, it doesn't work. It just seems to work because you don't have > enough interfaces or addresses configured. (And furthermore, compare > what contortions an ioctl-based implementation would have to go > through to deal with the differences in all those systems. So much > for portability!) > > -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