libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
header.h
Go to the documentation of this file.
1/*
2 * This file is part of the Aaru Data Preservation Suite.
3 * Copyright (c) 2019-2025 Natalia Portillo.
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef LIBAARUFORMAT_HEADER_H
20#define LIBAARUFORMAT_HEADER_H
21
58
59#define AARU_HEADER_APP_NAME_LEN 64
60#define GUID_SIZE 16
61
62#pragma pack(push, 1)
63
89
126
127#pragma pack(pop)
128
129#endif // LIBAARUFORMAT_HEADER_H
#define GUID_SIZE
Size in bytes of GUID / UUID-like binary identifier.
Definition header.h:60
#define AARU_HEADER_APP_NAME_LEN
Size in bytes (UTF-16LE) of application name field (32 UTF-16 code units).
Definition header.h:59
Version 2 container header with GUID, alignment shifts, and feature negotiation bitmaps.
Definition header.h:107
uint8_t application[64]
UTF-8 creator application name (fixed 64 bytes).
Definition header.h:109
uint8_t applicationMajorVersion
Creator application major version.
Definition header.h:112
uint64_t identifier
File magic (AARU_MAGIC).
Definition header.h:108
uint8_t tableShift
log2 sectors spanned by each primary DDT entry (0 = single-level).
Definition header.h:121
uint64_t featureIncompatible
Feature bits: any unimplemented -> abort (cannot open safely).
Definition header.h:124
int64_t lastWrittenTime
Last modification FILETIME (100 ns since 1601-01-01 UTC).
Definition header.h:117
uint64_t featureCompatible
Feature bits: unimplemented bits are ignorable (still R/W safe).
Definition header.h:122
uint64_t indexOffset
Absolute byte offset to primary index block (MUST be > 0; 0 => corrupt/unreadable).
Definition header.h:115
uint8_t dataShift
log2 sectors/items per block-index increment in DDT entries (2^dataShift).
Definition header.h:120
uint8_t applicationMinorVersion
Creator application minor / patch version.
Definition header.h:113
uint8_t guid[16]
128-bit image GUID (binary, not text); stable across children.
Definition header.h:118
uint32_t mediaType
Media type enumeration (value from MediaType).
Definition header.h:114
uint64_t featureCompatibleRo
Feature bits: unimplemented -> degrade to read-only access.
Definition header.h:123
uint8_t blockAlignmentShift
log2 block alignment (block size alignment = 2^blockAlignmentShift bytes).
Definition header.h:119
uint8_t imageMinorVersion
Container format minor version.
Definition header.h:111
int64_t creationTime
Creation FILETIME (100 ns since 1601-01-01 UTC).
Definition header.h:116
uint8_t imageMajorVersion
Container format major version.
Definition header.h:110
Version 1 container header placed at offset 0 for legacy / initial format.
Definition header.h:77
int64_t lastWrittenTime
Last modification FILETIME (100 ns since 1601-01-01 UTC).
Definition header.h:87
uint8_t applicationMinorVersion
Creator application minor / patch version.
Definition header.h:83
uint8_t applicationMajorVersion
Creator application major version.
Definition header.h:82
uint8_t application[64]
UTF-16LE creator application name (fixed-size buffer).
Definition header.h:79
uint8_t imageMajorVersion
Container format major version (incompatible changes when incremented).
Definition header.h:80
uint8_t imageMinorVersion
Container format minor version (backward compatible evolutions).
Definition header.h:81
uint64_t indexOffset
Absolute byte offset to primary index block (MUST be > 0; 0 => corrupt/unreadable).
Definition header.h:85
uint32_t mediaType
Media type enumeration (value from MediaType).
Definition header.h:84
uint64_t identifier
File magic (AARU_MAGIC).
Definition header.h:78
int64_t creationTime
Creation FILETIME (100 ns since 1601-01-01 UTC).
Definition header.h:86