GETHOSTID(2,L) AIX Technical Reference GETHOSTID(2,L)
-------------------------------------------------------------------------------
gethostid, sethostid
PURPOSE
Gets or sets the unique identifier of the current Internet host.
SYNTAX
int gethostid ( ) int sethostid (hostid)
int hostid;
DESCRIPTION
The gethostid system call returns the 32-bit identifier for the current host,
as set by sethostid.
The sethostid system call establishes a 32-bit identifier for the current host
that is intended to be unique. Often, this is a DARPA Internet address for the
local machine.
This system call can only be used by processes with an effective user ID of
superuser.
RETURN VALUE
Upon successful completion, the gethostid system call returns the identifier
for the current host, and the sethostid system call returns a value of 0. If
the gethostid or sethostid system call fails, a value of -1 is returned, and
errno is set to indicate the error.
ERROR CONDITIONS
The gethostid or sethostid system call fails if the following is true:
EINVAL There are no IP interfaces available. IBM AIX TCP/IP is not installed
on this system.
The sethostid system call also fails if the following is true:
EPERM The calling process did not have an effective user ID of superuser.
RELATED INFORMATION
In this book: "getsockname."
Processed November 7, 1990 GETHOSTID(2,L) 1
GETHOSTID(2,L) AIX Technical Reference GETHOSTID(2,L)
The hostname command in AIX TCP/IP User's Guide.
Processed November 7, 1990 GETHOSTID(2,L) 2