HOSTID(1) MachTen Programmer’s Manual HOSTID(1)

NAME
hostid - set or print identifier of current host system

SYNOPSIS
hostid [hexnum or internet address]

DESCRIPTION
Hostid prints the identifier of the current host in hex-
adecimal. This numeric value is expected to be unique
across all hosts and is commonly set to the host’s Inter-
net address. The super-user can set the hostid by giving
a hexadecimal argument or the hostname; this is usually
done in the startup script /etc/rc. In MachTen, hostid is
used to specify which IP address mactcpd will reply with
when a MacTCP application requests a source IP address
before establishing a connection. Since MacTCP is single-
homed, many MacTCP applications assume their source IP
address will not change. In some cases, it may be neces-
sary to set hostid to the source IP address of the network
interface that the MacTCP application will ultimately use
for its connection before launching that MacTCP applica-
tion. Hostid returns the error EPERM if a non root users
tries to set the hostid, or if the IP address specified
does not match any of the available network interfaces.

SEE ALSO
gethostid(2), sethostid(2)

MachTen July 9, 1988 1