1gethostid(3C)            Standard C Library Functions            gethostid(3C)
2
3
4

NAME

6       gethostid - get an identifier for the current host
7

SYNOPSIS

9       #include <unistd.h>
10
11       long gethostid(void);
12
13

DESCRIPTION

15       The  gethostid() function returns the 32-bit identifier for the current
16       host. If the hardware capability exists, this identifier is taken  from
17       platform-dependent stable storage; otherwise it is a randomly generated
18       number. It is not guaranteed to be unique.
19
20
21       If the calling thread's process is executing within a  non-global  zone
22       that  emulates  a host identifier, then the zone's emulated 32-bit host
23       identifier is returned.
24

ATTRIBUTES

26       See attributes(5) for descriptions of the following attributes:
27
28
29
30
31       ┌─────────────────────────────┬─────────────────────────────┐
32       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
33       ├─────────────────────────────┼─────────────────────────────┤
34       │Interface Stability          │Committed                    │
35       ├─────────────────────────────┼─────────────────────────────┤
36       │MT-Level                     │MT-Safe                      │
37       ├─────────────────────────────┼─────────────────────────────┤
38       │Standard                     │See standards(5).            │
39       └─────────────────────────────┴─────────────────────────────┘
40

SEE ALSO

42       hostid(1), sysinfo(2), attributes(5), standards(5), zones(5)
43
44
45
46SunOS 5.11                        29 Jan 2009                    gethostid(3C)
Impressum