> Dang. It doesn't work for down devices. > When I run strace on a program > that uses getifaddrs, the socket is opened with IPROTO_IP: > > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 14 > ioctl(14, 0x8912, 0x2084d3a8) = 0
That's SIOCGIFCONF. So it looks like getifaddrs isn't doing anything different than SIOCGIFCONF, at least on Linux. > I can't figure out what these ioctls are either...? Take a look at <linux/sockios.h> > I'll keep digging, but if you have any clues I would love to hear them! ifconfig -a reports down interfaces. It may just process /proc/net/dev. --Juan __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com