libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
tape.h
Go to the documentation of this file.
1/*
2 * This file is part of the Aaru Data Preservation Suite.
3 * Copyright (c) 2019-2025 Natalia Portillo.
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 2.1 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 * */
18
73
74#ifndef LIBAARUFORMAT_TAPE_H
75#define LIBAARUFORMAT_TAPE_H
76
77#include <stdint.h>
78
79#pragma pack(push, 1)
80
133 typedef struct TapeFileEntry
134{
135 uint32_t File;
137 uint8_t Partition;
139 uint64_t FirstBlock;
141 uint64_t
142 LastBlock;
144} TapeFileEntry;
145
237 typedef struct TapeFileHeader
238{
239 uint32_t identifier;
241 uint32_t entries;
243 uint64_t length;
245 uint64_t crc64;
247} TapeFileHeader;
248
319 typedef struct TapePartitionEntry
320{
321 uint8_t Number;
323 uint64_t FirstBlock;
325 uint64_t LastBlock;
328} TapePartitionEntry;
329
440 typedef struct TapePartitionHeader
441{
442 uint32_t identifier;
444 uint8_t entries;
446 uint64_t length;
448 uint64_t crc64;
450} TapePartitionHeader;
451
452#pragma pack(pop)
453
454#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