gethostid(2)

NAME
gethostid, sethostid - get or set the unique identifier of the current host

SYNTAX
hostid = gethostid()
long hostid;

sethostid(hostid)
long hostid;

DESCRIPTION
The sethostid system call establishes a 32-bit identifier for the current processor that is intended to be unique among all UNIX systems in existence. This normally resembles the Internet address for the local machine, as returned by gethostbyname(), and thus usually never needs to be set. This call is restricted to the superuser. The hostid argument is stored in the filename /etc/hostid.

RETURN VALUES
The gethostid system call returns the 32-bit identifier for the current host as set by a previous sethostid() system call or the hostid user call.

FILES
/etc/hostid

AUTHOR
Mitchum DSouza (m.dsouza@mrc-apu.cam.ac.uk)

SEE ALSO
hostid(1), gethostbyname(2)