ECMA167.h
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:19k
源码类别:

DVD

开发平台:

Others

  1. /****************************************************************************************
  2.  *  Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
  3.  *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
  4.  *
  5.  *  File: $Workfile: ECMA167.h $             
  6.  *
  7.  * Description:
  8.  * ============
  9.  * 
  10.  * 
  11.  * Log:
  12.  * ====
  13.  * $Revision: 2 $
  14.  * Last Modified by $Author: Nirm $ at $Modtime: 23/04/02 9:06 $ 
  15.  ****************************************************************************************
  16.  * Updates:
  17.  ****************************************************************************************
  18.  * $Log: /I49/H49V/Playcore/FileSys/UDF/ECMA167.h $
  19.  * 
  20.  * 2     23/04/02 9:30 Nirm
  21.  * - Added dependency in "Config.h".
  22.  * 
  23.  * 1     30/01/02 18:12 Nirm
  24.  ****************************************************************************************/
  25. /////////////////////////////////////////////////////////////////////////////
  26. // ECMA167.h - Definitions and Data-Structures described in ECMA-167
  27. //
  28. // Author: Nir Milstein
  29. #include "Config.h" // Global Configuration - do not remove!
  30. #ifndef __ECMA_167_H_
  31. #define __ECMA_167_H_
  32. #include "IncludeSysDefs.h"
  33. // NOTE: All of the structures MUST be packed, since they represent
  34. //  data-structures resident on the Medium!
  35. #pragma pack(1)
  36. /////////////////////////////////////////////////////////////////////////////
  37. // Constants
  38. #define VOLUME_RECOGNITION_SEQUENCE_START_LSN 16
  39. #define FIRST_ANCHOR_POINT_LSN 256
  40. #define MAX_ID_LENGTH 128
  41. /////////////////////////////////////////////////////////////////////////////
  42. // General - Basic Types (ECMA-167 1/7)
  43. // D-String (ECMA-167 1/7.2)
  44. typedef char DString;
  45. // Character-Set Specification (ECMA-167 1/7.2.1)
  46. typedef struct CharSpec_TAG {
  47. UINT8 uCharacterSetType;
  48. BYTE aCharacterSetInfo[63];
  49. } CharSpec;
  50. #define CHARACTER_SET_TYPE_CS0 0x00
  51. // Timestamp (ECMA-167 1/7.3)
  52. typedef struct Timestamp_TAG {
  53. UINT16 uTypeAndTimezone;
  54. INT16 iYear;
  55. UINT8 uMonth;
  56. UINT8 uDay;
  57. UINT8 uHour;
  58. UINT8 uMinute;
  59. UINT8 uSecond;
  60. UINT8 uCentiseconds;
  61. UINT8 uHundredsOfSeconds;
  62. UINT8 uMicroseconds;
  63. } Timestamp;
  64. #define TIMESTAMP_TYPE_CUT 0
  65. #define TIMESTAMP_TYPE_LOCAL 1
  66. #define TIMESTAMP_TYPE_AGREEMENT 2
  67. // Entity Identifier (ECMA-167 1/7.4)
  68. typedef struct RegID_Tag {
  69. UINT8 uFlags;
  70. BYTE aIdentifier[23];
  71. BYTE aIdentifierSuffix[8];
  72. } RegID;
  73. #define REGID_FLAGS_DIRTY 0x01
  74. #define REGID_FLAGS_PROTECTED 0x02
  75. /////////////////////////////////////////////////////////////////////////////
  76. // Volume and Boot-Block Recognition - Volume Recognition Structures (ECMA-167 2/9)
  77. // Volume Structure Descriptor (ECMA-167 2/9.1)
  78. #define STANDARD_ID_LEN 5
  79. struct GenericVolumeStructureDesc {
  80. UINT8 uStructureType;
  81. BYTE aStandardID[STANDARD_ID_LEN];
  82. UINT8 uStructureVersion;
  83. BYTE aStructureData[2041];
  84. };
  85. #define STANDARD_ID_BEA01 "BEA01"
  86. #define STANDARD_ID_BOOT2 "BOOT2"
  87. #define STANDARD_ID_CD001 "CD001"
  88. #define STANDARD_ID_CDW02 "CDW02"
  89. #define STANDARD_ID_NSR02 "NSR02"
  90. #define STANDARD_ID_NSR03 "NSR03"
  91. #define STANDARD_ID_TEA01 "TEA01"
  92. // Beginning Extended Area Descriptor (ECMA-167 2/9.2)
  93. #define BeginningExtendedAreaDesc GenericVolumeStructureDesc
  94. // Terminating Extended Area Descriptor (ECMA-167 2/9.3)
  95. #define TerminatingExtendedAreaDesc GenericVolumeStructureDesc
  96. // Boot Descriptor (ECMA-167 2/9.4)
  97. struct BootDesc {
  98. UINT8 uStructureType;
  99. BYTE aStandardID[STANDARD_ID_LEN];
  100. UINT8 uStructureVersion;
  101. BYTE ucReserved;
  102. RegID ridArchitectureType;
  103. RegID ridBootID;
  104. UINT32 dwBootExtentLocation;
  105. UINT32 dwBootExtentLength;
  106. UINT32 dwLoadAddressLow;
  107. UINT32 dwLoadAddressHigh;
  108. UINT32 dwStartAddressLow;
  109. UINT32 dwStartAddressHigh;
  110. Timestamp tsDescCreation;
  111. UINT16 wFlags;
  112. BYTE aReserved[32];
  113. BYTE aBootUse[1906];
  114. };
  115. /////////////////////////////////////////////////////////////////////////////
  116. // Volume Structure - Basic Types (ECMA-167 3/7)
  117. // Extent Descriptor (ECMA-167 3/7.1)
  118. typedef struct Extent_ad_TAG {
  119. UINT32 dwExtentLength;
  120. UINT32 dwExtentLocation;
  121. } Extent_ad;
  122. // Descriptor Tag (ECMA-167 3/7.2)
  123. typedef struct Tag_TAG {
  124. UINT16 uTagID;
  125. UINT16 uDescriptorVersion;
  126. UINT8 uTagChecksum;
  127. BYTE ucReserved;
  128. UINT16 uTagSerialNumber;
  129. UINT16 uDescriptorCRC;
  130. UINT16 uDescriptorCRCLength;
  131. UINT32 dwTagLocation;
  132. } Tag;
  133. #define TAG_ID_PRIMARY_VOLUME_DESC 1
  134. #define TAG_ID_ANCHOR_VOLUME_DESC_PTR 2
  135. #define TAG_ID_VOLUME_DESC_PTR 3
  136. #define TAG_ID_IMP_USE_VOLUME_DESC 4
  137. #define TAG_ID_PARTITION_DESC 5
  138. #define TAG_ID_LOGICAL_VOLUME_DESC 6
  139. #define TAG_ID_UNALLOC_SPACE_DESC 7
  140. #define TAG_ID_TERMINATING_DESC 8
  141. #define TAG_ID_LOGICAL_VOLUME_INTEGRITY 9
  142. /////////////////////////////////////////////////////////////////////////////
  143. // Volume Structure - Volume Recognition Structures (ECMA-167 3/9)
  144. // NSR Descriptor (ECMA-167 3/9.1)
  145. struct NSRDesc {
  146. UINT8 uStructureType;
  147. BYTE aStandardID[STANDARD_ID_LEN];
  148. UINT8 uStructureVersion;
  149. BYTE ucReserved;
  150. BYTE aStructureData[2040];
  151. };
  152. /////////////////////////////////////////////////////////////////////////////
  153. // Volume Structure - Volume Data Structures (ECMA-167 3/10)
  154. // Primary Volume Descriptor (ECMA-167 3/10.1)
  155. struct PrimaryVolumeDesc {
  156. Tag tgDescTag;
  157. UINT32 dwVolumeDescSequenceNumber;
  158. UINT32 dwPrimaryVolumeDescNumber;
  159. DString sVolumeID[32];
  160. UINT16 uVolumeSequenceNumber;
  161. UINT16 uMaxVolumeSequenceNumber;
  162. UINT16 uInterchangeLevel;
  163. UINT16 uMaxInterchangeLevel;
  164. UINT32 dwCharSetList;
  165. UINT32 dwMaxCharSetList;
  166. DString sVolumeSetID[128];
  167. CharSpec csDescriptorCharSet;
  168. CharSpec csExplanatoryCharSet;
  169. Extent_ad exVolumeAbstract;
  170. Extent_ad exVolumeCopyrightNotice;
  171. RegID ridApplicationID;
  172. Timestamp tsRecording;
  173. RegID ridImplID;
  174. BYTE aImplUse[64];
  175. UINT32 dwPredecessorVolumeDescSequenceLocation;
  176. UINT16 wFlags;
  177. BYTE aReserved[22];
  178. };
  179. #define PVD_FLAGS_VOLUME_SET_ID 0x0001
  180. // Anchor Volume Descriptor Pointer (ECMA-167 3/10.2)
  181. struct AnchorVolumeDescPtr {
  182. Tag tgDescTag;
  183. Extent_ad exMainVolumeDescSequenceExtent;
  184. Extent_ad exReserveVolumeDescSequenceExtent;
  185. BYTE aReserved[480];
  186. };
  187. // Volume Descriptor Pointer (ECMA-167 3/10.3)
  188. struct VolumeDescPtr {
  189. Tag tgDescTag;
  190. UINT32 dwVolumeDescSequenceNumber;
  191. Extent_ad exNextVolumeDescSequenceExtent;
  192. BYTE aReserved[484];
  193. };
  194. // Implementation Use Volume Descriptor (ECMA-167 3/10.4)
  195. struct ImplUseVolumeDesc {
  196. Tag tgDescTag;
  197. UINT32 dwVolumeDescSequenceNumber;
  198. RegID ridImplID;
  199. BYTE aImplUse[460];
  200. };
  201. // Partition Descriptor (ECMA-167 3/10.5)
  202. struct PartitionDesc {
  203. Tag tgDescTag;
  204. UINT32 dwVolumeDescSequenceNumber;
  205. UINT16 wPartitionFlags;
  206. UINT16 uPartitionNumber;
  207. RegID ridPartitionContents;
  208. BYTE aPartitionContentsUse[128];
  209. UINT32 uAccessType;
  210. UINT32 dwPartitionStartingLocation;
  211. UINT32 uPartitionLength;
  212. RegID ridImplID;
  213. BYTE aImplUse[128];
  214. BYTE aReserved[156];
  215. };
  216. #define PARTITION_FLAGS_ALLOCATION 1
  217. #define PARTITION_CONTENTS_FDC01 "+FDC01"
  218. #define PARTITION_CONTENTS_CD001 "+CD001"
  219. #define PARTITION_CONTENTS_CDW02 "+CDW02"
  220. #define PARTITION_CONTENTS_NSR02 "+NSR02"
  221. #define PARTITION_CONTENTS_NSR03 "+NSR03"
  222. #define PARTITION_ACCESS_NONE 0
  223. #define PARTITION_ACCESS_RO 1
  224. #define PARTITION_ACCESS_WO 2
  225. #define PARTITION_ACCESS_RW 3
  226. #define PARTITION_ACCESS_OW 4
  227. // Logical Volume Descriptor (ECMA-167 3/10.6)
  228. struct LogicalVolumeDesc {
  229. Tag tgDescTag;
  230. UINT32 dwVolumeDescSequenceNumber;
  231. CharSpec csDescCharSet;
  232. DString sLogicalVolumeID[128];
  233. UINT32 cbLogicalBlockSize;
  234. RegID ridDomainID;
  235. BYTE aLogicalVolumeContentsUse[16];
  236. UINT32 cbMapTableLength;
  237. UINT32 uNumberOfPartitionMaps;
  238. RegID ridImplID;
  239. BYTE aImplUse[128];
  240. Extent_ad exIntegritySequenceExtent;
  241. BYTE aPartitionMaps[];
  242. };
  243. // Generic Partition Map (ECMA-167 3/10.7.1)
  244. struct PartitionMapGeneric {
  245. UINT8 uPartitionMapType;
  246. UINT8 cbPartitionMapLength;
  247. BYTE aPartitionMapping[];
  248. };
  249. #define PARTITION_MAP_TYPE_NONE 0
  250. #define PARTITION_MAP_TYPE_1 1
  251. #define PARTITION_MAP_TYPE_2 2
  252. // Type1 PartitionMap (ECMA-167 3/10.7.2)
  253. struct PartitionMapType1 {
  254. UINT8 uPartitionMapType;
  255. UINT8 cbPartitionMapLength;
  256. UINT16 uVolumeSequenceNumber;
  257. UINT16 uPartitionNumber;
  258. };
  259. // Type2 PartitionMap (ECMA-167 3/10.7.3)
  260. struct PartitionMapType2 {
  261. UINT8 uPartitionMapType;
  262. UINT8 cbPartitionMapLength;
  263. BYTE aPartitionID[62];
  264. };
  265. // Unallocated Space Descriptor (ECMA-167 3/10.8)
  266. struct UnallocatedSpaceDesc {
  267. Tag tgDescTag;
  268. UINT32 dwVolumeDescSequenceNumber;
  269. UINT32 uNumberOfAllocationDescs;
  270. Extent_ad exAllcationDescs[];
  271. };
  272. // Terminating Descriptor (ECMA-167 3/10.9)
  273. struct TerminatingDescriptor {
  274. Tag tgDescTag;
  275. BYTE aReserved[496];
  276. };
  277. // Logical Volume Integrity Descriptor (ECMA-167 3/10.10)
  278. struct LogicalVolumeIntegrityDesc {
  279. Tag tgDescTag;
  280. Timestamp tsRecording;
  281. UINT32 dwIntegrityType;
  282. Extent_ad exNextIntegrityExtent;
  283. BYTE aLogicalVolumeContentsUse[32];
  284. UINT32 uNumberOfPartitions;
  285. UINT32 uLengthOfImplUse;
  286. UINT32 aFreeSpaceTable[];
  287. UINT32 aSizeTable[];
  288. BYTE aImplUse[];
  289. };
  290. #define INTEGRITY_TYPE_OPEN 0
  291. #define INTEGRITY_TYPE_CLOSE 1
  292. /////////////////////////////////////////////////////////////////////////////
  293. // File Structure - Basic Types (ECMA-167 4/7)
  294. // Recorded Address (ECMA-167 4/7.1)
  295. typedef struct LB_Addr_TAG {
  296. UINT32 uLogicalBlockNumber; // Relative to the start of the Partition
  297. UINT16 uPartitionReferenceNumber;
  298. } LB_Addr;
  299. // Descriptor Tag (ECMA-167 4/7.2)
  300. #define TAG_ID_FILE_SET_DESC 256
  301. #define TAG_ID_FILE_ID_DESC 257
  302. #define TAG_ID_ALLOC_EXTENT_DESC 258
  303. #define TAG_ID_INDIRECT_ENTRY 259
  304. #define TAG_ID_TERMINAL_ENTRY 260
  305. #define TAG_ID_FILE_ENTRY 261
  306. #define TAG_ID_EXT_ATTR_HDR_DESC 262
  307. #define TAG_ID_UNALLOC_SPACE_ENTRY 263
  308. #define TAG_ID_SPACE_BITMAP_DESC 264
  309. #define TAG_ID_PARTITION_INTEGRITY 265
  310. #define TAG_ID_EXT_FILE_ENTRY 266
  311. /////////////////////////////////////////////////////////////////////////////
  312. // File Structure - File Data Structures (ECMA-167 4/14)
  313. // Forward-Declarations
  314. // Short Allocation Descriptor (ECMA-167 4/14.14.1)
  315. typedef struct Short_ad_TAG {
  316. UINT32 cbExtentLength; // 2 MSBs are Extent-Type
  317. UINT32 dwExtentPosition; // Position within the containing Partition
  318. } Short_ad;
  319. // Long Allocation Descriptor (ECMA-167 4/14.14.2)
  320. typedef struct Long_ad_TAG {
  321. UINT32 cbExtentLength;
  322. LB_Addr lbaExtentLocation;
  323. BYTE aImplUse[6];
  324. } Long_ad;
  325. typedef union Alloc_Desc_TAG{
  326. Short_ad sadFile;
  327. Long_ad ladFile;
  328. }Alloc_desc;
  329. // File Set Descriptor (ECMA-167 4/14.1)
  330. struct FileSetDesc {
  331. Tag tgDescTag;
  332. Timestamp tsRecording;
  333. UINT16 uInterchangeLevel;
  334. UINT16 uMaxInterchangeLevel;
  335. UINT32 dwCharSetList;
  336. UINT32 dwMaxCharSetList;
  337. UINT32 uFileSetNumber;
  338. UINT32 uFileSetDescNumber;
  339. CharSpec csLogicalVolumeIDCharSet;
  340. DString sLogicalVolumeID[128];
  341. CharSpec csFileSetCharSet;
  342. DString sFileSetID[32];
  343. DString sCopyrightFileID[32];
  344. DString sAbstractFileID[32];
  345. Long_ad ladRootDirICB;
  346. RegID ridDomainID;
  347. Long_ad ladNextExtent;
  348. Long_ad ladSystemStreamDirICB;
  349. BYTE aReserved[32];
  350. };
  351. // Partition Header Descriptor (ECMA-167 4/14.3)
  352. struct PartitionHeaderDesc {
  353. Short_ad sadUnallocSpaceTable;
  354. Short_ad sadUnallocSpaceBitmap;
  355. Short_ad sadPartitionIntegrityTable;
  356. Short_ad sadFreedSpaceTable;
  357. Short_ad sadFreedSpaceBitmap;
  358. BYTE aReserved[88];
  359. };
  360. // File Identifier Descriptor (ECMA-167 4/14.4)
  361. struct FileIDDesc {
  362. Tag tgDescTag;
  363. UINT16 uFileVersionNumber;
  364. UINT8 uFileCharacteristics;
  365. UINT8 cbLengthOfFileID;
  366. Long_ad ladICB;
  367. UINT16 cbLengthOfImplUse;
  368. BYTE aImplUse[];
  369. DString sFileID[];
  370. BYTE aPadding[];
  371. };
  372. #define FILE_CHAR_HIDDEN 0x01
  373. #define FILE_CHAR_DIRECTORY 0x02
  374. #define FILE_CHAR_DELETED 0x04
  375. #define FILE_CHAR_PARENT 0x08
  376. #define FILE_CHAR_METADATA 0x10
  377. // Allocation Extent Descriptor (ECMA-167 4/14.5)
  378. struct AllocationExtendDesc {
  379. Tag tgDescTag;
  380. UINT32 dwPrevAllocationExtentLocation;
  381. UINT32 cbLengthOfAllocDescs;
  382. };
  383. // ICB Tag (ECMA-167 4/14.6)
  384. typedef struct ICBTag_TAG {
  385. UINT32 uPriorRecorderNumberOfDirectEntries;
  386. UINT16 uStrategyType;
  387. BYTE aStrategyParameter[2];
  388. UINT16 uMaxNumberOfEntries;
  389. BYTE ucReserved;
  390. UINT8 uFileType;
  391. LB_Addr lbaParentICBLocation;
  392. UINT16 wFlags;
  393. } ICBTag;
  394. #define ICB_FILETYPE_NONE 0
  395. #define ICB_FILETYPE_UNALLOC 1
  396. #define ICB_FILETYPE_INTEGRITY 2
  397. #define ICB_FILETYPE_INDIRECT 3
  398. #define ICB_FILETYPE_DIRECTORY 4
  399. #define ICB_FILETYPE_NORMAL 5
  400. #define ICB_FILETYPE_BLOCK_DEV 6
  401. #define ICB_FILETYPE_CHAR_DEV 7
  402. #define ICB_FILETYPE_EXT_ATTR 8
  403. #define ICB_FILETYPE_FIFO 9
  404. #define ICB_FILETYPE_C_ISSOCK 10
  405. #define ICB_FILETYPE_TERMINAL 11
  406. #define ICB_FILETYPE_LINK 12
  407. #define ICB_FILETYPE_STREAM_DIR 13
  408. #define ICB_FLAGS_ALLOC_MASK 0x0007
  409. #define ICB_FLAGS_AD_SHORT 0
  410. #define ICB_FLAGS_AD_LONG 1
  411. #define ICB_FLAGS_AD_EXTENDED 2
  412. #define ICB_FLAGS_AD_IN_ICB 3
  413. #define ICB_FLAGS_SORTED 0x0008
  414. #define ICB_FLAGS_NONRELOC 0x0010
  415. #define ICB_FLAGS_ARCHIVE 0x0020
  416. #define ICB_FLAGS_SETUID 0x0040
  417. #define ICB_FLAGS_SETGID 0x0080
  418. #define ICB_FLAGS_STICKY 0x0100
  419. #define ICB_FLAGS_CONTIGUOUS 0x0200
  420. #define ICB_FLAGS_SYSTEM 0x0400
  421. #define ICB_FLAGS_TRANSFORMED 0x0800
  422. #define ICB_FLAGS_MULTIVERSIONS 0x1000
  423. #define ICB_FLAGS_STREAM 0x2000
  424. // Indirect Entry (ECMA-167 4/14.7)
  425. struct IndirectEntry {
  426. Tag tgDescTag;
  427. ICBTag icbTag;
  428. Long_ad ladIndirectICB;
  429. };
  430. // Terminal Entry (ECMA-167 4/14.8)
  431. struct TerminalEntry {
  432. Tag tgDescTag;
  433. ICBTag icbTag;
  434. };
  435. // File Entry (ECMA-167 4/14.9)
  436. struct FileEntry {
  437. Tag tgDescTag;
  438. ICBTag icbTag;
  439. UINT32 dwUID;
  440. UINT32 dwGID;
  441. UINT32 dwPermissions;
  442. UINT16 uFileLinkCnt;
  443. UINT8 uRecordFormat;
  444. UINT8 uRecordDisplayAttrs;
  445. UINT32 cbRecordLength;
  446. UINT32 cbInfoLengthLow;
  447. UINT32 cbInfoLengthHigh;
  448. UINT32 cbLogicalBlocksRecordedLow;
  449. UINT32 cbLogicalBlocksRecordedHigh;
  450. Timestamp tsAccess;
  451. Timestamp tsModification;
  452. Timestamp tsAttributes;
  453. UINT32 dwCheckpoint;
  454. Long_ad ladExtAttrICB;
  455. RegID ridImplID;
  456. UINT32 dwUniqueIDLow;
  457. UINT32 dwUniqueIDHigh;
  458. UINT32 cbLengthOfExtAttrs;
  459. UINT32 cbLengthOfAllocDescs;
  460. BYTE aExtendedAttrs[];
  461. BYTE aAllocDescs[];
  462. };
  463. #define FILE_PERM_O_EXEC 0x00000001
  464. #define FILE_PERM_O_WRITE 0x00000002
  465. #define FILE_PERM_O_READ 0x00000004
  466. #define FILE_PERM_O_ATTR 0x00000008
  467. #define FILE_PERM_O_DELETE 0x00000010
  468. #define FILE_PERM_G_EXEC 0x00000020
  469. #define FILE_PERM_G_WRITE 0x00000040
  470. #define FILE_PERM_G_READ 0x00000080
  471. #define FILE_PERM_G_ATTR 0x00000100
  472. #define FILE_PERM_G_DELETE 0x00000200
  473. #define FILE_PERM_U_EXEC 0x00000400
  474. #define FILE_PERM_U_WRITE 0x00000800
  475. #define FILE_PERM_U_READ 0x00001000
  476. #define FILE_PERM_U_ATTR 0x00002000
  477. #define FILE_PERM_U_DELETE 0x00004000
  478. #define FILE_REC_FRMT_NONE 0
  479. #define FILE_REC_FRMT_FIXED_PAD 1
  480. #define FILE_REC_FRMT_FIXED 2
  481. #define FILE_REC_FRMT_VAR8 3
  482. #define FILE_REC_FRMT_VAR16 4
  483. #define FILE_REC_FRMT_VAR16_MSB 5
  484. #define FILE_REC_FRMT_VAR32 6
  485. #define FILE_REC_FRMT_PRINT 7
  486. #define FILE_REC_FRMT_LF 8
  487. #define FILE_REC_FRMT_CR 9
  488. #define FILE_REC_FRMT_CRLF 10
  489. #define FILE_REC_FRMT_LFCR 11
  490. // Extended Attribute Header Descriptor (ECMA-167 4/14.10.1)
  491. #define ATTR_TYPE_IMPL 2048
  492. #define ATTR_TYPE_APPL 65536
  493. struct ExtendedAttributeHeaderDesc {
  494. Tag tgDescTag;
  495. UINT32 cbImplAttrLocation;
  496. UINT32 cbApplAttrLocation;
  497. };
  498. // Generic Extended Attribute (ECMA-167 4/14.10.2)
  499. struct GenericExtendedAttribute {
  500. UINT32 uAttrType;
  501. UINT8 uAttrSubType;
  502. BYTE aReserved[3];
  503. UINT32 cbAttrLength;
  504. BYTE aAttrData[];
  505. };
  506. // Implementation-Use Extended Attribute (ECMA-167 4/14.10.8)
  507. struct ImplUseExtendedAttribute {
  508. UINT32 uAttrType;
  509. UINT8 uAttrSubType;
  510. BYTE aReserved[3];
  511. UINT32 cbAttrLength;
  512. UINT32 cbImplUseLength;
  513. RegID ridImplID;
  514. BYTE aImplUse[];
  515. };
  516. // Unallocated Space Entry (ECMA-167 4/14.11)
  517. struct UnallocSpaceEntry {
  518. Tag tgDescTag;
  519. ICBTag icbTag;
  520. UINT32 cbLengthOfAllocDecs;
  521. BYTE aAllocDescs[];
  522. };
  523. // Space Bitmap Descriptor (ECMA-167 4/14.12)
  524. struct SpaceBitmapDesc {
  525. Tag tgDescTag;
  526. UINT32 uNumberOfBits;
  527. UINT32 uNumberOfBytes;
  528. BYTE aBitmap[];
  529. };
  530. // Partition Intergrity Entry (ECMA-167 4/14.13)
  531. struct PartitionIntegrityEntry {
  532. Tag tgDescTag;
  533. ICBTag icbTag;
  534. Timestamp tsRecording;
  535. UINT8 uIntegrityType;
  536. BYTE aReserved[175];
  537. RegID ridImplID;
  538. BYTE aImplUse[256];
  539. };
  540. #define INTERGITY_TYPE_OPEN 0
  541. #define INTERGITY_TYPE_CLOSE 1
  542. #define INTERGITY_TYPE_STABLE 2
  543. // Extended Allocation Descriptor (ECMA-167 4/14.14.3)
  544. struct ExtAllocDesc {
  545. UINT32 cbExtentLength;
  546. UINT32 cbRecordedLength;
  547. UINT32 cbInfoLength;
  548. LB_Addr lbaExtentLocation;
  549. BYTE aImplUse[2];
  550. };
  551. // Logical Volume Header Descriptor (ECMA-167 4/14.15)
  552. struct LogicalVolumeHdr {
  553. UINT32 dwUniqueIDLow;
  554. UINT32 dwUniqueIDHigh;
  555. BYTE aReserved[24];
  556. };
  557. // Path Component (ECMA-167 4/14.16.1)
  558. struct PathComponent {
  559. UINT8 uComponentType;
  560. UINT8 cbLengthOfComponentID;
  561. UINT16 uComponentFileVersionNumber;
  562. DString sComponentID[];
  563. };
  564. // Extended File Entry (ECMA-167 4/14.17)
  565. struct ExtFileEntry {
  566. Tag tgDescTag;
  567. ICBTag icbTag;
  568. UINT32 dwUID;
  569. UINT32 dwGID;
  570. UINT32 dwPermissions;
  571. UINT16 uFileLinkCnt;
  572. UINT8 uRecordFormat;
  573. UINT8 uRecordDisplayAttrs;
  574. UINT32 cbRecordLength;
  575. UINT32 cbInfoLengthLow;
  576. UINT32 cbInfoLengthHigh;
  577. UINT32 cbObjectSizeLow;
  578. UINT32 cbObjectSizeHigh;
  579. UINT32 cbLogicalBlocksRecordedLow;
  580. UINT32 cbLogicalBlocksRecordedHigh;
  581. Timestamp tsAccess;
  582. Timestamp tsModification;
  583. Timestamp tsCreation;
  584. Timestamp tsAttributes;
  585. UINT32 dwCheckpoint;
  586. BYTE aReserved[4];
  587. Long_ad ladExtAttrICB;
  588. Long_ad ladStreamDirICB;
  589. RegID ridImplID;
  590. UINT32 dwUniqueIDLow;
  591. UINT32 dwUniqueIDHigh;
  592. UINT32 cbLengthOfExtAttrs;
  593. UINT32 cbLengthOfAllocDescs;
  594. BYTE aExtendedAttrs[];
  595. BYTE aAllocDescs[];
  596. };
  597. /////////////////////////////////////////////////////////////////////////////
  598. // Implementation-Specific auxiliary definitions and structures
  599. #define PRIMARY_VOLUME_DESC_INFO_OFFSET 24
  600. #define VOLUME_SET_IDENTIFIER 72
  601. #define PARTITION_DESC_INFO_OFFSET 188
  602. #define LOGICAL_VOLUME_DESC_INFO_OFFSET 248
  603. #define FILE_SET_DESC_INFO_OFFSET 400
  604. #define FILE_ENTRY_INFOLENGTH_OFFSET 56
  605. #define FILE_ENTRY_L_EXTATTR_OFFSET 168
  606. #define FILE_ENTRY_L_ALLOCDESC_OFFSET 172
  607. #define FILE_ENTRY_EXTATTRS_OFFSET 176
  608. #define EXT_FILE_ENTRY_L_EXTATTR_OFFSET 208
  609. #define EXT_FILE_ENTRY_L_ALLOCDESC_OFFSET 212
  610. #define EXT_FILE_ENTRY_EXTATTRS_OFFSET 216
  611. #ifdef DVD_VR_SUPPORT
  612. #define ALLOCATION_EXTENT_LENGTH_OFFSET 20
  613. #endif
  614. struct GenericVolumeStructureDesc_Base {
  615. UINT8 uStructureType;
  616. BYTE aStandardID[STANDARD_ID_LEN];
  617. UINT8 uStructureVersion;
  618. };
  619. #pragma pack()
  620. #endif //__ECMA_167_H_