> > >I hope this is the right list to post questions about the IPv6 programming
> > >API. Couldnt find any list dedicated for IPv6 application programming
> > >(there should be one). Well anyhow, I'm porting some of my IPv4
> > >applications to IPv6 and wonder how to convert a sockaddr structure into a
> > >sockaddr_in6 structure so I can print the address as a string after
> > >resolving name->address with getaddrinfo(). I suppose inet_ntop() is the
> > >right function to convert a network byte ordered address (sockaddr.sa_data)
> > >into a char buffer?
> > 
> >     use getnameinfo.
> 
> Ok, shouldnt this work? or have I missed something.
> I get:
> 
> getnameinfo: ai_family not supported (-6)

Found the error, I used sizeof(addrinfo.ai_addr) instead of
addrinfo.ai_addrlen.

/Bjorn


---------------------------------------------------------------------
The IPv6 Users Mailing List
Unsubscribe by sending "unsubscribe users" to [EMAIL PROTECTED]

Reply via email to