xref: /original-bsd/lib/libc/compat-43/gethostid.3 (revision 60e1d6e0)
1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)gethostid.3	6.6 (Berkeley) 03/10/91
7.\"
8.Dd
9.Dt GETHOSTID 2
10.Os BSD 4.2
11.Sh NAME
12.Nm gethostid ,
13.Nm sethostid
14.Nd get/set unique identifier of current host
15.Sh SYNOPSIS
16.Fd #include <unistd.h>
17.Ft long
18.Fn gethostid void
19.Ft int
20.Fn sethostid "long hostid"
21.Sh DESCRIPTION
22.Fn Sethostid
23establishes a 32-bit identifier for the
24current processor that is intended to be unique among all
25UNIX systems in existence.  This is normally a DARPA Internet
26address for the local machine.  This call is allowed only to the
27super-user and is normally performed at boot time.
28.Pp
29.Fn Gethostid
30returns the 32-bit identifier for the current processor.
31.Sh SEE ALSO
32.Xr hostid 1 ,
33.Xr gethostname 2
34.Sh BUGS
3532 bits for the identifier is too small.
36.Sh HISTORY
37The
38.Nm
39function call appeared in
40.Bx 4.2 .
41