Loading...
Searching...
No Matches
tape.h
Go to the documentation of this file.
/*
* This file is part of the Aaru Data Preservation Suite.
* Copyright (c) 2019-2026 Natalia Portillo.
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
* */
#ifndef LIBAARUFORMAT_TAPE_H
#define LIBAARUFORMAT_TAPE_H
#include <stdint.h>
#pragma pack(push, 1)
typedef struct TapeFileEntry
{
uint32_t File;
uint8_t Partition;
uint64_t FirstBlock;
uint64_t
LastBlock;
} TapeFileEntry;
typedef struct TapeFileHeader
{
uint32_t identifier;
uint32_t entries;
uint64_t length;
uint64_t crc64;
} TapeFileHeader;
typedef struct TapePartitionEntry
{
uint8_t Number;
uint64_t FirstBlock;
uint64_t LastBlock;
} TapePartitionEntry;
typedef struct TapePartitionHeader
{
uint32_t identifier;
uint8_t entries;
uint64_t length;
uint64_t crc64;
} TapePartitionHeader;
#pragma pack(pop)
#endif // LIBAARUFORMAT_TAPE_H
TapeFileEntry
Describes a single logical file on a tape medium.
Definition tape.h:134
TapeFileEntry::File
uint32_t File
File number (unique within the partition).
Definition tape.h:135
TapeFileEntry::LastBlock
uint64_t LastBlock
Last block of the file (inclusive).
Definition tape.h:142
TapeFileEntry::FirstBlock
uint64_t FirstBlock
First block of the file (inclusive).
Definition tape.h:139
TapeFileEntry::Partition
uint8_t Partition
Partition number containing this file.
Definition tape.h:137
TapeFileHeader
Header for a tape file metadata block containing file layout information.
Definition tape.h:238
TapeFileHeader::entries
uint32_t entries
Number of file entries following this header.
Definition tape.h:241
TapeFileHeader::identifier
uint32_t identifier
Block type identifier.
Definition tape.h:239
TapeFileHeader::crc64
uint64_t crc64
CRC64-ECMA checksum of the entry data.
Definition tape.h:245
TapeFileHeader::length
uint64_t length
Size of entry data in bytes (excluding this header).
Definition tape.h:243
TapePartitionEntry
Describes a single physical partition on a tape medium.
Definition tape.h:320
TapePartitionEntry::LastBlock
uint64_t LastBlock
Last block in the partition (inclusive).
Definition tape.h:325
TapePartitionEntry::FirstBlock
uint64_t FirstBlock
First block in the partition (inclusive).
Definition tape.h:323
TapePartitionEntry::Number
uint8_t Number
Partition number (unique identifier for this partition).
Definition tape.h:321
TapePartitionHeader
Header for a tape partition metadata block containing partition layout information.
Definition tape.h:441
TapePartitionHeader::crc64
uint64_t crc64
CRC64-ECMA checksum of the entry data.
Definition tape.h:448
TapePartitionHeader::length
uint64_t length
Size of entry data in bytes (excluding this header).
Definition tape.h:446
TapePartitionHeader::entries
uint8_t entries
Number of partition entries following this header.
Definition tape.h:444
TapePartitionHeader::identifier
uint32_t identifier
Block type identifier.
Definition tape.h:442