Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

iso13346.h

Go to the documentation of this file.
00001 00002 /*** ISO13346.H - ISO 13346 File System Disk Format 00003 * 00004 * Microsoft Confidential 00005 * Copyright (C) Microsoft Corporation 1996 00006 * All Rights Reserved 00007 * 00008 * This file defines the ISO 13346 Data Structures. 00009 * 00010 * The UDF file system uses these data structures to interpret the 00011 * media's contents. 00012 * 00013 */ 00014 00015 // 00016 // All 13346 structures are aligned on natural boundaries even though it will 00017 // not be obvious to the compiler. Disable compiler smarts for the duration 00018 // of the ISO definitions. 00019 // 00020 // As an example, the LONGAD definition is {ULONG {ULONG USHORT} UCHAR[6]} and 00021 // normal packing will pad out the internal NSRLBA, nevermind that the UCHAR 00022 // reserved field is doing exactly that. 00023 // 00024 00025 #pragma pack(1) 00026 00027 /*** ISO 13346 Part 1: General 00028 * 00029 * 00030 */ 00031 00032 /*** charspec - Character Set Specification (1/7.2.1) 00033 * 00034 */ 00035 00036 typedef struct CHARSPEC { 00037 UCHAR Type; // Character Set Type (CHARSPEC_T_...) 00038 UCHAR Info[63]; // Character Set Information 00039 } CHARSPEC, *PCHARSPEC; 00040 00041 // CHARSPEC_T_... - Values for charspec_Type Character Set Types (1/7.2.1.1) 00042 00043 #define CHARSPEC_T_CS0 0 // By Agreement 00044 #define CHARSPEC_T_CS1 1 // Unicode (according to ISO 2022) 00045 #define CHARSPEC_T_CS2 2 // 38 Glyphs 00046 #define CHARSPEC_T_CS3 3 // 65 Glyphs 00047 #define CHARSPEC_T_CS4 4 // 95 Glyphs 00048 #define CHARSPEC_T_CS5 5 // 191 Glyphs 00049 #define CHARSPEC_T_CS6 6 // Unicode or ISO 2022 00050 #define CHARSPEC_T_CS7 7 // Unicode or ISO 2022 00051 #define CHARSPEC_T_CS8 8 // 53 Glyphs 00052 00053 /*** timestamp - Timestamp Structure (1/7.3) 00054 * 00055 */ 00056 00057 typedef struct TIMESTAMP { 00058 SHORT Zone:12; // Time Zone (+-1440 minutes from CUT) 00059 USHORT Type:4; // Timestamp Type (TIMESTAMP_T_...) 00060 USHORT Year; // Year (1..9999) 00061 UCHAR Month; // Month (1..12) 00062 UCHAR Day; // Day (1..31) 00063 UCHAR Hour; // Hour (0..23) 00064 UCHAR Minute; // Minute (0..59) 00065 UCHAR Second; // Second (0..59) 00066 UCHAR CentiSecond; // Centiseconds (0..99) 00067 UCHAR Usec100; // Hundreds of microseconds (0..99) 00068 UCHAR Usec; // microseconds (0..99) 00069 } TIMESTAMP, *PTIMESTAMP; 00070 00071 // TIMESTAMP_T_... - Values for timestamp_Type (1/7.3.1) 00072 00073 #define TIMESTAMP_T_CUT 0 // Coordinated Universal Time 00074 #define TIMESTAMP_T_LOCAL 1 // Local Time 00075 #define TIMESTAMP_T_AGREEMENT 2 // Time format by agreement 00076 00077 // TIMESTAMP_Z_... Values for timestamp_Zone 00078 00079 #define TIMESTAMP_Z_MIN (-1440) // Minimum timezone offset (minutes) 00080 #define TIMESTAMP_Z_MAX ( 1440) // Maximum timezone offset (minutes) 00081 #define TIMESTAMP_Z_NONE (-2047) // No timezone in timestamp_Zone 00082 00083 00084 /**** regid - Entity Identifier (1/7.4) 00085 * 00086 */ 00087 00088 typedef struct REGID { 00089 UCHAR Flags; // Flags (REGID_F_...) 00090 UCHAR Identifier[23]; // Identifier 00091 UCHAR Suffix[8]; // Identifier Suffix 00092 } REGID, *PREGID; 00093 00094 // REGID_F_... - Definitions for regid_Flags bits 00095 00096 #define REGID_F_DIRTY (0x01) // Information Modified 00097 #define REGID_F_PROTECTED (0x02) // Changes Locked Out 00098 00099 // REGID_LENGTH_... - regid field lengths 00100 00101 #define REGID_LENGTH_IDENT 23 // Length of regid_Identifier (bytes) 00102 #define REGID_LENGTH_SUFFIX 8 // Length of regid_Suffix (bytes) 00103 00104 // REGID_ID_... - Values for regid_Identifier[0] 00105 00106 #define REGID_ID_ISO13346 (0x2B) // regid_Identifier within ISO 13346 00107 #define REGID_ID_NOTREGISTERED (0x2D) // regid_Identifier is not registered 00108 00109 00110 /*** Various Structures from Parts 3 and 4 moved here for compilation. 00111 * 00112 */ 00113 00114 00115 /*** extentad - Extent Address Descriptor (3/7.1) 00116 * 00117 */ 00118 00119 typedef struct EXTENTAD { 00120 ULONG Len; // Extent Length in Bytes 00121 ULONG Lsn; // Extent Logical Sector Number 00122 } EXTENTAD, *PEXTENTAD; 00123 00124 00125 /*** nsr_lba - Logical Block Address (4/7.1) (lb_addr) 00126 * 00127 */ 00128 00129 typedef struct NSRLBA { 00130 ULONG Lbn; // Logical Block Number 00131 USHORT Partition; // Partition Reference Number 00132 } NSRLBA, *PNSRLBA; 00133 00134 00135 /*** nsr_length - Format of a NSR allocation descriptor length field (4/14.14.1.1) 00136 * 00137 * This is hands-down one of the most stupid things in 13346 00138 */ 00139 00140 typedef struct NSRLENGTH { 00141 ULONG Length:30; 00142 ULONG Type:2; 00143 } NSRLENGTH, *PNSRLENGTH; 00144 00145 #define NSRLENGTH_TYPE_RECORDED 0 00146 #define NSRLENGTH_TYPE_UNRECORDED 1 00147 #define NSRLENGTH_TYPE_UNALLOCATED 2 00148 #define NSRLENGTH_TYPE_CONTINUATION 3 00149 00150 00151 /*** Short Allocation Descriptor (4/14.14.1) 00152 * 00153 * Note that a SHORTAD precisely overlaps a LONGAD. Use this by defining 00154 * a generic allocation descriptor structure. 00155 */ 00156 00157 typedef struct SHORTAD { 00158 NSRLENGTH Length; // Extent Length 00159 ULONG Start; // Extent Logical Block Number 00160 } SHORTAD, *PSHORTAD; 00161 00162 typedef SHORTAD AD_GENERIC, *PAD_GENERIC; 00163 00164 00165 /*** Long Allocation Descriptor (4/14.14.2) 00166 * 00167 */ 00168 00169 typedef struct LONGAD { 00170 NSRLENGTH Length; // Extent Length 00171 NSRLBA Start; // Extent Location 00172 UCHAR ImpUse[6]; // Implementation Use 00173 } LONGAD, *PLONGAD; 00174 00175 00176 /*** Extended Allocation Descriptor (4/14.14.3) 00177 * 00178 */ 00179 00180 typedef struct EXTAD { 00181 NSRLENGTH ExtentLen; // Extent Length 00182 NSRLENGTH RecordedLen; // Recorded Length 00183 ULONG InfoLen; // Information Length 00184 NSRLBA Start; // Extent Location 00185 UCHAR ImpUse[2]; // Implementation Use 00186 } EXTAD, *PEXTAD; 00187 00188 /*** ISO 13346 Part 2: Volume and Boot Block Recognition 00189 * 00190 * 00191 */ 00192 00193 00194 /*** vsd_generic - Generic Volume Structure Descriptor (2/9.1) 00195 * 00196 */ 00197 00198 typedef struct VSD_GENERIC { 00199 UCHAR Type; // Structure Type 00200 UCHAR Ident[5]; // Standard Identifier 00201 UCHAR Version; // Standard Version 00202 UCHAR Data[2041]; // Structure Data 00203 } VSD_GENERIC, *PVSD_GENERIC; 00204 00205 // VSD_LENGTH_... - vsd field lengths 00206 00207 #define VSD_LENGTH_IDENT 5 // Length of regid_Identifier (bytes) 00208 00209 // VSD_IDENT_... - Values for vsd_generic_Ident 00210 00211 #define VSD_IDENT_BEA01 "BEA01" // Begin Extended Area 00212 #define VSD_IDENT_TEA01 "TEA01" // Terminate Extended Area 00213 #define VSD_IDENT_CDROM "CDROM" // High Sierra Group (pre-ISO 9660) 00214 #define VSD_IDENT_CD001 "CD001" // ISO 9660 00215 #define VSD_IDENT_CDW01 "CDW01" // ECMA 168 00216 #define VSD_IDENT_CDW02 "CDW02" // ISO 13490 00217 #define VSD_IDENT_NSR01 "NSR01" // ECMA 167 00218 #define VSD_IDENT_NSR02 "NSR02" // ISO 13346 00219 #define VSD_IDENT_BOOT2 "BOOT2" // Boot Descriptor 00220 00221 typedef enum _VSD_IDENT { 00222 VsdIdentBad = 0, 00223 VsdIdentBEA01, 00224 VsdIdentTEA01, 00225 VsdIdentCDROM, 00226 VsdIdentCD001, 00227 VsdIdentCDW01, 00228 VsdIdentCDW02, 00229 VsdIdentNSR01, 00230 VsdIdentNSR02, 00231 VsdIdentBOOT2 00232 } VSD_IDENT, *PVSD_IDENT; 00233 00234 /*** vsd_bea01 - Begin Extended Area Descriptor (2/9.2) 00235 * 00236 */ 00237 00238 typedef struct VSD_BEA01 { 00239 UCHAR Type; // Structure Type 00240 UCHAR Ident[5]; // Standard Identifier ('BEA01') 00241 UCHAR Version; // Standard Version 00242 UCHAR Data[2041]; // Structure Data 00243 } VSD_BEA01, *PVSD_BEA01; 00244 00245 00246 /*** vsd_tea01 - Terminate Extended Area Descriptor (2/9.3) 00247 * 00248 */ 00249 00250 typedef struct VSD_TEA01 { 00251 UCHAR Type; // Structure Type 00252 UCHAR Ident[5]; // Standard Identifier ('TEA01') 00253 UCHAR Version; // Standard Version 00254 UCHAR Data[2041]; // Structure Data 00255 } VSD_TEA01, *PVSD_TEA01; 00256 00257 00258 /*** vsd_boot2 - Boot Descriptor (2/9.4) 00259 * 00260 */ 00261 00262 typedef struct VSD_BOOT2 { 00263 UCHAR Type; // Structure Type 00264 UCHAR Ident[5]; // Standard Identifier ('BOOT2') 00265 UCHAR Version; // Standard Version 00266 UCHAR Res8; // Reserved Zero 00267 REGID Architecture; // Architecture Type 00268 REGID BootIdent; // Boot Identifier 00269 ULONG BootExt; // Boot Extent Start 00270 ULONG BootExtLen; // Boot Extent Length 00271 ULONG LoadAddr[2]; // Load Address 00272 ULONG StartAddr[2]; // Start Address 00273 TIMESTAMP Timestamp; // Creation Time 00274 USHORT Flags; // Flags (VSD_BOOT2_F_...) 00275 UCHAR Res110[32]; // Reserved Zeros 00276 UCHAR BootUse[1906]; // Boot Use 00277 } VSD_BOOT2, *PVSD_BOOT2; 00278 00279 // VSD_BOOT2_F_... - Definitions for vsd_boot2_Flags bits 00280 00281 #define VSD_BOOT2_F_ERASE (0x0001) // Ignore previous similar BOOT2 vsds 00282 00283 // 00284 // Aligning this byte offset to a sector boundary by rounding up will 00285 // yield the starting offset of the Volume Recognition Area (2/8.3) 00286 // 00287 00288 #define VRA_BOUNDARY_LOCATION (32767 + 1) 00289 00290 /*** ISO 13346 Part 3: Volume Structure 00291 * 00292 * 00293 */ 00294 00295 /*** destag - Descriptor Tag (3/7.1 and 4/7.2) 00296 * 00297 * destag_Checksum = Byte sum of bytes 0-3 and 5-15 of destag. 00298 * 00299 * destag_CRC = CRC (X**16 + X**12 + X**5 + 1) 00300 * 00301 */ 00302 00303 typedef struct DESTAG { 00304 USHORT Ident; // Tag Identifier 00305 USHORT Version; // Descriptor Version 00306 UCHAR Checksum; // Tag Checksum 00307 UCHAR Res5; // Reserved 00308 USHORT Serial; // Tag Serial Number 00309 USHORT CRC; // Descriptor CRC 00310 USHORT CRCLen; // Descriptor CRC Length 00311 ULONG Lbn; // Tag Location (Logical Block Number) 00312 } DESTAG, *PDESTAG; 00313 00314 // DESTAG_ID_... - Values for destag_Ident 00315 // Descriptor Tag Values from NSR Part 3 (3/7.2.1) 00316 00317 #define DESTAG_ID_NOTSPEC 0 // Format Not Specified 00318 #define DESTAG_ID_NSR_PVD 1 // (3/10.1) Primary Volume Descriptor 00319 #define DESTAG_ID_NSR_ANCHOR 2 // (3/10.2) Anchor Volume Desc Pointer 00320 #define DESTAG_ID_NSR_VDP 3 // (3/10.3) Volume Descriptor Pointer 00321 #define DESTAG_ID_NSR_IMPUSE 4 // (3/10.4) Implementation Use Vol Desc 00322 #define DESTAG_ID_NSR_PART 5 // (3/10.5) Partition Descriptor 00323 #define DESTAG_ID_NSR_LVOL 6 // (3/10.6) Logical Volume Descriptor 00324 #define DESTAG_ID_NSR_UASD 7 // (3/10.8) Unallocated Space Desc 00325 #define DESTAG_ID_NSR_TERM 8 // (3/10.9) Terminating Descriptor 00326 #define DESTAG_ID_NSR_LVINTEG 9 // (3/10.10) Logical Vol Integrity Desc 00327 00328 #define DESTAG_ID_MINIMUM_PART3 1 // The lowest legal DESTAG in Part 3 00329 #define DESTAG_ID_MAXIMUM_PART3 9 // The highest legal DESTAG in Part 3 00330 00331 // DESTAG_ID_... - Values for destag_Ident, continued... 00332 // Descriptor Tag Values from NSR Part 4 (4/7.2.1) 00333 00334 #define DESTAG_ID_NSR_FSD 256 // (4/14.1) File Set Descriptor 00335 #define DESTAG_ID_NSR_FID 257 // (4/14.4) File Identifier Descriptor 00336 #define DESTAG_ID_NSR_ALLOC 258 // (4/14.5) Allocation Extent Desc 00337 #define DESTAG_ID_NSR_ICBIND 259 // (4/14.7) ICB Indirect Entry 00338 #define DESTAG_ID_NSR_ICBTRM 260 // (4/14.8) ICB Terminal Entry 00339 #define DESTAG_ID_NSR_FILE 261 // (4/14.9) File Entry 00340 #define DESTAG_ID_NSR_EA 262 // (4/14.10) Extended Attribute Header 00341 #define DESTAG_ID_NSR_UASE 263 // (4/14.11) Unallocated Space Entry 00342 #define DESTAG_ID_NSR_SBP 264 // (4/14.12) Space Bitmap Descriptor 00343 #define DESTAG_ID_NSR_PINTEG 265 // (4/14.13) Partition Integrity 00344 00345 #define DESTAG_ID_MINIMUM_PART4 256 // The lowest legal DESTAG in Part 4 00346 #define DESTAG_ID_MAXIMUM_PART4 265 // The highest legal DESTAG in Part 4 00347 00348 // DESTAG_VER_... - Values for destag_Version (3/7.2.2) 00349 00350 #define DESTAG_VER_CURRENT 2 // Current Descriptor Tag Version 00351 00352 // DESTAG_SERIAL_... - Values for destag_Serial (3/7.2.5) 00353 00354 #define DESTAG_SERIAL_NONE 0 // No Serial Number specified 00355 00356 00357 /*** Anchor Points (3/8.4.2.1) 00358 * 00359 */ 00360 00361 #define ANCHOR_SECTOR 256 00362 00363 00364 /*** vsd_nsr02 - NSR02 Volume Structure Descriptor (3/9.1) 00365 * 00366 */ 00367 00368 typedef struct VSD_NSR02 { 00369 UCHAR Type; // Structure Type 00370 UCHAR Ident[5]; // Standard Identifier ('NSR02') 00371 UCHAR Version; // Standard Version 00372 UCHAR Res7; // Reserved 0 Byte 00373 UCHAR Data[2040]; // Structure Data 00374 } VSD_NSR02, *PVSD_NSR02; 00375 00376 00377 // Values for vsd_nsr02_Type 00378 00379 #define VSD_NSR02_TYPE_0 0 // Reserved 0 00380 00381 // Values for vsd_nsr02_Version 00382 00383 #define VSD_NSR02_VER 1 // Standard Version 1 00384 00385 00386 /*** nsr_vd_generic - Generic Volume Descriptor of 512 bytes 00387 * 00388 */ 00389 00390 typedef struct NSR_VD_GENERIC { 00391 DESTAG Destag; // Descriptor Tag 00392 ULONG Sequence; // Volume Descriptor Sequence Number 00393 UCHAR Data20[492]; // Descriptor Data 00394 } NSR_VD_GENERIC, *PNSR_VD_GENERIC; 00395 00396 00397 /*** nsr_pvd - NSR Primary Volume Descriptor (3/10.1) 00398 * 00399 * nsr_pvd_destag.destag_Ident = DESTAG_ID_NSR_PVD 00400 * 00401 */ 00402 00403 typedef struct NSR_PVD { 00404 DESTAG Destag; // Descriptor Tag (NSR_PVD) 00405 ULONG VolDescSeqNum; // Volume Descriptor Sequence Number 00406 ULONG Number; // Primary Volume Descriptor Number 00407 UCHAR VolumeID[32]; // Volume Identifier 00408 USHORT VolSetSeq; // Volume Set Sequence Number 00409 USHORT VolSetSeqMax; // Maximum Volume Set Sequence Number 00410 USHORT Level; // Interchange Level 00411 USHORT LevelMax; // Maximum Interchange Level 00412 ULONG CharSetList; // Character Set List (See 1/7.2.11) 00413 ULONG CharSetListMax; // Maximum Character Set List 00414 UCHAR VolSetID[128]; // Volume Set Identifier 00415 CHARSPEC CharsetDesc; // Descriptor Character Set 00416 CHARSPEC CharsetExplan; // Explanatory Character Set 00417 EXTENTAD Abstract; // Volume Abstract Location 00418 EXTENTAD Copyright; // Volume Copyright Notice Location 00419 REGID Application; // Application Identifier 00420 TIMESTAMP RecordTime; // Recording Time 00421 REGID ImpUseID; // Implementation Identifier 00422 UCHAR ImpUse[64]; // Implementation Use 00423 ULONG Predecessor; // Predecessor Vol Desc Seq Location 00424 USHORT Flags; // Flags 00425 UCHAR Res490[22]; // Reserved Zeros 00426 } NSR_PVD, *PNSR_PVD; 00427 00428 // NSRPVD_F_... - Definitions for nsr_pvd_Flags 00429 00430 #define NSRPVD_F_COMMON_VOLID (0x0001)// Volume ID is common across Vol Set 00431 00432 00433 /*** nsr_anchor - Anchor Volume Descriptor Pointer (3/10.2) 00434 * 00435 * nsr_anchor_destag.destag_Ident = DESTAG_ID_NSR_ANCHOR 00436 * 00437 */ 00438 00439 typedef struct NSR_ANCHOR { 00440 DESTAG Destag; // Descriptor Tag (NSR_ANCHOR) 00441 EXTENTAD Main; // Main Vol Desc Sequence Location 00442 EXTENTAD Reserve; // Reserve Vol Desc Sequence Location 00443 UCHAR Res32[480]; // Reserved Zeros 00444 } NSR_ANCHOR, *PNSR_ANCHOR; 00445 00446 00447 /*** nsr_vdp - Volume Descriptor Pointer (3/10.3) 00448 * 00449 * nsr_vdp_destag.destag_Ident = DESTAG_ID_NSR_VDP 00450 * 00451 */ 00452 00453 typedef struct NSR_VDP { 00454 DESTAG Destag; // Descriptor Tag (NSR_VDP) 00455 ULONG VolDescSeqNum; // Vol Desc Sequence Number 00456 EXTENTAD Next; // Next Vol Desc Sequence Location 00457 UCHAR Res28[484]; // Reserved Zeros 00458 } NSR_VDP, *PNSR_VDP; 00459 00460 00461 /*** nsr_impuse - Implementation Use Volume Descriptor (3/10.4) 00462 * 00463 * nsr_impuse_destag.destag_Ident = DESTAG_ID_NSR_IMPUSE 00464 * 00465 */ 00466 00467 typedef struct NSR_IMPUSE { 00468 DESTAG Destag; // Descriptor Tag (NSR_IMPUSE) 00469 ULONG VolDescSeqNum; // Vol Desc Sequence Number 00470 REGID ImpUseID; // Implementation Identifier 00471 UCHAR ImpUse[460]; // Implementation Use 00472 } NSR_IMPUSE, *PNSR_IMPUSE; 00473 00474 00475 /*** nsr_part - Partition Descriptor (3/10.5) 00476 * 00477 * nsr_part_destag.destag_Ident = DESTAG_ID_NSR_PART 00478 * 00479 */ 00480 00481 typedef struct NSR_PART { 00482 DESTAG Destag; // Descriptor Tag (NSR_PART) 00483 ULONG VolDescSeqNum; // Vol Desc Sequence Number 00484 USHORT Flags; // Partition Flags (NSR_PART_F_...) 00485 USHORT Number; // Partition Number 00486 REGID ContentsID; // Partition Contents ID 00487 UCHAR ContentsUse[128]; // Partition Contents Use 00488 ULONG AccessType; // Access Type 00489 ULONG Start; // Partition Starting Location 00490 ULONG Length; // Partition Length (sector count) 00491 REGID ImpUseID; // Implementation Identifier 00492 UCHAR ImpUse[128]; // Implementation Use 00493 UCHAR Res356[156]; // Reserved Zeros 00494 } NSR_PART, *PNSR_PART; 00495 00496 00497 // NSR_PART_F_... - Definitions for nsr_part_Flags 00498 00499 #define NSR_PART_F_ALLOCATION (0x0001) // Volume Space Allocated 00500 00501 // Values for nsr_part_ContentsID.regid_Identifier 00502 00503 #define NSR_PART_CONTID_FDC01 "+FDC01" // ISO 9293-1987 00504 #define NSR_PART_CONTID_CD001 "+CD001" // ISO 9660 00505 #define NSR_PART_CONTID_CDW01 "+CDW01" // ECMA 168 00506 #define NSR_PART_CONTID_CDW02 "+CDW02" // ISO 13490 00507 #define NSR_PART_CONTID_NSR01 "+NSR01" // ECMA 167 00508 #define NSR_PART_CONTID_NSR02 "+NSR02" // ISO 13346 00509 00510 typedef enum NSR_PART_CONTID { 00511 NsrPartContIdBad = 0, 00512 NsrPartContIdFDC01, 00513 NsrPartContIdCD001, 00514 NsrPartContIdCDW01, 00515 NsrPartContIdCDW02, 00516 NsrPartContIdNSR01, 00517 NsrPartContIdNSR02 00518 } NSR_PART_CONTID, *PNSR_PART_CONTID; 00519 00520 // Values for nsr_part_AccessType 00521 00522 #define NSR_PART_ACCESS_NOSPEC 0 // Partition Access Unspecified 00523 #define NSR_PART_ACCESS_RO 1 // Read Only Access 00524 #define NSR_PART_ACCESS_WO 2 // Write-Once Access 00525 #define NSR_PART_ACCESS_RW_PRE 3 // Read/Write with preparation 00526 #define NSR_PART_ACCESS_RW_OVER 4 // Read/Write, fully overwritable 00527 00528 00529 /*** nsr_lvol - Logical Volume Descriptor (3/10.6) 00530 * 00531 * nsr_lvol_destag.destag_Ident = DESTAG_ID_NSR_LVOL 00532 * 00533 * The Logical Volume Contents Use field is specified here as a 00534 * File Set Descriptor Sequence (FSD) address. See (4/3.1). 00535 * 00536 */ 00537 00538 typedef struct NSR_LVOL { 00539 DESTAG Destag; // Descriptor Tag (NSR_LVOL) 00540 ULONG VolDescSeqNum; // Vol Desc Sequence Number 00541 CHARSPEC Charset; // Descriptor Character Set 00542 UCHAR VolumeID[128]; // Logical Volume ID 00543 ULONG BlockSize; // Logical Block Size (in bytes) 00544 REGID DomainID; // Domain Identifier 00545 LONGAD FSD; // Logical Volume Contents Use 00546 ULONG MapTableLength; // Map Table Length (bytes) 00547 ULONG MapTableCount; // Map Table Partition Maps Count 00548 REGID ImpUseID; // Implementaion Identifier 00549 UCHAR ImpUse[128]; // Implementation Use 00550 EXTENTAD Integrity; // Integrity Sequence Extent 00551 UCHAR MapTable[0]; // Partition Map Table (variant!) 00552 00553 // The true length of this structure may vary! 00554 00555 } NSR_LVOL, *PNSR_LVOL; 00556 00557 #define ISONsrLvolConstantSize (FIELD_OFFSET( NSR_LVOL, MapTable )) 00558 #define ISONsrLvolSize( L ) (QuadAlign( ISONsrLvolConstantSize + (L)->MapTableLength )) 00559 00560 /*** partmap_generic - Generic Partition Map (3/10.7.1) 00561 * 00562 */ 00563 00564 typedef struct PARTMAP_GENERIC { 00565 UCHAR Type; // Partition Map Type 00566 UCHAR Length; // Partition Map Length 00567 UCHAR Map[0]; // Partion Mapping (variant!) 00568 00569 // The true length of this structure may vary! 00570 00571 } PARTMAP_GENERIC, *PPARTMAP_GENERIC; 00572 00573 // Values for partmap_g_Type 00574 00575 #define PARTMAP_TYPE_NOTSPEC 0 // Partition Map Format Not Specified 00576 #define PARTMAP_TYPE_PHYSICAL 1 // Partition Map in Volume Set (Type 1) 00577 #define PARTMAP_TYPE_PROXY 2 // Partition Map by identifier (Type 2) 00578 00579 00580 /*** partmap_physical - Normal (Type 1) Partition Map (3/10.7.2) 00581 * 00582 * A Normal Partion Map specifies a partition number on a volume 00583 * within the same volume set. 00584 * 00585 */ 00586 00587 typedef struct PARTMAP_PHYSICAL { 00588 UCHAR Type; // Partition Map Type = 1 00589 UCHAR Length; // Partition Map Length = 6 00590 USHORT VolSetSeq; // Partition Volume Set Sequence Number 00591 USHORT Partition; // Partition Number 00592 } PARTMAP_PHYSICAL, *PPARTMAP_PHYSICAL; 00593 00594 00595 /*** partmap_proxy - Proxy (Type 2) Partition Map (3/10.7.3) 00596 * 00597 * A Proxy Partition Map is commonly not interchangeable. 00598 * 00599 */ 00600 00601 typedef struct PARTMAP_PROXY { 00602 UCHAR Type; // Partition Map Type = 2 00603 UCHAR Length; // Partition Map Length = 64 00604 UCHAR PartID[62]; // Partition Identifier (Proxy) 00605 } PARTMAP_PROXY, *PPARTMAP_PROXY; 00606 00607 00608 /*** nsr_uasd - Unallocated Space Descriptor (3/10.8) 00609 * 00610 * nsr_uasd_destag.destag_Ident = DESTAG_ID_NSR_UASD 00611 * 00612 * The true length of nsr_uasd_Extents is (nsr_uasd_ExtentCount * 8), and 00613 * the last logical sector of nsr_uasd_Extents is zero padded. 00614 * 00615 */ 00616 00617 typedef struct NSR_UASD { 00618 DESTAG Destag; // Descriptor Tag (NSR_UASD) 00619 ULONG VolDescSeqNum; // Vol Desc Sequence Number 00620 ULONG ExtentCount; // Number of Allocation Descriptors 00621 EXTENTAD Extents[0]; // Allocation Descriptors (variant!) 00622 00623 // The true length of this structure may vary! 00624 // The true length of nsr_uasd_Extents is (nsr_uasd_ExtentCount * 8) bytes. 00625 // The last logical sector of nsr_uasd_Extents is zero padded. 00626 00627 } NSR_UASD, *PNSR_UASD; 00628 00629 00630 /*** nsr_term - Terminating Descriptor (3/10.9 and 4/14.2) 00631 * 00632 * nsr_term_destag.destag_Ident = DESTAG_ID_NSR_TERM 00633 * 00634 */ 00635 00636 typedef struct NSR_TERM { 00637 DESTAG Destag; // Descriptor Tag (NSR_TERM) 00638 UCHAR Res16[496]; // Reserved Zeros 00639 } NSR_TERM, *PNSR_TERM; 00640 00641 00642 /*** nsr_lvhd - Logical Volume Header Descriptor (4/14.15) 00643 * 00644 * This descriptor is found in the Logical Volume Content Use 00645 * field of a Logical Volume Integrity Descriptor. 00646 * 00647 * This definition is moved to here to avoid forward reference. 00648 */ 00649 00650 typedef struct NSR_LVHD { 00651 ULONG UniqueID[2]; // Unique ID 00652 UCHAR Res8[24]; // Reserved Zeros 00653 } NSR_LVHD, *PNSR_LVHD; 00654 00655 00656 /*** nsr_integ - Logical Volume Integrity Descriptor (3/10.10) 00657 * 00658 * nsr_integ_destag.destag_Ident = DESTAG_ID_NSR_LVINTEG 00659 * 00660 * WARNING: WARNING: WARNING: nsr_integ is a multi-variant structure! 00661 * 00662 * The starting address of nsr_integ_Size is not acurrate. 00663 * Compensate for this nsr_integ_Size problem by adding the value of 00664 * (nsr_integ_PartitionCount-1) to the ULONG ARRAY INDEX. 00665 * 00666 * The starting address of nsr_integ_ImpUse[0] is not accurate. 00667 * Compensate for this nsr_integ_ImpUse problem by adding the value of 00668 * ((nsr_integ_PartitionCount-1)<<3) to the UCHAR ARRAY INDEX. 00669 * 00670 * This descriptor is padded with zero bytes to the end of the last 00671 * logical sector it occupies. 00672 * 00673 * The Logical Volume Contents Use field is specified here as a 00674 * Logical Volume Header Descriptor. See (4/3.1) second last point. 00675 */ 00676 00677 typedef struct NSR_INTEG { 00678 DESTAG Destag; // Descriptor Tag (NSR_LVINTEG) 00679 TIMESTAMP Time; // Recording Date 00680 ULONG Type; // Integrity Type (INTEG_T_...) 00681 EXTENTAD Next; // Next Integrity Extent 00682 NSR_LVHD LVHD; // Logical Volume Contents Use 00683 ULONG PartitionCount; // Number of Partitions 00684 ULONG ImpUseLength; // Length of Implementation Use 00685 ULONG Free[1]; // Free Space Table 00686 00687 // nsr_integ_Free has a variant length = (4*nsr_integ_PartitionCount) 00688 00689 ULONG Size[1]; // Size Table 00690 00691 // nsr_integ_Size has a variant starting offset due to nsr_integ_Free 00692 // nsr_integ_Size has a variant length = (4*nsr_integ_PartitionCount) 00693 00694 UCHAR ImpUse[0]; // Implementation Use 00695 00696 // nsr_integ_ImpUse has a variant starting offset due to nsr_integ_Free and 00697 // nsr_integ_Size. 00698 // nsr_integ_ImpUse has a variant length = (nsr_integ_ImpUseLength) 00699 00700 } NSR_INTEG, *PNSR_INTEG; 00701 00702 // Values for nsr_integ_Type 00703 00704 #define NSR_INTEG_T_OPEN 0 // Open Integrity Descriptor 00705 #define NSR_INTEG_T_CLOSE 1 // Close Integrity Descriptor 00706 00707 00708 /*** ISO 13346 Part 4: File Structure 00709 * 00710 * See DESTAG structure in Part 3 for definitions found in (4/7.2). 00711 * 00712 */ 00713 00714 00715 /*** nsr_fsd - File Set Descriptor (4/14.1) 00716 * 00717 * nsr_fsd_destag.destag_Ident = DESTAG_ID_NSR_FSD 00718 */ 00719 00720 typedef struct NSR_FSD { 00721 DESTAG Destag; // Descriptor Tag (NSR_LVOL) 00722 TIMESTAMP Time; // Recording Time 00723 USHORT Level; // Interchange Level 00724 USHORT LevelMax; // Maximum Interchange Level 00725 ULONG CharSetList; // Character Set List (See 1/7.2.11) 00726 ULONG CharSetListMax; // Maximum Character Set List 00727 ULONG FileSet; // File Set Number 00728 ULONG FileSetDesc; // File Set Descriptor Number 00729 CHARSPEC CharspecVolID; // Volume ID Character Set 00730 UCHAR VolID[128]; // Volume ID 00731 CHARSPEC CharspecFileSet; // File Set Character Set 00732 UCHAR FileSetID[32]; // File Set ID 00733 UCHAR Copyright[32]; // Copyright File Name 00734 UCHAR Abstract[32]; // Abstract File Name 00735 LONGAD IcbRoot; // Root Directory ICB Address 00736 REGID DomainID; // Domain Identifier 00737 LONGAD NextExtent; // Next FSD Extent 00738 UCHAR Res464[48]; // Reserved Zeros 00739 } NSR_FSD, *PNSR_FSD; 00740 00741 00742 /*** nsr_part_h - Partition Header Descriptor (4/14.3) 00743 * 00744 * No Descriptor Tag. 00745 * 00746 * This descriptor is found in the nsr_part_ContentsUse field of 00747 * an NSR02 Partition Descriptor. See NSR_PART_CONTID_NSR02. 00748 * 00749 */ 00750 00751 typedef struct NSR_PART_H { 00752 SHORTAD UASTable; // Unallocated Space Table 00753 SHORTAD UASBitmap; // Unallocated Space Bitmap 00754 SHORTAD IntegTable; // Integrity Table 00755 SHORTAD FreedTable; // Freed Space Table 00756 SHORTAD FreedBitmap; // Freed Space Bitmap 00757 UCHAR Res40[88]; // Reserved Zeros 00758 } NSR_PART_H, *PNSR_PART_H; 00759 00760 00761 /*** nsr_fid - File Identifier Descriptor (4/14.4) 00762 * 00763 * nsr_fid_destag.destag_Ident = DESTAG_ID_NSR_FID 00764 * 00765 * WARNING: WARNING: WARNING: nsr_fid is a multi-variant structure! 00766 * 00767 * The starting address of nsr_fid_FileID is not acurrate. 00768 * Compensate for this nsr_fid_FileID problem by adding the value of 00769 * (nsr_fid_ImpUseLen-1) to the UCHAR ARRAY INDEX. 00770 * 00771 * The starting address of nsr_fid_Padding is not acurrate. 00772 * Compensate for this nsr_fid_Padding problem by adding the value of 00773 * (nsr_fid_ImpUseLen+nsr_fid_FileIDLen-2) to the UCHAR ARRAY INDEX. 00774 * 00775 * The true total size of nsr_fid_s is 00776 * ((38 + nsr_fid_FileIDLen + nsr_fid_ImpUseLen) + 3) & ~3) 00777 * 00778 */ 00779 00780 typedef struct NSR_FID { 00781 DESTAG Destag; // Descriptor Tag (NSR_FID) 00782 USHORT Version; // File Version Number 00783 UCHAR Flags; // File Flags (NSR_FID_F_...) 00784 UCHAR FileIDLen; // File ID Length 00785 LONGAD Icb; // ICB (long) Address 00786 USHORT ImpUseLen; // Implementation Use Length 00787 00788 UCHAR ImpUse[1]; // Implementation Use Area 00789 00790 // nsr_fid_ImpUse has a variant length = nsr_fid_ImpUseLen 00791 00792 UCHAR FileID[1]; // File Identifier 00793 00794 // nsr_fid_FileID has a variant starting offset due to nsr_fid_ImpUse 00795 // nsr_fid_FileID has a variant length = nsr_fid_FileIDLen 00796 00797 UCHAR Padding[1]; // Padding 00798 00799 // nsr_fid_Paddinghas a variant starting offset due to nsr_fid_ImpUse and 00800 // nsr_fid_FileID 00801 // nsr_fid_Padding has a variant length. Round up to the next ULONG boundary. 00802 00803 } NSR_FID, *PNSR_FID; 00804 00805 #define ISONsrFidConstantSize (ULONG)(FIELD_OFFSET( NSR_FID, ImpUse )) 00806 #define ISONsrFidSize( F ) (LongAlign( ISONsrFidConstantSize + (F)->FileIDLen + (F)->ImpUseLen )) 00807 00808 // NSR_FID_F_... - Definitions for nsr_fid_Flags (Characteristics, 4/14.4.3) 00809 00810 #define NSR_FID_F_HIDDEN (0x01) // Hidden Bit 00811 #define NSR_FID_F_DIRECTORY (0x02) // Directory Bit 00812 #define NSR_FID_F_DELETED (0x04) // Deleted Bit 00813 #define NSR_FID_F_PARENT (0x08) // Parent Directory Bit 00814 00815 #define NSR_FID_OFFSET_FILEID 38 // Field Offset of nsr_fid_FileID[]; 00816 00817 00818 /*** nsr_alloc - Allocation Extent Descriptor (4/14.5) 00819 * 00820 * nsr_alloc_destag.destag_Ident = DESTAG_ID_NSR_ALLOC 00821 * 00822 * This descriptor is immediately followed by AllocLen bytes 00823 * of allocation descriptors, which is not part of this 00824 * descriptor (so CRC calculation doesn't include it). 00825 * 00826 */ 00827 00828 typedef struct NSR_ALLOC { 00829 DESTAG Destag; // Descriptor Tag (NSR_ALLOC) 00830 ULONG Prev; // Previous Allocation Descriptor 00831 ULONG AllocLen; // Length of Allocation Descriptors 00832 } NSR_ALLOC, *PNSR_ALLOC; 00833 00834 00835 /*** icbtag - Information Control Block Tag (4/14.6) 00836 * 00837 * An ICBTAG is commonly preceeded by a Descriptor Tag (DESTAG). 00838 * 00839 */ 00840 00841 typedef struct ICBTAG { 00842 ULONG PriorDirectCount;// Prior Direct Entry Count 00843 USHORT StratType; // Strategy Type (ICBTAG_STRAT_...) 00844 USHORT StratParm; // Strategy Parameter (2 bytes) 00845 USHORT MaxEntries; // Maximum Number of Entries in ICB 00846 UCHAR Res10; // Reserved Zero 00847 UCHAR FileType; // File Type (ICBTAG_FILE_T_...) 00848 NSRLBA IcbParent; // Parent ICB Location 00849 USHORT Flags; // ICB Flags (ICBTAG_F_...) 00850 } ICBTAG, *PICBTAG; 00851 00852 00853 // ICBTAG_STRAT_T_... - ICB Strategy Types 00854 // BUGBUG: rickdew 7/31/95. Weird strategies! I'm guessing on names here. 00855 00856 #define ICBTAG_STRAT_NOTSPEC 0 // ICB Strategy Not Specified 00857 #define ICBTAG_STRAT_TREE 1 // Strategy 1 (4/A.2) (Plain Tree) 00858 #define ICBTAG_STRAT_MASTER 2 // Strategy 2 (4/A.3) (Master ICB) 00859 #define ICBTAG_STRAT_BAL_TREE 3 // Strategy 3 (4/A.4) (Balanced Tree) 00860 #define ICBTAG_STRAT_DIRECT 4 // Strategy 4 (4/A.5) (One Direct) 00861 00862 // ICBTAG_FILE_T_... - Values for icbtag_FileType 00863 00864 #define ICBTAG_FILE_T_NOTSPEC 0 // Not Specified 00865 #define ICBTAG_FILE_T_UASE 1 // Unallocated Space Entry 00866 #define ICBTAG_FILE_T_PINTEG 2 // Partition Integrity Entry 00867 #define ICBTAG_FILE_T_INDIRECT 3 // Indirect Entry 00868 #define ICBTAG_FILE_T_DIRECTORY 4 // Directory 00869 #define ICBTAG_FILE_T_FILE 5 // Ordinary File 00870 #define ICBTAG_FILE_T_BLOCK_DEV 6 // Block Special Device 00871 #define ICBTAG_FILE_T_CHAR_DEV 7 // Character Special Device 00872 #define ICBTAG_FILE_T_XA 8 // Extended Attributes 00873 #define ICBTAG_FILE_T_FIFO 9 // FIFO file 00874 #define ICBTAG_FILE_T_C_ISSOCK 10 // Socket 00875 #define ICBTAG_FILE_T_TERMINAL 11 // Terminal Entry 00876 #define ICBTAG_FILE_T_PATHLINK 12 // Symbolic Link with a pathname 00877 00878 // ICBTAG_F_... - Values for icbtag_Flags 00879 00880 #define ICBTAG_F_ALLOC_MASK (0x0007)// Mask for Allocation Descriptor Info 00881 #define ICBTAG_F_ALLOC_SHORT 0 // Short Allocation Descriptors Used 00882 #define ICBTAG_F_ALLOC_LONG 1 // Long Allocation Descriptors Used 00883 #define ICBTAG_F_ALLOC_EXTENDED 2 // Extended Allocation Descriptors Used 00884 #define ICBTAG_F_ALLOC_IMMEDIATE 3 // File Data Recorded Immediately 00885 00886 #define ISOAllocationDescriptorSize(T) ( (T) == ICBTAG_F_ALLOC_SHORT ? sizeof(SHORTAD) : \ 00887 (T) == ICBTAG_F_ALLOC_LONG ? sizeof(LONGAD) : \ 00888 sizeof(EXTAD) ) 00889 00890 #define ICBTAG_F_SORTED (0x0008)// Directory is Sorted (4/8.6.1) 00891 #define ICBTAG_F_NO_RELOCATE (0x0010)// Data is not relocateable 00892 #define ICBTAG_F_ARCHIVE (0x0020)// Archive Bit 00893 #define ICBTAG_F_SETUID (0x0040)// S_ISUID Bit 00894 #define ICBTAG_F_SETGID (0x0080)// S_ISGID Bit 00895 #define ICBTAG_F_STICKY (0x0100)// C_ISVTX Bit 00896 #define ICBTAG_F_CONTIGUOUS (0x0200)// File Data is Contiguous 00897 #define ICBTAG_F_SYSTEM (0x0400)// System Bit 00898 #define ICBTAG_F_TRANSFORMED (0x0800)// Data Transformed 00899 #define ICBTAG_F_MULTIVERSIONS (0x1000)// Multi-version Files in Directory 00900 00901 00902 /*** icbind - Indirect ICB Entry (4/14.7) 00903 * 00904 */ 00905 00906 typedef struct ICBIND { 00907 DESTAG Destag; // Descriptor Tag (ID_NSR_ICBIND) 00908 ICBTAG Icbtag; // ICB Tag (ICBTAG_FILE_T_INDIRECT) 00909 LONGAD Icb; // ICB Address 00910 } ICBIND, *PICBIND; 00911 00912 00913 /*** icbtrm - Terminal ICB Entry (4/14.8) 00914 * 00915 */ 00916 00917 typedef struct ICBTRM { 00918 DESTAG Destag; // Descriptor Tag (ID_NSR_ICBTRM) 00919 ICBTAG Icbtag; // ICB Tag (ICBTAG_FILE_T_TERMINAL) 00920 } ICBTRM, *PICBTRM; 00921 00922 00923 /*** icbfile - File ICB Entry (4/14.9) 00924 * 00925 * WARNING: WARNING: WARNING: icbfile is a multi-variant structure! 00926 * 00927 * The starting address of icbfile_Allocs is not acurrate. 00928 * Compensate for this icbfile_Allocs problem by adding the value of 00929 * (icbfile_XALength-1) to the UCHAR ARRAY INDEX. 00930 * 00931 * icbfile_XALength is a multiple of 4. 00932 * 00933 */ 00934 00935 typedef struct ICBFILE { 00936 DESTAG Destag; // Descriptor Tag (ID_NSR_FILE) 00937 ICBTAG Icbtag; // ICB Tag (ICBTAG_FILE_T_FILE) 00938 ULONG UID; // User ID of file's owner 00939 ULONG GID; // Group ID of file's owner 00940 ULONG Permissions; // File Permissions 00941 USHORT LinkCount; // File hard-link count 00942 UCHAR RecordFormat; // Record Format 00943 UCHAR RecordDisplay; // Record Display Attributes 00944 ULONG RecordLength; // Record Length 00945 ULONGLONG InfoLength; // Information Length (file size) 00946 ULONGLONG BlocksRecorded; // Logical Blocks Recorded 00947 TIMESTAMP AccessTime; // Last-Accessed Time 00948 TIMESTAMP ModifyTime; // Last-Modification Time 00949 TIMESTAMP AttributeTime; // Last-Attribute-Change Time 00950 ULONG Checkpoint; // File Checkpoint 00951 LONGAD IcbEA; // Extended Attribute ICB 00952 REGID ImpUseID; // Implementation Use Identifier 00953 ULONGLONG UniqueID; // Unique ID 00954 ULONG EALength; // Length of Extended Attributes 00955 ULONG AllocLength; // Length of Allocation Descriptors 00956 UCHAR EAs[1]; // Extended Attributes 00957 00958 // icbfile_EAs has a variant length = icbfile_EALength 00959 00960 UCHAR Allocs[0]; // Allocation Descriptors. 00961 00962 // icbfile_Allocs has a variant starting offset due to icbfile_EAs. 00963 // icbfile_Allocs has a variant length = icbfile_AllocLen. 00964 00965 } ICBFILE, *PICBFILE; 00966 00967 00968 // Definitions for icbfile_Permissions (4/14.9.6) 00969 00970 #define ICBFILE_PERM_OTH_X (0x00000001) // Other: Execute OK 00971 #define ICBFILE_PERM_OTH_W (0x00000002) // Other: Write OK 00972 #define ICBFILE_PERM_OTH_R (0x00000004) // Other: Read OK 00973 #define ICBFILE_PERM_OTH_A (0x00000008) // Other: Set Attributes OK 00974 #define ICBFILE_PERM_OTH_D (0x00000010) // Other: Delete OK 00975 #define ICBFILE_PERM_GRP_X (0x00000020) // Group: Execute OK 00976 #define ICBFILE_PERM_GRP_W (0x00000040) // Group: Write OK 00977 #define ICBFILE_PERM_GRP_R (0x00000080) // Group: Read OK 00978 #define ICBFILE_PERM_GRP_A (0x00000100) // Group: Set Attributes OK 00979 #define ICBFILE_PERM_GRP_D (0x00000200) // Group: Delete OK 00980 #define ICBFILE_PERM_OWN_X (0x00000400) // Owner: Execute OK 00981 #define ICBFILE_PERM_OWN_W (0x00000800) // Owner: Write OK 00982 #define ICBFILE_PERM_OWN_R (0x00001000) // Owner: Read OK 00983 #define ICBFILE_PERM_OWN_A (0x00002000) // Owner: Set Attributes OK 00984 #define ICBFILE_PERM_OWN_D (0x00004000) // Owner: Delete OK 00985 00986 // (4/14.9.7) Record Format 00987 // Skipped 00988 00989 // (4/14.9.8) Record Display Attributes 00990 // Skipped 00991 00992 00993 /*** nsr_eah - Extended Attributes Header Descriptor (4/14.10.1) 00994 * 00995 */ 00996 00997 typedef struct NSR_EAH { 00998 DESTAG Destag; // Descriptor Tag (ID_NSR_XA) 00999 ULONG EAImp; // Implementation Attributes Location 01000 ULONG EAApp; // Application Attributes Location 01001 } NSR_EAH, *PNSR_EAH; 01002 01003 01004 /*** nsr_ea_g - Generic Extended Attributes Format (4/14.10.2) 01005 * 01006 */ 01007 01008 typedef struct NSR_EA_GENERIC { 01009 ULONG EAType; // Extended Attribute Type 01010 UCHAR EASubType; // Extended Attribute Sub Type 01011 UCHAR Res5[3]; // Reserved Zeros 01012 ULONG EALength; // Extended Attribute Length 01013 UCHAR EAData[0]; // Extended Attribute Data (variant!) 01014 01015 } NSR_EA_GENERIC, *PNSR_EA_GENERIC; 01016 01017 // 01018 // Extended Attribute Types (14.4.10) 01019 // 01020 01021 #define EA_TYPE_CHARSET 1 01022 #define EA_TYPE_ALTPERM 3 01023 #define EA_TYPE_FILETIMES 5 01024 #define EA_TYPE_INFOTIMES 6 01025 #define EA_TYPE_DEVICESPEC 12 01026 #define EA_TYPE_IMPUSE 2048 01027 #define EA_TYPE_APPUSE 65536 01028 01029 #define EA_SUBTYPE_BASE 1 01030 01031 01032 // (4/14.10.3) Character Set Information Extended Attribute Format 01033 // Skipped 01034 01035 // (4/14.10.4) Alternate Permissions Extended Attribute Format 01036 // Skipped 01037 01038 // (4/14.10.5) File Times Extended Attribute Format 01039 01040 typedef struct NSR_EA_FILETIMES { 01041 ULONG EAType; // Extended Attribute Type 01042 UCHAR EASubType; // Extended Attribute Sub Type 01043 UCHAR Res5[3]; // Reserved Zeros 01044 ULONG EALength; // Extended Attribute Length 01045 ULONG DataLength; // EAData Length 01046 ULONG Existence; // Specifies which times are recorded 01047 TIMESTAMP Stamps[0]; // Timestamps (variant!) 01048 01049 } NSR_EA_FILETIMES, *PNSR_EA_FILETIMES; 01050 01051 01052 // Definitions for nsr_ea_filetimes_Existence (4/14.10.5.6) 01053 01054 #define EA_FILETIMES_E_CREATION (0x00000001) 01055 #define EA_FILETIMES_E_DELETION (0x00000004) 01056 #define EA_FILETIMES_E_EFFECTIVE (0x00000008) 01057 #define EA_FILETIMES_E_LASTBACKUP (0x00000020) 01058 01059 01060 // (4/14.10.6) Information Times Extended Attribute Format 01061 // 01062 // Exactly the same as an NSR_EA_FILETIMES 01063 01064 // Definitions for nsr_ea_infotimes_Existence (4/14.10.6.6) 01065 01066 #define EA_INFOTIMES_E_CREATION (0x00000001) 01067 #define EA_INFOTIMES_E_MODIFICATION (0x00000002) 01068 #define EA_INFOTIMES_E_EXPIRATION (0x00000004) 01069 #define EA_INFOTIMES_E_EFFECTIVE (0x00000008) 01070 01071 01072 // (4/14.10.7) Device Specification Extended Attribute Format 01073 // Skipped 01074 01075 // (4/14.10.8) Implementation Use Extended Attribute Format 01076 // Skipped 01077 01078 // (4/14.10.9) Application Use Extended Attribute Format 01079 // Skipped 01080 01081 01082 /*** icbuase - Unallocated Space Entry (4/14.11) 01083 * 01084 * icbuase_destag.destag_Ident = DESTAG_ID_NSR_UASE 01085 * icbuase_icbtag.icbtag_FileType = ICBTAG_FILE_T_UASE 01086 * 01087 */ 01088 01089 typedef struct ICBUASE { 01090 DESTAG Destag; // Descriptor Tag (ID_NSR_ICBUASE) 01091 ICBTAG Icbtag; // ICB Tag (ICBTAG_FILE_T_UASE) 01092 ULONG AllocLen; // Allocation Descriptors Length 01093 UCHAR Allocs[0]; // Allocation Descriptors (variant!) 01094 01095 // The true length of this structure may vary! 01096 // icbuase_Allocs has a variant length = icbuase_AllocLen; 01097 01098 } ICBUASE, *PICBUASE; 01099 01100 01101 /*** nsr_sbd - Space Bitmap Descriptor (4/14.12) 01102 * 01103 * nsr_sbd_destag.destag_Ident = DESTAG_ID_NSR_SBD 01104 * 01105 */ 01106 01107 typedef struct NSR_SBD { 01108 DESTAG Destag; // Descriptor Tag (DESTAG_ID_NSR_SBD) 01109 ULONG BitCount; // Number of bits in Space Bitmap 01110 ULONG ByteCount; // Number of bytes in Space Bitmap 01111 UCHAR Bits[0]; // Space Bitmap (variant!) 01112 01113 // The true length of this structure may vary! 01114 // nsr_sbd_Bits has a variant length = nsr_sbd_ByteCount; 01115 01116 } NSR_SBD, *PNSR_SBD; 01117 01118 01119 /*** icbpinteg - Partition Integrity ICB Entry (4/14.13) 01120 * 01121 */ 01122 01123 typedef struct ICBPINTEG { 01124 DESTAG Destag; // Descriptor Tag (ID_NSR_PINTEG) 01125 ICBTAG Icbtag; // ICB Tag (ICBTAG_FILE_T_PINTEG) 01126 TIMESTAMP Recording; // Recording Time 01127 UCHAR IntegType; // Integrity Type (ICBPINTEG_T_...) 01128 UCHAR Res49[175]; // Reserved Zeros 01129 REGID ImpUseID; // Implemetation Use Identifier 01130 UCHAR ImpUse[256]; // Implemetation Use Area 01131 } ICBPINTEG, *PICBPINTEG; 01132 01133 // ICBPINTEG_T_... - Values for icbpinteg_IntegType 01134 01135 #define ICBPINTEG_T_OPEN 0 // Open Partition Integrity Entry 01136 #define ICBPINTEG_T_CLOSE 1 // Close Partition Integrity Entry 01137 #define ICBPINTEG_T_STABLE 2 // Stable Partition Integrity Entry 01138 01139 01140 /*** (4/14.14.1) Short Allocation Descriptor 01141 *** (4/14.14.2) Long Allocation Descriptor 01142 *** (4/14.14.3) Extended Allocation Descriptor 01143 * 01144 * See SHORTAD, LONGAD, EXTAD, already defined above. 01145 * 01146 */ 01147 01148 01149 /*** nsr_lvhd - Logical Volume Header Descriptor (4/14.15) 01150 * 01151 * The definition is moved to before Logical Volume Integrity 01152 * Descriptor. 01153 * 01154 */ 01155 01156 01157 /*** nsr_path - Path Component (4/14.16) 01158 * 01159 */ 01160 01161 typedef struct NSR_PATH { 01162 UCHAR Type; // Path Component Type (NSR_PATH_T_...) 01163 UCHAR CompLen; // Path Component Length 01164 UCHAR CompVer; // Path Component Version 01165 UCHAR Comp[0]; // Path Component Identifier (variant!) 01166 01167 // nsr_path_Comp has a variant length = nsr_path_CompLen 01168 01169 } NSR_PATH, *PNSR_PATH; 01170 01171 // NSR_PATH_T_... - Values for nsr_path_Type 01172 01173 #define NSR_PATH_T_RESERVED 0 // Reserved Value 01174 #define NSR_PATH_T_OTHER_ROOT 1 // Another root directory, by agreement 01175 #define NSR_PATH_T_ROOTDIR 2 // Root Directory ('\') 01176 #define NSR_PATH_T_PARENTDIR 3 // Parent Directory ('..') 01177 #define NSR_PATH_T_CURDIR 4 // Current Directory ('.') 01178 #define NSR_PATH_T_FILE 5 // File 01179 01180 01181 /*** ISO 13346 Part 5: Record Structure 01182 * 01183 * Skipped 01184 * 01185 */ 01186 01187 // 01188 // Restore the standard structure packing. 01189 // 01190 01191 #pragma pack() 01192

Generated on Sat May 15 19:40:32 2004 for test by doxygen 1.3.7