|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
Packed on-disk structures describing hardware and software used during image acquisition. More...
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | DumpHardwareHeader |
| Header that precedes a sequence of dump hardware entries and their variable-length payload. More... | |
| struct | DumpHardwareEntry |
| Per-environment length table describing subsequent UTF-8 strings and optional extent array. More... | |
Typedefs | |
| typedef struct DumpHardwareHeader | DumpHardwareHeader |
| typedef struct DumpHardwareEntry | DumpHardwareEntry |
Packed on-disk structures describing hardware and software used during image acquisition.
A Dump Hardware block (identifier = BlockType::DumpHardwareBlock) records one or more dump "environments" – typically combinations of a physical device (drive, controller, adapter) and the software stack that performed the read operation. Each environment is represented by a DumpHardwareEntry followed by a sequence of UTF‑8 strings and an optional array of extent ranges (DumpExtent, defined in context.h) that delimit portions of the medium this environment contributed to.
Binary layout (little-endian, packed, all multi-byte integers LE):
DumpHardwareHeader (sizeof = 16 bytes) identifier (4) -> BlockType::DumpHardwareBlock entries (2) -> number of following hardware entries length (4) -> total bytes of payload that follow this header crc64 (8) -> CRC64-ECMA of the payload bytes
Repeated for i in [0, entries): DumpHardwareEntry (36 bytes) manufacturerLength (4) modelLength (4) revisionLength (4) firmwareLength (4) serialLength (4) softwareNameLength (4) softwareVersionLength (4) softwareOperatingSystemLength (4) extents (4) -> number of DumpExtent structs after the strings
Variable-length UTF-8 strings (not NUL-terminated on disk) appear immediately after the entry, in the exact order of the length fields above; each string is present only if its length > 0. The reader allocates an extra byte to append '\0' for in-memory convenience.
Array of 'extents' DumpExtent structures (each 16 bytes: start, end) follows the strings if extents > 0. The semantic of each extent is an inclusive [start, end] logical sector (or unit) range contributed by this hardware/software combination.
CRC semantics:
Invariants / validation recommendations:
Memory management notes (runtime library):
Definition in file dump.h.
| typedef struct DumpHardwareEntry DumpHardwareEntry |
| typedef struct DumpHardwareHeader DumpHardwareHeader |