Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
6.4 KiB

  1. ;
  2. ; Copyright (c) 1991 Microsoft Corporation
  3. ;
  4. ; Module Name:
  5. ;
  6. ; ntfs.inc
  7. ;
  8. ; Abstract:
  9. ;
  10. ; This module contains declarations for the NTFS on-disk
  11. ; structures needed by the boot code.
  12. ;
  13. ; Author:
  14. ;
  15. ; Bill McJohn (billmc) 12-May-1992
  16. ;
  17. MASTER_FILE_TABLE_NUMBER EQU 0d
  18. MASTER_FILE_TABLE2_NUMBER EQU 1d
  19. LOG_FILE_NUMBER EQU 2d
  20. VOLUME_DASD_NUMBER EQU 3d
  21. ATTRIBUTE_DEF_TABLE_NUMBER EQU 4d
  22. ROOT_FILE_NAME_INDEX_NUMBER EQU 5d
  23. BIT_MAP_FILE_NUMBER EQU 6d
  24. BOOT_FILE_NUMBER EQU 7d
  25. BAD_CLUSTER_FILE_NUMBER EQU 8d
  26. QUOTA_TABLE_NUMBER EQU 9d
  27. UPCASE_TABLE_NUMBER EQU 10d
  28. $STANDARD_INFORMATION EQU 010h
  29. $ATTRIBUTE_LIST EQU 020h
  30. $FILE_NAME EQU 030h
  31. $VOLUME_VERSION EQU 040h
  32. $SECURITY_DESCRIPTOR EQU 050h
  33. $VOLUME_NAME EQU 060h
  34. $VOLUME_INFORMATION EQU 070h
  35. $DATA EQU 080h
  36. $INDEX_ROOT EQU 090h
  37. $INDEX_ALLOCATION EQU 0A0h
  38. $BITMAP EQU 0B0h
  39. $SYMBOLIC_LINK EQU 0C0h
  40. $EA_INFORMATION EQU 0D0h
  41. $EA_DATA EQU 0E0h
  42. $FIRST_USER_DEFINED_ATTRIBUTE EQU 0100h
  43. $END EQU 0FFFFFFFFh
  44. SEQUENCE_NUMBER_STRIDE EQU 512d
  45. LARGE_INTEGER struc
  46. LowPart dd ?;
  47. HighPart dd ?;
  48. LARGE_INTEGER ends;
  49. MFT_SEGMENT_REFERENCE struc
  50. REF_LowPart dd ?;
  51. REF_HighPart dw ?;
  52. REF_SeqNo dw ?;
  53. MFT_SEGMENT_REFERENCE ends;
  54. MULTI_SECTOR_HEADER struc
  55. MSH_Signature dd ?;
  56. MSH_UpdateArrayOfs dw ?;
  57. MSH_UpdateArraySize dw ?;
  58. MULTI_SECTOR_HEADER ends;
  59. FILE_RECORD_SEGMENT struc
  60. FRS_Header db (size MULTI_SECTOR_HEADER) dup (?);
  61. FRS_Lsn db (size LARGE_INTEGER) dup (?);
  62. FRS_SequenceNumber dw ?;
  63. FRS_ReferenceCount dw ?;
  64. FRS_FirstAttribute dw ?;
  65. FRS_Flags dw ?;
  66. FRS_FirstFreeByte dd ?;
  67. FRS_BytesAvailable dd ?;
  68. FRS_BaseFRS db (size MFT_SEGMENT_REFERENCE) dup (?);
  69. FRS_NextInstance dw ?;
  70. FILE_RECORD_SEGMENT ends;
  71. FILE_RECORD_SEGMENT_IN_USE EQU 0001h
  72. FILE_FILE_NAME_INDEX_PRESENT EQU 0002h
  73. ATTRIBUTE_RECORD struc
  74. ATTR_TypeCode dd ?;
  75. ATTR_RecordLength dd ?;
  76. ATTR_FormCode db ?;
  77. ATTR_NameLength db ?;
  78. ATTR_NameOffset dw ?;
  79. ATTR_Flags dw ?;
  80. ATTR_Instance dw ?;
  81. ATTR_FormUnion db ?;
  82. ATTRIBUTE_RECORD ends
  83. RESIDENT_ATTRIBUTE_FORM struc
  84. RES_ValueLength dd ?;
  85. RES_ValueOffset dw ?;
  86. RES_ResidentFlags db ?;
  87. RES_Reserved db ?;
  88. RESIDENT_ATTRIBUTE_FORM ends
  89. NONRESIDENT_ATTRIBUTE_FORM struc
  90. NONRES_LowestVcn db (size LARGE_INTEGER) dup (?);
  91. NONRES_HighestVcn db (size LARGE_INTEGER) dup (?);
  92. NONRES_MappingPairOffset dw ?;
  93. NONRES_Reserved dw 3 dup (?);
  94. NONRES_AllocatedLength db (size LARGE_INTEGER) dup (?);
  95. NONRES_FileSize db (size LARGE_INTEGER) dup (?);
  96. NONRES_ValidDataLength db (size LARGE_INTEGER) dup (?);
  97. NONRESIDENT_ATTRIBUTE_FORM ends
  98. ; Attribute Form Codes
  99. RESIDENT_FORM EQU 0
  100. NONRESIDENT_FORM EQU 1
  101. ; Attribute Record Flag Values
  102. ATTRIBUTE_FLAG_COMPRESSION_MASK EQU 00FFh
  103. ; Attribute list entry structure:
  104. ;
  105. ATTRIBUTE_LIST_ENTRY struc
  106. ATTRLIST_TypeCode dd ?;
  107. ATTRLIST_Length dw ?;
  108. ATTRLIST_NameLength db ?;
  109. ATTRLIST_NameOffset db ?;
  110. ATTRLIST_LowestVcn db (size LARGE_INTEGER) dup (?);
  111. ATTRLIST_SegmentReference db (size MFT_SEGMENT_REFERENCE) dup (?);
  112. ATTRLIST_Instance dw ?;
  113. ATTRLIST_Name dw ?;
  114. ATTRIBUTE_LIST_ENTRY ends
  115. FAT_DIRENT_ATTR_READ_ONLY EQU 01h
  116. FAT_DIRENT_ATTR_HIDDEN EQU 02h
  117. FAT_DIRENT_ATTR_SYSTEM EQU 04h
  118. FAT_DIRENT_ATTR_VOLUME_ID EQU 08h
  119. FAT_DIRENT_ATTR_ARCHIVE EQU 20h
  120. FAT_DIRENT_ATTR_DEVICE EQU 40h
  121. DUPLICATED_INFORMATION struc
  122. DUPINFO_CreationTime db (size LARGE_INTEGER) dup (?);
  123. DUPINFO_LastModificationTime db (size LARGE_INTEGER) dup (?);
  124. DUPINFO_LastChangeTime db (size LARGE_INTEGER) dup (?);
  125. DUPINFO_LastAccessTime db (size LARGE_INTEGER) dup (?);
  126. DUPINFO_AllocatedLength db (size LARGE_INTEGER) dup (?);
  127. DUPINFO_FileSize db (size LARGE_INTEGER) dup (?);
  128. DUPINFO_FileAttributes dd ?;
  129. DUPINFO_PackedEaSize dw ?;
  130. DUPLICATED_INFORMATION ends
  131. FILE_NAME struc
  132. FN_ParentDirectory db (size MFT_SEGMENT_REFERENCE) dup (?);
  133. FN_Info db (size DUPLICATED_INFORMATION) dup (?);
  134. FN_Pad dw ?;
  135. FN_FileNameLength db ?; Length in chars
  136. FN_Flags db ?;
  137. FN_FileName dw ?; First char of name.
  138. FILE_NAME ends
  139. FILE_NAME_NTFS EQU 1
  140. FILE_NAME_DOS EQU 2
  141. FILE_NAME_LINK EQU 4
  142. INDEX_HEADER struc
  143. IH_FirstIndexEntry dd ?;
  144. IH_FirstFreeByte dd ?;
  145. IH_BytesAvailable dd ?;
  146. IH_Flags db ?; INDEX_xxx flags
  147. IH_Reserved db 3 dup (?);
  148. INDEX_HEADER ends
  149. ; INDEX_xxx flags
  150. INDEX_NODE EQU 1
  151. INDEX_ROOT struc
  152. IR_IndexedAttributeType dd ?;
  153. IR_CollationRule dd ?;
  154. IR_BytesPerBuffer dd ?;
  155. IR_ClustersPerBuffer db ?;
  156. IR_Reserved db 3 dup (?);
  157. IR_IndexHeader db (size INDEX_HEADER) dup (?);
  158. INDEX_ROOT ends;
  159. INDEX_ALLOCATION_BUFFER struc
  160. IB_Header db (size MULTI_SECTOR_HEADER) dup (?);
  161. IB_Lsn db (size LARGE_INTEGER) dup (?);
  162. IB_ThisVcn db (size LARGE_INTEGER) dup (?);
  163. IB_IndexHeader db (size INDEX_HEADER) dup (?);
  164. INDEX_ALLOCATION_BUFFER ends;
  165. INDEX_ENTRY struc
  166. IE_FileReference db (size MFT_SEGMENT_REFERENCE) dup (?);
  167. IE_Length dw ?;
  168. IE_AttributeLength dw ?;
  169. IE_Flags dw ?;
  170. IE_Reserved dw ?;
  171. IE_Value db ?;
  172. INDEX_ENTRY ends;
  173. ; INDEX_ENTRY_xxx flags
  174. ;
  175. INDEX_ENTRY_NODE EQU 1
  176. INDEX_ENTRY_END EQU 2