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.

Date: Thu, 31 Aug 2000 20:38:47 +0900
>I looked only shortly in it but I found things like sysctl()-calls in it.
>Not very portable.

	if there's no sysctl support, it will use ioctl(SIOCGIFCONF).
	(there's an #ifdef).

>> 	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.

	the issue is that SIOCGIFCONF is VERY hard to use correctly,
	specifically when you have sockaddr_foo that is larger than normal
	sockaddr.  we definitely need a wrapper function, IMHO.

itojun