gethostid(2) — 4 BSD
NAME
gethostid, sethostid − get/set unique identifier of current host
SYNOPSIS
hostid = gethostid ()
int hostid;
sethostid (hostid)
int hostid;
DESCRIPTION
sethostid establishes a 32-bit identifier for the current processor which is intended to be unique among all UNIX systems in existence. This is normally a DARPA Internet address for the local machine. This call is allowed only to the super-user and is normally performed at boot time.
gethostid returns the 32-bit identifier for the current processor.
NOTE
Two versions of gethostid may be accessed. The first version is the proprietary CX system call which directly accesses the kernel. The other version is defined in the 88open Object Compatibility Standard Networking Supplement (OCSNS) which is implemented within the C library and accesses the kernel only through system calls defined in the Binary Compatibility Standard (BCS). The OCSNS version is accessed through specific OCS options passed to cc(1) and/or ld(1).
SEE ALSO
CX/UX Programmer’s Reference Manual