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


GETCLIENTID

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

The GETCLIENTID macro returns the identifier by which the calling application is known to the TCP/IP address space. The client ID structure returned is used by the GIVESOCKET and TAKESOCKET macros.

When GETCLIENTID is called by a server or client, the identifier of the calling application is returned.

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

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

>--+---------------------------+--+-------------------------+--->
   +-,ECB--=--+-address--+-----+  '-,ERROR--=--+-address--+-'   
   |          +-*indaddr-+     |               +-*indaddr-+     
   |          '-(reg)----'     |               '-(reg)----'     
   '-,REQAREA--=--+-address--+-'                                
                  +-*indaddr-+                                  
                  '-(reg)----'                                  

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

Keyword
Description
CLIENT
Input/Output parameter. A client ID structure describing the identifier for your application, regardless whether a server or client.
Field
Description
DOMAIN
A fullword binary number specifying the domain of the client. On input, this is an optional parameter for AF_INET, and a required parameter for AF_INET6 to specify the domain of the client. For TCP⁄IP, the value is a decimal 2 indicating AF_INET, or decimal 19 indicating AF_INET6. On output, this is the returned domain of the client.
NAME
An 8-byte character field that is filled, on completion of the call, with the client address space identifier.
TASK
Output parameter. An 8-byte field set to the client task identifier.
RESERVED
Output parameter. Specifies 20 bytes of binary zeros. This field is required, but it is not used.
ERRNO
Output parameter. A fullword binary field. If RETCODE is negative, ERRNO contains a valid error number. Otherwise, ignore ERRNO.

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

RETCODE
Output parameter. A fullword binary field that returns one of the following values:
Value
Description
0
Successful call.
-1
Check ERRNO for an error code.
ECB or REQAREA
Input parameter. This parameter is required if you are using APITYPE=3. It points to a 104-byte field containing:
For ECB
A 4-byte ECB posted by TCP/IP when the macro completes.
For REQAREA
A 4-byte user token (set by you) that is presented to your exit when the response to this function request is complete.
For ECB/REQAREA
The last 100 bytes is a storage field used by the interface to save the state information.
Note: This storage must not be modified until the macro function has completed and the ECB has been posted, or the asynchronous exit has been driven.
ERROR
Input parameter. The location in your program to receive control when the application programming interface (API) processing module cannot be loaded.
TASK
Input parameter. The location of the task storage area in your program.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014