libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
tape.h File Reference

Data structures for tape media support in Aaru disk images. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  TapeFileEntry
 Describes a single logical file on a tape medium. More...
struct  TapeFileHeader
 Header for a tape file metadata block containing file layout information. More...
struct  TapePartitionEntry
 Describes a single physical partition on a tape medium. More...
struct  TapePartitionHeader
 Header for a tape partition metadata block containing partition layout information. More...

Typedefs

typedef struct TapeFileEntry TapeFileEntry
typedef struct TapeFileHeader TapeFileHeader
typedef struct TapePartitionEntry TapePartitionEntry
typedef struct TapePartitionHeader TapePartitionHeader

Detailed Description

Data structures for tape media support in Aaru disk images.

This header defines structures used to represent tape-specific metadata in the Aaru image format. Tape media differs from disk media in several key ways:

Tape Organization:

  • Tapes are organized into sequential blocks rather than random-access sectors
  • Multiple logical files can exist on a single tape
  • Tapes may be divided into multiple partitions
  • Files are defined by contiguous ranges of blocks within a partition

File Structure: Tape files are logical groupings of blocks that represent discrete data units. Each file has:

  • A unique file number identifying it within its partition
  • A partition number indicating which physical partition contains it
  • A block range (FirstBlock to LastBlock, inclusive) defining its extent

Partition Structure: Tape partitions are physical divisions of the tape medium. Each partition:

  • Has a unique partition number
  • Contains a contiguous range of blocks
  • Can contain multiple files or none
  • May have different formatting or characteristics

Block Addressing: Block numbers are sequential within a partition, starting from 0. The FirstBlock and LastBlock values are inclusive, meaning both boundary blocks are part of the file or partition. For example, a file with FirstBlock=100 and LastBlock=199 contains 100 blocks (blocks 100 through 199 inclusive).

Use Cases:

  • Archiving legacy tape media (DAT, DLT, LTO, QIC, etc.)
  • Preserving tape structure for restoration to physical media
  • Forensic imaging of tape evidence
  • Migration of tape archives to modern storage
  • Documentation of tape organization for archival purposes

Storage in Aaru Images: The tape metadata blocks (TapeFileHeader and TapePartitionHeader) are optional structural blocks written during image finalization. They allow readers to understand the logical organization of the tape without parsing the entire data stream.

Note
All structures in this file use packed alignment (#pragma pack(push, 1)) to ensure consistent on-disk layout across different compilers and platforms.
Block addresses are 0-based and partition numbers typically start from 0 (though some tape formats may use 1-based numbering).
See also
BlockType for the identifier constants used in TapeFileHeader and TapePartitionHeader

Definition in file tape.h.

Typedef Documentation

◆ TapeFileEntry

typedef struct TapeFileEntry TapeFileEntry

◆ TapeFileHeader

typedef struct TapeFileHeader TapeFileHeader

◆ TapePartitionEntry

typedef struct TapePartitionEntry TapePartitionEntry

◆ TapePartitionHeader

typedef struct TapePartitionHeader TapePartitionHeader