Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
GETSERVBYPORT z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
Use the GETSERVBYPORT command to translate a port number to the name of the service that is using the port. Format.-,--TCP----------. >>-SOCKET--(--"GETSERVBYPORT"--,--portid--+-----------------+---> '-,--protocolname-' >--)----------------------------------------------------------->< Parameters
Returned valueThis command returns a string that contains the return code, service name, the port number that the service is using, and the network protocol, for example, 0 FTP 21 TCP. The return code can be 0 or the REXX API error number. The return code 0 indicates that the requested socket command was completed successfully. See Socket call error return codes for additional information about the numeric error codes that are returned by this command. The following REXX socket API error numbers can be returned:
LE C/C++ equivalent
Code exampleFigure 1. GETSERVBYPORT command
example
|
Copyright IBM Corporation 1990, 2014
|