00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#pragma pack(1)
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 typedef struct CHARSPEC {
00037 UCHAR
Type;
00038 UCHAR
Info[63];
00039 }
CHARSPEC, *
PCHARSPEC;
00040
00041
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
00054
00055
00056
00057 typedef struct TIMESTAMP {
00058 SHORT Zone:12;
00059 USHORT Type:4;
00060 USHORT Year;
00061 UCHAR
Month;
00062 UCHAR
Day;
00063 UCHAR
Hour;
00064 UCHAR
Minute;
00065 UCHAR
Second;
00066 UCHAR
CentiSecond;
00067 UCHAR
Usec100;
00068 UCHAR
Usec;
00069 }
TIMESTAMP, *
PTIMESTAMP;
00070
00071
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
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
00085
00086
00087
00088 typedef struct REGID {
00089 UCHAR
Flags;
00090 UCHAR
Identifier[23];
00091 UCHAR
Suffix[8];
00092 }
REGID, *
PREGID;
00093
00094
00095
00096 #define REGID_F_DIRTY (0x01) // Information Modified
00097 #define REGID_F_PROTECTED (0x02) // Changes Locked Out
00098
00099
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
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
00111
00112
00113
00114
00115
00116
00117
00118
00119 typedef struct EXTENTAD {
00120 ULONG
Len;
00121 ULONG
Lsn;
00122 }
EXTENTAD, *
PEXTENTAD;
00123
00124
00125
00126
00127
00128
00129 typedef struct NSRLBA {
00130 ULONG
Lbn;
00131 USHORT Partition;
00132 }
NSRLBA, *
PNSRLBA;
00133
00134
00135
00136
00137
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
00152
00153
00154
00155
00156
00157 typedef struct SHORTAD {
00158 NSRLENGTH Length;
00159 ULONG
Start;
00160 }
SHORTAD, *
PSHORTAD;
00161
00162 typedef SHORTAD AD_GENERIC, *
PAD_GENERIC;
00163
00164
00165
00166
00167
00168
00169 typedef struct LONGAD {
00170 NSRLENGTH Length;
00171 NSRLBA Start;
00172 UCHAR
ImpUse[6];
00173 }
LONGAD, *
PLONGAD;
00174
00175
00176
00177
00178
00179
00180 typedef struct EXTAD {
00181 NSRLENGTH ExtentLen;
00182 NSRLENGTH RecordedLen;
00183 ULONG
InfoLen;
00184 NSRLBA Start;
00185 UCHAR
ImpUse[2];
00186 }
EXTAD, *
PEXTAD;
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
typedef struct VSD_GENERIC {
00199 UCHAR
Type;
00200 UCHAR
Ident[5];
00201 UCHAR
Version;
00202 UCHAR
Data[2041];
00203 }
VSD_GENERIC, *
PVSD_GENERIC;
00204
00205
00206
00207 #define VSD_LENGTH_IDENT 5 // Length of regid_Identifier (bytes)
00208
00209
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
00235
00236
00237
00238 typedef struct VSD_BEA01 {
00239 UCHAR
Type;
00240 UCHAR
Ident[5];
00241 UCHAR
Version;
00242 UCHAR
Data[2041];
00243 }
VSD_BEA01, *
PVSD_BEA01;
00244
00245
00246
00247
00248
00249
00250 typedef struct VSD_TEA01 {
00251 UCHAR
Type;
00252 UCHAR
Ident[5];
00253 UCHAR
Version;
00254 UCHAR
Data[2041];
00255 }
VSD_TEA01, *
PVSD_TEA01;
00256
00257
00258
00259
00260
00261
00262 typedef struct VSD_BOOT2 {
00263 UCHAR
Type;
00264 UCHAR
Ident[5];
00265 UCHAR
Version;
00266 UCHAR
Res8;
00267 REGID Architecture;
00268 REGID BootIdent;
00269 ULONG
BootExt;
00270 ULONG
BootExtLen;
00271 ULONG
LoadAddr[2];
00272 ULONG
StartAddr[2];
00273 TIMESTAMP Timestamp;
00274 USHORT Flags;
00275 UCHAR
Res110[32];
00276 UCHAR
BootUse[1906];
00277 }
VSD_BOOT2, *
PVSD_BOOT2;
00278
00279
00280
00281 #define VSD_BOOT2_F_ERASE (0x0001) // Ignore previous similar BOOT2 vsds
00282
00283
00284
00285
00286
00287
00288 #define VRA_BOUNDARY_LOCATION (32767 + 1)
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303 typedef struct DESTAG {
00304 USHORT Ident;
00305 USHORT Version;
00306 UCHAR
Checksum;
00307 UCHAR
Res5;
00308 USHORT Serial;
00309 USHORT CRC;
00310 USHORT CRCLen;
00311 ULONG
Lbn;
00312 }
DESTAG, *
PDESTAG;
00313
00314
00315
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
00332
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
00349
00350 #define DESTAG_VER_CURRENT 2 // Current Descriptor Tag Version
00351
00352
00353
00354 #define DESTAG_SERIAL_NONE 0 // No Serial Number specified
00355
00356
00357
00358
00359
00360
00361 #define ANCHOR_SECTOR 256
00362
00363
00364
00365
00366
00367
00368 typedef struct VSD_NSR02 {
00369 UCHAR
Type;
00370 UCHAR
Ident[5];
00371 UCHAR
Version;
00372 UCHAR
Res7;
00373 UCHAR
Data[2040];
00374 }
VSD_NSR02, *
PVSD_NSR02;
00375
00376
00377
00378
00379 #define VSD_NSR02_TYPE_0 0 // Reserved 0
00380
00381
00382
00383 #define VSD_NSR02_VER 1 // Standard Version 1
00384
00385
00386
00387
00388
00389
00390 typedef struct NSR_VD_GENERIC {
00391 DESTAG Destag;
00392 ULONG
Sequence;
00393 UCHAR
Data20[492];
00394 }
NSR_VD_GENERIC, *
PNSR_VD_GENERIC;
00395
00396
00397
00398
00399
00400
00401
00402
00403 typedef struct NSR_PVD {
00404 DESTAG Destag;
00405 ULONG
VolDescSeqNum;
00406 ULONG
Number;
00407 UCHAR
VolumeID[32];
00408 USHORT VolSetSeq;
00409 USHORT VolSetSeqMax;
00410 USHORT Level;
00411 USHORT LevelMax;
00412 ULONG
CharSetList;
00413 ULONG
CharSetListMax;
00414 UCHAR
VolSetID[128];
00415 CHARSPEC CharsetDesc;
00416 CHARSPEC CharsetExplan;
00417 EXTENTAD Abstract;
00418 EXTENTAD Copyright;
00419 REGID Application;
00420 TIMESTAMP RecordTime;
00421 REGID ImpUseID;
00422 UCHAR
ImpUse[64];
00423 ULONG
Predecessor;
00424 USHORT Flags;
00425 UCHAR
Res490[22];
00426 }
NSR_PVD, *
PNSR_PVD;
00427
00428
00429
00430 #define NSRPVD_F_COMMON_VOLID (0x0001)// Volume ID is common across Vol Set
00431
00432
00433
00434
00435
00436
00437
00438
00439 typedef struct NSR_ANCHOR {
00440 DESTAG Destag;
00441 EXTENTAD Main;
00442 EXTENTAD Reserve;
00443 UCHAR
Res32[480];
00444 }
NSR_ANCHOR, *
PNSR_ANCHOR;
00445
00446
00447
00448
00449
00450
00451
00452
00453 typedef struct NSR_VDP {
00454 DESTAG Destag;
00455 ULONG
VolDescSeqNum;
00456 EXTENTAD Next;
00457 UCHAR
Res28[484];
00458 }
NSR_VDP, *
PNSR_VDP;
00459
00460
00461
00462
00463
00464
00465
00466
00467 typedef struct NSR_IMPUSE {
00468 DESTAG Destag;
00469 ULONG
VolDescSeqNum;
00470 REGID ImpUseID;
00471 UCHAR
ImpUse[460];
00472 }
NSR_IMPUSE, *
PNSR_IMPUSE;
00473
00474
00475
00476
00477
00478
00479
00480
00481 typedef struct NSR_PART {
00482 DESTAG Destag;
00483 ULONG
VolDescSeqNum;
00484 USHORT Flags;
00485 USHORT Number;
00486 REGID ContentsID;
00487 UCHAR
ContentsUse[128];
00488 ULONG
AccessType;
00489 ULONG
Start;
00490 ULONG
Length;
00491 REGID ImpUseID;
00492 UCHAR
ImpUse[128];
00493 UCHAR
Res356[156];
00494 }
NSR_PART, *
PNSR_PART;
00495
00496
00497
00498
00499 #define NSR_PART_F_ALLOCATION (0x0001) // Volume Space Allocated
00500
00501
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
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
00530
00531
00532
00533
00534
00535
00536
00537
00538 typedef struct NSR_LVOL {
00539 DESTAG Destag;
00540 ULONG
VolDescSeqNum;
00541 CHARSPEC Charset;
00542 UCHAR
VolumeID[128];
00543 ULONG
BlockSize;
00544 REGID DomainID;
00545 LONGAD FSD;
00546 ULONG
MapTableLength;
00547 ULONG
MapTableCount;
00548 REGID ImpUseID;
00549 UCHAR
ImpUse[128];
00550 EXTENTAD Integrity;
00551 UCHAR
MapTable[0];
00552
00553
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
00561
00562
00563
00564 typedef struct PARTMAP_GENERIC {
00565 UCHAR
Type;
00566 UCHAR
Length;
00567 UCHAR
Map[0];
00568
00569
00570
00571 }
PARTMAP_GENERIC, *
PPARTMAP_GENERIC;
00572
00573
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
00581
00582
00583
00584
00585
00586
00587 typedef struct PARTMAP_PHYSICAL {
00588 UCHAR
Type;
00589 UCHAR
Length;
00590 USHORT VolSetSeq;
00591 USHORT Partition;
00592 }
PARTMAP_PHYSICAL, *
PPARTMAP_PHYSICAL;
00593
00594
00595
00596
00597
00598
00599
00600
00601 typedef struct PARTMAP_PROXY {
00602 UCHAR
Type;
00603 UCHAR
Length;
00604 UCHAR
PartID[62];
00605 }
PARTMAP_PROXY, *
PPARTMAP_PROXY;
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617 typedef struct NSR_UASD {
00618 DESTAG Destag;
00619 ULONG
VolDescSeqNum;
00620 ULONG
ExtentCount;
00621 EXTENTAD Extents[0];
00622
00623
00624
00625
00626
00627 }
NSR_UASD, *
PNSR_UASD;
00628
00629
00630
00631
00632
00633
00634
00635
00636 typedef struct NSR_TERM {
00637 DESTAG Destag;
00638 UCHAR
Res16[496];
00639 }
NSR_TERM, *
PNSR_TERM;
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650 typedef struct NSR_LVHD {
00651 ULONG
UniqueID[2];
00652 UCHAR
Res8[24];
00653 }
NSR_LVHD, *
PNSR_LVHD;
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677 typedef struct NSR_INTEG {
00678 DESTAG Destag;
00679 TIMESTAMP Time;
00680 ULONG
Type;
00681 EXTENTAD Next;
00682 NSR_LVHD LVHD;
00683 ULONG
PartitionCount;
00684 ULONG
ImpUseLength;
00685 ULONG
Free[1];
00686
00687
00688
00689 ULONG
Size[1];
00690
00691
00692
00693
00694 UCHAR
ImpUse[0];
00695
00696
00697
00698
00699
00700 }
NSR_INTEG, *
PNSR_INTEG;
00701
00702
00703
00704 #define NSR_INTEG_T_OPEN 0 // Open Integrity Descriptor
00705 #define NSR_INTEG_T_CLOSE 1 // Close Integrity Descriptor
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720 typedef struct NSR_FSD {
00721 DESTAG Destag;
00722 TIMESTAMP Time;
00723 USHORT Level;
00724 USHORT LevelMax;
00725 ULONG
CharSetList;
00726 ULONG
CharSetListMax;
00727 ULONG
FileSet;
00728 ULONG
FileSetDesc;
00729 CHARSPEC CharspecVolID;
00730 UCHAR
VolID[128];
00731 CHARSPEC CharspecFileSet;
00732 UCHAR
FileSetID[32];
00733 UCHAR
Copyright[32];
00734 UCHAR
Abstract[32];
00735 LONGAD IcbRoot;
00736 REGID DomainID;
00737 LONGAD NextExtent;
00738 UCHAR
Res464[48];
00739 }
NSR_FSD, *
PNSR_FSD;
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751 typedef struct NSR_PART_H {
00752 SHORTAD UASTable;
00753 SHORTAD UASBitmap;
00754 SHORTAD IntegTable;
00755 SHORTAD FreedTable;
00756 SHORTAD FreedBitmap;
00757 UCHAR
Res40[88];
00758 }
NSR_PART_H, *
PNSR_PART_H;
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780 typedef struct NSR_FID {
00781 DESTAG Destag;
00782 USHORT Version;
00783 UCHAR
Flags;
00784 UCHAR
FileIDLen;
00785 LONGAD Icb;
00786 USHORT ImpUseLen;
00787
00788 UCHAR
ImpUse[1];
00789
00790
00791
00792 UCHAR
FileID[1];
00793
00794
00795
00796
00797 UCHAR
Padding[1];
00798
00799
00800
00801
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
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
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828 typedef struct NSR_ALLOC {
00829 DESTAG Destag;
00830 ULONG
Prev;
00831 ULONG
AllocLen;
00832 }
NSR_ALLOC, *
PNSR_ALLOC;
00833
00834
00835
00836
00837
00838
00839
00840
00841 typedef struct ICBTAG {
00842 ULONG
PriorDirectCount;
00843 USHORT StratType;
00844 USHORT StratParm;
00845 USHORT MaxEntries;
00846 UCHAR
Res10;
00847 UCHAR
FileType;
00848 NSRLBA IcbParent;
00849 USHORT Flags;
00850 }
ICBTAG, *
PICBTAG;
00851
00852
00853
00854
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
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
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
00903
00904
00905
00906 typedef struct ICBIND {
00907 DESTAG Destag;
00908 ICBTAG Icbtag;
00909 LONGAD Icb;
00910 }
ICBIND, *
PICBIND;
00911
00912
00913
00914
00915
00916
00917 typedef struct ICBTRM {
00918 DESTAG Destag;
00919 ICBTAG Icbtag;
00920 }
ICBTRM, *
PICBTRM;
00921
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934
00935 typedef struct ICBFILE {
00936 DESTAG Destag;
00937 ICBTAG Icbtag;
00938 ULONG
UID;
00939 ULONG
GID;
00940 ULONG
Permissions;
00941 USHORT LinkCount;
00942 UCHAR
RecordFormat;
00943 UCHAR
RecordDisplay;
00944 ULONG
RecordLength;
00945 ULONGLONG
InfoLength;
00946 ULONGLONG
BlocksRecorded;
00947 TIMESTAMP AccessTime;
00948 TIMESTAMP ModifyTime;
00949 TIMESTAMP AttributeTime;
00950 ULONG
Checkpoint;
00951 LONGAD IcbEA;
00952 REGID ImpUseID;
00953 ULONGLONG
UniqueID;
00954 ULONG
EALength;
00955 ULONG
AllocLength;
00956 UCHAR
EAs[1];
00957
00958
00959
00960 UCHAR
Allocs[0];
00961
00962
00963
00964
00965 }
ICBFILE, *
PICBFILE;
00966
00967
00968
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
00987
00988
00989
00990
00991
00992
00993
00994
00995
00996
00997 typedef struct NSR_EAH {
00998 DESTAG Destag;
00999 ULONG
EAImp;
01000 ULONG
EAApp;
01001 }
NSR_EAH, *
PNSR_EAH;
01002
01003
01004
01005
01006
01007
01008 typedef struct NSR_EA_GENERIC {
01009 ULONG
EAType;
01010 UCHAR
EASubType;
01011 UCHAR
Res5[3];
01012 ULONG
EALength;
01013 UCHAR
EAData[0];
01014
01015 }
NSR_EA_GENERIC, *
PNSR_EA_GENERIC;
01016
01017
01018
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
01033
01034
01035
01036
01037
01038
01039
01040 typedef struct NSR_EA_FILETIMES {
01041 ULONG
EAType;
01042 UCHAR
EASubType;
01043 UCHAR
Res5[3];
01044 ULONG
EALength;
01045 ULONG
DataLength;
01046 ULONG
Existence;
01047 TIMESTAMP Stamps[0];
01048
01049 }
NSR_EA_FILETIMES, *
PNSR_EA_FILETIMES;
01050
01051
01052
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
01061
01062
01063
01064
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
01073
01074
01075
01076
01077
01078
01079
01080
01081
01082
01083
01084
01085
01086
01087
01088
01089 typedef struct ICBUASE {
01090 DESTAG Destag;
01091 ICBTAG Icbtag;
01092 ULONG
AllocLen;
01093 UCHAR
Allocs[0];
01094
01095
01096
01097
01098 }
ICBUASE, *
PICBUASE;
01099
01100
01101
01102
01103
01104
01105
01106
01107 typedef struct NSR_SBD {
01108 DESTAG Destag;
01109 ULONG
BitCount;
01110 ULONG
ByteCount;
01111 UCHAR
Bits[0];
01112
01113
01114
01115
01116 }
NSR_SBD, *
PNSR_SBD;
01117
01118
01119
01120
01121
01122
01123 typedef struct ICBPINTEG {
01124 DESTAG Destag;
01125 ICBTAG Icbtag;
01126 TIMESTAMP Recording;
01127 UCHAR
IntegType;
01128 UCHAR
Res49[175];
01129 REGID ImpUseID;
01130 UCHAR
ImpUse[256];
01131 }
ICBPINTEG, *
PICBPINTEG;
01132
01133
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
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160
01161 typedef struct NSR_PATH {
01162 UCHAR
Type;
01163 UCHAR
CompLen;
01164 UCHAR
CompVer;
01165 UCHAR
Comp[0];
01166
01167
01168
01169 }
NSR_PATH, *
PNSR_PATH;
01170
01171
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
01182
01183
01184
01185
01186
01187
01188
01189
01190
01191
#pragma pack()
01192