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.
bool block_zero_written
 True if block zero has been written (writing path).
int32_t(* finalize_write )(struct aaruformat_context *ctx)
 Writer finalization hook (NULL for reader).
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).
bool use_zstd
 Use Zstandard instead of LZMA for data blocks.
bool has_zstd_blocks
 True if any block was actually written with Zstandard compression.
int zstd_level
 Zstandard compression level (writing path, default 19).
int num_threads
 Compression worker threads (1 = single-threaded, default).
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.
FluxHeader flux_data_header
 Flux data header (if present).
FluxEntryflux_entries
 Array of flux entries (flux_data_header.entries elements).
UT_array * flux_captures
 Pending flux capture payloads (write path).
FluxCaptureMapEntryflux_map
 Hash map for flux capture lookup by head/track/subtrack/capture index.
bool dirty_secondary_ddt
 True if secondary DDT tables should be written during close.
bool dirty_primary_ddt
 True if primary DDT table should be written during close.
bool dirty_single_level_ddt
 True if single-level DDT should be written during close.
bool dirty_checksum_block
 True if checksum block should be written during close.
bool dirty_tracks_block
 True if tracks block should be written during close.
bool dirty_mode2_subheaders_block
 True if MODE2 subheader block should be written during close.
bool dirty_sector_prefix_block
 True if sector prefix block should be written during close.
bool dirty_sector_prefix_ddt
 True if sector prefix DDT should be written during close.
bool dirty_sector_suffix_block
 True if sector suffix block should be written during close.
bool dirty_sector_suffix_ddt
 True if sector suffix DDT should be written during close.
bool dirty_sector_subchannel_block
 True if subchannel block should be written during close.
bool dirty_dvd_long_sector_blocks
 True if DVD long sector blocks should be written during close.
bool dirty_dvd_title_key_decrypted_block
 True if decrypted title key block should be written during close.
bool dirty_media_tags
 True if media tags should be written during close.
bool dirty_tape_ddt
 True if tape DDT should be written during close.
bool dirty_tape_file_block
 True if tape file block should be written during close.
bool dirty_tape_partition_block
 True if tape partition block should be written during close.
bool dirty_geometry_block
 True if geometry block should be written during close.
bool dirty_metadata_block
 True if metadata block should be written during close.
bool dirty_dumphw_block
 True if dump hardware block should be written during close.
bool dirty_cicm_block
 True if CICM metadata block should be written during close.
bool dirty_json_block
 True if JSON metadata block should be written during close.
bool dirty_flux_block
 True if flux block should be written during close.
bool dirty_index_block
 True if index block should be written during close.
uint8_t * ps3_disc_key
 Cached disc key (16 bytes), NULL if not loaded.
void * ps3_plaintext_regions
 Parsed Ps3PlaintextRegion array (max 32), NULL if not loaded.
uint32_t ps3_plaintext_region_count
 Number of plaintext regions.
bool ps3_encryption_initialized
 Whether lazy init has occurred.
uint8_t * wiiu_disc_key
 Cached disc key (16 bytes), NULL if not loaded.
void * wiiu_partition_regions
 Parsed WiiuPartitionRegion array, NULL if not loaded.
uint32_t wiiu_partition_region_count
 Number of partition regions.
bool wiiu_encryption_initialized
 Whether lazy init has occurred.
uint8_t * wiiu_encrypted_block_cache
 Cached re-encrypted 0x8000-byte physical sector.
uint64_t wiiu_cached_physical_sector
 Physical sector number of cached block.
bool wiiu_cache_valid
 Whether the encrypted block cache is valid.
bool wiiu_building_crypto_block
 True while gathering sectors for re-encryption (suppresses recursion).
void * ngcw_junk_entries
 Parsed NgcwJunkEntry array, NULL if not loaded.
uint32_t ngcw_junk_entry_count
 Number of junk entries.
uint16_t ngcw_junk_seed_size
 LFG seed size in uint32 words (expected: 17).
bool ngcw_junk_initialized
 Whether junk map has been loaded.
void * wii_partition_regions
 Parsed WiiPartitionRegion array, NULL if not loaded.
uint32_t wii_partition_region_count
 Number of partition regions.
bool wii_encryption_initialized
 Whether lazy init has occurred.
uint8_t * wii_encrypted_group_cache
 Cached re-encrypted 0x8000-byte group.
uint64_t wii_cached_physical_group
 Physical group number of cached block.
bool wii_cache_valid
 Whether the encrypted group cache is valid.
bool wii_building_crypto_block
 True while gathering sectors for re-encryption (suppresses recursion).
uint8_t ec_algorithm
 ErasureCodingAlgorithm (0=XOR, 1=RS-Vandermonde).
uint16_t ec_K
 Data blocks per stripe.
uint16_t ec_M
 Parity blocks per stripe.
uint32_t ec_data_shard_size
 Max on-disk block size for data blocks (fixed at creation).
void * ec_rs_ctx
 rs_context* (opaque RS codec), NULL if EC disabled.
uint8_t ** ec_data_parity
 Array of K * M parity buffers (interleaved stripe slots).
uint64_t * ec_data_block_offsets
 Array of K * K file offsets for blocks in active stripes.
uint32_t * ec_data_block_sizes
 Array of K * K actual on-disk sizes for blocks in active stripes.
uint64_t * ec_data_shard_crcs
 Array of K * K CRC64 values for blocks in active stripes.
uint16_t * ec_data_stripe_counts
 Array of K: blocks accumulated per stripe slot.
uint32_t ec_total_data_blocks
 Total data blocks written (counter for round-robin assignment).
UT_array * ec_data_stripes
 Completed data stripe descriptors (serialized to ECMB).
bool ec_enabled
 True if erasure coding is active.
void * ec_read_stripes
 Parsed EcReadStripe array for data group, NULL if no ECMB.
uint32_t ec_read_stripe_count
 Number of data stripes parsed from ECMB.
void * ec_block_lookup
 uthash: block file offset → stripe index + position.
bool ec_recovery_available
 True if ECMB loaded and recovery is possible.
bool ec_recovery_in_progress
 Recursion guard for recovery (prevents infinite loops).

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 174 of file context.h.

Field Documentation

◆ blake3_context

blake3_hasher* aaruformat_context::blake3_context

Opaque BLAKE3 context for streaming updates.

Definition at line 271 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 260 of file context.h.

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

◆ block_header_cache

struct CacheHeader aaruformat_context::block_header_cache

LRU/Cache header for block headers.

Definition at line 259 of file context.h.

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

◆ block_zero_written

bool aaruformat_context::block_zero_written

True if block zero has been written (writing path).

Definition at line 298 of file context.h.

Referenced by aaruf_write_sector(), and aaruf_write_sector_long().

◆ cached_ddt_offset

uint64_t aaruformat_context::cached_ddt_offset

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

Definition at line 193 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 194 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 191 of file context.h.

Referenced by aaruf_close(), 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 280 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 276 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 277 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 278 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 279 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 272 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 217 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 234 of file context.h.

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

◆ comments

uint8_t* aaruformat_context::comments

◆ compression_enabled

◆ crc64_context

crc64_ctx* aaruformat_context::crc64_context

Opaque CRC64 context for streaming updates.

Definition at line 252 of file context.h.

Referenced by aaruf_close_current_block().

◆ creator

uint8_t* aaruformat_context::creator

Who (person) created the image?

Definition at line 219 of file context.h.

Referenced by aaruf_clear_creator(), 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 284 of file context.h.

Referenced by aaruf_close_current_block(), aaruf_set_erasure_coding(), 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 291 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 293 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 237 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 246 of file context.h.

Referenced by aaruf_close(), 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 197 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 303 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), and aaruf_write_sector().

◆ dirty_checksum_block

bool aaruformat_context::dirty_checksum_block

True if checksum block should be written during close.

Definition at line 325 of file context.h.

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

◆ dirty_cicm_block

bool aaruformat_context::dirty_cicm_block

True if CICM metadata block should be written during close.

Definition at line 342 of file context.h.

Referenced by aaruf_create(), and aaruf_finalize_write().

◆ dirty_dumphw_block

bool aaruformat_context::dirty_dumphw_block

True if dump hardware block should be written during close.

Definition at line 341 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_dumphw().

◆ dirty_dvd_long_sector_blocks

bool aaruformat_context::dirty_dvd_long_sector_blocks

True if DVD long sector blocks should be written during close.

Definition at line 333 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_tag().

◆ dirty_dvd_title_key_decrypted_block

bool aaruformat_context::dirty_dvd_title_key_decrypted_block

True if decrypted title key block should be written during close.

Definition at line 334 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_sector_tag().

◆ dirty_flux_block

bool aaruformat_context::dirty_flux_block

True if flux block should be written during close.

Definition at line 344 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_flux_capture().

◆ dirty_geometry_block

bool aaruformat_context::dirty_geometry_block

True if geometry block should be written during close.

Definition at line 339 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_geometry().

◆ dirty_index_block

◆ dirty_json_block

bool aaruformat_context::dirty_json_block

True if JSON metadata block should be written during close.

Definition at line 343 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_aaru_json_metadata().

◆ dirty_media_tags

bool aaruformat_context::dirty_media_tags

True if media tags should be written during close.

Definition at line 335 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_write_media_tag().

◆ dirty_metadata_block

bool aaruformat_context::dirty_metadata_block

True if metadata block should be written during close.

Definition at line 340 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and aaruf_set_media_title().

◆ dirty_mode2_subheaders_block

bool aaruformat_context::dirty_mode2_subheaders_block

True if MODE2 subheader block should be written during close.

Definition at line 327 of file context.h.

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

◆ dirty_primary_ddt

bool aaruformat_context::dirty_primary_ddt

True if primary DDT table should be written during close.

Definition at line 323 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_multi_level_v2().

◆ dirty_secondary_ddt

bool aaruformat_context::dirty_secondary_ddt

True if secondary DDT tables should be written during close.

Definition at line 322 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_multi_level_v2().

◆ dirty_sector_prefix_block

bool aaruformat_context::dirty_sector_prefix_block

True if sector prefix block should be written during close.

Definition at line 328 of file context.h.

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

◆ dirty_sector_prefix_ddt

bool aaruformat_context::dirty_sector_prefix_ddt

True if sector prefix DDT should be written during close.

Definition at line 329 of file context.h.

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

◆ dirty_sector_subchannel_block

bool aaruformat_context::dirty_sector_subchannel_block

True if subchannel block should be written during close.

Definition at line 332 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_write_sector_long(), and aaruf_write_sector_tag().

◆ dirty_sector_suffix_block

bool aaruformat_context::dirty_sector_suffix_block

True if sector suffix block should be written during close.

Definition at line 330 of file context.h.

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

◆ dirty_sector_suffix_ddt

bool aaruformat_context::dirty_sector_suffix_ddt

True if sector suffix DDT should be written during close.

Definition at line 331 of file context.h.

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

◆ dirty_single_level_ddt

bool aaruformat_context::dirty_single_level_ddt

True if single-level DDT should be written during close.

Definition at line 324 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), and set_ddt_single_level_v2().

◆ dirty_tape_ddt

bool aaruformat_context::dirty_tape_ddt

True if tape DDT should be written during close.

Definition at line 336 of file context.h.

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

◆ dirty_tape_file_block

bool aaruformat_context::dirty_tape_file_block

True if tape file block should be written during close.

Definition at line 337 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tape_file(), and process_tape_files_block().

◆ dirty_tape_partition_block

bool aaruformat_context::dirty_tape_partition_block

True if tape partition block should be written during close.

Definition at line 338 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tape_partition(), and process_tape_partitions_block().

◆ dirty_tracks_block

bool aaruformat_context::dirty_tracks_block

True if tracks block should be written during close.

Definition at line 326 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_set_tracks(), and aaruf_write_sector_tag().

◆ 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 231 of file context.h.

Referenced by aaruf_clear_drive_firmware_revision(), 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 227 of file context.h.

Referenced by aaruf_clear_drive_manufacturer(), 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 228 of file context.h.

Referenced by aaruf_clear_drive_model(), 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 229 of file context.h.

Referenced by aaruf_clear_drive_serial_number(), 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 215 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

◆ ec_algorithm

uint8_t aaruformat_context::ec_algorithm

ErasureCodingAlgorithm (0=XOR, 1=RS-Vandermonde).

Definition at line 379 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_finalize(), and ec_load_ecmb().

◆ ec_block_lookup

void* aaruformat_context::ec_block_lookup

uthash: block file offset → stripe index + position.

Definition at line 396 of file context.h.

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_data_block().

◆ ec_data_block_offsets

uint64_t* aaruformat_context::ec_data_block_offsets

Array of K * K file offsets for blocks in active stripes.

Definition at line 385 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

◆ ec_data_block_sizes

uint32_t* aaruformat_context::ec_data_block_sizes

Array of K * K actual on-disk sizes for blocks in active stripes.

Definition at line 386 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

◆ ec_data_parity

uint8_t** aaruformat_context::ec_data_parity

Array of K * M parity buffers (interleaved stripe slots).

Definition at line 384 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

◆ ec_data_shard_crcs

uint64_t* aaruformat_context::ec_data_shard_crcs

Array of K * K CRC64 values for blocks in active stripes.

Definition at line 387 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_flush_data_stripe(), and ec_free().

◆ ec_data_shard_size

uint32_t aaruformat_context::ec_data_shard_size

Max on-disk block size for data blocks (fixed at creation).

Definition at line 382 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), ec_load_ecmb(), and ec_recover_data_block().

◆ ec_data_stripe_counts

uint16_t* aaruformat_context::ec_data_stripe_counts

Array of K: blocks accumulated per stripe slot.

Definition at line 388 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), ec_flush_data_stripe(), and ec_free().

◆ ec_data_stripes

UT_array* aaruformat_context::ec_data_stripes

Completed data stripe descriptors (serialized to ECMB).

Definition at line 390 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_finalize(), ec_flush_data_stripe(), and ec_free().

◆ ec_enabled

bool aaruformat_context::ec_enabled

True if erasure coding is active.

Definition at line 391 of file context.h.

Referenced by aaruf_close_current_block(), aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_finalize(), and ec_free().

◆ ec_K

uint16_t aaruformat_context::ec_K

◆ ec_M

uint16_t aaruformat_context::ec_M

◆ ec_read_stripe_count

uint32_t aaruformat_context::ec_read_stripe_count

Number of data stripes parsed from ECMB.

Definition at line 395 of file context.h.

Referenced by ec_free(), and ec_load_ecmb().

◆ ec_read_stripes

void* aaruformat_context::ec_read_stripes

Parsed EcReadStripe array for data group, NULL if no ECMB.

Definition at line 394 of file context.h.

Referenced by ec_free(), ec_load_ecmb(), and ec_recover_data_block().

◆ ec_recovery_available

bool aaruformat_context::ec_recovery_available

True if ECMB loaded and recovery is possible.

Definition at line 397 of file context.h.

Referenced by aaruf_read_sector(), ec_free(), ec_load_ecmb(), and ec_recover_data_block().

◆ ec_recovery_in_progress

bool aaruformat_context::ec_recovery_in_progress

Recursion guard for recovery (prevents infinite loops).

Definition at line 398 of file context.h.

Referenced by aaruf_read_sector(), and ec_recover_data_block().

◆ ec_rs_ctx

void* aaruformat_context::ec_rs_ctx

rs_context* (opaque RS codec), NULL if EC disabled.

Definition at line 383 of file context.h.

Referenced by aaruf_set_erasure_coding(), ec_accumulate_data_block(), ec_free(), ec_load_ecmb(), and ec_recover_data_block().

◆ ec_total_data_blocks

uint32_t aaruformat_context::ec_total_data_blocks

Total data blocks written (counter for round-robin assignment).

Definition at line 389 of file context.h.

Referenced by aaruf_set_erasure_coding(), and ec_accumulate_data_block().

◆ ecc_cd_context

CdEccContext* aaruformat_context::ecc_cd_context

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

Definition at line 251 of file context.h.

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

◆ finalize_write

int32_t(* aaruformat_context::finalize_write) (struct aaruformat_context *ctx)

Writer finalization hook (NULL for reader).

Definition at line 299 of file context.h.

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

◆ flux_captures

UT_array* aaruformat_context::flux_captures

Pending flux capture payloads (write path).

Definition at line 318 of file context.h.

Referenced by aaruf_clear_flux_captures(), aaruf_write_flux_capture(), process_flux_data_block(), and write_flux_blocks().

◆ flux_data_header

◆ flux_entries

◆ flux_map

FluxCaptureMapEntry* aaruformat_context::flux_map

Hash map for flux capture lookup by head/track/subtrack/capture index.

Definition at line 319 of file context.h.

Referenced by find_flux_entry_by_key(), flux_map_add(), and flux_map_clear().

◆ geometry_block

GeometryBlockHeader aaruformat_context::geometry_block

Logical geometry block (if present).

Definition at line 232 of file context.h.

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

◆ has_zstd_blocks

◆ header

◆ heads

uint32_t aaruformat_context::heads

Heads of the media represented by the image.

Definition at line 238 of file context.h.

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

◆ image_info

◆ imageStream

FILE* aaruformat_context::imageStream

Underlying FILE* stream (binary mode).

Definition at line 179 of file context.h.

Referenced by aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_finalize_write(), aaruf_open(), aaruf_read_flux_capture(), aaruf_read_sector(), aaruf_verify_image(), add_subindex_entries(), cleanup_failed_create(), cleanup_open_failure(), decode_ddt_entry_v1(), decode_ddt_entry_v2(), decode_ddt_multi_level_v2(), decode_ddt_single_level_v2(), ec_collect_blocks_by_type(), ec_finalize(), ec_flush_data_stripe(), ec_load_ecmb(), ec_recover_data_block(), ec_write_batch_parity(), process_aaru_metadata_json_block(), process_checksum_block(), process_cicm_block(), process_data_block(), process_ddt_v1(), process_ddt_v2(), process_dumphw_block(), process_flux_data_block(), process_geometry_block(), process_index_v1(), process_index_v2(), process_index_v3(), process_metadata_block(), process_tape_files_block(), process_tape_partitions_block(), process_tracks_block(), read_flux_payload_header(), read_lzma_compressed_payload(), read_uncompressed_payload(), read_zstd_compressed_payload(), set_ddt_entry_v2(), set_ddt_multi_level_v2(), set_ddt_single_level_v2(), set_ddt_tape(), verify_index_v1(), verify_index_v2(), verify_index_v3(), write_aaru_json_block(), write_cached_secondary_ddt(), write_checksum_block(), write_cicm_block(), write_dumphw_block(), write_dvd_long_sector_blocks(), write_dvd_title_key_decrypted_block(), write_flux_blocks(), write_flux_capture_payload(), write_geometry_block(), write_index_block(), write_media_tags(), write_metadata_block(), write_mode2_subheaders_block(), write_primary_ddt(), write_sector_prefix(), write_sector_prefix_ddt(), write_sector_subchannel(), write_sector_suffix(), write_sector_suffix_ddt(), write_single_level_ddt(), write_tape_file_block(), write_tape_partition_block(), and write_tracks_block().

◆ in_memory_ddt

bool aaruformat_context::in_memory_ddt

True if primary (and possibly secondary) DDT loaded.

Definition at line 199 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 313 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), 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 218 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 236 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 242 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 286 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 180 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 181 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 177 of file context.h.

Referenced by aaruf_clear_comments(), aaruf_clear_creator(), aaruf_clear_drive_firmware_revision(), aaruf_clear_drive_manufacturer(), aaruf_clear_drive_model(), aaruf_clear_drive_serial_number(), aaruf_clear_flux_captures(), aaruf_clear_media_barcode(), aaruf_clear_media_manufacturer(), aaruf_clear_media_model(), aaruf_clear_media_part_number(), aaruf_clear_media_sequence(), aaruf_clear_media_serial_number(), aaruf_clear_media_title(), aaruf_close(), aaruf_close_current_block(), aaruf_create(), aaruf_get_aaru_json_metadata(), aaruf_get_all_tape_files(), aaruf_get_all_tape_partitions(), 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_flux_captures(), 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_readable_media_tags(), aaruf_get_readable_sector_tags(), aaruf_get_tape_file(), aaruf_get_tape_partition(), aaruf_get_tracks(), aaruf_get_user_sectors(), aaruf_open(), aaruf_read_flux_capture(), 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_erasure_coding(), 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_flux_capture(), 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 196 of file context.h.

Referenced by aaruf_close().

◆ md5_context

md5_ctx aaruformat_context::md5_context

Opaque MD5 context for streaming updates.

Definition at line 273 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 225 of file context.h.

Referenced by aaruf_clear_media_barcode(), 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 222 of file context.h.

Referenced by aaruf_clear_media_manufacturer(), 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 223 of file context.h.

Referenced by aaruf_clear_media_model(), 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 226 of file context.h.

Referenced by aaruf_clear_media_part_number(), 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 241 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 224 of file context.h.

Referenced by aaruf_clear_media_serial_number(), 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 220 of file context.h.

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

◆ mediaTags

mediaTagEntry* aaruformat_context::mediaTags

◆ metadata_block

uint8_t* aaruformat_context::metadata_block

Raw metadata UTF-16LE concatenated strings.

Definition at line 216 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 207 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 285 of file context.h.

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

◆ ngcw_junk_entries

void* aaruformat_context::ngcw_junk_entries

Parsed NgcwJunkEntry array, NULL if not loaded.

Definition at line 364 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), ngcw_junk_lazy_init(), and wii_reconstruct_group_junk().

◆ ngcw_junk_entry_count

uint32_t aaruformat_context::ngcw_junk_entry_count

Number of junk entries.

Definition at line 365 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), ngcw_junk_lazy_init(), and wii_reconstruct_group_junk().

◆ ngcw_junk_initialized

bool aaruformat_context::ngcw_junk_initialized

Whether junk map has been loaded.

Definition at line 367 of file context.h.

Referenced by aaruf_close(), and aaruf_read_sector().

◆ ngcw_junk_seed_size

uint16_t aaruformat_context::ngcw_junk_seed_size

LFG seed size in uint32 words (expected: 17).

Definition at line 366 of file context.h.

Referenced by aaruf_close(), and ngcw_junk_lazy_init().

◆ num_threads

◆ number_of_data_tracks

uint8_t aaruformat_context::number_of_data_tracks

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

Definition at line 248 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 195 of file context.h.

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

◆ ps3_disc_key

uint8_t* aaruformat_context::ps3_disc_key

Cached disc key (16 bytes), NULL if not loaded.

Definition at line 348 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

◆ ps3_encryption_initialized

bool aaruformat_context::ps3_encryption_initialized

Whether lazy init has occurred.

Definition at line 351 of file context.h.

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

◆ ps3_plaintext_region_count

uint32_t aaruformat_context::ps3_plaintext_region_count

Number of plaintext regions.

Definition at line 350 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

◆ ps3_plaintext_regions

void* aaruformat_context::ps3_plaintext_regions

Parsed Ps3PlaintextRegion array (max 32), NULL if not loaded.

Definition at line 349 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), aaruf_write_sector(), and ps3_lazy_init().

◆ readableSectorTags

bool* aaruformat_context::readableSectorTags

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

Definition at line 266 of file context.h.

Referenced by aaruf_close(), aaruf_create(), aaruf_get_readable_sector_tags(), 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 296 of file context.h.

Referenced by aaruf_create(), aaruf_open(), 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 212 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 256 of file context.h.

Referenced by aaruf_create(), aaruf_finalize_write(), aaruf_open(), 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 202 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 203 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 186 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 188 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 287 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 289 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 204 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 205 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 187 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 189 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 288 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 290 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 239 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 274 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 275 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 198 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 270 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 185 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 311 of file context.h.

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

◆ tape_partitions

TapePartitionHashEntry* aaruformat_context::tape_partitions

◆ track_entries

TrackEntry* aaruformat_context::track_entries

◆ tracks_header

TracksHeader aaruformat_context::tracks_header

◆ use_zstd

◆ user_data_ddt

uint64_t* aaruformat_context::user_data_ddt

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

Definition at line 184 of file context.h.

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

◆ user_data_ddt2

◆ user_data_ddt_header

◆ wii_building_crypto_block

bool aaruformat_context::wii_building_crypto_block

True while gathering sectors for re-encryption (suppresses recursion).

Definition at line 376 of file context.h.

Referenced by aaruf_read_sector().

◆ wii_cache_valid

bool aaruformat_context::wii_cache_valid

Whether the encrypted group cache is valid.

Definition at line 375 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wii_lazy_init().

◆ wii_cached_physical_group

uint64_t aaruformat_context::wii_cached_physical_group

Physical group number of cached block.

Definition at line 374 of file context.h.

Referenced by aaruf_read_sector().

◆ wii_encrypted_group_cache

uint8_t* aaruformat_context::wii_encrypted_group_cache

Cached re-encrypted 0x8000-byte group.

Definition at line 373 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wii_lazy_init().

◆ wii_encryption_initialized

bool aaruformat_context::wii_encryption_initialized

Whether lazy init has occurred.

Definition at line 372 of file context.h.

Referenced by aaruf_close(), and aaruf_read_sector().

◆ wii_partition_region_count

uint32_t aaruformat_context::wii_partition_region_count

Number of partition regions.

Definition at line 371 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), wii_lazy_init(), and wii_reconstruct_group_junk().

◆ wii_partition_regions

void* aaruformat_context::wii_partition_regions

Parsed WiiPartitionRegion array, NULL if not loaded.

Definition at line 370 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), wii_lazy_init(), and wii_reconstruct_group_junk().

◆ wiiu_building_crypto_block

bool aaruformat_context::wiiu_building_crypto_block

True while gathering sectors for re-encryption (suppresses recursion).

Definition at line 361 of file context.h.

Referenced by aaruf_read_sector().

◆ wiiu_cache_valid

bool aaruformat_context::wiiu_cache_valid

Whether the encrypted block cache is valid.

Definition at line 360 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

◆ wiiu_cached_physical_sector

uint64_t aaruformat_context::wiiu_cached_physical_sector

Physical sector number of cached block.

Definition at line 359 of file context.h.

Referenced by aaruf_read_sector().

◆ wiiu_disc_key

uint8_t* aaruformat_context::wiiu_disc_key

Cached disc key (16 bytes), NULL if not loaded.

Definition at line 354 of file context.h.

Referenced by aaruf_close(), and wiiu_lazy_init().

◆ wiiu_encrypted_block_cache

uint8_t* aaruformat_context::wiiu_encrypted_block_cache

Cached re-encrypted 0x8000-byte physical sector.

Definition at line 358 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

◆ wiiu_encryption_initialized

bool aaruformat_context::wiiu_encryption_initialized

Whether lazy init has occurred.

Definition at line 357 of file context.h.

Referenced by aaruf_close(), and aaruf_read_sector().

◆ wiiu_partition_region_count

uint32_t aaruformat_context::wiiu_partition_region_count

Number of partition regions.

Definition at line 356 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

◆ wiiu_partition_regions

void* aaruformat_context::wiiu_partition_regions

Parsed WiiuPartitionRegion array, NULL if not loaded.

Definition at line 355 of file context.h.

Referenced by aaruf_close(), aaruf_read_sector(), and wiiu_lazy_init().

◆ writing_buffer

uint8_t* aaruformat_context::writing_buffer

Accumulation buffer for current block data.

Definition at line 283 of file context.h.

Referenced by aaruf_close_current_block(), aaruf_finalize_write(), 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 292 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 297 of file context.h.

Referenced by aaruf_write_sector(), and aaruf_write_sector_long().

◆ zstd_level


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