VMS Help  —  TCPIP Services, Programming Interfaces, Socket API Functions, inet_network()
    Converts a null-terminated text string representing an IP address
    into a network address in local host format.
    Format
      #include  <in.h>
      #include  <inet.h>
      int inet_network  ( const char *cp );

1  –  Argument

 cp
    A pointer to an ASCII (null-terminated) character string
    containing a network address in the dotted-decimal format.

2  –  Description

    This function returns an internet network address as a local
    host integer value when an ASCII string representing the address
    in the internet standard dotted-decimal format is given as its
    argument.
                                   NOTE
       The 64-bit return from OpenVMS Alpha and I64 systems has
       zero-extended bits in the high 32 bits of R0.

3  –  Return Values

    -1                 Indicates that cp does not point to a proper
                       internet network address.
    x                  An internet network address, in local host
                       order.
Close Help