z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


NTOP

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

The NTOP macro converts an IP address from its numeric binary form into a standard text presentation form. On successful completion, NTOP returns the converted IP address in the buffer provided.

The following requirements apply to this call:
Read syntax diagramSkip visual syntax diagram
>>-EZASMI--TYPE=NTOP--,AF--=--+-'INET'---+---------------------->
                              +-'INET6'--+   
                              +-address--+   
                              +-*indaddr-+   
                              '-(reg)----'   

>--,SRCADDR--=--+-address--+--,DSTADDR--=--+-address--+--------->
                +-*indaddr-+               +-*indaddr-+   
                '-(reg)----'               '-(reg)----'   

>--,DSTLEN--=--+-address--+--,ERRNO--=--+-address--+------------>
               +-*indaddr-+             +-*indaddr-+   
               '-(reg)----'             '-(reg)----'   

>--,RETCODE--=--+-address--+--+-------------------------+------><
                +-*indaddr-+  '-,ERROR--=--+-address--+-'   
                '-(reg)----'               +-*indaddr-+     
                                           '-(reg)----'     

Keyword
Description
AF
Input parameter. Specify one of the following:
Value
Description
'INET' or a decimal '2'
Indicates the address being converted is an IPv4 address.
'INET6' or a decimal '19'
Indicates the address being converted is an IPv6 address.

AF can also indicate a fullword binary number specifying the address family.

SRCADDR
Input parameter. A field containing the numeric binary form of the IPv4 or IPv6 address being converted. For an IPv4 address, this field must be a fullword. For an IPv6 address, this field must be 16 bytes. The address must be in network byte order.
DSTADDR
Input parameter. A field used to receive the standard text presentation form of the IPv4 or IPv6 address being converted. For IPv4 the address will be in dotted-decimal format and for IPv6 the address will be in colon-hex format. The size of the converted IPv4 address will be a maximum of 15 bytes and the size of the converted IPv6 address will be a maximum of 45 bytes. Consult the value returned in DSTLEN for the actual length of the value in DSTADDR.
DSTLEN
Initially, an input parameter. The address of a binary halfword field that is used to specify the length of the DSTADDR field on input and upon a successful return will contain the length of the converted IP address.
ERRNO
Output parameter. A fullword binary field. If RETCODE is negative, ERRNO contains a valid error number. Otherwise, ignore the ERRNO field.

See Socket call error return codes for information about ERRNO return codes.

RETCODE
A fullword binary field that returns one of the following values:
Value
Description
0
Successful call.
–1
Check ERRNO for an error code.
ERROR
Input parameter. The location in your program to receive control when the application programming interface (API) processing module cannot be loaded.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014