• Home
  • Raw
  • Download

Lines Matching full:uuid

17  * UUID - Universally Unique IDentifier - 128 bits unique number.
18 * There are 5 versions and one variant of UUID defined by RFC4122
19 * specification. A UUID contains a set of fields. The set varies
20 * depending on the version of the UUID, as shown below:
27 * Layout of UUID:
36 * UUID binary format (16 bytes):
40 * UUID string is 36 length of characters (36 bytes):
47 * When converting to a binary UUID, le means the field should be converted
50 * UUID is also used as GUID (Globally Unique Identifier) with the same binary
60 int uuid_str_valid(const char *uuid) in uuid_str_valid() argument
64 if (uuid == NULL) in uuid_str_valid()
67 for (i = 0, valid = 1; uuid[i] && valid; i++) { in uuid_str_valid()
70 valid = (uuid[i] == '-'); in uuid_str_valid()
73 valid = isxdigit(uuid[i]); in uuid_str_valid()
140 * uuid_str_to_bin() - convert string UUID or GUID to big endian binary data.
142 * @param uuid_str - pointer to UUID or GUID string [37B] or GUID shorcut
144 * @str_format - UUID string format: 0 - UUID; 1 - GUID
190 * uuid_bin_to_str() - convert big endian binary data to string UUID or GUID.
192 * @param uuid_bin: pointer to binary data of UUID (big endian) [16B]
194 * @str_format: bit 0: 0 - UUID; 1 - GUID
208 * UUID and GUID bin data - always in big endian: in uuid_bin_to_str()
236 * gen_rand_uuid() - this function generates a random binary UUID version 4.
246 struct uuid *uuid = (struct uuid *)ptr; in gen_rand_uuid() local
255 clrsetbits_be16(&uuid->time_hi_and_version, in gen_rand_uuid()
259 clrsetbits_8(&uuid->clock_seq_hi_and_reserved, in gen_rand_uuid()
263 memcpy(uuid_bin, uuid, 16); in gen_rand_uuid()
267 * gen_rand_uuid_str() - this function generates UUID v4 (random) in two string
268 * formats UUID or GUID.
271 * @param - uuid output type: UUID - 0, GUID - 1
277 /* Generate UUID (big endian) */ in gen_rand_uuid_str()
280 /* Convert UUID bin to UUID or GUID formated STRING */ in gen_rand_uuid_str()
287 char uuid[UUID_STR_LEN + 1]; in do_uuid() local
290 if (!strcmp(argv[0], "uuid")) in do_uuid()
298 gen_rand_uuid_str(uuid, str_format); in do_uuid()
301 printf("%s\n", uuid); in do_uuid()
303 env_set(argv[1], uuid); in do_uuid()
308 U_BOOT_CMD(uuid, CONFIG_SYS_MAXARGS, 1, do_uuid,
309 "UUID - generate random Universally Unique Identifier",
313 "e.g. uuid uuid_env"
317 "GUID - generate Globally Unique Identifier based on random UUID",