[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 00413) getifaddrs not returning AF_INET6 Family
- To: usagi-users@xxxxxxxxxxxxxx
- Subject: (usagi-users 00413) getifaddrs not returning AF_INET6 Family
- From: skodati@xxxxxxxxxx
- Date: Fri, 20 Apr 2001 12:37:24 +0530
- Reply-to: usagi-users@xxxxxxxxxxxxxx
Hi
Iam writing an IPv6 aplication, and used getifaddrs to get the interface
parameters,
I have the following lines of code,
(ifap and ifa are of struct ifaddrs)
if(getifaddrs((&ifap) !=0){
return(-1);
}
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr->sa_family != AF_INET6)
{ printf("Family check failed\n");
continue;
}
}
I debugged the code and i found the the interfaces lo, eth0, sit0 with the
families 2 and 17 (AF_PACKET packet family????)
But not returning any AF_INET6 family addresses,
I configured my system with IPv6, and ifconfig shows both IPv6 and IPv4
addressses,
Anyway to read the IPv6 addresses, or Am I missing something??
( i run on 2.4.0 kernel )
thanks and regards
Suresh Kodati