(usagi-users 03451) getaddrinfo() returns sockaddr_in6 but machine doesn't have IPv6 turned on

"mclellan, dave" <[email protected]>
Newsgroups gmane.linux.ipv6.usagi.users,gmane.network.ipv6.general
Message-ID <[email protected]>
Hi: I'm running on a Linux kernel 2.4.21-9 EL.  This machine has
getaddrinfo() and I call it to get a loopback address. in the hints ai_flags
= 0, ai_protocol=0, ai_family=0.  meaning I'm expecting a loopback address.
The same is designed to run on whatever is available on the machine. 

I get two sockaddrs on return: a sockaddr_in6 and a sockaddr_in both of
which describe their respective loopbacks with port.  

Without modifying it, I turn the sockaddr_in6 around to a socket() call.
This gets an error -- Address family not supported by protocol.  Ok, I buy
that. 

But why does getaddrinfo() give me and sockaddr_in6 back?  IPv6 is not
turned on for the machine;  shouldn't getaddrinfo() only give me a
sockaddr_in?  

Thanks for any advice

Dave McLellan --Consulting Software Engineer - SPEA Engineering
EMC Corporation
228 South St. Mail Stop: 228 LL/AA-24
Hopkinton, MA 01748  USA
+1-508-249-1257 F: +1-508-497-8030  [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.