lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV Re: DNS lookups revisited


From: Richard Levitte - VMS Whacker
Subject: LYNX-DEV Re: DNS lookups revisited
Date: Tue, 23 Dec 1997 15:18:11 +0100

   With regard to my earlier message about DNS lookups and the problems
   within SOCKETSHR, I have made approrpiate modifications to SOCKETSHR
   which correct this problem. I've followed what the MULTINET
   gethostbyname routine appears to do, which is to return the user's
   original host name if the reverse lookup fails.

I certainly hope gethostbyname() return a struct hostent *.  I imagine
the Multinet implementation returns such a thing with a NULL address
list, correct?

According to all docs I can find, gethostbyname() should return NULL on
failure.  The following could be found in the OpenBSD 2.1 man page for
gethostbyname():

 DIAGNOSTICS
      Error return status from gethostbyname(), gethostbyname2(), and
      gethostbyaddr() is indicated by return of a null pointer.  The external
      integer h_errno may then be checked to see whether this is a temporary
      failure or an invalid or unknown host.
 
      The variable h_errno can have the following values:
 
      HOST_NOT_FOUND  No such host is known.
 
      TRY_AGAIN       This is usually a temporary error and means that the lo-
                      cal server did not receive a response from an authorita-
                      tive server.  A retry at some later time may succeed.
 
      NO_RECOVERY     Some unexpected server failure was encountered.  This is
                      a non-recoverable error.
 
      NO_DATA         The requested name is valid but does not have an IP ad-
                      dress; this is not a temporary error.  This means that
                      the name is known to the name server but there is no ad-
                      dress associated with this name.  Another type of request
                      to the name server using this domain name will result in
                      an answer; for example, a mail-forwarder may be regis-
                      tered for this domain.
 

   equally silly for SOCKETSHR to fail a gethostbyname if it doesn't.

yes.

-- 
R Levitte, Levitte Programming;  Spannv. 38, I;  S-161 43  Bromma;  SWEDEN
      Tel: +46-8-26 52 47;  Cel: +46-708-20 09 64;  No fax right now
  PGP key fingerprint = A6 96 C0 34 3A 96 AA 6C  B0 D5 9A DF D2 E9 9C 65
   Check http://richard.levitte.org/ for my public key. address@hidden

          "price, performance, quality.  Choose any two you like"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]