gtpi1m4x | System Installation Support Reference |
The socket accept user exit, C542, provides a centralized program to screen
all connection requests before they are returned to the server
application. C542 is entered each time the accept
application programming interface (API) function call receives a connection
request from a client.
Input
- The socket descriptor associated with an incoming connection request
- A pointer to the socket address of the connecting client (C structure
sockaddr defined in the socket.h header file)
- The length of the socket address.
Programming Considerations
- The pointer to the socket address that is passed to C542 enables C542 to
determine the identity of the connecting client.
- C542 accepts an incoming connection request by returning the socket
descriptor passed to it by the accept function back to the
accept function.
- C542 rejects an incoming connection request by returning -1 to the
accept function.
- If C542 rejects an incoming connection request, the accept
function closes the socket descriptor associated with the connection request,
sets sock_errno to SOCACCES, and returns -1 to the server
application program that issued the accept function call.
Return Values
- If an incoming connection request is accepted by C542, the socket
descriptor passed to it by the accept function is returned to the
accept function.
- If an incoming connection request is rejected by C542, -1 is returned to
the accept function.