z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
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

The gethostid() call returns the 32-bit identifier unique to the current host. This value is the default home internet address.

This call can be used only in the AF_INET domain.

#include <manifest.h>
#include <socket.h>
unsigned long gethostid()

Return values

The gethostid() call returns the 32-bit identifier of the current host, which should be unique across all hosts. When a NULL pointer or 0 is returned, the value of errno is indeterminate, and, therefore, the output from a tcperror() call is also not valid.

Related calls

gethostname()

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014