GETHOSTUUID(2) | 2 (mac os x system calls manual) | GETHOSTUUID(2) |
gethostuuid
—
return a unique identifier for the current
machine
#include
<unistd.h>
int
gethostuuid
(uuid_t id,
const struct timespec *wait);
The
gethostuuid
()
function returns a 16-byte uuid_t specified by
id, that uniquely identifies the current machine. Be
aware that the hardware identifiers that
gethostuuid
() uses to generate the UUID can
themselves be modified.
The wait argument is a pointer to a struct timespec that specifies the maximum time to wait for the result. Setting the tv_sec and tv_nsec fields to zero means to wait indefinitely until it completes.
The gethostuuid
() function returns zero on
success or -1 on error.
The gethostuuid
() functions fails if:
EFAULT
]EWOULDBLOCK
]November 5, 2008 | Mac OS X |