DragonFly On-Line Manual Pages

Search: Section:  

UUID(3)               DragonFly Library Functions Manual               UUID(3)


uuid_addr_lookup, uuid_compare, uuid_create, uuid_create_nil, uuid_equal, uuid_from_string, uuid_hash, uuid_is_nil, uuid_name_lookup, uuid_reset_lookup, uuid_to_string -- DCE 1.1 compliant UUID functions


Standard C Library (libc, -lc)


#include <uuid.h> void uuid_addr_lookup(const uuid_t *u, char **strp, uint32_t *status); int32_t uuid_compare(const uuid_t *uuid1, const uuid_t *uuid2, uint32_t *status); void uuid_create(uuid_t *uuid, uint32_t *status); void uuid_create_nil(uuid_t *uuid, uint32_t *status); int32_t uuid_equal(const uuid_t *uuid1, const uuid_t *uuid2, uint32_t *status); void uuid_from_string(const char *str, uuid_t *uuid, uint32_t *status); uint16_t uuid_hash(const uuid_t *uuid, uint32_t *status); int32_t uuid_is_nil(const uuid_t *uuid, uint32_t *status); void uuid_name_lookup(uuid_t *u, const char *str, uint32_t *status); void uuid_reset_lookup(void); void uuid_to_string(const uuid_t *uuid, char **str, uint32_t *status); void uuid_enc_le(void *buf, const uuid_t *uuid); void uuid_dec_le(const void *buf, uuid_t *); void uuid_enc_be(void *buf, const uuid_t *uuid); void uuid_dec_be(const void *buf, uuid_t *);


The family of DCE 1.1 compliant UUID functions allow applications to operate on universally unique identifiers, or UUIDs. The uuid_create() and uuid_create_nil() functions create UUIDs. The uuid_compare(), uuid_equal() and uuid_is_nil() functions can be used to test UUIDs. To convert from the binary representation to the string representation or vice versa, use uuid_to_string() or uuid_from_string() respectively. A 16-bit hash value can be obtained by calling uuid_hash(). String equivalents to UUIDs may be available. The uuid_addr_lookup() function will lookup the symbolic name given a UUID. The variable *strp should be initialized to NULL. Successive calls to uuid_addr_lookup() will free the previous contents prior to doing the lookup. The last string may be freed by calling the function with a NULL UUID. If a lookup fails, *strp will be set to NULL and *status (if status is not NULL) will be set to uuid_s_not_found. Otherwise *strp will be assigned to the symbolic name and *status will be set to uuid_s_ok. The uuid_name_lookup() function will lookup a UUID given a symbolic name. The contents of the uuid will be zeroed out if a lookup fails. The uuid_reset_lookup() function will clear its in-memory cache of UUID<->NAME conversions. The next lookup will reload the cache. The uuid_enc_le() and uuid_enc_be() functions encode a binary representa- tion of a UUID into an octet stream in little-endian and big-endian byte- order, respectively. The destination buffer must be pre-allocated by the caller, and must be large enough to hold the 16-octet binary UUID. These routines are not part of the DCE RPC API. They are provided for conve- nience. The uuid_dec_le() and uuid_dec_be() functions decode a UUID from an octet stream in little-endian and big-endian byte-order, respectively. These routines are not part of the DCE RPC API. They are provided for conve- nience.


The successful or unsuccessful completion of the function is returned in the status argument. Possible values are: uuid_s_ok The function completed successfully. uuid_s_bad_version The UUID does not have a known version. uuid_s_invalid_string_uuid The string representation of an UUID is not valid. uuid_s_no_memory The meaning of the code escaped the writers mind. uuid_s_not_found A UUID lookup failed.


/etc/defaults/uuids A list of UUIDs and their symbolic names provided by the OS vendor. /etc/uuids A list of UUIDs and their symbolic names provided by the system administrator.


uuidgen(1), uuidgen(2), uuids(5)


The UUID functions conform to the DCE 1.1 RPC specification. DragonFly 3.5 August 13, 2008 DragonFly 3.5

Search: Section: