Lines Matching full:uuid
15 * UUID - Universally Unique IDentifier - 128 bits unique number.
16 * There are 5 versions and one variant of UUID defined by RFC4122
17 * specification. A UUID contains a set of fields. The set varies
18 * depending on the version of the UUID, as shown below:
25 * Layout of UUID:
34 * UUID binary format (16 bytes):
38 * UUID string is 36 length of characters (36 bytes):
45 * When converting to a binary UUID, le means the field should be converted
48 * UUID is also used as GUID (Globally Unique Identifier) with the same binary
58 int uuid_str_valid(const char *uuid) in uuid_str_valid() argument
62 if (uuid == NULL) in uuid_str_valid()
65 for (i = 0, valid = 1; uuid[i] && valid; i++) { in uuid_str_valid()
68 valid = (uuid[i] == '-'); in uuid_str_valid()
71 valid = isxdigit(uuid[i]); in uuid_str_valid()
138 * uuid_str_to_bin() - convert string UUID or GUID to big endian binary data.
140 * @param uuid_str - pointer to UUID or GUID string [37B] or GUID shorcut
142 * @str_format - UUID string format: 0 - UUID; 1 - GUID
188 * uuid_bin_to_str() - convert big endian binary data to string UUID or GUID.
190 * @param uuid_bin - pointer to binary data of UUID (big endian) [16B]
192 * @str_format - UUID string format: 0 - UUID; 1 - GUID
204 * UUID and GUID bin data - always in big endian: in uuid_bin_to_str()
228 * gen_rand_uuid() - this function generates a random binary UUID version 4.
237 struct uuid uuid; in gen_rand_uuid() local
238 unsigned int *ptr = (unsigned int *)&uuid; in gen_rand_uuid()
242 for (i = 0; i < sizeof(struct uuid) / sizeof(*ptr); i++) in gen_rand_uuid()
245 clrsetbits_be16(&uuid.time_hi_and_version, in gen_rand_uuid()
249 clrsetbits_8(&uuid.clock_seq_hi_and_reserved, in gen_rand_uuid()
253 memcpy(uuid_bin, &uuid, sizeof(struct uuid)); in gen_rand_uuid()
257 * gen_rand_uuid_str() - this function generates UUID v4 (random) in two string
258 * formats UUID or GUID.
261 * @param - uuid output type: UUID - 0, GUID - 1
267 /* Generate UUID (big endian) */ in gen_rand_uuid_str()
270 /* Convert UUID bin to UUID or GUID formated STRING */ in gen_rand_uuid_str()
277 char uuid[UUID_STR_LEN + 1]; in do_uuid() local
280 if (!strcmp(argv[0], "uuid")) in do_uuid()
288 gen_rand_uuid_str(uuid, str_format); in do_uuid()
291 printf("%s\n", uuid); in do_uuid()
293 env_set(argv[1], uuid); in do_uuid()
298 U_BOOT_CMD(uuid, CONFIG_SYS_MAXARGS, 1, do_uuid,
299 "UUID - generate random Universally Unique Identifier",
303 "e.g. uuid uuid_env"
307 "GUID - generate Globally Unique Identifier based on random UUID",