netdev
[Top] [All Lists]

Re: getipnodebyname??

To: Armando Aguirre Schlick <aaguirre@xxxxxxxx>
Subject: Re: getipnodebyname??
From: Statux <statux@xxxxxxxxxxx>
Date: Thu, 13 Jul 2000 17:52:08 -0400 (EDT)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <200007132129.RAA06309@xxxxxxxxxxxxxxxx>
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. gethostbyname doesn't have a second argument; gethostbyname2
does. 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.

On Thu, 13 Jul 2000, Armando Aguirre Schlick wrote:

> 
> > gethostbyname or gethostbyname2, perhaps?
> 
>       gethostbyname return everything, not including IPv4-mapped IPv6, and
> gethostbyname depends on the second arg (AF_INET or AF_INET6), but twice
> don't return what I'd want ( I know it).
>       Does exists some _new_ RFC about it??
> 
> > On Thu, 13 Jul 2000, Armando Aguirre Schlick wrote:
> > 
> > >  
> > >   Hi everybody..
> > >   Here's my question... is there some standard function like
> > >  getipnodebyname in glibc?
> > >   I need to reach all of the address of a host, including IPv4-mapped
> > >  IPv6 address...
> > >   Thanks in advance..
> > > 
> > 
> > 
> 


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