From: Rob McCool
Newsgroups: netscape.devs-nsapi
Subject: Re: net_ip2host confusion
Date: Wed, 27 Nov 1996 16:30:20 -0800
> I'm using net_ip2host within a path check func to qualify some
> domains. I am having troubles with a particular domain (the
> customer's). I can get to the domain with a browser, I just
> don't seem to be able to have the IP translated to the FQDN.
>
> Is there reason code info available from this function? The domain
> is in the uk, so it might be timing out? Can I set a longer wait?
It might be timing out, any reason code should be available as h_errno
on UNIX systems if you're not running 2.0 on some UNIX other than IRIX.
If that's what you're running, you may not be able to get the reason
code. However, the underlying code is simply calling gethostbyaddr() so
a simple C program that does the same thing might be able to determine
what the problem is.
> Also how does the function handle dynamicly assigned addresses
> with the verify flag set?
All that the verify flag does is take the host name that is returned
from gethostbyaddr, and look through the structure's h_name and
h_aliases entries for a fully qualified name. If it is unable to find
one, the 2.x servers may also attempt to guess the local domain name. If
it is still unable to find one, the request is considered unverified. If
it does find one, it performs a gethostbyname() on the name, and looks
through the addresses for that machine to find one that matches. If it
finds one, it returns the name as verified.
> The manual is a tad terse on this function so any pointers to
> additional info would be muchly appreciated.
>
> -Ted "Rob, are you writing a book?" Scott
If I had the time...
--Rob
--
Rob McCool, robm@netscape.com http://home.netscape.com/people/robm/
Stunt Programmer, Netscape Communications Corporation
It was working ten minutes ago, I swear...
Reproduced by permission of the author.