Standard C Library Functions gethostid(3C)
NAME
gethostid - get an identifier for the current host
SYNOPSIS
#include
long gethostid(void);
DESCRIPTION
The gethostid() function returns the 32-bit identifier for
the current host. If the hardware capability exists, thisidentifier is taken from platform-dependent stable storage;
otherwise it is a randomly generated number. It is not guaranteed to be unique.If the calling thread's process is executing within a non-
global zone that emulates a host identifier, then the zone'semulated 32-bit host identifier is returned.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | MT-Safe |
|_____________________________|_____________________________|
| Standard | See standards(5). ||_____________________________|_____________________________|
SEE ALSO
hostid(1), sysinfo(2), attributes(5), standards(5), zones(5)SunOS 5.11 Last change: 29 Jan 2009 1