ReactOS 0.4.16-dev-297-gc569aee
common.h
Go to the documentation of this file.
1#ifndef _EXT2_COMMON_INCLUDE_
2#define _EXT2_COMMON_INCLUDE_
3
4/* global ioctl */
5#define IOCTL_APP_VOLUME_PROPERTY \
6CTL_CODE(FILE_DEVICE_UNKNOWN, 2000, METHOD_BUFFERED, FILE_ANY_ACCESS)
7
8#define IOCTL_APP_QUERY_PERFSTAT \
9CTL_CODE(FILE_DEVICE_UNKNOWN, 2001, METHOD_BUFFERED, FILE_ANY_ACCESS)
10
11#define IOCTL_APP_MOUNT_POINT \
12CTL_CODE(FILE_DEVICE_UNKNOWN, 2002, METHOD_BUFFERED, FILE_ANY_ACCESS)
13
14
15/* performance / memory allocaiton statistics */
16#define PS_IRP_CONTEXT 0x00
17#define PS_VCB 0x01
18#define PS_FCB 0x02
19#define PS_CCB 0x03
20#define PS_MCB 0x04
21#define PS_EXTENT 0x05
22#define PS_RW_CONTEXT 0x06
23#define PS_VPB 0x07
24#define PS_FILE_NAME 0x08
25#define PS_MCB_NAME 0x09
26#define PS_INODE_NAME 0x0A
27#define PS_DIR_ENTRY 0x0B
28#define PS_DIR_PATTERN 0x0C
29#define PS_DISK_EVENT 0x0D
30#define PS_DISK_BUFFER 0x0E
31#define PS_BLOCK_DATA 0x0F
32
33#define PS_EXT2_INODE 0x10
34#define PS_DENTRY 0x11
35#define PS_BUFF_HEAD 0x12
36
37#define PS_MAX_TYPE_V1 (0x10)
38#define PS_MAX_TYPE_V2 (0x30)
39
40typedef union {
41
43
44 struct {
51 ULONG RwContext; /* rw context */
56 ULONG DirEntry; /* pDir */
57 ULONG DirPattern; /* Ccb-> in Ext2QeuryDir */
60 ULONG BlockData; /* Ext2Expand&TruncateFile*/
61 };
62
64
65typedef union {
66
68
69 struct {
76 ULONG RwContext; /* rw context */
81 ULONG DirEntry; /* pDir */
82 ULONG DirPattern; /* Ccb-> in Ext2QeuryDir */
85 ULONG BlockData; /* Ext2Expand&TruncateFile*/
86 ULONG Inodes; /* inodes */
87 ULONG NameEntries; /* name dentry */
88 ULONG BufferHead; /* Buffer Header allocations */
89 };
90
92
94
95 /* totoal number of processed/being processed requests */
96 struct {
100
101 /* structure size */
103
104 /* current memory allocation statistics */
106
107 /* memory allocated in bytes */
109
110 /* totoal memory allocation statistics */
112
114
115#define EXT2_PERF_STAT_MAGIC '2SPE'
116#define EXT2_PERF_STAT_VER2 2
117
119
120 ULONG Magic; /* EPS2 */
121 USHORT Version; /* 02 */
122 USHORT Length; /* sizeof(EXT2_PERF_STATISTICS_V2) */
123
124 /* totoal number of processed/being processed requests */
125 struct {
129
130 /* structure size */
132
133 /* current memory allocation statistics */
135
136 /* memory allocated in bytes */
138
139 /* totoal memory allocation statistics */
141
143
144/* volume property ... */
145
146#define EXT2_VOLUME_PROPERTY_MAGIC 'EVPM'
147
148#define EXT2_FLAG_VP_SET_GLOBAL 0x00000001
149
150#define APP_CMD_QUERY_VERSION 0x00000000 /* with global flag set */
151#define APP_CMD_QUERY_CODEPAGES 0x00000001
152#define APP_CMD_QUERY_PROPERTY 0x00000002
153#define APP_CMD_SET_PROPERTY 0x00000003
154#define APP_CMD_QUERY_PROPERTY2 0x00000004
155#define APP_CMD_SET_PROPERTY2 0x00000005
156#define APP_CMD_QUERY_PROPERTY3 0x00000006
157#define APP_CMD_SET_PROPERTY3 0x00000007
158
159#define CODEPAGE_MAXLEN 0x20
160#define HIDINGPAT_LEN 0x20
161
162typedef struct _EXT2_VOLUME_PROPERTY {
172
173#ifdef __cplusplus
175#else // __cplusplus
178#endif // __cplusplus
179
180 /* new volume properties added after version 0.35 */
181
182 /* volume uuid */
184
185 /* mount point: driver letter only */
187
188 /* checking bitmap */
190
191 /* global hiding patterns */
196
198
199#ifdef __REACTOS__
200#define EXT2_VPROP3_AUTOMOUNT (1ULL << 0)
201#define EXT2_VPROP3_USERIDS (1ULL << 1)
202#else
203#define EXT2_VPROP3_AUTOMOUNT (1ui64 << 0)
204#define EXT2_VPROP3_USERIDS (1ui64 << 1)
205#endif
206
207#ifdef __cplusplus
209#else // __cplusplus
212#endif // __cplusplus
213 unsigned __int64 Flags2;
223
224/* Ext2Fsd driver version and built time */
230 CHAR Time[0x20];
231 CHAR Date[0x20];
233
234/* performance statistics */
235#define EXT2_QUERY_PERFSTAT_MAGIC 'EVPM'
236#define EXT2_QUERY_PERFSTAT_VER2 0x8000000
237
238typedef struct _EXT2_QUERY_PERFSTAT {
242 union {
245 };
247
248#define EXT2_QUERY_PERFSTAT_SZV1 (FIELD_OFFSET(EXT2_QUERY_PERFSTAT, PerfStatV1) + sizeof(EXT2_PERF_STATISTICS_V1))
249#define EXT2_QUERY_PERFSTAT_SZV2 (FIELD_OFFSET(EXT2_QUERY_PERFSTAT, PerfStatV1) + sizeof(EXT2_PERF_STATISTICS_V2))
250
251/* mountpoint management */
252#define EXT2_APP_MOUNTPOINT_MAGIC 'EAMM'
253typedef struct _EXT2_MOUNT_POINT {
261
262#define APP_CMD_ADD_DOS_SYMLINK 0x00000001
263#define APP_CMD_DEL_DOS_SYMLINK 0x00000002
264
265
266#endif /* _EXT2_COMMON_INCLUDE_ */
unsigned char BOOLEAN
#define __int64
Definition: basetyps.h:16
@ Reserved2
Definition: bcd.h:202
u8 __u8
Definition: btrfs.h:17
struct _EXT2_MOUNT_POINT * PEXT2_MOUNT_POINT
struct _EXT2_PERF_STATISTICS_V1 * PEXT2_PERF_STATISTICS_V1
struct _EXT2_VOLUME_PROPERTY EXT2_VOLUME_PROPERTY
struct _EXT2_QUERY_PERFSTAT * PEXT2_QUERY_PERFSTAT
struct _EXT2_PERF_STATISTICS_V2 * PEXT2_PERF_STATISTICS_V2
struct _EXT2_PERF_STATISTICS_V2 EXT2_PERF_STATISTICS_V2
struct _EXT2_VOLUME_PROPERTY * PEXT2_VOLUME_PROPERTY
struct _EXT2_VOLUME_PROPERTY3 EXT2_VOLUME_PROPERTY3
#define HIDINGPAT_LEN
Definition: common.h:160
struct _EXT2_VOLUME_PROPERTY_VERSION * PEXT2_VOLUME_PROPERTY_VERSION
#define CODEPAGE_MAXLEN
Definition: common.h:159
struct _EXT2_VOLUME_PROPERTY2 * PEXT2_VOLUME_PROPERTY2
struct _EXT2_QUERY_PERFSTAT EXT2_QUERY_PERFSTAT
struct _EXT2_VOLUME_PROPERTY_VERSION EXT2_VOLUME_PROPERTY_VERSION
#define PS_MAX_TYPE_V1
Definition: common.h:37
struct _EXT2_VOLUME_PROPERTY3 * PEXT2_VOLUME_PROPERTY3
struct _EXT2_MOUNT_POINT EXT2_MOUNT_POINT
struct _EXT2_PERF_STATISTICS_V1 EXT2_PERF_STATISTICS_V1
struct _EXT2_VOLUME_PROPERTY2 EXT2_VOLUME_PROPERTY2
#define PS_MAX_TYPE_V2
Definition: common.h:38
static PLARGE_INTEGER Time
Definition: time.c:105
unsigned short USHORT
Definition: pedump.c:61
EXT2_STAT_ARRAY_V1 Total
Definition: common.h:111
struct _EXT2_PERF_STATISTICS_V1::@693 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
EXT2_STAT_ARRAY_V1 Unit
Definition: common.h:102
EXT2_STAT_ARRAY_V1 Size
Definition: common.h:108
EXT2_STAT_ARRAY_V1 Current
Definition: common.h:105
EXT2_STAT_ARRAY_V2 Unit
Definition: common.h:131
EXT2_STAT_ARRAY_V2 Current
Definition: common.h:134
EXT2_STAT_ARRAY_V2 Total
Definition: common.h:140
struct _EXT2_PERF_STATISTICS_V2::@694 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
EXT2_STAT_ARRAY_V2 Size
Definition: common.h:137
EXT2_PERF_STATISTICS_V2 PerfStatV2
Definition: common.h:244
EXT2_PERF_STATISTICS_V1 PerfStatV1
Definition: common.h:243
BOOLEAN bHidingPrefix
Definition: common.h:192
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: common.h:195
BOOLEAN bCheckBitmap
Definition: common.h:189
BOOLEAN bHidingSuffix
Definition: common.h:193
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: common.h:194
unsigned __int64 Flags2
Definition: common.h:213
BOOLEAN bExt3Writable
Definition: common.h:167
CHAR Codepage[CODEPAGE_MAXLEN]
Definition: common.h:170
uint32_t ULONG
Definition: typedefs.h:59
ULONG ReadDiskBuffer
Definition: common.h:59
ULONG BlockData
Definition: common.h:60
ULONG InodeName
Definition: common.h:55
ULONG IrpContext
Definition: common.h:45
ULONG FileName
Definition: common.h:53
ULONG ReadDiskEvent
Definition: common.h:58
ULONG RwContext
Definition: common.h:51
ULONG DirEntry
Definition: common.h:56
ULONG DirPattern
Definition: common.h:57
ULONG InodeName
Definition: common.h:80
ULONG IrpContext
Definition: common.h:70
ULONG RwContext
Definition: common.h:76
ULONG BufferHead
Definition: common.h:88
ULONG ReadDiskBuffer
Definition: common.h:84
ULONG ReadDiskEvent
Definition: common.h:83
ULONG DirPattern
Definition: common.h:82
ULONG BlockData
Definition: common.h:85
ULONG FileName
Definition: common.h:78
ULONG DirEntry
Definition: common.h:81
ULONG NameEntries
Definition: common.h:87
static int Link(const char **args)
Definition: vfdcmd.c:2414
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
#define IRP_MJ_MAXIMUM_FUNCTION
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175