VMS Help
TCPIP Services, Programming Interfaces, Sockets API, gethostname()

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Returns the fully qualified name of the local host.
    Format
      #include  <types.h>
      #include  <socket.h>
      int gethostname  ( char *name, int namelen) ;

  1 - Arguments

 name
    The address of a buffer where the name should be returned. The
    returned name is null terminated unless sufficient space is not
    provided.
 namelen
    The size of the buffer pointed to by name.

  2 - Description

    This function returns the translation of the logical names
    TCPIP$INET_HOST and TCPIP$INET_DOMAIN when used with the TCP/IP
    Services software.

  3 - Return Values

    0                  Successful completion.
    -1                 Error; errno is set to indicate the error.

  4 - Errors

    EFAULT             The buffer described by name and namelen is
                       not a valid, writable part of the user address
                       space.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.