Re:Comcast Activates First Users With IPv6 Native Dual Stack...
by dfox on Wednesday February 02, 2011 @06:34AM
(#2169872)
See getaddrinfo(3) man page, that should be almost all you want. Making code mixed v4/v6 that way actually seems easier than v4-only solution with gethostbyname(3) and building struct sockaddr manually.
I assume we'll be living in a mixed IPV4/IPV6 world for awhile. Who's got a tutorial for making a connection to a host using IPV6 if available, but falling back to IPV4 if it isn't?