need for getifaddrs in uclibc

Mike Frysinger vapier at
Sun Jan 6 07:54:31 UTC 2008

On Wednesday 07 November 2007, Natanael Copa wrote:
> On Wed, 2007-11-07 at 19:39 +0100, Jason Curl wrote:
> > Natanael Copa wrote:
> > > Hi,
> > >
> > > Does anyone know a susv3/POSIX compliant way to list all ipv6
> > > interfaces? I bet there are no. ioctl(SIOCGIFCONF) ignores ipv6
> > > interfaces, I just tested.
> >
> > What does ifconfig do in BusyBox? Does that do what you want?
> talks directly to netlink, with is even more non portable.

i believe that's about the only way to get all the info you need anymore in 
Linux ...

> > When I implemented something across multiple platforms only for IPv4
> > that was a real nightmare (Solaris, Linux, uClibc, FreeBSD, Cygwin).
> >
> > > I suggest implementing a getifaddrs in uclibc, even if its not
> > > susv3/POSIX.
> I checked around. if_nameindex will list all your network interfaces,
> which gets me half the way. but I still havent found out how to get a
> list of ipv6 addresses from a given device name.

from my testing, if_nameindex wont even enumerate all possible interfaces via 
the ioctl() interface.  you need to go through netlink to get it all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : 

More information about the uClibc mailing list