>
> my understanding (from my Richard Stevens book) is that gethostbyname will
> return ipv4 mapped ipv6 addresses by setting h_addrtype in hostent to
> AF_INET6.
What is that book?? gethostbyname(name) don't have an arg of type
hostent. I guess that I' have to set h_addrtype at the struct returned or
I'm wrong??
Where can I find the specifications of the function gethostbyname
(the last one). The glibc documentation isn't uptodate (glibc-2.1.x).
> gethostbyname doesn't have a second argument; gethostbyname2
> does.
Sorry, gethostbyname2(name,af). I wrote it fast..
> if you want all the addresses of a host and you want them to be ipv4
> mapped to ipv6, then you use gethostbyname.
>
> what exact info are you looking for, though? one of those two functions
> should give you all you need.
Thanks so much.
|