UUID types and functions. More...
Data Structures | |
| struct | spdk_uuid |
Macros | |
| #define | SPDK_UUID_STRING_LEN 37 /* 36 characters + null terminator */ |
Functions | |
| SPDK_STATIC_ASSERT (sizeof(struct spdk_uuid)==16, "Incorrect size") | |
| int | spdk_uuid_parse (struct spdk_uuid *uuid, const char *uuid_str) |
| Convert UUID in textual format into a spdk_uuid. | |
| int | spdk_uuid_fmt_lower (char *uuid_str, size_t uuid_str_size, const struct spdk_uuid *uuid) |
| Convert UUID in spdk_uuid into lowercase textual format. | |
| int | spdk_uuid_compare (const struct spdk_uuid *u1, const struct spdk_uuid *u2) |
| Compare two UUIDs. | |
| void | spdk_uuid_generate (struct spdk_uuid *uuid) |
| Generate a new UUID. | |
| int | spdk_uuid_generate_sha1 (struct spdk_uuid *uuid, struct spdk_uuid *ns_uuid, const char *name, size_t len) |
| Generate a new UUID using SHA1 hash. | |
| void | spdk_uuid_copy (struct spdk_uuid *dst, const struct spdk_uuid *src) |
| Copy a UUID. | |
| bool | spdk_uuid_is_null (const struct spdk_uuid *uuid) |
| Compare the UUID to the NULL value (all bits equal to zero). | |
| void | spdk_uuid_set_null (struct spdk_uuid *uuid) |
| Set the value of UUID to the NULL value. | |
UUID types and functions.
Compare two UUIDs.
| u1 | UUID 1. |
| u2 | UUID 2. |
Copy a UUID.
| src | Source UUID to copy from. |
| dst | Destination UUID to store. |
| int spdk_uuid_fmt_lower | ( | char * | uuid_str, |
| size_t | uuid_str_size, | ||
| const struct spdk_uuid * | uuid ) |
Convert UUID in spdk_uuid into lowercase textual format.
| uuid_str | User-provided string buffer to write the textual format into. |
| uuid_str_size | Size of uuid_str buffer. Must be at least SPDK_UUID_STRING_LEN. |
| uuid | UUID to convert to textual format. |
| void spdk_uuid_generate | ( | struct spdk_uuid * | uuid | ) |
Generate a new UUID.
| [out] | uuid | User-provided UUID buffer to fill. |
| int spdk_uuid_generate_sha1 | ( | struct spdk_uuid * | uuid, |
| struct spdk_uuid * | ns_uuid, | ||
| const char * | name, | ||
| size_t | len ) |
Generate a new UUID using SHA1 hash.
| [out] | uuid | User-provided UUID buffer to fill. |
| ns_uuid | Well-known namespace UUID for generated UUID. | |
| name | Arbitrary, binary string. | |
| len | Length of binary string. |
| bool spdk_uuid_is_null | ( | const struct spdk_uuid * | uuid | ) |
Compare the UUID to the NULL value (all bits equal to zero).
| uuid | The UUID to test. |
| int spdk_uuid_parse | ( | struct spdk_uuid * | uuid, |
| const char * | uuid_str ) |
Convert UUID in textual format into a spdk_uuid.
| [out] | uuid | User-provided UUID buffer. |
| uuid_str | UUID in textual format in C string. |
| void spdk_uuid_set_null | ( | struct spdk_uuid * | uuid | ) |
Set the value of UUID to the NULL value.
| uuid | The UUID to set. |