Changeset 3887aab2 in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2024-06-13T16:03:39Z (19 months ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master
Children:
c15296b
Parents:
0b1f01c
git-author:
Miroslav Cimerman <mc@…> (2024-06-12 21:08:14)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2024-06-13 16:03:39)
Message:

Change internal UUID representation to named fields

Location:
uspace/lib/c/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/types/uuid.h

    r0b1f01c r3887aab2  
    3838#include <stdint.h>
    3939
    40 enum {
    41         uuid_bytes = 16
    42 };
     40#define _UUID_NODE_LEN 6
    4341
    4442/** Universally Unique Identifier */
     43
    4544typedef struct {
    46         uint8_t b[uuid_bytes];
     45        uint32_t time_low;
     46        uint16_t time_mid;
     47        uint16_t time_hi_and_version;
     48        uint8_t clock_seq_hi_and_reserved;
     49        uint8_t clock_seq_low;
     50        uint8_t node[_UUID_NODE_LEN];
    4751} uuid_t;
    4852
  • uspace/lib/c/include/uuid.h

    r0b1f01c r3887aab2  
    4343extern void uuid_encode(uuid_t *, uint8_t *);
    4444extern void uuid_decode(uint8_t *, uuid_t *);
     45extern void uuid_encode_le(uuid_t *, uint8_t *);
     46extern void uuid_decode_le(uint8_t *, uuid_t *);
    4547extern errno_t uuid_parse(const char *, uuid_t *, const char **);
    4648extern errno_t uuid_format(uuid_t *, char **, bool);
Note: See TracChangeset for help on using the changeset viewer.