Subject: Re: SIOCGIFCONF wierdness
To: Alex Barclay <alex@tfo-consulting.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 05/09/2001 08:31:34
>> 	your code is assuming that SIOCGIFCONF returns an array of fixed-length
>> 	struct (ifreq), however, the assumption is not correct.  ifreq
>> 	can be bigger when sockaddr in ifreq struct is bigger.
>> 	SIOCGIFCONF is one of the most difficult-to-use ioctl.
>> 
>> 	i'd suggest you to use getifaddrs(3).
>
>Thanks for this. I'll take a look in more detail at this tonight.
>
>One final question... Did the assumption change between 1.4 and now? I'm
>actually trying to port some code that used to run just fine.

	the (false) assumption works when you have certan set of addresses only
	on your system (like IPv4 only).  if you have other type of addresses,
	you cannot assume this even on 1.4 systems.

itojun