Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
Data Structures | |
struct | uuid |
Binary representation of a UUID. More... | |
Macros | |
#define | UUID_SIZE 16U |
Number of bytes in the binary representation of a UUID. | |
#define | UUID_STR_LEN 37U |
Length of the UUID canonical string representation, including the NULL terminator. | |
#define | UUID_BASE64_LEN 25U |
Length of the UUID base64 string representation, including the NULL terminator. | |
#define | UUID_BASE64URL_LEN 23U |
Length of the UUID base64 URL and filename safe string representation, including the NULL terminator. | |
Functions | |
int | uuid_generate_v4 (struct uuid *out) |
Generate a UUIDv4. | |
int | uuid_generate_v5 (const struct uuid *namespace, const void *data, size_t data_size, struct uuid *out) |
Generate a UUIDv5. | |
int | uuid_copy (const struct uuid *data, struct uuid *out) |
Copy an UUID into another UUID. | |
int | uuid_from_buffer (const uint8_t data[16U], struct uuid *out) |
Create a uuid_t from a binary (big-endian) formatted UUID. | |
int | uuid_from_string (const char data[37U], struct uuid *out) |
Parse a UUID from its canonical (RFC9562) string representation. | |
int | uuid_to_buffer (const struct uuid *data, uint8_t out[16U]) |
Create a uuid_t from a binary (big-endian) formatted UUID. | |
int | uuid_to_string (const struct uuid *data, char out[37U]) |
Convert a UUID to its canonical (RFC9562) string representation. | |
int | uuid_to_base64 (const struct uuid *data, char out[25U]) |
Convert a UUID to its base 64 (RFC 3548, RFC 4648) string representation. | |
int | uuid_to_base64url (const struct uuid *data, char out[23U]) |
Convert a UUID to its base 64 (RFC 4648 sec. | |
#define UUID_BASE64_LEN 25U |
#include <zephyr/sys/uuid.h>
Length of the UUID base64 string representation, including the NULL terminator.
#define UUID_BASE64URL_LEN 23U |
#include <zephyr/sys/uuid.h>
Length of the UUID base64 URL and filename safe string representation, including the NULL terminator.
#define UUID_SIZE 16U |
#include <zephyr/sys/uuid.h>
Number of bytes in the binary representation of a UUID.
#define UUID_STR_LEN 37U |
#include <zephyr/sys/uuid.h>
Length of the UUID canonical string representation, including the NULL terminator.
#include <zephyr/sys/uuid.h>
Copy an UUID into another UUID.
data | Input data to copy. |
out | Destination for the copy. |
0 | The UUID has been correctly copied in dst |
-EINVAL | dst is not acceptable |
#include <zephyr/sys/uuid.h>
Create a uuid_t from a binary (big-endian) formatted UUID.
data | The buffer where the binary UUID is stored in a big-endian order. |
out | The UUID where the result will be written. |
0 | The UUID has been correctly parsed and stored in out |
-EINVAL | data or out are not acceptable |
int uuid_from_string | ( | const char | data[37U], |
struct uuid * | out ) |
#include <zephyr/sys/uuid.h>
Parse a UUID from its canonical (RFC9562) string representation.
data | A pointer to the string to be parsed. |
out | The UUID where the result will be written. |
0 | The UUID has been correctly parsed and stored in out |
-EINVAL | input or out are not acceptable |
int uuid_generate_v4 | ( | struct uuid * | out | ) |
#include <zephyr/sys/uuid.h>
Generate a UUIDv4.
out | The UUID where the result will be written. |
0 | The UUID has been correctly generated and stored in out |
-EINVAL | out is not acceptable |
int uuid_generate_v5 | ( | const struct uuid * | namespace, |
const void * | data, | ||
size_t | data_size, | ||
struct uuid * | out ) |
#include <zephyr/sys/uuid.h>
Generate a UUIDv5.
This function computes a deterministic UUID starting from a namespace UUID and binary data.
namespace | A pointer to an UUID to be used as namespace. |
data | A pointer to the data that will be hashed to produce the UUID. |
data_size | The size of the data buffer. |
out | The UUID where the result will be written. |
0 | The UUID has been correctly generated and stored in out |
-EINVAL | out is not acceptable |
-ENOMEM | Memory allocation failed |
-ENOTSUP | mbedTLS returned an unrecognized error |
int uuid_to_base64 | ( | const struct uuid * | data, |
char | out[25U] ) |
#include <zephyr/sys/uuid.h>
Convert a UUID to its base 64 (RFC 3548, RFC 4648) string representation.
data | The UUID to convert to string. |
out | A pointer to a previously allocated buffer where the result will be written. |
0 | The UUID has been converted and written in out |
-EINVAL | out is not acceptable |
int uuid_to_base64url | ( | const struct uuid * | data, |
char | out[23U] ) |
#include <zephyr/sys/uuid.h>
Convert a UUID to its base 64 (RFC 4648 sec.
5) URL and filename safe string representation.
data | The UUID to convert to string. |
out | A pointer to a previously allocated buffer where the result will be written. |
0 | The UUID has been converted and written in out |
-EINVAL | out is not acceptable |
#include <zephyr/sys/uuid.h>
Create a uuid_t from a binary (big-endian) formatted UUID.
data | The input UUID to store in the buffer. |
out | The buffer where the binary UUID is stored in a big-endian order. |
0 | The UUID has been correctly parsed and stored in buff |
-EINVAL | buff is not acceptable |
int uuid_to_string | ( | const struct uuid * | data, |
char | out[37U] ) |
#include <zephyr/sys/uuid.h>
Convert a UUID to its canonical (RFC9562) string representation.
data | The UUID to convert to string. |
out | A pointer to a previously allocated buffer where the result will be written. |
0 | The UUID has been converted and written in out |
-EINVAL | out is not acceptable |