2 OSTA Universal Disk Format (UDF) definitions.
4 Copyright (C) 2014-2017 Paulo Alcantara <pcacjr@zytor.com>
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
12 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #define UDF_BEA_IDENTIFIER "BEA01"
19 #define UDF_NSR2_IDENTIFIER "NSR02"
20 #define UDF_NSR3_IDENTIFIER "NSR03"
21 #define UDF_TEA_IDENTIFIER "TEA01"
23 #define UDF_LOGICAL_SECTOR_SHIFT 11
24 #define UDF_LOGICAL_SECTOR_SIZE ((UINT64)(1ULL << UDF_LOGICAL_SECTOR_SHIFT))
25 #define UDF_VRS_START_OFFSET ((UINT64)(16ULL << UDF_LOGICAL_SECTOR_SHIFT))
28 UdfPrimaryVolumeDescriptor
= 1,
29 UdfAnchorVolumeDescriptorPointer
= 2,
30 UdfVolumeDescriptorPointer
= 3,
31 UdfImplemenationUseVolumeDescriptor
= 4,
32 UdfPartitionDescriptor
= 5,
33 UdfLogicalVolumeDescriptor
= 6,
34 UdfUnallocatedSpaceDescriptor
= 7,
35 UdfTerminatingDescriptor
= 8,
36 UdfLogicalVolumeIntegrityDescriptor
= 9,
37 UdfFileSetDescriptor
= 256,
38 UdfFileIdentifierDescriptor
= 257,
39 UdfAllocationExtentDescriptor
= 258,
41 UdfExtendedFileEntry
= 266,
42 } UDF_VOLUME_DESCRIPTOR_ID
;
48 UINT16 DescriptorVersion
;
51 UINT16 TagSerialNumber
;
53 UINT16 DescriptorCRCLength
;
59 UINT32 ExtentLocation
;
63 UINT8 CharacterSetType
;
64 UINT8 CharacterSetInfo
[63];
72 // Domain Entity Identifier
80 // UDF Entity Identifier
89 // Implementation Entity Identifier
94 UINT8 ImplementationUseArea
[6];
95 } ImplementationEntity
;
97 // Application Entity Identifier
100 UINT8 ApplicationUseArea
[8];
103 // Raw Identifier Suffix
112 UINT32 LogicalBlockNumber
;
113 UINT16 PartitionReferenceNumber
;
118 UDF_LB_ADDR ExtentLocation
;
119 UINT8 ImplementationUse
[6];
120 } UDF_LONG_ALLOCATION_DESCRIPTOR
;
123 UDF_DESCRIPTOR_TAG DescriptorTag
;
124 UDF_EXTENT_AD MainVolumeDescriptorSequenceExtent
;
125 UDF_EXTENT_AD ReserveVolumeDescriptorSequenceExtent
;
127 } UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER
;
130 UDF_DESCRIPTOR_TAG DescriptorTag
;
131 UINT32 VolumeDescriptorSequenceNumber
;
132 UDF_CHAR_SPEC DescriptorCharacterSet
;
133 UINT8 LogicalVolumeIdentifier
[128];
134 UINT32 LogicalBlockSize
;
135 UDF_ENTITY_ID DomainIdentifier
;
136 UDF_LONG_ALLOCATION_DESCRIPTOR LogicalVolumeContentsUse
;
137 UINT32 MapTableLength
;
138 UINT32 NumberOfPartitionMaps
;
139 UDF_ENTITY_ID ImplementationIdentifier
;
140 UINT8 ImplementationUse
[128];
141 UDF_EXTENT_AD IntegritySequenceExtent
;
142 UINT8 PartitionMaps
[6];
143 } UDF_LOGICAL_VOLUME_DESCRIPTOR
;