[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help on DNS gethostbyname( )
> Hi,
>
> What will be returned by the function gethostbyname( ) when an alias
> is passed to it instead of a CNAME? Will it return the A record or the
> CNAME? And does it depend on the name server or the implementation of
> the Winsock stack?
>
> Any suggestion is much appreciated.
It is supposed to return the CNAME in the h_name field,
the original alias in the h_aliases list, and at least
one address associated with the alias in the h_addr_list
-- for DNS, the last is usually an A record pointed to by
the CNAME.
Sanjay.