Commit | Line | Data |
---|---|---|
88b3ccf2 KB |
1 | .\" Copyright (c) 1983 The Regents of the University of California. |
2 | .\" All rights reserved. | |
2b2314f1 | 3 | .\" |
91cff1e1 | 4 | .\" %sccs.include.redist.man% |
88b3ccf2 | 5 | .\" |
91cff1e1 | 6 | .\" @(#)gethostid.3 6.5 (Berkeley) %G% |
2b2314f1 | 7 | .\" |
55436667 | 8 | .TH GETHOSTID 2 "" |
2b2314f1 KM |
9 | .UC 5 |
10 | .SH NAME | |
11 | gethostid, sethostid \- get/set unique identifier of current host | |
12 | .SH SYNOPSIS | |
13 | .nf | |
14 | .ft B | |
15 | hostid = gethostid() | |
d2675937 | 16 | long hostid; |
2b2314f1 KM |
17 | .PP |
18 | .ft B | |
19 | sethostid(hostid) | |
d2675937 | 20 | long hostid; |
2b2314f1 KM |
21 | .fi |
22 | .SH DESCRIPTION | |
23 | .I Sethostid | |
24 | establishes a 32-bit identifier for the | |
214b5721 | 25 | current processor that is intended to be unique among all |
2b2314f1 KM |
26 | UNIX systems in existence. This is normally a DARPA Internet |
27 | address for the local machine. This call is allowed only to the | |
28 | super-user and is normally performed at boot time. | |
29 | .PP | |
30 | .I Gethostid | |
31 | returns the 32-bit identifier for the current processor. | |
32 | .SH SEE ALSO | |
33 | hostid(1), gethostname(2) | |
34 | .SH BUGS | |
35 | 32 bits for the identifier is too small. |