Gets the unique identifier of the current host.
Standard C Library (libc.a)
#include <unistd.h> int gethostid ( )
The gethostid subroutine allows a process to retrieve the 32-bit identifier for the current host. In most cases, the host ID is stored in network standard byte order and is a DARPA Internet address for a local machine.
Upon successful completion, the gethostid subroutine returns the identifier for the current host.
If the gethostid subroutine is unsuccessful, the system handler performs the following functions:
The gethostid subroutine is part of Base Operating System (BOS) Runtime.
All applications containing the gethostid subroutine must be compiled with _BSD set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.
The gethostname subroutine, sethostid subroutine, sethostname subroutine.
Sockets Overview in AIX Version 4.3 Communications Programming Concepts.