0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 #include "ecma_167.h"
0042
0043 #ifndef _OSTA_UDF_H
0044 #define _OSTA_UDF_H 1
0045
0046
0047 #define UDF_CHAR_SET_TYPE 0
0048 #define UDF_CHAR_SET_INFO "OSTA Compressed Unicode"
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058 #define UDF_ID_DEVELOPER "*Linux UDFFS"
0059 #define UDF_ID_COMPLIANT "*OSTA UDF Compliant"
0060 #define UDF_ID_LV_INFO "*UDF LV Info"
0061 #define UDF_ID_FREE_EA "*UDF FreeEASpace"
0062 #define UDF_ID_FREE_APP_EA "*UDF FreeAppEASpace"
0063 #define UDF_ID_DVD_CGMS "*UDF DVD CGMS Info"
0064 #define UDF_ID_VAT_LVEXTENSION "*UDF VAT LVExtension"
0065 #define UDF_ID_OS2_EA "*UDF OS/2 EA"
0066 #define UDF_ID_OS2_EA_LENGTH "*UDF OS/2 EALength"
0067 #define UDF_ID_MAC_VOLUME "*UDF Mac VolumeInfo"
0068 #define UDF_ID_MAC_FINDER "*UDF Mac FinderInfo"
0069 #define UDF_ID_MAC_UNIQUE "*UDF Mac UniqueIDTable"
0070 #define UDF_ID_MAC_RESOURCE "*UDF Mac ResourceFork"
0071 #define UDF_ID_OS400_DIRINFO "*UDF OS/400 DirInfo"
0072 #define UDF_ID_VIRTUAL "*UDF Virtual Partition"
0073 #define UDF_ID_SPARABLE "*UDF Sparable Partition"
0074 #define UDF_ID_ALLOC "*UDF Virtual Alloc Tbl"
0075 #define UDF_ID_SPARING "*UDF Sparing Table"
0076 #define UDF_ID_METADATA "*UDF Metadata Partition"
0077
0078
0079 #define DOMAIN_FLAGS_HARD_WRITE_PROTECT 0x01
0080 #define DOMAIN_FLAGS_SOFT_WRITE_PROTECT 0x02
0081
0082 struct domainIdentSuffix {
0083 __le16 UDFRevision;
0084 uint8_t domainFlags;
0085 uint8_t reserved[5];
0086 } __packed;
0087
0088 struct UDFIdentSuffix {
0089 __le16 UDFRevision;
0090 uint8_t OSClass;
0091 uint8_t OSIdentifier;
0092 uint8_t reserved[4];
0093 } __packed;
0094
0095 struct impIdentSuffix {
0096 uint8_t OSClass;
0097 uint8_t OSIdentifier;
0098 uint8_t impUse[6];
0099 } __packed;
0100
0101 struct appIdentSuffix {
0102 uint8_t impUse[8];
0103 } __packed;
0104
0105
0106
0107 struct logicalVolIntegrityDescImpUse {
0108 struct regid impIdent;
0109 __le32 numFiles;
0110 __le32 numDirs;
0111 __le16 minUDFReadRev;
0112 __le16 minUDFWriteRev;
0113 __le16 maxUDFWriteRev;
0114 uint8_t impUse[];
0115 } __packed;
0116
0117
0118
0119 struct impUseVolDescImpUse {
0120 struct charspec LVICharset;
0121 dstring logicalVolIdent[128];
0122 dstring LVInfo1[36];
0123 dstring LVInfo2[36];
0124 dstring LVInfo3[36];
0125 struct regid impIdent;
0126 uint8_t impUse[128];
0127 } __packed;
0128
0129 struct udfPartitionMap2 {
0130 uint8_t partitionMapType;
0131 uint8_t partitionMapLength;
0132 uint8_t reserved1[2];
0133 struct regid partIdent;
0134 __le16 volSeqNum;
0135 __le16 partitionNum;
0136 } __packed;
0137
0138
0139 struct virtualPartitionMap {
0140 uint8_t partitionMapType;
0141 uint8_t partitionMapLength;
0142 uint8_t reserved1[2];
0143 struct regid partIdent;
0144 __le16 volSeqNum;
0145 __le16 partitionNum;
0146 uint8_t reserved2[24];
0147 } __packed;
0148
0149
0150 struct sparablePartitionMap {
0151 uint8_t partitionMapType;
0152 uint8_t partitionMapLength;
0153 uint8_t reserved1[2];
0154 struct regid partIdent;
0155 __le16 volSeqNum;
0156 __le16 partitionNum;
0157 __le16 packetLength;
0158 uint8_t numSparingTables;
0159 uint8_t reserved2[1];
0160 __le32 sizeSparingTable;
0161 __le32 locSparingTable[4];
0162 } __packed;
0163
0164
0165 struct metadataPartitionMap {
0166 uint8_t partitionMapType;
0167 uint8_t partitionMapLength;
0168 uint8_t reserved1[2];
0169 struct regid partIdent;
0170 __le16 volSeqNum;
0171 __le16 partitionNum;
0172 __le32 metadataFileLoc;
0173 __le32 metadataMirrorFileLoc;
0174 __le32 metadataBitmapFileLoc;
0175 __le32 allocUnitSize;
0176 __le16 alignUnitSize;
0177 uint8_t flags;
0178 uint8_t reserved2[5];
0179 } __packed;
0180
0181
0182 struct virtualAllocationTable20 {
0183 __le16 lengthHeader;
0184 __le16 lengthImpUse;
0185 dstring logicalVolIdent[128];
0186 __le32 previousVATICBLoc;
0187 __le32 numFiles;
0188 __le32 numDirs;
0189 __le16 minUDFReadRev;
0190 __le16 minUDFWriteRev;
0191 __le16 maxUDFWriteRev;
0192 __le16 reserved;
0193 uint8_t impUse[];
0194
0195 } __packed;
0196
0197 #define ICBTAG_FILE_TYPE_VAT20 0xF8U
0198
0199
0200 struct sparingEntry {
0201 __le32 origLocation;
0202 __le32 mappedLocation;
0203 } __packed;
0204
0205 struct sparingTable {
0206 struct tag descTag;
0207 struct regid sparingIdent;
0208 __le16 reallocationTableLen;
0209 __le16 reserved;
0210 __le32 sequenceNum;
0211 struct sparingEntry mapEntry[];
0212 } __packed;
0213
0214
0215 #define ICBTAG_FILE_TYPE_MAIN 0xFA
0216 #define ICBTAG_FILE_TYPE_MIRROR 0xFB
0217 #define ICBTAG_FILE_TYPE_BITMAP 0xFC
0218
0219
0220 struct allocDescImpUse {
0221 __le16 flags;
0222 uint8_t impUse[4];
0223 } __packed;
0224
0225 #define AD_IU_EXT_ERASED 0x0001
0226
0227
0228 #define ICBTAG_FILE_TYPE_REALTIME 0xF9U
0229
0230
0231
0232 struct freeEaSpace {
0233 __le16 headerChecksum;
0234 uint8_t freeEASpace[];
0235 } __packed;
0236
0237
0238 struct DVDCopyrightImpUse {
0239 __le16 headerChecksum;
0240 uint8_t CGMSInfo;
0241 uint8_t dataType;
0242 uint8_t protectionSystemInfo[4];
0243 } __packed;
0244
0245
0246 struct LVExtensionEA {
0247 __le16 headerChecksum;
0248 __le64 verificationID;
0249 __le32 numFiles;
0250 __le32 numDirs;
0251 dstring logicalVolIdent[128];
0252 } __packed;
0253
0254
0255
0256 struct freeAppEASpace {
0257 __le16 headerChecksum;
0258 uint8_t freeEASpace[];
0259 } __packed;
0260
0261
0262 #define UDF_ID_UNIQUE_ID "*UDF Unique ID Mapping Data"
0263 #define UDF_ID_NON_ALLOC "*UDF Non-Allocatable Space"
0264 #define UDF_ID_POWER_CAL "*UDF Power Cal Table"
0265 #define UDF_ID_BACKUP "*UDF Backup"
0266
0267
0268 #define UDF_ID_MAC_RESOURCE_FORK_STREAM "*UDF Macintosh Resource Fork"
0269
0270 #define UDF_ID_NT_ACL "*UDF NT ACL"
0271 #define UDF_ID_UNIX_ACL "*UDF UNIX ACL"
0272
0273
0274 #define UDF_OS_CLASS_UNDEF 0x00U
0275 #define UDF_OS_CLASS_DOS 0x01U
0276 #define UDF_OS_CLASS_OS2 0x02U
0277 #define UDF_OS_CLASS_MAC 0x03U
0278 #define UDF_OS_CLASS_UNIX 0x04U
0279 #define UDF_OS_CLASS_WIN9X 0x05U
0280 #define UDF_OS_CLASS_WINNT 0x06U
0281 #define UDF_OS_CLASS_OS400 0x07U
0282 #define UDF_OS_CLASS_BEOS 0x08U
0283 #define UDF_OS_CLASS_WINCE 0x09U
0284
0285 #define UDF_OS_ID_UNDEF 0x00U
0286 #define UDF_OS_ID_DOS 0x00U
0287 #define UDF_OS_ID_OS2 0x00U
0288 #define UDF_OS_ID_MAC 0x00U
0289 #define UDF_OS_ID_MAX_OSX 0x01U
0290 #define UDF_OS_ID_UNIX 0x00U
0291 #define UDF_OS_ID_AIX 0x01U
0292 #define UDF_OS_ID_SOLARIS 0x02U
0293 #define UDF_OS_ID_HPUX 0x03U
0294 #define UDF_OS_ID_IRIX 0x04U
0295 #define UDF_OS_ID_LINUX 0x05U
0296 #define UDF_OS_ID_MKLINUX 0x06U
0297 #define UDF_OS_ID_FREEBSD 0x07U
0298 #define UDF_OS_ID_NETBSD 0x08U
0299 #define UDF_OS_ID_WIN9X 0x00U
0300 #define UDF_OS_ID_WINNT 0x00U
0301 #define UDF_OS_ID_OS400 0x00U
0302 #define UDF_OS_ID_BEOS 0x00U
0303 #define UDF_OS_ID_WINCE 0x00U
0304
0305 #endif