libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
AaruHeaderV2 Struct Reference

Version 2 container header with GUID, alignment shifts, and feature negotiation bitmaps. More...

`#include <aaruformat/structs/header.h>`

## Data Fields
uint64_t | identifier
| File magic (AARU_MAGIC).
uint8_t | application [64]
| UTF-8 creator application name (fixed 64 bytes).
uint8_t | imageMajorVersion
| Container format major version.
uint8_t | imageMinorVersion
| Container format minor version.
uint8_t | applicationMajorVersion
| Creator application major version.
uint8_t | applicationMinorVersion
| Creator application minor / patch version.
uint32_t | mediaType
| Media type enumeration (value from MediaType).
uint64_t | indexOffset
| Absolute byte offset to primary index block (MUST be > 0; 0 => corrupt/unreadable).
int64_t | creationTime
| Creation FILETIME (100 ns since 1601-01-01 UTC).
int64_t | lastWrittenTime
| Last modification FILETIME (100 ns since 1601-01-01 UTC).
uint8_t | guid [16]
| 128-bit image GUID (binary, not text); stable across children.
uint8_t | blockAlignmentShift
| log2 block alignment (block size alignment = 2^blockAlignmentShift bytes).
uint8_t | dataShift
| log2 sectors/items per block-index increment in DDT entries (2^dataShift).
uint8_t | tableShift
| log2 sectors spanned by each primary DDT entry (0 = single-level).
uint64_t | featureCompatible
| Feature bits: unimplemented bits are ignorable (still R/W safe).
uint64_t | featureCompatibleRo
| Feature bits: unimplemented -> degrade to read-only access.
uint64_t | featureIncompatible
| Feature bits: any unimplemented -> abort (cannot open safely).

## Detailed Description

Version 2 container header with GUID, alignment shifts, and feature negotiation bitmaps.

Additions over v1:

- guid: stable 128-bit identifier enabling linkage by derivative images.
- blockAlignmentShift / dataShift / tableShift: global structural hints copied into data & DDT blocks.
- featureCompatible / featureCompatibleRo / featureIncompatible: capability bitmasks.

Feature bitmask semantics:

- featureCompatible: Optional features; absence of implementation should not impact R/W correctness.
- featureCompatibleRo: If unimplemented, image MAY be opened read-only.
- featureIncompatible: If any bit unimplemented, image MUST NOT be opened (prevent misinterpretation).

Readers should AND their supported bit set with the header masks to decide access level (see file documentation). Writers must preserve unknown bits when saving an existing image.

Definition at line 106 of file header.h.

## Field Documentation

## ◆ application

uint8_t AaruHeaderV2::application[64]

UTF-8 creator application name (fixed 64 bytes).

Definition at line 109 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ applicationMajorVersion

uint8_t AaruHeaderV2::applicationMajorVersion

Creator application major version.

Definition at line 112 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ applicationMinorVersion

uint8_t AaruHeaderV2::applicationMinorVersion

Creator application minor / patch version.

Definition at line 113 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ blockAlignmentShift

uint8_t AaruHeaderV2::blockAlignmentShift

log2 block alignment (block size alignment = 2^blockAlignmentShift bytes).

Definition at line 119 of file header.h.

## ◆ creationTime

int64_t AaruHeaderV2::creationTime

Creation FILETIME (100 ns since 1601-01-01 UTC).

Definition at line 116 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ dataShift

uint8_t AaruHeaderV2::dataShift

log2 sectors/items per block-index increment in DDT entries (2^dataShift).

Definition at line 120 of file header.h.

## ◆ featureCompatible

uint64_t AaruHeaderV2::featureCompatible

Feature bits: unimplemented bits are ignorable (still R/W safe).

Definition at line 122 of file header.h.

Referenced by write_checksum_block().

## ◆ featureCompatibleRo

uint64_t AaruHeaderV2::featureCompatibleRo

Feature bits: unimplemented -> degrade to read-only access.

Definition at line 123 of file header.h.

## ◆ featureIncompatible

uint64_t AaruHeaderV2::featureIncompatible

Feature bits: any unimplemented -> abort (cannot open safely).

Definition at line 124 of file header.h.

## ◆ guid

uint8_t AaruHeaderV2::guid[16]

128-bit image GUID (binary, not text); stable across children.

Definition at line 118 of file header.h.

Referenced by aaruf_create().

## ◆ identifier

uint64_t AaruHeaderV2::identifier

File magic (AARU_MAGIC).

Definition at line 108 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ imageMajorVersion

uint8_t AaruHeaderV2::imageMajorVersion

Container format major version.

Definition at line 110 of file header.h.

Referenced by aaruf_create(), aaruf_open(), aaruf_verify_image(), process_data_block(), process_dumphw_block(), process_tracks_block(), verify_index_v1(), verify_index_v2(), and verify_index_v3().

## ◆ imageMinorVersion

uint8_t AaruHeaderV2::imageMinorVersion

Container format minor version.

Definition at line 111 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ indexOffset

uint64_t AaruHeaderV2::indexOffset

Absolute byte offset to primary index block (MUST be > 0; 0 => corrupt/unreadable).

Definition at line 115 of file header.h.

Referenced by aaruf_create(), aaruf_open(), aaruf_verify_image(), process_index_v1(), process_index_v2(), process_index_v3(), verify_index_v1(), verify_index_v2(), verify_index_v3(), and write_index_block().

## ◆ lastWrittenTime

int64_t AaruHeaderV2::lastWrittenTime

Last modification FILETIME (100 ns since 1601-01-01 UTC).

Definition at line 117 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ mediaType

uint32_t AaruHeaderV2::mediaType

Media type enumeration (value from MediaType).

Definition at line 114 of file header.h.

Referenced by aaruf_create(), and aaruf_open().

## ◆ tableShift

uint8_t AaruHeaderV2::tableShift

log2 sectors spanned by each primary DDT entry (0 = single-level).

Definition at line 121 of file header.h.

The documentation for this struct was generated from the following file:

- include/aaruformat/structs/header.h