pdcomm_license_host_id
Function
Copies the host id of this machine.
PdcommStatus pdcomm_license_host_id(uint8_t *output, size_t capacity, size_t *required)The host id has the form PDH1-XXXX-XXXX-XXXX-XXXX (24 ASCII bytes, no terminating NUL). It is derived from the operating-system machine id and is what a SECS/GEM runtime or developer license lists in its hosts.
Parameters
| Name | Description |
|---|---|
output | Destination for the host id. May be NULL only when capacity is 0. |
capacity | Size of output in bytes. |
required | Receives the length of the host id (24), or 0 when it is unavailable. Must not be NULL. |
Returns
#PDCOMM_OK when the host id was copied; #PDCOMM_BUFFER_TOO_SMALL when capacity is smaller than *required (output untouched); #PDCOMM_INVALID_ARGUMENT when required is NULL, or output is NULL with a nonzero capacity; #PDCOMM_IO_ERROR when the machine id cannot be read, for example in a container without /etc/machine-id; #PDCOMM_INTERNAL_ERROR when a panic was contained.
Notes
- Thread safety: may be called from any thread.