User Tools

Site Tools


solaris:gethostid.3c

gethostid


NAME

gethostid - get an identifier for the current host

SYNOPSIS

#include <unistd.h>

long gethostid(void);

DESCRIPTION

The gethostid() function returns the 32-bit identifier for the current host. If the hardware capability exists, this identifier 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’s emulated 32-bit host identifier is returned.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

SEE ALSO

solaris/gethostid.3c.txt · Last modified: 2023/07/19 08:58 by A User Not Logged in