libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
aaruformat_context Struct Reference

Master context representing an open or in‑creation Aaru image. More...

#include <aaruformat/context.h>

Data Fields

uint64_t magic
 File magic (AARU_MAGIC) post-open.
AaruHeaderV2 header
 Parsed container header (v2).
FILE * imageStream
 Underlying FILE* stream (binary mode).
uint8_t library_major_version
 Linked library major version.
uint8_t library_minor_version
 Linked library minor version;.
uint64_t * user_data_ddt
 Legacy flat DDT pointer (NULL when using v2 mini/big arrays).
TapeDdtHashEntrytape_ddt
 Hash table root for tape DDT entries.
uint32_t * sector_prefix_ddt
 Legacy CD sector prefix DDT (deprecated by *2).
uint32_t * sector_suffix_ddt
 Legacy CD sector suffix DDT.
uint64_t * sector_prefix_ddt2
 CD sector prefix DDT V2.
uint64_t * sector_suffix_ddt2
 CD sector suffix DDT V2.
uint64_t * user_data_ddt2
 DDT entries (big variant) primary/secondary current.
uint64_t * cached_secondary_ddt2
 Cached secondary table (big entries) or NULL.
DdtHeader2 user_data_ddt_header
 Active user data DDT v2 header (primary table meta).
uint64_t cached_ddt_offset
 File offset of currently cached secondary DDT (0=none).
uint64_t cached_ddt_position
 Position index of cached secondary DDT.
uint64_t primary_ddt_offset
 File offset of the primary DDT v2 table.
size_t mapped_memory_ddt_size
 Length of mmapped DDT if userDataDdt is mmapped.
int ddt_version
 DDT version in use (1=legacy, 2=v2 hierarchical).
uint8_t shift
 Legacy overall shift (deprecated by data_shift/table_shift).
bool in_memory_ddt
 True if primary (and possibly secondary) DDT loaded.
uint8_t * sector_prefix
 Raw per-sector prefix (e.g., sync+header) uncorrected.
uint8_t * sector_prefix_corrected
 Corrected variant (post error correction) if stored.
uint8_t * sector_suffix
 Raw per-sector suffix (EDC/ECC) uncorrected.
uint8_t * sector_suffix_corrected
 Corrected suffix if stored separately.
uint8_t * sector_subchannel
 Raw 96-byte subchannel (if captured).
uint8_t * mode2_subheaders
 MODE2 Form1/Form2 8-byte subheaders (concatenated).
uint8_t * sector_id
 DVD sector ID (4 bytes) if present.
uint8_t * sector_ied
 DVD sector IED (2 bytes) if present.
uint8_t * sector_cpr_mai
 DVD sector CPR_MAI (6 bytes) if present.
uint8_t * sector_edc
 DVD sector EDC (4 bytes) if present.
uint8_t * sector_decrypted_title_key
 DVD decrypted title key (5 bytes) if present.
struct DumpHardwareEntriesWithDatadump_hardware_entries_with_data
 Array of dump hardware entries + strings.
uint8_t * metadata_block
 Raw metadata UTF-16LE concatenated strings.
uint8_t * cicm_block
 CICM XML payload.
uint8_t * json_block
 JSON metadata block payload (UTF-8).
uint8_t * creator
 Who (person) created the image?
uint8_t * media_title
 Title of the media represented by the image.
uint8_t * comments
 Image comments.
uint8_t * media_manufacturer
 Manufacturer of the media represented by the image.
uint8_t * media_model
 Model of the media represented by the image.
uint8_t * media_serial_number
 Serial number of the media represented by the image.
uint8_t * media_barcode
 Barcode of the media represented by the image.
uint8_t * media_part_number
 Part number of the media represented by the image.
uint8_t * drive_manufacturer
 Manufacturer of the drive used to read the media represented by the image.
uint8_t * drive_model
 Model of the drive used to read the media represented by the image.
uint8_t * drive_serial_number
 Serial number of the drive used to read the media represented by the image.
uint8_t * drive_firmware_revision
 Firmware revision of the drive used to read the media represented by the image.
GeometryBlockHeader geometry_block
 Logical geometry block (if present).
MetadataBlockHeader metadata_block_header
 Metadata block header.
CicmMetadataBlock cicm_block_header
 CICM metadata header (if present).
DumpHardwareHeader dump_hardware_header
 Dump hardware header.
AaruMetadataJsonBlockHeader json_block_header
 JSON metadata block header (if present).
uint32_t cylinders
 Cylinders of the media represented by the image.
uint32_t heads
 Heads of the media represented by the image.
uint32_t sectors_per_track
 Sectors per track of the media represented by the image (for variable image, the smallest)
int32_t media_sequence
 Number in sequence for the media represented by the image.
int32_t last_media_sequence
 Last media of the sequence the media represented by the image corresponds to.
TrackEntrytrack_entries
 Full track list (tracksHeader.entries elements).
TrackEntrydata_tracks
 Filtered list of data tracks (subset of trackEntries).
TracksHeader tracks_header
 Tracks header (optical) if present.
uint8_t number_of_data_tracks
 Count of tracks considered "data" (sequence 1..99 heuristics).
CdEccContextecc_cd_context
 CD ECC/EDC helper tables (allocated on demand).
crc64_ctxcrc64_context
 Opaque CRC64 context for streaming updates.
UT_array * index_entries
 Flattened index entries (UT_array of IndexEntry).
hash_map_tsector_hash_map
 Deduplication hash map (fingerprint->entry mapping).
struct CacheHeader block_header_cache
 LRU/Cache header for block headers.
struct CacheHeader block_cache
 LRU/Cache header for block payloads.
ImageInfo image_info
 Exposed high-level image info summary.
bool * readableSectorTags
 Per-sector boolean array (optical tags read successfully?).
mediaTagEntrymediaTags
 Hash table of extra media tags (uthash root).
spamsum_ctxspamsum_context
 Opaque SpamSum context for streaming updates.
blake3_hasher * blake3_context
 Opaque BLAKE3 context for streaming updates.
Checksums checksums
 Whole-image checksums discovered.
md5_ctx md5_context
 Opaque MD5 context for streaming updates.
sha1_ctx sha1_context
 Opaque SHA-1 context for streaming updates.
sha256_ctx sha256_context
 Opaque SHA-256 context for streaming updates.
bool calculating_md5
 True if whole-image MD5 being calculated on-the-fly.
bool calculating_sha1
 True if whole-image SHA-1 being calculated on-the-fly.
bool calculating_sha256
 True if whole-image SHA-256 being calculated on-the-fly.
bool calculating_spamsum
 True if whole-image SpamSum being calculated on-the-fly.
bool calculating_blake3
 True if whole-image BLAKE3 being calculated on-the-fly.
uint8_t * writing_buffer
 Accumulation buffer for current block data.
BlockHeader current_block_header
 Header for block currently being assembled (write path).
uint64_t next_block_position
 Absolute file offset where next block will be written.
uint64_t last_written_block
 Last written block number (write path).
size_t sector_prefix_length
 Length of sector_prefix.
size_t sector_suffix_length
 Length of sector_suffix.
size_t sector_prefix_offset
 Current position in sector_prefix.
size_t sector_suffix_offset
 Current position in sector_suffix.
int current_block_offset
 Logical offset inside block (units: bytes or sectors depending on path).
int writing_buffer_position
 Current size / position within writingBuffer.
uint8_t current_track_type
 Current track type (when writing optical images with tracks, needed for block compression type).
bool is_writing
 True if context opened/created for writing.
bool rewinded
 True if stream has been rewound after open (write path).
bool writing_long
 True if writing long sectors.
uint32_t lzma_dict_size
 LZMA dictionary size (writing path).
bool deduplicate
 Storage deduplication active (duplicates coalesce).
bool compression_enabled
 True if block compression enabled (writing path).
tapeFileHashEntrytape_files
 Hash table root for tape files.
TapePartitionHashEntrytape_partitions
 Hash table root for tape partitions.
bool is_tape
 True if the image is a tape image.

Detailed Description

Master context representing an open or in‑creation Aaru image.

Contains stream handle, parsed headers, deduplication structures, optical extras, metadata blocks, checksum information, caches, and write-state. Allocate with library factory (or zero‑init + explicit open) and destroy with corresponding close/free routine.

Field grouping:

  • Core & header: magic, library*Version, imageStream, header.
  • Optical sector adjuncts: sectorPrefix/sectorSuffix/subchannel plus corrected variants & mode2_subheaders.
  • Deduplication: inMemoryDdt, userDataDdt*, userDataDdtHeader, mini/big/cached secondary arrays, version tags.
  • Metadata & geometry: geometryBlock, metadataBlockHeader+metadataBlock, cicmBlockHeader+cicmBlock, tracksHeader.
  • Tracks & hardware: trackEntries, dataTracks, dumpHardwareHeader, dumpHardwareEntriesWithData.
  • Integrity & ECC: checksums, eccCdContext, crc64Context.
  • Index & dedup lookup: indexEntries (UT_array of IndexEntry), sectorHashMap (duplicate detection), deduplicate flag.
  • Write path: isWriting, currentBlockHeader, writingBuffer(+position/offset), nextBlockPosition.

Notes:

  • userDataDdt points to memory-mapped or fully loaded DDT (legacy path); userDataDdtMini / userDataDdtBig supersede.
  • shift retained for backward compatibility with earlier single‑level address shift semantics.
  • mappedMemoryDdtSize is meaningful only if userDataDdt references an mmapped region.

Definition at line 171 of file context.h.

Field Documentation

◆ blake3_context

blake3_hasher* aaruformat_context::blake3_context

Opaque BLAKE3 context for streaming updates.

Definition at line 268 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), cleanup_failed_create(), and write_checksum_block().

◆ block_cache

struct CacheHeader aaruformat_context::block_cache

LRU/Cache header for block payloads.

Definition at line 257 of file context.h.

Referenced by aaruf_create(), aaruf_open(), and aaruf_read_sector().

◆ block_header_cache

struct CacheHeader aaruformat_context::block_header_cache

LRU/Cache header for block headers.

Definition at line 256 of file context.h.

Referenced by aaruf_create(), aaruf_open(), and aaruf_read_sector().

◆ cached_ddt_offset

uint64_t aaruformat_context::cached_ddt_offset

File offset of currently cached secondary DDT (0=none).

Definition at line 190 of file context.h.

Referenced by decode_ddt_multi_level_v2(), set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

◆ cached_ddt_position

uint64_t aaruformat_context::cached_ddt_position

Position index of cached secondary DDT.

Definition at line 191 of file context.h.

Referenced by set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

◆ cached_secondary_ddt2

uint64_t* aaruformat_context::cached_secondary_ddt2

Cached secondary table (big entries) or NULL.

Definition at line 188 of file context.h.

Referenced by decode_ddt_multi_level_v2(), set_ddt_multi_level_v2(), and write_cached_secondary_ddt().

◆ calculating_blake3

bool aaruformat_context::calculating_blake3

True if whole-image BLAKE3 being calculated on-the-fly.

Definition at line 277 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ calculating_md5

bool aaruformat_context::calculating_md5

True if whole-image MD5 being calculated on-the-fly.

Definition at line 273 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ calculating_sha1

bool aaruformat_context::calculating_sha1

True if whole-image SHA-1 being calculated on-the-fly.

Definition at line 274 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ calculating_sha256

bool aaruformat_context::calculating_sha256

True if whole-image SHA-256 being calculated on-the-fly.

Definition at line 275 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ calculating_spamsum

bool aaruformat_context::calculating_spamsum

True if whole-image SpamSum being calculated on-the-fly.

Definition at line 276 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ checksums

Checksums aaruformat_context::checksums

Whole-image checksums discovered.

Definition at line 269 of file context.h.

Referenced by aaruf_close(), process_checksum_block(), and write_checksum_block().

◆ cicm_block

uint8_t* aaruformat_context::cicm_block

CICM XML payload.

Definition at line 214 of file context.h.

Referenced by aaruf_close(), aaruf_get_cicm_metadata(), process_cicm_block(), and write_cicm_block().

◆ cicm_block_header

CicmMetadataBlock aaruformat_context::cicm_block_header

CICM metadata header (if present).

Definition at line 231 of file context.h.

Referenced by aaruf_get_cicm_metadata(), process_cicm_block(), and write_cicm_block().

◆ comments

uint8_t* aaruformat_context::comments

Image comments.

Definition at line 218 of file context.h.

Referenced by aaruf_get_comments(), aaruf_set_comments(), process_metadata_block(), and write_metadata_block().

◆ compression_enabled

◆ crc64_context

crc64_ctx* aaruformat_context::crc64_context

Opaque CRC64 context for streaming updates.

Definition at line 249 of file context.h.

Referenced by aaruf_close_current_block().

◆ creator

uint8_t* aaruformat_context::creator

Who (person) created the image?

Definition at line 216 of file context.h.

Referenced by aaruf_get_creator(), aaruf_set_creator(), process_metadata_block(), and write_metadata_block().

◆ current_block_header

BlockHeader aaruformat_context::current_block_header

Header for block currently being assembled (write path).

Definition at line 281 of file context.h.

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

◆ current_block_offset

int aaruformat_context::current_block_offset

Logical offset inside block (units: bytes or sectors depending on path).

Definition at line 288 of file context.h.

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

◆ current_track_type

uint8_t aaruformat_context::current_track_type

Current track type (when writing optical images with tracks, needed for block compression type).

Definition at line 290 of file context.h.

Referenced by aaruf_write_sector().

◆ cylinders

uint32_t aaruformat_context::cylinders

Cylinders of the media represented by the image.

Definition at line 234 of file context.h.

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

◆ data_tracks

TrackEntry* aaruformat_context::data_tracks

Filtered list of data tracks (subset of trackEntries).

Definition at line 243 of file context.h.

Referenced by aaruf_read_sector_long(), aaruf_read_track_sector(), aaruf_set_tracks(), and process_tracks_block().

◆ ddt_version

int aaruformat_context::ddt_version

DDT version in use (1=legacy, 2=v2 hierarchical).

Definition at line 194 of file context.h.

Referenced by aaruf_read_sector(), process_ddt_v1(), and process_ddt_v2().

◆ deduplicate

bool aaruformat_context::deduplicate

Storage deduplication active (duplicates coalesce).

Definition at line 298 of file context.h.

Referenced by aaruf_close(), aaruf_create(), and aaruf_write_sector().

◆ drive_firmware_revision

uint8_t* aaruformat_context::drive_firmware_revision

Firmware revision of the drive used to read the media represented by the image.

Definition at line 228 of file context.h.

Referenced by aaruf_get_drive_firmware_revision(), aaruf_set_drive_firmware_revision(), process_metadata_block(), and write_metadata_block().

◆ drive_manufacturer

uint8_t* aaruformat_context::drive_manufacturer

Manufacturer of the drive used to read the media represented by the image.

Definition at line 224 of file context.h.

Referenced by aaruf_get_drive_manufacturer(), aaruf_set_drive_manufacturer(), process_metadata_block(), and write_metadata_block().

◆ drive_model

uint8_t* aaruformat_context::drive_model

Model of the drive used to read the media represented by the image.

Definition at line 225 of file context.h.

Referenced by aaruf_get_drive_model(), aaruf_set_drive_model(), process_metadata_block(), and write_metadata_block().

◆ drive_serial_number

uint8_t* aaruformat_context::drive_serial_number

Serial number of the drive used to read the media represented by the image.

Definition at line 226 of file context.h.

Referenced by aaruf_get_drive_serial_number(), aaruf_set_drive_serial_number(), process_metadata_block(), and write_metadata_block().

◆ dump_hardware_entries_with_data

struct DumpHardwareEntriesWithData* aaruformat_context::dump_hardware_entries_with_data

Array of dump hardware entries + strings.

Definition at line 212 of file context.h.

Referenced by aaruf_close(), aaruf_get_dumphw(), aaruf_set_dumphw(), process_dumphw_block(), reset_dump_hardware_context(), and write_dumphw_block().

◆ dump_hardware_header

DumpHardwareHeader aaruformat_context::dump_hardware_header

◆ ecc_cd_context

CdEccContext* aaruformat_context::ecc_cd_context

CD ECC/EDC helper tables (allocated on demand).

Definition at line 248 of file context.h.

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), aaruf_read_sector_long(), aaruf_write_sector_long(), and cleanup_failed_create().

◆ geometry_block

GeometryBlockHeader aaruformat_context::geometry_block

Logical geometry block (if present).

Definition at line 229 of file context.h.

Referenced by aaruf_get_geometry(), aaruf_open(), aaruf_set_geometry(), process_geometry_block(), and write_geometry_block().

◆ header

◆ heads

uint32_t aaruformat_context::heads

Heads of the media represented by the image.

Definition at line 235 of file context.h.

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

◆ image_info

◆ imageStream

FILE* aaruformat_context::imageStream

◆ in_memory_ddt

bool aaruformat_context::in_memory_ddt

True if primary (and possibly secondary) DDT loaded.

Definition at line 196 of file context.h.

Referenced by aaruf_close(), aaruf_create(), process_ddt_v1(), and process_ddt_v2().

◆ index_entries

◆ is_tape

bool aaruformat_context::is_tape

True if the image is a tape image.

Definition at line 304 of file context.h.

Referenced by aaruf_close(), aaruf_create(), set_ddt_tape(), and write_tape_ddt().

◆ is_writing

◆ json_block

uint8_t* aaruformat_context::json_block

JSON metadata block payload (UTF-8).

Definition at line 215 of file context.h.

Referenced by aaruf_get_aaru_json_metadata(), aaruf_set_aaru_json_metadata(), process_aaru_metadata_json_block(), and write_aaru_json_block().

◆ json_block_header

AaruMetadataJsonBlockHeader aaruformat_context::json_block_header

JSON metadata block header (if present).

Definition at line 233 of file context.h.

Referenced by aaruf_get_aaru_json_metadata(), aaruf_set_aaru_json_metadata(), process_aaru_metadata_json_block(), and write_aaru_json_block().

◆ last_media_sequence

int32_t aaruformat_context::last_media_sequence

Last media of the sequence the media represented by the image corresponds to.

Definition at line 239 of file context.h.

Referenced by process_metadata_block().

◆ last_written_block

uint64_t aaruformat_context::last_written_block

Last written block number (write path).

Definition at line 283 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), and aaruf_write_sector_long().

◆ library_major_version

uint8_t aaruformat_context::library_major_version

Linked library major version.

Definition at line 177 of file context.h.

Referenced by aaruf_create(), and aaruf_open().

◆ library_minor_version

uint8_t aaruformat_context::library_minor_version

Linked library minor version;.

Definition at line 178 of file context.h.

Referenced by aaruf_create(), and aaruf_open().

◆ lzma_dict_size

◆ magic

uint64_t aaruformat_context::magic

File magic (AARU_MAGIC) post-open.

Definition at line 174 of file context.h.

Referenced by aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_get_aaru_json_metadata(), aaruf_get_cicm_metadata(), aaruf_get_comments(), aaruf_get_creator(), aaruf_get_drive_firmware_revision(), aaruf_get_drive_manufacturer(), aaruf_get_drive_model(), aaruf_get_drive_serial_number(), aaruf_get_dumphw(), aaruf_get_geometry(), aaruf_get_image_info(), aaruf_get_media_barcode(), aaruf_get_media_manufacturer(), aaruf_get_media_model(), aaruf_get_media_part_number(), aaruf_get_media_sequence(), aaruf_get_media_serial_number(), aaruf_get_media_title(), aaruf_get_negative_sectors(), aaruf_get_overflow_sectors(), aaruf_get_tape_file(), aaruf_get_tape_partition(), aaruf_get_tracks(), aaruf_get_user_sectors(), aaruf_open(), aaruf_read_media_tag(), aaruf_read_sector(), aaruf_read_sector_long(), aaruf_read_sector_tag(), aaruf_read_track_sector(), aaruf_set_aaru_json_metadata(), aaruf_set_comments(), aaruf_set_creator(), aaruf_set_drive_firmware_revision(), aaruf_set_drive_manufacturer(), aaruf_set_drive_model(), aaruf_set_drive_serial_number(), aaruf_set_dumphw(), aaruf_set_geometry(), aaruf_set_media_barcode(), aaruf_set_media_manufacturer(), aaruf_set_media_model(), aaruf_set_media_part_number(), aaruf_set_media_sequence(), aaruf_set_media_serial_number(), aaruf_set_media_title(), aaruf_set_tape_file(), aaruf_set_tape_partition(), aaruf_set_tracks(), aaruf_verify_image(), aaruf_write_media_tag(), aaruf_write_sector(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

◆ mapped_memory_ddt_size

size_t aaruformat_context::mapped_memory_ddt_size

Length of mmapped DDT if userDataDdt is mmapped.

Definition at line 193 of file context.h.

Referenced by aaruf_close(), and process_ddt_v1().

◆ md5_context

md5_ctx aaruformat_context::md5_context

Opaque MD5 context for streaming updates.

Definition at line 270 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ media_barcode

uint8_t* aaruformat_context::media_barcode

Barcode of the media represented by the image.

Definition at line 222 of file context.h.

Referenced by aaruf_get_media_barcode(), aaruf_set_media_barcode(), process_metadata_block(), and write_metadata_block().

◆ media_manufacturer

uint8_t* aaruformat_context::media_manufacturer

Manufacturer of the media represented by the image.

Definition at line 219 of file context.h.

Referenced by aaruf_get_media_manufacturer(), aaruf_set_media_manufacturer(), process_metadata_block(), and write_metadata_block().

◆ media_model

uint8_t* aaruformat_context::media_model

Model of the media represented by the image.

Definition at line 220 of file context.h.

Referenced by aaruf_get_media_model(), aaruf_set_media_model(), process_metadata_block(), and write_metadata_block().

◆ media_part_number

uint8_t* aaruformat_context::media_part_number

Part number of the media represented by the image.

Definition at line 223 of file context.h.

Referenced by aaruf_get_media_part_number(), aaruf_set_media_part_number(), process_metadata_block(), and write_metadata_block().

◆ media_sequence

int32_t aaruformat_context::media_sequence

Number in sequence for the media represented by the image.

Definition at line 238 of file context.h.

Referenced by process_metadata_block().

◆ media_serial_number

uint8_t* aaruformat_context::media_serial_number

Serial number of the media represented by the image.

Definition at line 221 of file context.h.

Referenced by aaruf_get_media_serial_number(), aaruf_set_media_serial_number(), process_metadata_block(), and write_metadata_block().

◆ media_title

uint8_t* aaruformat_context::media_title

Title of the media represented by the image.

Definition at line 217 of file context.h.

Referenced by aaruf_get_media_title(), aaruf_set_media_title(), process_metadata_block(), and write_metadata_block().

◆ mediaTags

mediaTagEntry* aaruformat_context::mediaTags

Hash table of extra media tags (uthash root).

Definition at line 264 of file context.h.

Referenced by aaruf_close(), aaruf_read_media_tag(), aaruf_write_media_tag(), process_data_block(), and write_media_tags().

◆ metadata_block

uint8_t* aaruformat_context::metadata_block

Raw metadata UTF-16LE concatenated strings.

Definition at line 213 of file context.h.

Referenced by aaruf_close(), and process_metadata_block().

◆ metadata_block_header

◆ mode2_subheaders

uint8_t* aaruformat_context::mode2_subheaders

MODE2 Form1/Form2 8-byte subheaders (concatenated).

Definition at line 204 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_mode2_subheaders_block().

◆ next_block_position

uint64_t aaruformat_context::next_block_position

Absolute file offset where next block will be written.

Definition at line 282 of file context.h.

Referenced by aaruf_close_current_block(), aaruf_create(), aaruf_write_sector(), and set_ddt_multi_level_v2().

◆ number_of_data_tracks

uint8_t aaruformat_context::number_of_data_tracks

Count of tracks considered "data" (sequence 1..99 heuristics).

Definition at line 245 of file context.h.

Referenced by aaruf_read_sector_long(), aaruf_read_track_sector(), aaruf_set_tracks(), and process_tracks_block().

◆ primary_ddt_offset

uint64_t aaruformat_context::primary_ddt_offset

File offset of the primary DDT v2 table.

Definition at line 192 of file context.h.

Referenced by aaruf_create(), process_ddt_v2(), set_ddt_multi_level_v2(), write_cached_secondary_ddt(), and write_primary_ddt().

◆ readableSectorTags

bool* aaruformat_context::readableSectorTags

Per-sector boolean array (optical tags read successfully?).

Definition at line 263 of file context.h.

Referenced by aaruf_close(), aaruf_create(), aaruf_open(), cleanup_failed_create(), cleanup_open_failure(), and process_data_block().

◆ rewinded

bool aaruformat_context::rewinded

True if stream has been rewound after open (write path).

Definition at line 293 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), and aaruf_write_sector_long().

◆ sector_cpr_mai

uint8_t* aaruformat_context::sector_cpr_mai

◆ sector_decrypted_title_key

uint8_t* aaruformat_context::sector_decrypted_title_key

DVD decrypted title key (5 bytes) if present.

Definition at line 209 of file context.h.

Referenced by aaruf_read_sector_tag(), aaruf_write_sector_tag(), process_data_block(), and write_dvd_title_key_decrypted_block().

◆ sector_edc

uint8_t* aaruformat_context::sector_edc

◆ sector_hash_map

hash_map_t* aaruformat_context::sector_hash_map

Deduplication hash map (fingerprint->entry mapping).

Definition at line 253 of file context.h.

Referenced by aaruf_close(), aaruf_create(), aaruf_write_sector(), and cleanup_failed_create().

◆ sector_id

uint8_t* aaruformat_context::sector_id

◆ sector_ied

uint8_t* aaruformat_context::sector_ied

◆ sector_prefix

uint8_t* aaruformat_context::sector_prefix

Raw per-sector prefix (e.g., sync+header) uncorrected.

Definition at line 199 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_sector_prefix().

◆ sector_prefix_corrected

uint8_t* aaruformat_context::sector_prefix_corrected

Corrected variant (post error correction) if stored.

Definition at line 200 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_data_block().

◆ sector_prefix_ddt

uint32_t* aaruformat_context::sector_prefix_ddt

Legacy CD sector prefix DDT (deprecated by *2).

Definition at line 183 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_ddt_v1().

◆ sector_prefix_ddt2

uint64_t* aaruformat_context::sector_prefix_ddt2

CD sector prefix DDT V2.

Definition at line 185 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_ddt_v2(), and write_sector_prefix_ddt().

◆ sector_prefix_length

size_t aaruformat_context::sector_prefix_length

Length of sector_prefix.

Definition at line 284 of file context.h.

Referenced by aaruf_write_sector_long().

◆ sector_prefix_offset

size_t aaruformat_context::sector_prefix_offset

Current position in sector_prefix.

Definition at line 286 of file context.h.

Referenced by aaruf_write_sector_long(), and write_sector_prefix().

◆ sector_subchannel

uint8_t* aaruformat_context::sector_subchannel

◆ sector_suffix

uint8_t* aaruformat_context::sector_suffix

Raw per-sector suffix (EDC/ECC) uncorrected.

Definition at line 201 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_data_block(), and write_sector_suffix().

◆ sector_suffix_corrected

uint8_t* aaruformat_context::sector_suffix_corrected

Corrected suffix if stored separately.

Definition at line 202 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_data_block().

◆ sector_suffix_ddt

uint32_t* aaruformat_context::sector_suffix_ddt

Legacy CD sector suffix DDT.

Definition at line 184 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), and process_ddt_v1().

◆ sector_suffix_ddt2

uint64_t* aaruformat_context::sector_suffix_ddt2

CD sector suffix DDT V2.

Definition at line 186 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector_long(), aaruf_write_sector_long(), process_ddt_v2(), and write_sector_suffix_ddt().

◆ sector_suffix_length

size_t aaruformat_context::sector_suffix_length

Length of sector_suffix.

Definition at line 285 of file context.h.

Referenced by aaruf_write_sector_long().

◆ sector_suffix_offset

size_t aaruformat_context::sector_suffix_offset

Current position in sector_suffix.

Definition at line 287 of file context.h.

Referenced by aaruf_write_sector_long(), and write_sector_suffix().

◆ sectors_per_track

uint32_t aaruformat_context::sectors_per_track

Sectors per track of the media represented by the image (for variable image, the smallest)

Definition at line 236 of file context.h.

Referenced by aaruf_open(), aaruf_set_geometry(), and process_geometry_block().

◆ sha1_context

sha1_ctx aaruformat_context::sha1_context

Opaque SHA-1 context for streaming updates.

Definition at line 271 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ sha256_context

sha256_ctx aaruformat_context::sha256_context

Opaque SHA-256 context for streaming updates.

Definition at line 272 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), and write_checksum_block().

◆ shift

uint8_t aaruformat_context::shift

Legacy overall shift (deprecated by data_shift/table_shift).

Definition at line 195 of file context.h.

Referenced by aaruf_create(), aaruf_open(), decode_ddt_entry_v1(), and process_ddt_v1().

◆ spamsum_context

spamsum_ctx* aaruformat_context::spamsum_context

Opaque SpamSum context for streaming updates.

Definition at line 267 of file context.h.

Referenced by aaruf_create(), aaruf_write_sector(), aaruf_write_sector_long(), cleanup_failed_create(), and write_checksum_block().

◆ tape_ddt

TapeDdtHashEntry* aaruformat_context::tape_ddt

Hash table root for tape DDT entries.

Definition at line 182 of file context.h.

Referenced by aaruf_create(), set_ddt_tape(), and write_tape_ddt().

◆ tape_files

tapeFileHashEntry* aaruformat_context::tape_files

Hash table root for tape files.

Definition at line 302 of file context.h.

Referenced by aaruf_get_tape_file(), aaruf_set_tape_file(), process_tape_files_block(), and write_tape_file_block().

◆ tape_partitions

TapePartitionHashEntry* aaruformat_context::tape_partitions

Hash table root for tape partitions.

Definition at line 303 of file context.h.

Referenced by aaruf_get_tape_partition(), aaruf_set_tape_partition(), process_tape_partitions_block(), and write_tape_partition_block().

◆ track_entries

TrackEntry* aaruformat_context::track_entries

◆ tracks_header

TracksHeader aaruformat_context::tracks_header

◆ user_data_ddt

uint64_t* aaruformat_context::user_data_ddt

Legacy flat DDT pointer (NULL when using v2 mini/big arrays).

Definition at line 181 of file context.h.

Referenced by aaruf_close(), decode_ddt_entry_v1(), and process_ddt_v1().

◆ user_data_ddt2

◆ user_data_ddt_header

◆ writing_buffer

uint8_t* aaruformat_context::writing_buffer

Accumulation buffer for current block data.

Definition at line 280 of file context.h.

Referenced by aaruf_close(), aaruf_close_current_block(), aaruf_write_sector(), and set_ddt_multi_level_v2().

◆ writing_buffer_position

int aaruformat_context::writing_buffer_position

Current size / position within writingBuffer.

Definition at line 289 of file context.h.

Referenced by aaruf_close_current_block(), and aaruf_write_sector().

◆ writing_long

bool aaruformat_context::writing_long

True if writing long sectors.

Definition at line 294 of file context.h.

Referenced by aaruf_write_sector(), and aaruf_write_sector_long().


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