GETHOSTID(3) BSD Programmer's Manual GETHOSTID(3)
g
\bge
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd, s
\bse
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd - get/set unique identifier of current host
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
#
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<u
\bun
\bni
\bis
\bst
\btd
\bd.
\b.h
\bh>
\b>
g
\bge
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd(_
\bv_
\bo_
\bi_
\bd);
s
\bse
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd(_
\bl_
\bo_
\bn_
\bg _
\bh_
\bo_
\bs_
\bt_
\bi_
\bd);
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
S
\bSe
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd() establishes a 32-bit identifier for the current processor
that 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.
G
\bGe
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd() returns the 32-bit identifier for the current processor.
This function has been deprecated. The hostid should be set or retrieved
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
sysctl(2), gethostname(3), sysctl(8).
32 bits for the identifier is too small.
H
\bHI
\bIS
\bST
\bTO
\bOR
\bRY
\bY
The g
\bge
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd() and s
\bse
\bet
\bth
\bho
\bos
\bst
\bti
\bid
\bd() syscalls appeared in 4.2BSD and were
4.2 Berkeley Distribution June 2, 1993 1