Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
GETHOSTID z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
Use the GETHOSTID command to return the primary IPv4 address for the current host. The primary address is the IP address of the default home address that is specified in the TCP/IP configuration file for the stack with which the current socket set is associated. Restriction: This command does not support IPv6
addresses.
ParametersThis command has no parameters. Returned valueThis command returns a string that contains the return code and the primary IPv4 address of the host, for example, "0 10.11.103.1". 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. GETHOSTID command
example
|
Copyright IBM Corporation 1990, 2014
|