--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->
| UUID_Clear() | UUID_Compare() | UUID_Copy() | UUID_Generate() |
| UUID_GetNameSpace() | UUID_Pack() | UUID_Parse() | UUID_Unpack() |
| UUID_Unparse() |
void UUID_Clear(
uuid_t * uuid );
Clears the specified uuid.
uuid - UUID to be cleared.
This function always succeeds.
int UUID_Compare(
const uuid_t * u1,
const uuid_t * u2 );
Compares between two UUIDs.
u1, u2 - UUIDs to be compared.
<0 - if the u1 is lexically BEFORE u2 =0 - if u1 equals u2 >0 - if the u1 is lexically AFTER u2
void UUID_Copy(
const uuid_t * src,
uuid_t * dst );
Copies the UUID's.
src - the source UUID. dst - the desitation UUID.
This function always succeeds.
void UUID_Generate(
uuid_type_t type,
uuid_t * uuid );
Generate Universally Unique Identifier conforming the RFC 4122.
type - type of the identifier:
UUID_TYPE_DCE_RANDOM - random identifier. Do not use it on purpose
due to the weak source of noise on AROS.
UUID_TYPE_DCE_TIME - system time based identifier.
uuid - storage for generated UUID.
This function always succeeds.
void UUID_GetNameSpace(
uint32_t NameSpace,
uuid_t * uuid );
Copy a predefined namespace UUID into a caller-supplied UUID object. This does not generate a name-based UUID.
NameSpace - UUID_NAMESPACE_DNS, UUID_NAMESPACE_URL,
UUID_NAMESPACE_OID or UUID_NAMESPACE_X500.
uuid - Non-NULL pointer to a writable uuid_t.
None. The selected UUID is copied to *uuid. An unrecognized NameSpace value writes the nil UUID (all fields zero).
The namespace values are respectively 6ba7b810-9dad-11d1-80b4-00c04fd430c8 (DNS), 6ba7b811-9dad-11d1-80b4-00c04fd430c8 (URL), 6ba7b812-9dad-11d1-80b4-00c04fd430c8 (OID), and 6ba7b814-9dad-11d1-80b4-00c04fd430c8 (X.500). The caller provides and owns the output object.
void UUID_Pack(
const uuid_t * uuid,
uint8_t * out );
Serialize a UUID into a 16-byte sequence. The time_low, time_mid and time_hi_and_version fields are written most significant byte first, followed by clock_seq_hi_and_reserved, clock_seq_low and the six node bytes in their stored order. The result is independent of the native byte order of uuid_t.
uuid - Non-NULL pointer to a readable uuid_t.
out - Non-NULL pointer to at least 16 writable bytes. The output
buffer must not overlap the input object.
None. Exactly 16 bytes are written to out; no terminator is added.
Neither buffer size nor UUID validity is checked.
int UUID_Parse(
const char * in,
uuid_t * uuid );
Convert a NUL-terminated UUID string to a uuid_t. The required form is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where each x is a hexadecimal digit. Uppercase and lowercase hexadecimal letters are accepted. The input must contain exactly UUID_STRLEN (36) characters before the terminator; braces, surrounding whitespace and prefixes are not accepted.
in - Non-NULL pointer to a readable NUL-terminated string. uuid - Non-NULL pointer to a writable uuid_t.
1 on success, with the converted value in *uuid. 0 for an invalid length, separator or hexadecimal digit; *uuid is left unchanged.
Version and variant fields are not validated. The nil UUID is accepted, and the input string is unchanged.
void UUID_Unpack(
const uint8_t * in,
uuid_t * uuid );
Deserialize the 16-byte representation produced by UUID_Pack(). The first four bytes form time_low, the next two time_mid and the next two time_hi_and_version, all most significant byte first. The remaining bytes supply clock_seq_hi_and_reserved, clock_seq_low and the six node bytes.
in - Non-NULL pointer to at least 16 readable bytes.
uuid - Non-NULL pointer to a writable uuid_t. The output object
must not overlap the input buffer.
None. All UUID fields are written to *uuid.
The input is unchanged. Neither buffer size nor UUID validity is checked; the nil UUID is accepted.
void UUID_Unparse(
const uuid_t * uuid,
char * out );
Write the UUID as lowercase hexadecimal text in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, followed by a NUL byte.
uuid - Non-NULL pointer to a readable uuid_t.
out - Non-NULL pointer to a writable buffer of at least
UUID_STRLEN + 1 (37) bytes, separate from the input object.
None. The textual representation is written to out.
The caller must provide the full 37-byte buffer; there is no size argument. Version and variant fields are not validated.