ReactOS 0.4.17-dev-1133-gc25e4fd
ntfslib.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS NTFS FS library
4 * FILE: lib/fslib/ntfslib/ntfslib.h
5 * PURPOSE: NTFS lib definitions
6 * PROGRAMMERS: Pierre Schweitzer, Klachkov Valery
7 */
8
9#ifndef NTFSLIB_H
10#define NTFSLIB_H
11
12
13/* INCLUDES ******************************************************************/
14
15#include <stdlib.h>
16
17#include <ndk/iofuncs.h>
18#include <ndk/obfuncs.h>
19#include <ndk/rtlfuncs.h>
20#include <ndk/umtypes.h>
21
22#include <fmifs/fmifs.h>
23
24
25/* OTHER MACROSES ************************************************************/
26
27#define KeQuerySystemTime(t) NtfsGetSystemTimeAsFileTime((LPFILETIME)(t));
28
29#define FREE(p) if (p) RtlFreeHeap(RtlGetProcessHeap(), 0, p);
30
31#define FIRST_ATTRIBUTE(fr) ((PATTR_RECORD)((ULONG_PTR)fr + fr->FirstAttributeOffset))
32#define NEXT_ATTRIBUTE(attr) ((PATTR_RECORD)((ULONG_PTR)(attr) + (attr)->Length))
33
34#define ARR_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
35
36
37/* BYTES MACROSES ************************************************************/
38
39#define MB_TO_B(x) (x * 1024)
40
41#define GET_BYTE(val, n) (((val) >> (8*(n))) & 0xFF)
42
43#define GET_BYTE_FROM_END(val, n) (((val) >> (8*(sizeof((val)) - 1 - (n)))) & 0xFF)
44
45#define BSWAP16(val) \
46 ( (((val) >> 8) & 0x00FF) | (((val) << 8) & 0xFF00) )
47
48#define BSWAP32(val) \
49 ( (((val) >> 24) & 0x000000FF) | (((val) >> 8) & 0x0000FF00) | \
50 (((val) << 8) & 0x00FF0000) | (((val) << 24) & 0xFF000000) )
51
52#define BSWAP64(val) \
53 ( (((val) >> 56) & 0x00000000000000FF) | (((val) >> 40) & 0x000000000000FF00) | \
54 (((val) >> 24) & 0x0000000000FF0000) | (((val) >> 8) & 0x00000000FF000000) | \
55 (((val) << 8) & 0x000000FF00000000) | (((val) << 24) & 0x0000FF0000000000) | \
56 (((val) << 40) & 0x00FF000000000000) | (((val) << 56) & 0xFF00000000000000) )
57
58
59/* DISK MACROSES *************************************************************/
60
61#define DISK_HANDLE (NtfsFormatData.DiskHandle)
62#define DISK_GEO (NtfsFormatData.DiskGeometry)
63#define DISK_LEN (NtfsFormatData.LengthInformation)
64#define LABEL (NtfsFormatData.Label)
65#define LAYOUT (NtfsFormatData.Layout)
66
67#define BYTES_PER_SECTOR ((ULONG)DISK_GEO->BytesPerSector)
68#define SECTORS_PER_TRACK ((ULONG)DISK_GEO->SectorsPerTrack)
69
70// The following are computed once by ComputeLayout() and cached in LAYOUT.
71#define SECTORS_PER_CLUSTER (LAYOUT.SectorsPerCluster)
72#define BYTES_PER_CLUSTER (LAYOUT.BytesPerCluster)
73#define CLUSTER_COUNT (LAYOUT.ClusterCount)
74#define TOTAL_SECTORS (LAYOUT.TotalSectors)
75
76#define IS_HARD_DRIVE (DISK_GEO->MediaType == FixedMedia)
77
78
79/* DISK DEFINES **************************************************************/
80
81#define DISK_HEADS 0xFF
82
83
84/* BOOT SECTOR DEFINES *******************************************************/
85
86#define OEM_ID BSWAP64(0x4E54465320202020) // "NTFS "
87#define EBPB_HEADER BSWAP32(0x80008000)
88#define BOOT_SECTOR_END BSWAP16(0x55AA)
89
90
91/* MFT / RECORD DEFINES ******************************************************/
92
93#define MFT_RECORD_SIZE 1024
94#define INDEX_RECORD_SIZE 4096
95
96// Count of MFT records materialized during format (the 16 reserved system records).
97#define MFT_RESERVED_RECORDS 16
98
99// Count of $MFTMirr records: the first four system records
100// ($MFT, $MFTMirr, $LogFile, $Volume).
101#define MFT_MIRR_COUNT 4
102
103
104/* OTHER DEFINES *************************************************************/
105
106#define NTFS_MAJOR_VERSION 3
107#define NTFS_MINOR_VERSION 1
108
109// The shared security id stamped on every file (its descriptor lives in $Secure).
110#define NTFS_SECURITY_ID 0x100
111
112#define FILE_RECORD_MAGIC BSWAP32(0x46494C45) // 'FILE'
113#define INDX_RECORD_MAGIC BSWAP32(0x494E4458) // 'INDX'
114
115// The beginning and length of an attribute record are always aligned to an 8-byte boundary,
116// relative to the beginning of the file record.
117#define ATTR_RECORD_ALIGNMENT 8
118
119// A resident attribute's value offset is aligned to a 4-byte boundary,
120// relative to the start of the attribute record.
121#define VALUE_OFFSET_ALIGNMENT 4
122
123// Data runs are aligned to a 4-byte boundary, relative to the start of the
124// attribute record.
125#define DATA_RUN_ALIGNMENT 4
126
127// FILE_RECORD_END seems to follow AttributeEnd in every file record starting with $Quota.
128// No clue what data is being represented here.
129#define FILE_RECORD_END 0x11477982
130
131#define FILE_NAME_POSIX 0
132#define FILE_NAME_WIN32 1
133#define FILE_NAME_DOS 2
134#define FILE_NAME_WIN32_AND_DOS 3
135
136#define FILE_TYPE_READ_ONLY 0x1
137#define FILE_TYPE_HIDDEN 0x2
138#define FILE_TYPE_SYSTEM 0x4
139#define FILE_TYPE_ARCHIVE 0x20
140#define FILE_TYPE_REPARSE 0x400
141#define FILE_TYPE_COMPRESSED 0x800
142#define FILE_TYPE_DIRECTORY 0x10000000
143
144// Indexed Flag in Resident attributes - still somewhat speculative
145#define RA_INDEXED 0x01
146
147#define RA_METAFILES_ATTRIBUTES (FILE_TYPE_SYSTEM | FILE_TYPE_HIDDEN)
148#define RA_HEADER_LENGTH (FIELD_OFFSET(ATTR_RECORD, Resident.Reserved) + sizeof(UCHAR))
149
150// Collation rules (used by $INDEX_ROOT)
151#define COLLATION_BINARY 0x00
152#define COLLATION_FILE_NAME 0x01
153#define COLLATION_NTOFS_ULONG 0x10 // $Secure:$SII (by security id)
154#define COLLATION_NTOFS_SECURITY_HASH 0x12 // $Secure:$SDH (by descriptor hash)
155
156// Non-resident attribute header size. The extended form (with the trailing
157// "compressed/allocated size" field at 0x40) is used for sparse/compressed
158// attributes such as $BadClus:$Bad.
159#define NONRES_HEADER_SIZE 0x40
160#define NONRES_HEADER_SIZE_SPARSE 0x48
161
162// Index entry flags
163#define INDEX_ENTRY_NODE 0x01 // Entry points at a sub-node (has a child VCN)
164#define INDEX_ENTRY_END 0x02 // Last entry in the node
165// Index node header flags
166#define INDEX_NODE_LARGE 0x01 // Node has an $INDEX_ALLOCATION
167
168// A metadata record's sequence number. Windows uses sequence == record number
169// only for the reserved system range 1..15 (record 0 uses 1, since sequence 0
170// means "unused"); every other record - including the $Extend children at 24+ -
171// is a normal first allocation with sequence 1. chkdsk rejects references to
172// records >= 16 whose sequence isn't 1 (it reads as an impossibly-reused record).
173#define RECORD_SEQUENCE(rec) ((USHORT)(((rec) >= 1 && (rec) <= 15) ? (rec) : 1))
174
175// Build an MFT file reference: record number in the low 48 bits, sequence
176// number in the high 16 bits.
177#define MFT_REFERENCE(rec) (((ULONGLONG)(rec)) | ((ULONGLONG)RECORD_SEQUENCE(rec) << 48))
178
179// Metafiles
180#define METAFILE_MFT 0
181#define METAFILE_MFTMIRR 1
182#define METAFILE_LOGFILE 2
183#define METAFILE_VOLUME 3
184#define METAFILE_ATTRDEF 4
185#define METAFILE_ROOT 5
186#define METAFILE_BITMAP 6
187#define METAFILE_BOOT 7
188#define METAFILE_BADCLUS 8
189#define METAFILE_SECURE 9
190#define METAFILE_UPCASE 10
191#define METAFILE_EXTEND 11
192#define METAFILE_FIRST_USER_FILE 16
193
194#define RUN_LIST_ENTRY_HEADER_SIZE 1
195#define RUN_LIST_ENTRY_SIZE 8
196
197
198/* GLOBAL DATA ***************************************************************/
199
200//
201// The whole metadata is laid out contiguously from the start of the volume:
202//
203// [ $Boot | $MFT | $MFTMirr | $LogFile | $Bitmap | $UpCase | $AttrDef | $MFT bitmap | ... free ... ]
204//
205// A correct NTFS driver locates $MFT / $MFTMirr through the boot sector, so the
206// exact placement does not matter for mountability - only that everything fits
207// inside the volume and the cluster bitmap marks the used clusters.
208//
209typedef struct _NTFS_LAYOUT
210{
213 ULONGLONG TotalSectors; // Value recorded in the boot sector (volume sectors - 1)
215
216 CHAR ClustersPerMftRecord; // Signed, boot-sector encoding
217 CHAR ClustersPerIndexRecord; // Signed, boot-sector encoding
218
220
221 // Cluster placement of the metadata
230 ULONGLONG RootIdxLcn; ULONG RootIdxClusters; // One INDX block for the root $I30 index
231 ULONGLONG SdsLcn; ULONG SdsClusters; // $Secure:$SDS (8 descriptors + 256 KiB mirror)
232 ULONGLONG SdhIdxLcn; ULONG SdhIdxClusters; // $Secure:$SDH INDX block (large view index)
233
234 // $Extend / Transactional-NTFS (TxF) payload streams (zero-initialized).
235 ULONGLONG TopsTLcn; ULONG TopsTClusters; // $RmMetadata/$TxfLog/$Tops:$T (1 MiB)
236 ULONGLONG BlfLcn; ULONG BlfClusters; // $TxfLog/$TxfLog.blf (64 KiB)
237 ULONGLONG Cont1Lcn; ULONG Cont1Clusters; // $TxfLogContainer...0001 (2 MiB)
238 ULONGLONG Cont2Lcn; ULONG Cont2Clusters; // $TxfLogContainer...0002 (2 MiB)
239 ULONGLONG DeletedIdxLcn; ULONG DeletedIdxClusters;// $Extend/$Deleted:$I30 allocation (64 KiB)
240
241 ULONGLONG FirstFreeLcn; // Count of clusters used by metadata == first free cluster
243
244// The $SDS descriptor mirror is stored NTFS_SDS_MIRROR bytes after the primary.
245#define NTFS_SDS_MIRROR 0x40000
246
247// Shared across all ntfslib translation units. The single definition lives in
248// ntfslib.c; every other file sees it through this extern declaration.
249typedef struct _NTFS_FORMAT_DATA
250{
255 ULONGLONG FormatTime; // Single timestamp stamped on every record
256 ULONG HiddenSectors;// Partition start LBA (BPB field; the VBR needs it to boot)
259
261
262#define HIDDEN_SECTORS (NtfsFormatData.HiddenSectors)
263
264#define FORMAT_TIME (NtfsFormatData.FormatTime)
265
266
267/* BOOT SECTOR STRUCTURES ****************************************************/
268
269#include <pshpack1.h>
270
271typedef struct _BIOS_PARAMETERS_BLOCK
272{
273 USHORT BytesPerSector; // 0x0B
275 BYTE Unused0[7]; // 0x0E
276 BYTE MediaId; // 0x15
278 USHORT SectorsPerTrack; // 0x18
279 USHORT Heads; // 0x1A
283
285{
287 ULONGLONG SectorCount; // 0x28
288 ULONGLONG MftLocation; // 0x30
291 BYTE Unused0[3]; // 0x41
293 BYTE Unused1[3]; // 0x45
294 ULONGLONG SerialNumber; // 0x48
295 DWORD32 Checksum; // 0x50, unused
297
298typedef struct _BOOT_SECTOR
299{
300 BYTE Jump[3]; // 0x00
304 BYTE BootStrap[426]; // 0x54
305 USHORT EndSector; // 0x1FE
307
308#include <poppack.h>
309
310
311/* FILES DATA ****************************************************************/
312
313typedef struct _RECORD_HEADER
314{
315 ULONG Magic; // 0x00, magic 'FILE'
316 USHORT UsaOffset; // 0x04, offset to the update sequence
317 USHORT UsaCount; // 0x06, size in words of Update Sequence Number & Array (S)
318 ULONGLONG Lsn; // 0x08, $LogFile Sequence Number
320
322{
326 MFT_RECORD_UNKNOWN1 = 0x0004, // Set on $Extend children by Windows
327 MFT_RECORD_VIEW_INDEX = 0x0008 // File carries a view index (e.g. $Secure)
329
330typedef struct _FILE_RECORD_HEADER
331{
333 USHORT SequenceNumber; // 0x10
336 USHORT Flags; // 0x16, flags (see MFT_RECORD_FLAGS)
337 ULONG BytesInUse; // 0x18, real size of the FILE record
338 ULONG BytesAllocated; // 0x1C, allocated size of the FILE record
339 ULONGLONG BaseFileRecord; // 0x20, file reference to the base FILE record
341 USHORT Padding; // 0x2A
342 ULONG MFTRecordNumber; // 0x2C
344
345
346/* ATTRIBUTES COMMON *********************************************************/
347
348typedef enum _ATTR_FLAGS
349{
352 ATTR_IS_SPARSE = 0x8000
354
355typedef enum _ATTRIBUTE_TYPE
356{
373 AttributeEnd = 0xFFFFFFFF
375
376typedef struct _ATTR_RECORD
377{
378 ULONG Type; // 0x00
379 ULONG Length; // 0x04
383 USHORT Flags; // 0x0C
385 union
386 {
387 struct
388 {
391 BYTE Flags; // 0x16
392 BYTE Reserved; // 0x17
394
395 struct
396 {
401 BYTE Reserved[4]; // 0x24
406 };
408
409
410/* ATTRIBUTES STRUCTURES *****************************************************/
411
413{
421 ULONG ClassId; // 0x2C
422 ULONG OwnerId; // 0x30
425 ULONGLONG Usn; // 0x40
427
429{
438 union
439 {
440 struct
441 {
445
452
454{
460
461
462/* INDEX STRUCTURES **********************************************************/
463
464typedef struct _INDEX_NODE_HEADER
465{
466 ULONG FirstEntryOffset; // Offset to the first index entry, relative to this header
467 ULONG TotalSizeOfEntries; // Total size of the index entries, incl. this header
468 ULONG AllocatedSize; // Allocated size of the node
469 BYTE Flags; // 0 = small (fits in $INDEX_ROOT), 1 = large ($INDEX_ALLOCATION)
472
474{
475 ULONG AttributeType; // Type of the indexed attribute ($FILE_NAME = 0x30)
477 ULONG SizeOfEntry; // Bytes per index record
482
484{
485 ULONGLONG FileReference; // MFT reference of the indexed file (0 for the end marker)
486 USHORT Length; // Length of this index entry
487 USHORT KeyLength; // Length of the key ($FILE_NAME) that follows
488 USHORT Flags; // See INDEX_ENTRY_*
491
492
493/* PROTOTYPES ****************************************************************/
494
495ULONG
497
498// ntfslib.c
499
500VOID
502
504
505// Computes the on-disk layout (cluster size, metadata placement, serial number)
506// and stores it in LAYOUT. ClusterSize is the caller-requested cluster size in
507// bytes (0 = auto-select). Returns STATUS_SUCCESS, or an error if the volume is
508// too small to hold the NTFS metadata.
511
512// bootsect.c
513
516
517// files.c
518
521
522#endif
LONG NTSTATUS
Definition: precomp.h:26
DWORD ClusterSize
Definition: format.c:66
unsigned int DWORD32
Definition: basetsd.h:118
struct _VOLUME_INFORMATION_ATTRIBUTE * PVOLUME_INFORMATION_ATTRIBUTE
struct _RECORD_HEADER * PRECORD_HEADER
struct _FILENAME_ATTRIBUTE FILENAME_ATTRIBUTE
struct _INDEX_NODE_HEADER INDEX_NODE_HEADER
struct _STANDARD_INFORMATION STANDARD_INFORMATION
NTSTATUS WriteMetafiles(VOID)
Definition: files.c:872
struct _FILENAME_ATTRIBUTE * PFILENAME_ATTRIBUTE
struct _INDEX_ENTRY_HEADER * PINDEX_ENTRY_HEADER
struct _BIOS_PARAMETERS_BLOCK BIOS_PARAMETERS_BLOCK
struct _BOOT_SECTOR * PBOOT_SECTOR
struct _STANDARD_INFORMATION * PSTANDARD_INFORMATION
enum _ATTR_FLAGS ATTR_FLAGS
struct _NTFS_LAYOUT * PNTFS_LAYOUT
BYTE GetSectorsPerCluster(VOID)
Definition: ntfslib.c:42
struct _RECORD_HEADER RECORD_HEADER
_ATTRIBUTE_TYPE
Definition: ntfslib.h:356
@ AttributeVolumeName
Definition: ntfslib.h:362
@ AttributeEnd
Definition: ntfslib.h:373
@ AttributeIndexRoot
Definition: ntfslib.h:365
@ AttributePropertySet
Definition: ntfslib.h:371
@ AttributeReparsePoint
Definition: ntfslib.h:368
@ AttributeFileName
Definition: ntfslib.h:359
@ AttributeEAInformation
Definition: ntfslib.h:369
@ AttributeStandardInformation
Definition: ntfslib.h:357
@ AttributeEA
Definition: ntfslib.h:370
@ AttributeAttributeList
Definition: ntfslib.h:358
@ AttributeVolumeInformation
Definition: ntfslib.h:363
@ AttributeSecurityDescriptor
Definition: ntfslib.h:361
@ AttributeIndexAllocation
Definition: ntfslib.h:366
@ AttributeObjectId
Definition: ntfslib.h:360
@ AttributeLoggedUtilityStream
Definition: ntfslib.h:372
@ AttributeData
Definition: ntfslib.h:364
@ AttributeBitmap
Definition: ntfslib.h:367
VOID NtfsGetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: ntfslib.c:26
struct _BIOS_PARAMETERS_BLOCK * PBIOS_PARAMETERS_BLOCK
enum _MFT_RECORD_FLAGS * PMFT_RECORD_FLAGS
struct _ATTR_RECORD * PATTR_RECORD
_ATTR_FLAGS
Definition: ntfslib.h:349
@ ATTR_IS_ENCRYPTED
Definition: ntfslib.h:351
@ ATTR_IS_COMPRESSED
Definition: ntfslib.h:350
@ ATTR_IS_SPARSE
Definition: ntfslib.h:352
struct _INDEX_ROOT_ATTRIBUTE * PINDEX_ROOT_ATTRIBUTE
struct _EXTENDED_BIOS_PARAMETERS_BLOCK * PEXTENDED_BIOS_PARAMETERS_BLOCK
struct _INDEX_ROOT_ATTRIBUTE INDEX_ROOT_ATTRIBUTE
struct _NTFS_FORMAT_DATA NTFS_FORMAT_DATA
struct _INDEX_ENTRY_HEADER INDEX_ENTRY_HEADER
enum _ATTRIBUTE_TYPE * PATTRIBUTE_TYPE
struct _FILE_RECORD_HEADER * PFILE_RECORD_HEADER
enum _ATTRIBUTE_TYPE ATTRIBUTE_TYPE
_MFT_RECORD_FLAGS
Definition: ntfslib.h:322
@ MFT_RECORD_NOT_USED
Definition: ntfslib.h:323
@ MFT_RECORD_VIEW_INDEX
Definition: ntfslib.h:327
@ MFT_RECORD_IS_DIRECTORY
Definition: ntfslib.h:325
@ MFT_RECORD_IN_USE
Definition: ntfslib.h:324
@ MFT_RECORD_UNKNOWN1
Definition: ntfslib.h:326
enum _MFT_RECORD_FLAGS MFT_RECORD_FLAGS
struct _ATTR_RECORD ATTR_RECORD
struct _EXTENDED_BIOS_PARAMETERS_BLOCK EXTENDED_BIOS_PARAMETERS_BLOCK
NTSTATUS ComputeLayout(IN ULONG ClusterSize)
Definition: ntfslib.c:99
enum _ATTR_FLAGS * PATTR_FLAGS
struct _INDEX_NODE_HEADER * PINDEX_NODE_HEADER
struct _FILE_RECORD_HEADER FILE_RECORD_HEADER
struct _VOLUME_INFORMATION_ATTRIBUTE VOLUME_INFORMATION_ATTRIBUTE
NTFS_FORMAT_DATA NtfsFormatData
Definition: ntfslib.c:20
struct _BOOT_SECTOR BOOT_SECTOR
struct _NTFS_LAYOUT NTFS_LAYOUT
NTSTATUS WriteBootSector(VOID)
Definition: bootsect.c:112
short WCHAR
Definition: pedump.c:58
unsigned short USHORT
Definition: pedump.c:61
char CHAR
Definition: pedump.c:57
#define NtGetTickCount
Definition: rtlp.h:163
USHORT ValueOffset
Definition: ntfslib.h:390
UCHAR NameLength
Definition: ntfslib.h:381
USHORT DataRunsOffset
Definition: ntfslib.h:399
USHORT NameOffset
Definition: ntfslib.h:382
ULONG ValueLength
Definition: ntfslib.h:389
LONGLONG DataSize
Definition: ntfslib.h:403
UCHAR IsNonResident
Definition: ntfslib.h:380
ULONG Type
Definition: ntfslib.h:378
struct _ATTR_RECORD::@5993::@5995 Resident
USHORT Instance
Definition: ntfslib.h:384
struct _ATTR_RECORD::@5993::@5996 NonResident
ULONGLONG HighestVCN
Definition: ntfslib.h:398
LONGLONG AllocatedSize
Definition: ntfslib.h:402
BYTE Reserved
Definition: ntfslib.h:392
BYTE Flags
Definition: ntfslib.h:391
ULONG Length
Definition: ntfslib.h:379
LONGLONG CompressedSize
Definition: ntfslib.h:404
USHORT Flags
Definition: ntfslib.h:383
USHORT CompressionUnit
Definition: ntfslib.h:400
ULONGLONG LowestVCN
Definition: ntfslib.h:397
USHORT BytesPerSector
Definition: ntfs.h:28
USHORT SectorsPerTrack
Definition: ntfs.h:33
DWORD32 HiddenSectorsCount
Definition: ntfslib.h:280
UCHAR Unused0[7]
Definition: ntfs.h:30
USHORT EndSector
Definition: ntfs.h:60
BIOS_PARAMETERS_BLOCK BPB
Definition: ntfs.h:57
ULARGE_INTEGER OEMID
Definition: ntfslib.h:301
UCHAR Jump[3]
Definition: ntfs.h:55
UCHAR BootStrap[426]
Definition: ntfs.h:59
EXTENDED_BIOS_PARAMETERS_BLOCK EBPB
Definition: ntfs.h:58
USHORT AlignmentOrReserved
Definition: ntfslib.h:443
ULONGLONG DirectoryFileReferenceNumber
Definition: ntfslib.h:430
USHORT PackedEaSize
Definition: ntfslib.h:442
ULONGLONG AllocatedSize
Definition: ntfslib.h:435
union _FILENAME_ATTRIBUTE::@5997 Extended
ULONGLONG DataSize
Definition: ntfslib.h:436
ULONGLONG ChangeTime
Definition: ntfslib.h:432
ULONGLONG LastAccessTime
Definition: ntfslib.h:434
struct _FILENAME_ATTRIBUTE::@5997::@5998 EaInfo
ULONGLONG CreationTime
Definition: ntfslib.h:431
ULONGLONG LastWriteTime
Definition: ntfslib.h:433
ULONG FileAttributes
Definition: ntfslib.h:437
USHORT SequenceNumber
Definition: ntfs.h:284
USHORT Flags
Definition: ntfs.h:287
USHORT HardLinkCount
Definition: ntfslib.h:334
USHORT NextAttributeNumber
Definition: ntfs.h:291
RECORD_HEADER Header
Definition: ntfslib.h:332
USHORT Padding
Definition: ntfs.h:292
ULONG MFTRecordNumber
Definition: ntfs.h:293
USHORT FirstAttributeOffset
Definition: ntfslib.h:335
ULONG BytesInUse
Definition: ntfs.h:288
ULONGLONG BaseFileRecord
Definition: ntfs.h:290
ULONG BytesAllocated
Definition: ntfs.h:289
Definition: ntfslib.h:484
USHORT Length
Definition: ntfslib.h:486
USHORT KeyLength
Definition: ntfslib.h:487
USHORT Reserved
Definition: ntfslib.h:489
ULONGLONG FileReference
Definition: ntfslib.h:485
USHORT Flags
Definition: ntfslib.h:488
BYTE Padding[3]
Definition: ntfslib.h:470
ULONG AllocatedSize
Definition: ntfslib.h:468
ULONG FirstEntryOffset
Definition: ntfslib.h:466
ULONG TotalSizeOfEntries
Definition: ntfslib.h:467
INDEX_NODE_HEADER Header
Definition: ntfslib.h:480
BYTE ClustersPerIndexRecord
Definition: ntfslib.h:478
GET_LENGTH_INFORMATION * LengthInformation
Definition: ntfslib.h:252
ULONG HiddenSectors
Definition: ntfslib.h:256
PDISK_GEOMETRY DiskGeometry
Definition: ntfslib.h:253
HANDLE DiskHandle
Definition: ntfslib.h:251
PUNICODE_STRING Label
Definition: ntfslib.h:254
ULONGLONG FormatTime
Definition: ntfslib.h:255
NTFS_LAYOUT Layout
Definition: ntfslib.h:257
ULONG MftAllocRecords
Definition: ntfslib.h:223
ULONGLONG SdhIdxLcn
Definition: ntfslib.h:232
ULONG BytesPerCluster
Definition: ntfslib.h:212
ULONG SdsClusters
Definition: ntfslib.h:231
ULONG MftBitmapClusters
Definition: ntfslib.h:229
ULONG BootClusters
Definition: ntfslib.h:222
ULONGLONG AttrDefLcn
Definition: ntfslib.h:228
ULONGLONG BootLcn
Definition: ntfslib.h:222
ULONG Cont1Clusters
Definition: ntfslib.h:237
CHAR ClustersPerIndexRecord
Definition: ntfslib.h:217
ULONGLONG MftMirrLcn
Definition: ntfslib.h:224
ULONGLONG ClusterCount
Definition: ntfslib.h:214
ULONGLONG BlfLcn
Definition: ntfslib.h:236
CHAR ClustersPerMftRecord
Definition: ntfslib.h:216
ULONGLONG Cont1Lcn
Definition: ntfslib.h:237
ULONGLONG TopsTLcn
Definition: ntfslib.h:235
ULONGLONG MftLcn
Definition: ntfslib.h:223
ULONG Cont2Clusters
Definition: ntfslib.h:238
ULONGLONG LogFileLcn
Definition: ntfslib.h:225
ULONGLONG FirstFreeLcn
Definition: ntfslib.h:241
ULONG UpCaseClusters
Definition: ntfslib.h:227
ULONG LogFileClusters
Definition: ntfslib.h:225
ULONG BlfClusters
Definition: ntfslib.h:236
ULONGLONG RootIdxLcn
Definition: ntfslib.h:230
ULONG SdhIdxClusters
Definition: ntfslib.h:232
ULONGLONG TotalSectors
Definition: ntfslib.h:213
ULONGLONG MftBitmapLcn
Definition: ntfslib.h:229
ULONGLONG SerialNumber
Definition: ntfslib.h:219
ULONG SectorsPerCluster
Definition: ntfslib.h:211
ULONGLONG DeletedIdxLcn
Definition: ntfslib.h:239
ULONG RootIdxClusters
Definition: ntfslib.h:230
ULONG MftMirrClusters
Definition: ntfslib.h:224
ULONGLONG Cont2Lcn
Definition: ntfslib.h:238
ULONG BitmapClusters
Definition: ntfslib.h:226
ULONGLONG BitmapLcn
Definition: ntfslib.h:226
ULONG TopsTClusters
Definition: ntfslib.h:235
ULONGLONG UpCaseLcn
Definition: ntfslib.h:227
ULONGLONG SdsLcn
Definition: ntfslib.h:231
ULONG AttrDefClusters
Definition: ntfslib.h:228
ULONG DeletedIdxClusters
Definition: ntfslib.h:239
ULONG MftClusters
Definition: ntfslib.h:223
ULONGLONG Lsn
Definition: ntfslib.h:318
USHORT UsaOffset
Definition: ntfslib.h:316
USHORT UsaCount
Definition: ntfslib.h:317
ULONG Magic
Definition: ntfslib.h:315
ULONGLONG QuotaCharge
Definition: ntfslib.h:424
ULONGLONG LastWriteTime
Definition: ntfslib.h:416
ULONGLONG ChangeTime
Definition: ntfslib.h:415
ULONGLONG LastAccessTime
Definition: ntfslib.h:417
ULONGLONG CreationTime
Definition: ntfslib.h:414
unsigned char UCHAR
Definition: typedefs.h:53
int64_t LONGLONG
Definition: typedefs.h:68
#define NTAPI
Definition: typedefs.h:36
uint64_t ULONGLONG
Definition: typedefs.h:67
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
unsigned char BYTE
Definition: xxhash.c:193