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

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

    Searches the network database sequentially from the beginning for
    a network record with a given address.
    The $QIO equivalent is the IO$_ACPCONTROL function with the
    INETACP_FUNC$C_GETNETBYADDR subfunction code.
    Format
      #include  <netdb.h>
      struct netent *getnetbyaddr  ( long net, int type) ;

  1 - Arguments

 net
    The network number, in host byte order, of the networks database
    entry required.
 type
    The type of network being sought (AF_INET).

  2 - Description

    This function finds the first network record in the networks
    database with the given address.
    The getnetbyaddr() and getnetbyname()  functions use a common
    static area for their return values. Subsequent calls to any of
    these functions overwrite any previously returned network entry.
    You must make a copy of the network entry if you want to save it.

  3 - Return Values

    NULL               Indicates end of file or an error.
    x                  A pointer to an object having the netent
                       structure.

  4 - Errors

    EINVAL             The net argument is invalid.
    ESRCH              The search failed.
  Close     HLB-list     TLB-list     Help  

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