#ifndef _LINUX_NTFS3_NTFS_H
#define _LINUX_NTFS3_NTFS_H
#include <linux/blkdev.h>
#include <linux/build_bug.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/types.h>
#include "debug.h"
#define NTFS3_CHECK_FREE_CLST
#define NTFS_NAME_LEN …
#define NTFS_LINK_MAX …
#define NTFS_LZNT_MAX_CLUSTER …
#define NTFS_LZNT_CUNIT …
#define NTFS_LZNT_CLUSTERS …
struct GUID { … };
struct cpu_str { … };
struct le_str { … };
static_assert(…);
#ifdef CONFIG_NTFS3_64BIT_CLUSTER
CLST;
static_assert(…);
#else
typedef u32 CLST;
#endif
#define SPARSE_LCN64 …
#define SPARSE_LCN …
#define RESIDENT_LCN …
#define COMPRESSED_LCN …
enum RECORD_NUM { … };
enum ATTR_TYPE { … };
static_assert(…);
enum FILE_ATTRIBUTE { … };
static_assert(…);
extern const struct cpu_str NAME_MFT;
extern const struct cpu_str NAME_MIRROR;
extern const struct cpu_str NAME_LOGFILE;
extern const struct cpu_str NAME_VOLUME;
extern const struct cpu_str NAME_ATTRDEF;
extern const struct cpu_str NAME_ROOT;
extern const struct cpu_str NAME_BITMAP;
extern const struct cpu_str NAME_BOOT;
extern const struct cpu_str NAME_BADCLUS;
extern const struct cpu_str NAME_QUOTA;
extern const struct cpu_str NAME_SECURE;
extern const struct cpu_str NAME_UPCASE;
extern const struct cpu_str NAME_EXTEND;
extern const struct cpu_str NAME_OBJID;
extern const struct cpu_str NAME_REPARSE;
extern const struct cpu_str NAME_USNJRNL;
extern const __le16 I30_NAME[4];
extern const __le16 SII_NAME[4];
extern const __le16 SDH_NAME[4];
extern const __le16 SO_NAME[2];
extern const __le16 SQ_NAME[2];
extern const __le16 SR_NAME[2];
extern const __le16 BAD_NAME[4];
extern const __le16 SDS_NAME[4];
extern const __le16 WOF_NAME[17];
struct MFT_REF { … };
static_assert(…);
static inline CLST ino_get(const struct MFT_REF *ref)
{ … }
struct NTFS_BOOT { … };
static_assert(…);
enum NTFS_SIGNATURE { … };
static_assert(…);
struct NTFS_RECORD_HEADER { … };
static_assert(…);
static inline int is_baad(const struct NTFS_RECORD_HEADER *hdr)
{ … }
enum RECORD_FLAG { … };
struct MFT_REC { … };
#define MFTRECORD_FIXUP_OFFSET_1 …
#define MFTRECORD_FIXUP_OFFSET_3 …
#define MFTRECORD_FIXUP_OFFSET …
static_assert(…);
static_assert(…);
static inline bool is_rec_base(const struct MFT_REC *rec)
{ … }
static inline bool is_mft_rec5(const struct MFT_REC *rec)
{ … }
static inline bool is_rec_inuse(const struct MFT_REC *rec)
{ … }
static inline bool clear_rec_inuse(struct MFT_REC *rec)
{ … }
#define RESIDENT_FLAG_INDEXED …
struct ATTR_RESIDENT { … };
struct ATTR_NONRESIDENT { … };
#define ATTR_FLAG_COMPRESSED …
#define ATTR_FLAG_COMPRESSED_MASK …
#define ATTR_FLAG_ENCRYPTED …
#define ATTR_FLAG_SPARSED …
struct ATTRIB { … };
#define SIZEOF_RESIDENT …
#define SIZEOF_NONRESIDENT_EX …
#define SIZEOF_NONRESIDENT …
#define SIZEOF_RESIDENT_LE …
#define SIZEOF_NONRESIDENT_EX_LE …
#define SIZEOF_NONRESIDENT_LE …
static inline u64 attr_ondisk_size(const struct ATTRIB *attr)
{ … }
static inline u64 attr_size(const struct ATTRIB *attr)
{ … }
static inline bool is_attr_encrypted(const struct ATTRIB *attr)
{ … }
static inline bool is_attr_sparsed(const struct ATTRIB *attr)
{ … }
static inline bool is_attr_compressed(const struct ATTRIB *attr)
{ … }
static inline bool is_attr_ext(const struct ATTRIB *attr)
{ … }
static inline bool is_attr_indexed(const struct ATTRIB *attr)
{ … }
static inline __le16 const *attr_name(const struct ATTRIB *attr)
{ … }
static inline u64 attr_svcn(const struct ATTRIB *attr)
{ … }
static_assert(…);
static_assert(…);
static_assert(…);
static inline void *resident_data_ex(const struct ATTRIB *attr, u32 datasize)
{ … }
static inline void *resident_data(const struct ATTRIB *attr)
{ … }
static inline void *attr_run(const struct ATTRIB *attr)
{ … }
struct ATTR_STD_INFO { … };
static_assert(…);
#define SECURITY_ID_INVALID …
#define SECURITY_ID_FIRST …
struct ATTR_STD_INFO5 { … };
static_assert(…);
struct ATTR_LIST_ENTRY { … };
static inline u32 le_size(u8 name_len)
{ … }
static inline int le_cmp(const struct ATTR_LIST_ENTRY *le,
const struct ATTRIB *attr)
{ … }
static inline __le16 const *le_name(const struct ATTR_LIST_ENTRY *le)
{ … }
#define FILE_NAME_POSIX …
#define FILE_NAME_UNICODE …
#define FILE_NAME_DOS …
#define FILE_NAME_UNICODE_AND_DOS …
struct NTFS_DUP_INFO { … };
struct ATTR_FILE_NAME { … };
static_assert(…);
static_assert(…);
#define SIZEOF_ATTRIBUTE_FILENAME …
#define SIZEOF_ATTRIBUTE_FILENAME_MAX …
static inline struct ATTRIB *attr_from_name(struct ATTR_FILE_NAME *fname)
{ … }
static inline u16 fname_full_size(const struct ATTR_FILE_NAME *fname)
{ … }
static inline u8 paired_name(u8 type)
{ … }
#define NTFS_IE_HAS_SUBNODES …
#define NTFS_IE_LAST …
struct NTFS_DE { … };
static_assert(…);
static inline void de_set_vbn_le(struct NTFS_DE *e, __le64 vcn)
{ … }
static inline void de_set_vbn(struct NTFS_DE *e, CLST vcn)
{ … }
static inline __le64 de_get_vbn_le(const struct NTFS_DE *e)
{ … }
static inline CLST de_get_vbn(const struct NTFS_DE *e)
{ … }
static inline struct NTFS_DE *de_get_next(const struct NTFS_DE *e)
{ … }
static inline struct ATTR_FILE_NAME *de_get_fname(const struct NTFS_DE *e)
{ … }
static inline bool de_is_last(const struct NTFS_DE *e)
{ … }
static inline bool de_has_vcn(const struct NTFS_DE *e)
{ … }
static inline bool de_has_vcn_ex(const struct NTFS_DE *e)
{ … }
#define MAX_BYTES_PER_NAME_ENTRY …
#define NTFS_INDEX_HDR_HAS_SUBNODES …
struct INDEX_HDR { … };
static_assert(…);
static inline struct NTFS_DE *hdr_first_de(const struct INDEX_HDR *hdr)
{ … }
static inline struct NTFS_DE *hdr_next_de(const struct INDEX_HDR *hdr,
const struct NTFS_DE *e)
{ … }
static inline bool hdr_has_subnode(const struct INDEX_HDR *hdr)
{ … }
struct INDEX_BUFFER { … };
static_assert(…);
static inline bool ib_is_empty(const struct INDEX_BUFFER *ib)
{ … }
static inline bool ib_is_leaf(const struct INDEX_BUFFER *ib)
{ … }
enum COLLATION_RULE { … };
static_assert(…);
struct INDEX_ROOT { … };
static_assert(…);
static_assert(…);
#define VOLUME_FLAG_DIRTY …
#define VOLUME_FLAG_RESIZE_LOG_FILE …
struct VOLUME_INFO { … };
#define SIZEOF_ATTRIBUTE_VOLUME_INFO …
#define NTFS_LABEL_MAX_LENGTH …
#define NTFS_ATTR_INDEXABLE …
#define NTFS_ATTR_DUPALLOWED …
#define NTFS_ATTR_MUST_BE_INDEXED …
#define NTFS_ATTR_MUST_BE_NAMED …
#define NTFS_ATTR_MUST_BE_RESIDENT …
#define NTFS_ATTR_LOG_ALWAYS …
struct ATTR_DEF_ENTRY { … };
static_assert(…);
struct OBJECT_ID { … };
static_assert(…);
struct NTFS_DE_O { … };
static_assert(…);
struct NTFS_DE_Q {
struct NTFS_DE de;
__le32 owner_id;
__le32 Version;
__le32 Flags;
__le64 BytesUsed;
__le64 ChangeTime;
__le64 WarningLimit;
__le64 HardLimit;
__le64 ExceededTime;
}__packed;
static_assert(…);
#define SecurityDescriptorsBlockSize …
#define SecurityDescriptorMaxSize …
#define Log2OfSecurityDescriptorsBlockSize …
struct SECURITY_KEY { … };
struct SECURITY_HDR { … } __packed;
static_assert(…);
struct NTFS_DE_SII { … } __packed;
static_assert(…);
static_assert(…);
struct NTFS_DE_SDH { … };
#define SIZEOF_SDH_DIRENTRY …
struct REPARSE_KEY { … };
static_assert(…);
#define SIZEOF_REPARSE_KEY …
struct NTFS_DE_R { … };
static_assert(…);
#define WOF_CURRENT_VERSION …
#define WOF_PROVIDER_WIM …
#define WOF_PROVIDER_SYSTEM …
#define WOF_PROVIDER_CURRENT_VERSION …
#define WOF_COMPRESSION_XPRESS4K …
#define WOF_COMPRESSION_LZX32K …
#define WOF_COMPRESSION_XPRESS8K …
#define WOF_COMPRESSION_XPRESS16K …
struct REPARSE_POINT { … };
static_assert(…);
#define IO_REPARSE_TAG_RESERVED_RANGE …
#define IsReparseTagMicrosoft(_tag) …
#define IsReparseTagNameSurrogate(_tag) …
#define IO_REPARSE_TAG_VALID_VALUES …
#define IsReparseTagValid(_tag) …
enum IO_REPARSE_TAG { … };
#define SYMLINK_FLAG_RELATIVE …
struct REPARSE_DATA_BUFFER { … };
#define FILE_NEED_EA …
struct EA_INFO { … };
static_assert(…);
struct EA_FULL { … };
static_assert(…);
#define ACL_REVISION …
#define ACL_REVISION_DS …
#define SE_SELF_RELATIVE …
struct SECURITY_DESCRIPTOR_RELATIVE { … };
static_assert(…);
struct ACE_HEADER { … };
static_assert(…);
struct ACL { … };
static_assert(…);
struct SID { … };
static_assert(…);
#endif