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: Andy Harper
Subject: LYNX-DEV Re: DNS lookups revisited
Date: Tue, 23 Dec 1997 14:27:05 BST

>   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?

  Yes, what socketshr does with this now is to first get the list of IP
  addresses (any failure here causes a NULL function return with suitable
  status in errno). The first IP addres is then used in a reverse lookup to get
  the hostname. If this fails, the original user-supplied hostname is returned.
  All of the stuff is then added to a hostenet structure and a pointer to this
  returned.

  The MULTINET docs don't seem to say what happens should a hostname not exist
  for the IP address (due to no reverse dns entry) but experimentation shows
  that it seems to insert the user supplied name, so that's what I've added.

Regards,

Andy Harper
Kings College London

reply via email to

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