Ethereal-dev: Re: [ethereal-dev] SIOCGIFCONF

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Uwe Girlich <Uwe.Girlich@xxxxxxxxxxx>
Date: Thu, 31 Aug 2000 13:26:12 +0200
On Thu, Aug 31, 2000 at 04:48:49PM +0900, itojun@xxxxxxxxxx wrote:
> 	I believe getifaddrs(3) is the way to go.  SIOCGIFCONF is too hard to
> 	use.  the code is available under BSD license, and can be found in
> 	*BSD lib/libc/net/getifaddrs.c.  we can ship it in "missing" directory 
> 	(i'm not sure if it works on random other OSes or not, but it looks
> 	to be portable and it does provide a good API wrapping to the issue).
I looked only shortly in it but I found things like sysctl()-calls in it.
Not very portable.

> 	the function was originated in Stevens book, and implemented by BSDI.
I used the original source of Stevens and just checked in a simple version
of util.c, which allocates a growing buffer until two consecutive ioctls give
the same buffer size back.

Bye, Uwe