X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FFilesystems%2FNTFS%2Findex.h;fp=Modules%2FFilesystems%2FNTFS%2Findex.h;h=f45d8975c7d1f95aa918b0d79a7ff5e97751a7b9;hb=5b9f97fc9b10ded09a844935f7cd0d33e5d2e4d6;hp=0000000000000000000000000000000000000000;hpb=e89bb46ecd13feaa786f8b156d5195835aaf459e;p=tpg%2Facess2.git diff --git a/Modules/Filesystems/NTFS/index.h b/Modules/Filesystems/NTFS/index.h new file mode 100644 index 00000000..f45d8975 --- /dev/null +++ b/Modules/Filesystems/NTFS/index.h @@ -0,0 +1,65 @@ +/* + * Acess2 - NTFS Driver + * By John Hodge (thePowersGang) + * This file is published under the terms of the Acess licence. See the + * file COPYING for details. + * + * index.h - Index Types + */ +#ifndef _INDEX_H_ +#define _INDEX_H_ + +#include "attributes.h" + +typedef struct +{ + Uint32 EntryOffset; + Uint32 IndexLength; + Uint32 AllocateSize; + Uint8 Flags; + Uint8 _reserved[3]; +} PACKED tNTFS_IndexHeader; + +typedef struct +{ + Uint32 Type; + Uint32 CollationRule; + Uint32 IndexBlockSize; + Uint8 ClustersPerIndexBlock; + Uint8 _reserved[3]; + tNTFS_IndexHeader Header; +} PACKED tNTFS_IndexRoot; + +typedef struct +{ + union { + struct { + Uint64 File; // MFT Index of file + } PACKED Dir; + /** + * Views/Indexes + */ + struct { + Uint16 DataOffset; + Uint16 DataLength; + Uint32 _reserved; + } PACKED ViewIndex; + } PACKED Header; + + Uint16 Length; //!< Size of the index entry (multiple of 8 bytes) + Uint16 KeyLength; //!< Size of key value + Uint16 Flags; //!< Flags Bitfield + Uint16 _reserved; + + /** + * \brief Key Data + * \note Only valid if \a Flags does not have \a INDEX_ENTRY_END set + * \note In NTFS3 only \a Filename is used + */ + union { + tNTFS_Attrib_Filename Filename; + //TODO: more key types + } PACKED Key; +} PACKED tNTFS_IndexEntry; + +#endif