[Info-vax] Which name is returned by the gethostbyaddr(<IP address>) in the hostent h_name field

Joseph Huber joseph.huber at NOREPLY.web.de
Fri Jul 22 05:03:34 EDT 2011


Andy wrote:
> I have not had much experience with IP programming. I have some
> software that uses the gethostbyaddr(<IP address>) hostent h_name
> field to do some checking.
> 
> Is this the name of the host,i.e. the name returned by the hostname
> command, or the network interface? 
> Is there a command that returns this name?

hostname is nopt a VMS command, but available in the GNV suite:
hostname returns the DNS (or local host database) name of the system where 
the command is issued.

  Socket_Routines
    gethostbyaddr
      Description
           This routine finds the first host record in the host database
           with the given address.
There are different IP stacks available on VMS,
with   "TCPIP services for VMS" the equivalent command is  
  TCPIP SHOW HOST a.b.c.d

-- 

Remove NOREPLY. from Email address.
Joseph Huber, http://www.huber-joseph.de



More information about the Info-vax mailing list