#include <uuid/uuid.h>
uuid/uuid.h
macro_UUID_STRING_T
#define _UUID_STRING_T
typedefuuid_string_t
typedef __darwin_uuid_string_t uuid_string_t
macroUUID_DEFINE
#define UUID_DEFINE(name, u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15) static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15}
variableUUID_NULL
UUID_DEFINE(UUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
functionuuid_clear
void uuid_clear(uuid_t uu)
functionuuid_compare
int uuid_compare(const uuid_t uu1, const uuid_t uu2)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Compares two UUIDs byte by byte, in the manner of memcmp. Returns a value less than, equal to, or greater than zero as uu1 is lexically less than, equal to, or greater than uu2. Kernel counterpart of uuid_compare(3).
functionuuid_copy
void uuid_copy(uuid_t dst, const uuid_t src)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Copies the UUID src into dst. Kernel counterpart of uuid_copy(3).
functionuuid_generate
void uuid_generate(uuid_t out)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Generates a new UUID into out. Identical to uuid_generate_random: the kernel always uses the random-based (version 4) algorithm. Kernel counterpart of uuid_generate(3).
functionuuid_generate_random
void uuid_generate_random(uuid_t out)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Generates a version 4 (random) UUID into out. Fills all 16 bytes from read_random, then sets the version field to 4 and the variant bits to the RFC 4122 variant. Kernel counterpart of uuid_generate_random(3).
functionuuid_generate_time
void uuid_generate_time(uuid_t out)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Generates a version 1 (time-based) UUID into out, from the current time in 100-nanosecond units since the UUID epoch (15 October 1582), a random clock sequence, and a node field taken from an Ethernet hardware address when one is available (uuid_get_ethernet); otherwise a random node with the multicast bit set is used so it cannot collide with a real MAC address. Kernel counterpart of uuid_generate_time(3).
functionuuid_generate_early_random
void uuid_generate_early_random(uuid_t out)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Generates a version 4 (random) UUID into out using read_frandom, the early-boot random generator, instead of read_random. For use early in boot before the full random subsystem is available; otherwise identical to uuid_generate_random. Kernel-only extension, not part of uuid(3).
functionuuid_is_null
int uuid_is_null(const uuid_t uu)
functionuuid_parse
int uuid_parse(const uuid_string_t in, uuid_t uu)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Parses the 36-character string form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (hexadecimal digits, either case) into the binary UUID uu. Returns 0 on success, -1 if the string is malformed or has trailing characters. Kernel counterpart of uuid_parse(3).
functionuuid_unparse
void uuid_unparse(const uuid_t uu, uuid_string_t out)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Converts the binary UUID uu to its 36-character string form plus terminating NUL in out. Identical to uuid_unparse_upper: the kernel emits uppercase hex digits. Kernel counterpart of uuid_unparse(3).
functionuuid_unparse_lower
void uuid_unparse_lower(const uuid_t uu, uuid_string_t out)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Converts the binary UUID uu to its string form in out, using lowercase hexadecimal digits. Kernel counterpart of uuid_unparse_lower(3).
functionuuid_unparse_upper
void uuid_unparse_upper(const uuid_t uu, uuid_string_t out)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libkern/uuid/uuid.c
Converts the binary UUID uu to its string form in out, using uppercase hexadecimal digits. Kernel counterpart of uuid_unparse_upper(3).