2
* Header file iso9660.h - assorted structure definitions and typecasts.
3
* specific to iso9660 filesystem.
5
Written by Eric Youngdale (1993).
7
Copyright 1993 Yggdrasil Computing, Incorporated
9
Copyright (C) 2009 Free Software Foundation, Inc.
11
This program is free software; you can redistribute it and/or modify
12
it under the terms of the GNU General Public License as published by
13
the Free Software Foundation; either version 3, or (at your option)
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, see <http://www.gnu.org/licenses/>.
26
* $Id: iso9660.h,v 1.2 1997/05/17 15:46:44 eric Exp $
33
* The isofs filesystem constants/structures
36
/* This part borrowed from the bsd386 isofs */
37
#define ISODCL(from, to) (to - from + 1)
39
struct iso_volume_descriptor {
40
char type[ISODCL(1,1)]; /* 711 */
42
char version[ISODCL(7,7)];
43
char data[ISODCL(8,2048)];
46
/* volume descriptor types */
47
#define ISO_VD_PRIMARY 1
48
#define ISO_VD_SUPPLEMENTARY 2 /* Used by Joliet */
49
#define ISO_VD_END 255
51
#define ISO_STANDARD_ID "CD001"
53
#define EL_TORITO_ID "EL TORITO SPECIFICATION"
54
#define EL_TORITO_ARCH_x86 0
55
#define EL_TORITO_ARCH_PPC 1
56
#define EL_TORITO_ARCH_MAC 2
57
#define EL_TORITO_BOOTABLE 0x88
58
#define EL_TORITO_MEDIA_NOEMUL 0
59
#define EL_TORITO_MEDIA_12FLOP 1
60
#define EL_TORITO_MEDIA_144FLOP 2
61
#define EL_TORITO_MEDIA_288FLOP 3
62
#define EL_TORITO_MEDIA_HD 4
64
struct iso_primary_descriptor {
65
char type [ISODCL ( 1, 1)]; /* 711 */
66
char id [ISODCL ( 2, 6)];
67
char version [ISODCL ( 7, 7)]; /* 711 */
68
char unused1 [ISODCL ( 8, 8)];
69
char system_id [ISODCL ( 9, 40)]; /* achars */
70
char volume_id [ISODCL ( 41, 72)]; /* dchars */
71
char unused2 [ISODCL ( 73, 80)];
72
char volume_space_size [ISODCL ( 81, 88)]; /* 733 */
73
char escape_sequences [ISODCL ( 89, 120)];
74
char volume_set_size [ISODCL (121, 124)]; /* 723 */
75
char volume_sequence_number [ISODCL (125, 128)]; /* 723 */
76
char logical_block_size [ISODCL (129, 132)]; /* 723 */
77
char path_table_size [ISODCL (133, 140)]; /* 733 */
78
char type_l_path_table [ISODCL (141, 144)]; /* 731 */
79
char opt_type_l_path_table [ISODCL (145, 148)]; /* 731 */
80
char type_m_path_table [ISODCL (149, 152)]; /* 732 */
81
char opt_type_m_path_table [ISODCL (153, 156)]; /* 732 */
82
char root_directory_record [ISODCL (157, 190)]; /* 9.1 */
83
char volume_set_id [ISODCL (191, 318)]; /* dchars */
84
char publisher_id [ISODCL (319, 446)]; /* achars */
85
char preparer_id [ISODCL (447, 574)]; /* achars */
86
char application_id [ISODCL (575, 702)]; /* achars */
87
char copyright_file_id [ISODCL (703, 739)]; /* 7.5 dchars */
88
char abstract_file_id [ISODCL (740, 776)]; /* 7.5 dchars */
89
char bibliographic_file_id [ISODCL (777, 813)]; /* 7.5 dchars */
90
char creation_date [ISODCL (814, 830)]; /* 8.4.26.1 */
91
char modification_date [ISODCL (831, 847)]; /* 8.4.26.1 */
92
char expiration_date [ISODCL (848, 864)]; /* 8.4.26.1 */
93
char effective_date [ISODCL (865, 881)]; /* 8.4.26.1 */
94
char file_structure_version [ISODCL (882, 882)]; /* 711 */
95
char unused4 [ISODCL (883, 883)];
96
char application_data [ISODCL (884, 1395)];
97
char unused5 [ISODCL (1396, 2048)];
100
/* El Torito Boot Record Volume Descriptor */
101
struct eltorito_boot_descriptor {
102
char id [ISODCL ( 1, 1)]; /* 711 */
103
char id2 [ISODCL ( 2, 6)];
104
char version [ISODCL ( 7, 7)]; /* 711 */
105
char system_id [ISODCL ( 8, 39)];
106
char unused2 [ISODCL ( 40, 71)];
107
char bootcat_ptr [ISODCL ( 72 , 75)];
108
char unused5 [ISODCL ( 76, 2048)];
111
/* Validation entry for El Torito */
112
struct eltorito_validation_entry {
113
char headerid [ISODCL ( 1, 1)]; /* 711 */
114
char arch [ISODCL ( 2, 2)];
115
char pad1 [ISODCL ( 3, 4)]; /* 711 */
116
char id [ISODCL ( 5, 28)];
117
char cksum [ISODCL ( 29, 30)];
118
char key1 [ISODCL ( 31, 31)];
119
char key2 [ISODCL ( 32, 32)];
122
/* El Torito initial/default entry in boot catalog */
123
struct eltorito_defaultboot_entry {
124
char boot_id [ISODCL ( 1, 1)]; /* 711 */
125
char boot_media [ISODCL ( 2, 2)];
126
char loadseg [ISODCL ( 3, 4)]; /* 711 */
127
char arch [ISODCL ( 5, 5)];
128
char pad1 [ISODCL ( 6, 6)];
129
char nsect [ISODCL ( 7, 8)];
130
char bootoff [ISODCL ( 9, 12)];
131
char pad2 [ISODCL ( 13, 32)];
134
/* El Torito boot information table */
135
struct eltorito_boot_info
137
/* Address of Primary Volume Descriptor. */
138
char pvd_addr[ISODCL (1, 4)];
139
/* Boot file address. */
140
char file_addr[ISODCL (5, 8)];
141
/* Boot file length. */
142
char file_length[ISODCL (9, 12)];
143
/* Boot file checksum. */
144
char file_checksum[ISODCL (13, 16)];
145
char dummy[ISODCL (17, 56)];
149
/* We use this to help us look up the parent inode numbers. */
151
struct iso_path_table{
152
unsigned char name_len[2]; /* 721 */
153
char extent[4]; /* 731 */
154
char parent[2]; /* 721 */
158
struct iso_directory_record {
159
unsigned char length [ISODCL (1, 1)]; /* 711 */
160
char ext_attr_length [ISODCL (2, 2)]; /* 711 */
161
char extent [ISODCL (3, 10)]; /* 733 */
162
char size [ISODCL (11, 18)]; /* 733 */
163
char date [ISODCL (19, 25)]; /* 7 by 711 */
164
char flags [ISODCL (26, 26)];
165
char file_unit_size [ISODCL (27, 27)]; /* 711 */
166
char interleave [ISODCL (28, 28)]; /* 711 */
167
char volume_sequence_number [ISODCL (29, 32)]; /* 723 */
168
unsigned char name_len [ISODCL (33, 33)]; /* 711 */
169
char name [34]; /* Not really, but we need something here */