[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 01100) Re: SIOCGIFADDR and IPv6



In article <02d701c18c38$e351f160$abcb09c0@xxxxxxxxxxxxxxxxx> (at Mon, 24 Dec 2001 10:37:28 +0530), "Vishal Malhan" <vmalhan@xxxxxxxxxxxxxxxxx> says:

> The ioctl SIOCGIFADDR works fine for v4 but gives EINVAL for v6.
> Are the IOCTL's not v6 enabled ?
> If so then how to do the same for v6 ?

We do not support SIOCGIFADDR for IPv6 because in6_addr is too big.:-p
Use rtnetlink(7) to get ipv6 addresses.
You probably want to use getifaddrs(3) in USAGI package to get 
addresses (H/W addresses, ipv4 addresses and ipv6 addresses) on interfaces.
The interface was originally from BSDI and also available on 
KAME(BSD)-based OS's.

--yoshfuji