[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

gethostbyaddr()->h_aliases



I'm puzzling over the h_aliases field of the struct hostent returned
by gethostbyaddr().

For example, if I do 
$ dig ftp.debian.org

I find it's an A record for 141.209.21.21

However, if I do a gethostbyaddr on this ip number, I get a hostent
structure with h_name set to "bugs-2.cps.cmich.edu" and an empty
h_aliases list.

Does anyone know of a simple reverse address lookup tool (other than
gethostbyaddr) that I can play around with?  Also, does anyone know of
any example ip addresses that have multiple reverse mappings?

I'm suspecting that the h_aliases field is going to be unpopulated for
gethostbyaddr.  If this is true, shouldn't this be noted in the
documentation on this routine?  [Does anyone know if gethostbyname has
similar restrictions?  This code and test stuff is a lousy way to get
anything useful done.]

Thanks,

-- 
Raul


Reply to: