gethostid(2)gethostid(2)NAMEgethostid - Get the unique identifier of the current host
SYNOPSIS
#include <unistd.h>
long gethostid(
void );
STANDARDS
Interfaces documented on this reference page conform to industry stan‐
dards as follows:
gethostid(): XNS4.0, XNS5.0
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
DESCRIPTION
The gethostid() function allows a process to retrieve the 32-bit iden‐
tifier for the current host. The host ID is stored in network standard
byte order and is set either by the hostid(1) command or the
sethostid(2) function call.
RETURN VALUES
Upon completion, the gethostid() function returns the identifier for
the current host.
SEE ALSO
Commands: hostid(1)
Functions: gethostname(2), sethostname(2)
Standards: standards(5)gethostid(2)