diff options
author | Karel Zak | 2018-08-31 10:08:46 +0200 |
---|---|---|
committer | Karel Zak | 2018-08-31 10:08:46 +0200 |
commit | 9a312758eeee7c3dc3edcece0d60b68daac8ff3b (patch) | |
tree | 585a03a546c4553580a9b8aa83ff49718934f99d /libuuid | |
parent | tests: update fdisk output (diff) | |
download | kernel-qcow2-util-linux-9a312758eeee7c3dc3edcece0d60b68daac8ff3b.tar.gz kernel-qcow2-util-linux-9a312758eeee7c3dc3edcece0d60b68daac8ff3b.tar.xz kernel-qcow2-util-linux-9a312758eeee7c3dc3edcece0d60b68daac8ff3b.zip |
libuuid: add note about RFC4122 UUID layout
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libuuid')
-rw-r--r-- | libuuid/src/uuidP.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libuuid/src/uuidP.h b/libuuid/src/uuidP.h index 86a5e266f..78183ded7 100644 --- a/libuuid/src/uuidP.h +++ b/libuuid/src/uuidP.h @@ -45,6 +45,35 @@ #define TIME_OFFSET_HIGH 0x01B21DD2 #define TIME_OFFSET_LOW 0x13814000 +/* + * Note that RFC4122 defines UUID in more details: + * + * Field Data Type Octet Note + * ------------------------------------------------- + * time_low unsigned 32 0-3 The low field of the + * bit integer timestamp + * + * time_mid unsigned 16 4-5 The middle field of the + * bit integer timestamp + * + * time_hi_and_version unsigned 16 6-7 The high field of the + * bit integer timestamp multiplexed + * with the version number + * + * clock_seq_hi_and_rese unsigned 8 8 The high field of the + * rved bit integer clock sequence + * multiplexed with the + * variant + * + * clock_seq_low unsigned 8 9 The low field of the + * bit integer clock sequence + * + * node unsigned 48 10-15 The spatially unique + * bit integer node identifier + * + * We have clock_seq_hi_and_reserved (8bit) and clock_seq_low (8bit) + * merged into clock_seq (16bit). + */ struct uuid { uint32_t time_low; uint16_t time_mid; |