Import 2.3.25pre1
[davej-history.git] / include / linux / udf_167.h
blob0fe77d0ef83ce1745b1548429b1d2fd07c7ad7d1
1 #if !defined(_LINUX_UDF_167_H)
2 #define _LINUX_UDF_167_H
3 /*
4 * udf_167.h
6 * DESCRIPTION
7 * Definitions from the ECMA 167 standard.
8 * http://www.ecma.ch/
10 * These abbreviations are used to keep the symbols short:
11 * Alloc Allocation
12 * App Application
13 * Attr Attribute
14 * Char Characters
15 * Desc Descriptor
16 * Descs Descriptors
17 * Ext Extent
18 * Ident Identifier
19 * Imp Implementation
20 * Lvl Level
21 * Max Maximum
22 * Num Number
23 * Ptr Pointer
24 * Seq Sequence
25 * Std Standard
26 * Struct Structure
27 * Vol Volume
28 * The symbols are otherwise identical to the standard, and the
29 * sections of the standard to refer to are indicated.
31 * CONTACTS
32 * E-mail regarding any portion of the Linux UDF file system should be
33 * directed to the development team mailing list (run by majordomo):
34 * linux_udf@hootie.lvld.hp.com
36 * COPYRIGHT
37 * This file is distributed under the terms of the GNU General Public
38 * License (GPL). Copies of the GPL can be obtained from:
39 * ftp://prep.ai.mit.edu/pub/gnu/GPL
40 * Each contributing author retains all rights to their own work.
42 * HISTORY
43 * July 12, 1997 - Andrew E. Mileski
44 * Adapted from the ECMA-167 standard.
46 * 10/2/98 dgb Adaptation
47 * 10/4/98 Changes by HJA Sandkuyl
48 * 10/7/98 Changed FILE_EXISTENCE to FILE_HIDDEN, per UDF 2.0 spec
49 * 11/26/98 Modifed some entries for UDF 1.5/2.0
50 * 11/26/98 bf Fixed typos, non-linux types, more structures
51 * 12/5/98 dgb Adjusted structure and content of include files.
54 #ifdef __KERNEL__
55 #include <linux/types.h>
56 #define Uint8 __u8
57 #define Uint16 __u16
58 #define Uint32 __u32
59 #define Uint64 __u64
60 typedef Uint8 dstring;
61 #else
62 #define Uint8 unsigned char
63 #define Uint16 unsigned short
64 #define Uint32 unsigned int
65 #define Uint64 unsigned long long
66 typedef Uint8 dstring;
67 #endif
69 /* make sure all structures are packed! */
70 #pragma pack(1)
72 /* CS0 Charspec (ECMA 167 1/7.2.1) */
73 typedef struct {
74 Uint8 charSetType;
75 Uint8 charSetInfo[63];
76 } charspec;
78 /* Timestamp (ECMA 167 1/7.3) */
79 typedef struct {
80 Uint16 typeAndTimezone;
81 Uint16 year;
82 Uint8 month;
83 Uint8 day;
84 Uint8 hour;
85 Uint8 minute;
86 Uint8 second;
87 Uint8 centiseconds;
88 Uint8 hundredsOfMicroseconds;
89 Uint8 microseconds;
90 } timestamp;
92 /* Timestamp types (ECMA 167 1/7.3.1) */
93 #define TIMESTAMP_TYPE_CUT 0x0000U
94 #define TIMESTAMP_TYPE_LOCAL 0x0001U
95 #define TIMESTAMP_TYPE_AGREEMENT 0x0002U
97 /* Entity Identifier (ECMA 167 1/7.4) */
98 typedef struct {
99 Uint8 flags;
100 Uint8 ident[23];
101 Uint8 identSuffix[8];
102 } EntityID;
103 #define regid EntityID
105 /* Entity identifier flags (ECMA 167 1/7.4.1) */
106 #define ENTITYID_FLAGS_DIRTY 0x01U
107 #define ENTITYID_FLAGS_PROTECTED 0x02U
109 /* Volume Structure Descriptor (ECMA 167 2/9.1) */
110 #define STD_ID_LEN 5
111 struct VolStructDesc {
112 Uint8 structType;
113 Uint8 stdIdent[STD_ID_LEN];
114 Uint8 structVersion;
115 Uint8 structData[2041];
118 /* Std structure identifiers (ECMA 167 2/9.1.2) */
119 #define STD_ID_BEA01 "BEA01"
120 #define STD_ID_BOOT2 "BOOT2"
121 #define STD_ID_CD001 "CD001"
122 #define STD_ID_CDW02 "CDW02"
123 #define STD_ID_NSR02 "NSR02"
124 #define STD_ID_NSR03 "NSR03"
125 #define STD_ID_TEA01 "TEA01"
127 /* Beginning Extended Area Descriptor (ECMA 167 2/9.2) */
128 struct BeginningExtendedAreaDesc {
129 Uint8 structType;
130 Uint8 stdIdent[STD_ID_LEN];
131 Uint8 structVersion;
132 Uint8 structData[2041];
135 /* Terminating Extended Area Descriptor (ECMA 167 2/9.3) */
136 struct TerminatingExtendedAreaDesc {
137 Uint8 structType;
138 Uint8 stdIdent[STD_ID_LEN];
139 Uint8 structVersion;
140 Uint8 structData[2041];
143 /* Boot Descriptor (ECMA 167 2/9.4) */
144 struct BootDesc {
145 Uint8 structType;
146 Uint8 stdIdent[STD_ID_LEN];
147 Uint8 structVersion;
148 Uint8 reserved1;
149 EntityID architectureType;
150 EntityID bootIdent;
151 Uint32 bootExtLocation;
152 Uint32 bootExtLength;
153 Uint64 loadAddress;
154 Uint64 startAddress;
155 timestamp descCreationDateAndTime;
156 Uint16 flags;
157 Uint8 reserved2[32];
158 Uint8 bootUse[1906];
161 /* Boot flags (ECMA 167 2/9.4.12) */
162 #define BOOT_FLAGS_ERASE 1
164 /* Extent Descriptor (ECMA 167 3/7.1) */
165 typedef struct {
166 Uint32 extLength;
167 Uint32 extLocation;
168 } extent_ad;
170 /* Descriptor Tag (ECMA 167 3/7.2) */
171 typedef struct {
172 Uint16 tagIdent;
173 Uint16 descVersion;
174 Uint8 tagChecksum;
175 Uint8 reserved;
176 Uint16 tagSerialNum;
177 Uint16 descCRC;
178 Uint16 descCRCLength;
179 Uint32 tagLocation;
180 } tag;
182 /* Tag Identifiers (ECMA 167 3/7.2.1) */
183 #define TID_UNUSED_DESC 0x0000U
184 #define TID_PRIMARY_VOL_DESC 0x0001U
185 #define TID_ANCHOR_VOL_DESC_PTR 0x0002U
186 #define TID_VOL_DESC_PTR 0x0003U
187 #define TID_IMP_USE_VOL_DESC 0x0004U
188 #define TID_PARTITION_DESC 0x0005U
189 #define TID_LOGICAL_VOL_DESC 0x0006U
190 #define TID_UNALLOC_SPACE_DESC 0x0007U
191 #define TID_TERMINATING_DESC 0x0008U
192 #define TID_LOGICAL_VOL_INTEGRITY_DESC 0x0009U
194 /* Tag Identifiers (ECMA 167 4/7.2.1) */
195 #define TID_FILE_SET_DESC 0x0100U
196 #define TID_FILE_IDENT_DESC 0x0101U
197 #define TID_ALLOC_EXTENT_DESC 0x0102U
198 #define TID_INDIRECT_ENTRY 0x0103U
199 #define TID_TERMINAL_ENTRY 0x0104U
200 #define TID_FILE_ENTRY 0x0105U
201 #define TID_EXTENDED_ATTRE_HEADER_DESC 0x0106U
202 #define TID_UNALLOCATED_SPACE_ENTRY 0x0107U
203 #define TID_SPACE_BITMAP_DESC 0x0108U
204 #define TID_PARTITION_INTEGRITY_ENTRY 0x0109U
205 #define TID_EXTENDED_FILE_ENTRY 0x010AU
207 /* NSR Descriptor (ECMA 167 3/9.1) */
208 struct NSRDesc {
209 Uint8 structType;
210 Uint8 stdIdent[STD_ID_LEN];
211 Uint8 structVersion;
212 Uint8 reserved;
213 Uint8 structData[2040];
216 /* Primary Volume Descriptor (ECMA 167 3/10.1) */
217 struct PrimaryVolDesc {
218 tag descTag;
219 Uint32 volDescSeqNum;
220 Uint32 primaryVolDescNum;
221 dstring volIdent[32];
222 Uint16 volSeqNum;
223 Uint16 maxVolSeqNum;
224 Uint16 interchangeLvl;
225 Uint16 maxInterchangeLvl;
226 Uint32 charSetList;
227 Uint32 maxCharSetList;
228 dstring volSetIdent[128];
229 charspec descCharSet;
230 charspec explanatoryCharSet;
231 extent_ad volAbstract;
232 extent_ad volCopyright;
233 EntityID appIdent;
234 timestamp recordingDateAndTime;
235 EntityID impIdent;
236 Uint8 impUse[64];
237 Uint32 predecessorVolDescSeqLocation;
238 Uint16 flags;
239 Uint8 reserved[22];
242 /* Primary volume descriptor flags (ECMA 167 3/10.1.21) */
243 #define VOL_SET_IDENT 1
245 /* Anchor Volume Descriptor Pointer (ECMA 167 3/10.2) */
246 struct AnchorVolDescPtr {
247 tag descTag;
248 extent_ad mainVolDescSeqExt;
249 extent_ad reserveVolDescSeqExt;
250 Uint8 reserved[480];
253 /* Volume Descriptor Pointer (ECMA 167 3/10.3) */
254 struct VolDescPtr {
255 tag descTag;
256 Uint32 volDescSeqNum;
257 extent_ad nextVolDescSeqExt;
258 Uint8 reserved[484];
261 /* Implementation Use Volume Descriptor (ECMA 167 3/10.4) */
262 struct ImpUseVolDesc {
263 tag descTag;
264 Uint32 volDescSeqNum;
265 EntityID impIdent;
266 Uint8 impUse[460];
269 /* Partition Descriptor (ECMA 167 3/10.5) */
270 struct PartitionDesc {
271 tag descTag;
272 Uint32 volDescSeqNum;
273 Uint16 partitionFlags;
274 Uint16 partitionNumber;
275 EntityID partitionContents;
276 Uint8 partitionContentsUse[128];
277 Uint32 accessType;
278 Uint32 partitionStartingLocation;
279 Uint32 partitionLength;
280 EntityID impIdent;
281 Uint8 impUse[128];
282 Uint8 reserved[156];
285 /* Partition Flags (ECMA 167 3/10.5.3) */
286 #define PARTITION_FLAGS_ALLOC 1
288 /* Partition Contents (ECMA 167 3/10.5.5) */
289 #define PARTITION_CONTENTS_FDC01 "+FDC01"
290 #define PARTITION_CONTENTS_CD001 "+CD001"
291 #define PARTITION_CONTENTS_CDW02 "+CDW02"
292 #define PARTITION_CONTENTS_NSR02 "+NSR02"
293 #define PARTITION_CONTENTS_NSR03 "+NSR03"
295 /* Partition Access Types (ECMA 167 3/10.5.7) */
296 #define PARTITION_ACCESS_NONE 0
297 #define PARTITION_ACCESS_R 1
298 #define PARTITION_ACCESS_WO 2
299 #define PARTITION_ACCESS_RW 3
300 #define PARTITION_ACCESS_OW 4
302 /* Logical Volume Descriptor (ECMA 167 3/10.6) */
303 struct LogicalVolDesc {
304 tag descTag;
305 Uint32 volDescSeqNum;
306 charspec descCharSet;
307 dstring logicalVolIdent[128];
308 Uint32 logicalBlockSize;
309 EntityID domainIdent;
310 Uint8 logicalVolContentsUse[16]; /* used to find fileset */
311 Uint32 mapTableLength;
312 Uint32 numPartitionMaps;
313 EntityID impIdent;
314 Uint8 impUse[128];
315 extent_ad integritySeqExt;
316 Uint8 partitionMaps[0];
319 /* Generic Partition Map (ECMA 167 3/10.7.1) */
320 struct GenericPartitionMap {
321 Uint8 partitionMapType;
322 Uint8 partitionMapLength;
323 Uint8 partitionMapping[0];
326 /* Partition Map Type (ECMA 167 3/10.7.1.1) */
327 #define PARTITION_MAP_TYPE_NONE 0
328 #define PARTITION_MAP_TYPE_1 1
329 #define PARTITION_MAP_TYPE_2 2
331 /* Type 1 Partition Map (ECMA 167 3/10.7.2) */
332 struct GenericPartitionMap1 {
333 Uint8 partitionMapType;
334 Uint8 partitionMapLength;
335 Uint16 volSeqNum;
336 Uint16 partitionNum;
339 /* Type 2 Partition Map (ECMA 167 3/10.7.3) */
340 struct GenericPartitionMap2 {
341 Uint8 partitionMapType; /* 2 */
342 Uint8 partitionMapLength;
343 Uint8 partitionIdent[62];
346 /* Unallocated Space Descriptor (ECMA 167 3/10.8) */
347 struct UnallocatedSpaceDesc {
348 tag descTag;
349 Uint32 volDescSeqNum;
350 Uint32 numAllocDescs;
351 extent_ad allocDescs[0];
354 /* Terminating Descriptor (ECMA 3/10.9) */
355 struct TerminatingDesc {
356 tag descTag;
357 Uint8 reserved[496];
360 struct GenericDesc
362 tag descTag;
363 Uint32 volDescSeqNum;
366 /* Logical Volume Integrity Descriptor (ECMA 167 3/10.10) */
367 struct LogicalVolIntegrityDesc {
368 tag descTag;
369 timestamp recordingDateAndTime;
370 Uint32 integrityType;
371 extent_ad nextIntegrityExt;
372 Uint8 logicalVolContentsUse[32];
373 Uint32 numOfPartitions;
374 Uint32 lengthOfImpUse;
375 Uint32 freeSpaceTable[0];
376 Uint32 sizeTable[0];
377 Uint8 impUse[0];
380 /* Integrity Types (ECMA 167 3/10.10.3) */
381 #define INTEGRITY_TYPE_OPEN 0
382 #define INTEGRITY_TYPE_CLOSE 1
384 /* Recorded Address (ECMA 167 4/7.1) */
385 typedef struct {
386 Uint32 logicalBlockNum;
387 Uint16 partitionReferenceNum;
388 } lb_addr;
390 /* Extent interpretation (ECMA 167 4/14.14.1.1) */
391 #define EXTENT_RECORDED_ALLOCATED 0x00
392 #define EXTENT_NOT_RECORDED_ALLOCATED 0x01
393 #define EXTENT_NOT_RECORDED_NOT_ALLOCATED 0x02
394 #define EXTENT_NEXT_EXTENT_ALLOCDECS 0x03
396 /* Long Allocation Descriptor (ECMA 167 4/14.14.2) */
397 typedef struct {
398 Uint32 extLength;
399 lb_addr extLocation;
400 Uint8 impUse[6];
401 } long_ad;
402 /* upper 2 bits of extLength indicate type */
404 /* File Set Descriptor (ECMA 167 4/14.1) */
405 struct FileSetDesc {
406 tag descTag;
407 timestamp recordingDateAndTime;
408 Uint16 interchangeLvl;
409 Uint16 maxInterchangeLvl;
410 Uint32 charSetList;
411 Uint32 maxCharSetList;
412 Uint32 fileSetNum;
413 Uint32 fileSetDescNum;
414 charspec logicalVolIdentCharSet;
415 dstring logicalVolIdent[128];
416 charspec fileSetCharSet;
417 dstring fileSetIdent[32];
418 dstring copyrightFileIdent[32];
419 dstring abstractFileIdent[32];
420 long_ad rootDirectoryICB;
421 EntityID domainIdent;
422 long_ad nextExt;
423 long_ad streamDirectoryICB;
424 Uint8 reserved[32];
427 /* Short Allocation Descriptor (ECMA 167 4/14.14.1) */
428 typedef struct {
429 Uint32 extLength;
430 Uint32 extPosition;
431 } short_ad;
433 /* Partition Header Descriptor (ECMA 167 4/14.3) */
434 struct PartitionHeaderDesc {
435 short_ad unallocatedSpaceTable;
436 short_ad unallocatedSpaceBitmap;
437 short_ad partitionIntegrityTable;
438 short_ad freedSpaceTable;
439 short_ad freedSpaceBitmap;
440 Uint8 reserved[88];
443 /* File Identifier Descriptor (ECMA 167 4/14.4) */
444 struct FileIdentDesc
446 tag descTag;
447 Uint16 fileVersionNum; /* 1 */
448 Uint8 fileCharacteristics;
449 Uint8 lengthFileIdent;
450 long_ad icb;
451 Uint16 lengthOfImpUse;
452 Uint8 impUse[0];
453 Uint8 fileIdent[0];
454 Uint8 padding[0];
457 /* File Characteristics (ECMA 167 4/14.4.3) */
458 #define FILE_HIDDEN 1
459 #define FILE_DIRECTORY 2
460 #define FILE_DELETED 4
461 #define FILE_PARENT 8
462 #define FILE_METADATA 0x10 /* UDF 2.0 */
464 /* Allocation Ext Descriptor (ECMA 167 4/14.5) */
465 struct AllocExtDesc
467 tag descTag;
468 Uint32 previousAllocExtLocation;
469 Uint32 lengthAllocDescs;
472 /* ICB Tag (ECMA 167 4/14.6) */
473 typedef struct {
474 Uint32 priorRecordedNumDirectEntries;
475 Uint16 strategyType;
476 Uint16 strategyParameter;
477 Uint16 numEntries;
478 Uint8 reserved;
479 Uint8 fileType;
480 lb_addr parentICBLocation;
481 Uint16 flags;
482 } icbtag;
484 /* ICB File Type (ECMA 167 4/14.6.6) */
485 #define FILE_TYPE_NONE 0x00U
486 #define FILE_TYPE_UNALLOC 0x01U
487 #define FILE_TYPE_INTEGRITY 0x02U
488 #define FILE_TYPE_INDIRECT 0x03U
489 #define FILE_TYPE_DIRECTORY 0x04U
490 #define FILE_TYPE_REGULAR 0x05U
491 #define FILE_TYPE_BLOCK 0x06U
492 #define FILE_TYPE_CHAR 0x07U
493 #define FILE_TYPE_EXTENDED 0x08U
494 #define FILE_TYPE_FIFO 0x09U
495 #define FILE_TYPE_SOCKET 0x0aU
496 #define FILE_TYPE_TERMINAL 0x0bU
497 #define FILE_TYPE_SYMLINK 0x0cU
498 #define FILE_TYPE_STREAMDIR 0x0dU /* ECMA 167 4/13 */
500 /* ICB Flags (ECMA 167 4/14.6.8) */
501 #define ICB_FLAG_ALLOC_MASK 0x0007U
502 #define ICB_FLAG_SORTED 0x0008U
503 #define ICB_FLAG_NONRELOCATABLE 0x0010U
504 #define ICB_FLAG_ARCHIVE 0x0020U
505 #define ICB_FLAG_SETUID 0x0040U
506 #define ICB_FLAG_SETGID 0x0080U
507 #define ICB_FLAG_STICKY 0x0100U
508 #define ICB_FLAG_CONTIGUOUS 0x0200U
509 #define ICB_FLAG_SYSTEM 0x0400U
510 #define ICB_FLAG_TRANSFORMED 0x0800U
511 #define ICB_FLAG_MULTIVERSIONS 0x1000U
513 /* ICB Flags Allocation type(ECMA 167 4/14.6.8) */
514 #define ICB_FLAG_AD_SHORT 0
515 #define ICB_FLAG_AD_LONG 1
516 #define ICB_FLAG_AD_EXTENDED 2
517 #define ICB_FLAG_AD_IN_ICB 3
519 /* Indirect Entry (ECMA 167 4/14.7) */
520 struct IndirectEntry {
521 tag descTag;
522 icbtag icbTag;
523 long_ad indirectICB;
526 /* Terminal Entry (ECMA 167 4/14.8) */
527 struct TerminalEntry {
528 tag descTag;
529 icbtag icbTag;
532 /* File Entry (ECMA 167 4/14.9) */
533 struct FileEntry {
534 tag descTag;
535 icbtag icbTag;
536 Uint32 uid;
537 Uint32 gid;
538 Uint32 permissions;
539 Uint16 fileLinkCount;
540 Uint8 recordFormat;
541 Uint8 recordDisplayAttr;
542 Uint32 recordLength;
543 Uint64 informationLength;
544 Uint64 logicalBlocksRecorded;
545 timestamp accessTime;
546 timestamp modificationTime;
547 timestamp attrTime;
548 Uint32 checkpoint;
549 long_ad extendedAttrICB;
550 EntityID impIdent;
551 Uint64 uniqueID; /* 0= root, 16- (2^32-1) */
552 Uint32 lengthExtendedAttr;
553 Uint32 lengthAllocDescs;
554 Uint8 extendedAttr[0];
555 Uint8 allocDescs[0];
558 /* File Permissions (ECMA 167 4/14.9.5) */
559 #define PERM_O_EXEC 0x00000001U
560 #define PERM_O_WRITE 0x00000002U
561 #define PERM_O_READ 0x00000004U
562 #define PERM_O_CHATTR 0x00000008U
563 #define PERM_O_DELETE 0x00000010U
564 #define PERM_G_EXEC 0x00000020U
565 #define PERM_G_WRITE 0x00000040U
566 #define PERM_G_READ 0x00000080U
567 #define PERM_G_CHATTR 0x00000100U
568 #define PERM_G_DELETE 0x00000200U
569 #define PERM_U_EXEC 0x00000400U
570 #define PERM_U_WRITE 0x00000800U
571 #define PERM_U_READ 0x00001000U
572 #define PERM_U_CHATTR 0x00002000U
573 #define PERM_U_DELETE 0x00004000U
575 /* File Record Format (ECMA 167 4/14.9.7) */
576 #define RECORD_FMT_NONE 0
577 #define RECORD_FMT_FIXED_PAD 1
578 #define RECORD_FMT_FIXED 2
579 #define RECORD_FMT_VARIABLE8 3
580 #define RECORD_FMT_VARIABLE16 4
581 #define RECORD_FMT_VARIABLE16_MSB 5
582 #define RECORD_FMT_VARIABLE32 6
583 #define RECORD_FMT_PRINT 7
584 #define RECORD_FMT_LF 8
585 #define RECORD_FMT_CR 9
586 #define RECORD_FMT_CRLF 10
587 #define RECORD_FMT_LFCR 10
589 /* Extended Attribute Header Descriptor (ECMA 167 4/14.10.1) */
590 struct ExtendedAttrHeaderDesc {
591 tag descTag;
592 Uint32 impAttrLocation;
593 Uint32 appAttrLocation;
596 /* Generic Attribute Format (ECMA 4/14.10.2) */
597 struct GenericAttrFormat {
598 Uint32 attrType;
599 Uint8 attrSubtype;
600 Uint8 reserved[3];
601 Uint32 attrLength;
602 Uint8 attrData[0];
605 /* Character Set Attribute Format (ECMA 4/14.10.3) */
606 struct CharSetAttrFormat {
607 Uint32 attrType; /* 1 */
608 Uint8 attrSubtype; /* 1 */
609 Uint8 reserved[3];
610 Uint32 attrLength;
611 Uint32 escapeSeqLength;
612 Uint8 charSetType;
613 Uint8 escapeSeq[0];
616 /* Alternate Permissions (ECMA 167 4/14.10.4) */
617 struct AlternatePermissionsExtendedAttr {
618 Uint32 attrType; /* 3 */
619 Uint8 attrSubtype; /* 1 */
620 Uint8 reserved[3];
621 Uint32 attrLength;
622 Uint16 ownerIdent;
623 Uint16 groupIdent;
624 Uint16 permission;
627 /* File Times Extended Attribute (ECMA 167 4/14.10.5) */
628 struct FileTimesExtendedAttr {
629 Uint32 attrType; /* 5 */
630 Uint8 attrSubtype; /* 1 */
631 Uint8 reserved[3];
632 Uint32 attrLength;
633 Uint32 dataLength;
634 Uint32 fileTimeExistence;
635 Uint8 fileTimes;
638 /* FileTimeExistence (ECMA 167 4/14.10.5.6) */
639 #define FTE_CREATION 0
640 #define FTE_DELETION 2
641 #define FTE_EFFECTIVE 3
642 #define FTE_BACKUP 5
644 /* Information Times Extended Attribute (ECMA 167 4/14.10.6) */
645 struct InfoTimesExtendedAttr {
646 Uint32 attrType; /* 6 */
647 Uint8 attrSubtype; /* 1 */
648 Uint8 reserved[3];
649 Uint32 attrLength;
650 Uint32 dataLength;
651 Uint32 infoTimeExistence;
652 Uint8 infoTimes[0];
655 /* Device Specification Extended Attribute (ECMA 167 4/14.10.7) */
656 struct DeviceSpecificationExtendedAttr {
657 Uint32 attrType; /* 12 */
658 Uint8 attrSubtype; /* 1 */
659 Uint8 reserved[3];
660 Uint32 attrLength;
661 Uint32 impUseLength;
662 Uint32 majorDeviceIdent;
663 Uint32 minorDeviceIdent;
664 Uint8 impUse[0];
667 /* Implementation Use Extended Attr (ECMA 167 4/14.10.8) */
668 struct ImpUseExtendedAttr {
669 Uint32 attrType; /* 2048 */
670 Uint8 attrSubtype; /* 1 */
671 Uint8 reserved[3];
672 Uint32 attrLength;
673 Uint32 impUseLength;
674 EntityID impIdent;
675 Uint8 impUse[0];
678 /* Application Use Extended Attribute (ECMA 167 4/14.10.9) */
679 struct AppUseExtendedAttr {
680 Uint32 attrType; /* 65536 */
681 Uint8 attrSubtype; /* 1 */
682 Uint8 reserved[3];
683 Uint32 attrLength;
684 Uint32 appUseLength;
685 EntityID appIdent;
686 Uint8 appUse[0];
689 #define EXTATTR_CHAR_SET 1
690 #define EXTATTR_ALT_PERMS 3
691 #define EXTATTR_FILE_TIMES 5
692 #define EXTATTR_INFO_TIMES 6
693 #define EXTATTR_DEV_SPEC 12
694 #define EXTATTR_IMP_USE 2048
695 #define EXTATTR_APP_USE 65536
698 /* Unallocated Space Entry (ECMA 167 4/14.11) */
699 struct UnallocatedSpaceEntry {
700 tag descTag;
701 icbtag icbTag;
702 Uint32 lengthAllocDescs;
703 Uint8 allocDescs[0];
706 /* Space Bitmap Descriptor (ECMA 167 4/14.12) */
707 struct SpaceBitmapDesc {
708 tag descTag;
709 Uint32 numOfBits;
710 Uint32 numOfBytes;
711 Uint8 bitmap[0];
714 /* Partition Integrity Entry (ECMA 167 4/14.13) */
715 struct PartitionIntegrityEntry {
716 tag descTag;
717 icbtag icbTag;
718 timestamp recordingDateAndTime;
719 Uint8 integrityType;
720 Uint8 reserved[175];
721 EntityID impIdent;
722 Uint8 impUse[256];
725 /* Extended Allocation Descriptor (ECMA 167 4/14.14.3) */
726 typedef struct { /* ECMA 167 4/14.14.3 */
727 Uint32 extLength;
728 Uint32 recordedLength;
729 Uint32 informationLength;
730 lb_addr extLocation;
731 } ext_ad;
733 /* Logical Volume Header Descriptor (ECMA 167 4/14.5) */
734 struct LogicalVolHeaderDesc {
735 Uint64 uniqueID;
736 Uint8 reserved[24];
739 /* Path Component (ECMA 167 4/14.16.1) */
740 struct PathComponent {
741 Uint8 componentType;
742 Uint8 lengthComponentIdent;
743 Uint16 componentFileVersionNum;
744 dstring componentIdent[0];
747 /* File Entry (ECMA 167 4/14.17) */
748 struct ExtendedFileEntry {
749 tag descTag;
750 icbtag icbTag;
751 Uint32 uid;
752 Uint32 gid;
753 Uint32 permissions;
754 Uint16 fileLinkCount;
755 Uint8 recordFormat;
756 Uint8 recordDisplayAttr;
757 Uint32 recordLength;
758 Uint64 informationLength;
759 Uint64 objectSize;
760 Uint64 logicalBlocksRecorded;
761 timestamp accessTime;
762 timestamp modificationTime;
763 timestamp createTime;
764 timestamp attrTime;
765 Uint32 checkpoint;
766 Uint32 reserved;
767 long_ad extendedAttrICB;
768 long_ad streamDirectoryICB;
769 EntityID impIdent;
770 Uint64 uniqueID;
771 Uint32 lengthExtendedAttr;
772 Uint32 lengthAllocDescs;
773 Uint8 extendedAttr[0];
774 Uint8 allocDescs[0];
776 #pragma pack()
778 #endif /* !defined(_LINUX_UDF_167_H) */