netdev
[Top] [All Lists]

Re: getipnodebyname??

To: netdev@xxxxxxxxxxx
Subject: Re: getipnodebyname??
From: Armando Aguirre Schlick <aaguirre@xxxxxxxx>
Date: Thu, 13 Jul 2000 18:25:10 -0400 (CST)
In-reply-to: <Pine.LNX.3.96.1000713174424.4278A-100000@xxxxxxxxxxxxxxxxxxxx> from "Statux" at Jul 13, 2000 05:52:08 PM
Sender: owner-netdev@xxxxxxxxxxx
> 
> 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.

<Prev in Thread] Current Thread [Next in Thread>