ReactOS  0.4.14-dev-49-gfb4591c
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 \
6 CTL_CODE(FILE_DEVICE_UNKNOWN, 2000, METHOD_BUFFERED, FILE_ANY_ACCESS)
7 
8 #define IOCTL_APP_QUERY_PERFSTAT \
9 CTL_CODE(FILE_DEVICE_UNKNOWN, 2001, METHOD_BUFFERED, FILE_ANY_ACCESS)
10 
11 #define IOCTL_APP_MOUNT_POINT \
12 CTL_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 
40 typedef 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 
65 typedef 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 
93 typedef struct _EXT2_PERF_STATISTICS_V1 {
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 
118 typedef struct _EXT2_PERF_STATISTICS_V2 {
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 
162 typedef struct _EXT2_VOLUME_PROPERTY {
172 
173 #ifdef __cplusplus
175 #else // __cplusplus
176 typedef struct _EXT2_VOLUME_PROPERTY2 {
178 #endif // __cplusplus
179 
180  /* new volume properties added after version 0.35 */
181 
182  /* volume uuid */
183  __u8 UUID[16];
184 
185  /* mount point: driver letter only */
187 
188  /* checking bitmap */
190 
191  /* global hiding patterns */
196 
198 
199 #define EXT2_VPROP3_AUTOMOUNT (1ULL << 0)
200 #define EXT2_VPROP3_USERIDS (1ULL << 1)
201 
202 #ifdef __cplusplus
204 #else // __cplusplus
205 typedef struct _EXT2_VOLUME_PROPERTY3 {
207 #endif // __cplusplus
208  unsigned __int64 Flags2;
218 
219 /* Ext2Fsd driver version and built time */
224  CHAR Version[0x1C];
225  CHAR Time[0x20];
226  CHAR Date[0x20];
228 
229 /* performance statistics */
230 #define EXT2_QUERY_PERFSTAT_MAGIC 'EVPM'
231 #define EXT2_QUERY_PERFSTAT_VER2 0x8000000
232 
233 typedef struct _EXT2_QUERY_PERFSTAT {
237  union {
240  };
242 
243 #define EXT2_QUERY_PERFSTAT_SZV1 (FIELD_OFFSET(EXT2_QUERY_PERFSTAT, PerfStatV1) + sizeof(EXT2_PERF_STATISTICS_V1))
244 #define EXT2_QUERY_PERFSTAT_SZV2 (FIELD_OFFSET(EXT2_QUERY_PERFSTAT, PerfStatV1) + sizeof(EXT2_PERF_STATISTICS_V2))
245 
246 /* mountpoint management */
247 #define EXT2_APP_MOUNTPOINT_MAGIC 'EAMM'
248 typedef struct _EXT2_MOUNT_POINT {
253  USHORT Link[256];
254  USHORT Name[256];
256 
257 #define APP_CMD_ADD_DOS_SYMLINK 0x00000001
258 #define APP_CMD_DEL_DOS_SYMLINK 0x00000002
259 
260 
261 #endif /* _EXT2_COMMON_INCLUDE_ */
struct _EXT2_VOLUME_PROPERTY_VERSION EXT2_VOLUME_PROPERTY_VERSION
struct _EXT2_PERF_STATISTICS_V2 EXT2_PERF_STATISTICS_V2
unsigned char __u8
Definition: compat.h:88
EXT2_PERF_STATISTICS_V1 PerfStatV1
Definition: common.h:238
ULONG BlockData
Definition: common.h:60
BOOLEAN bCheckBitmap
Definition: common.h:189
EXT2_PERF_STATISTICS_V2 PerfStatV2
Definition: common.h:239
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
EXT2_STAT_ARRAY_V1 Size
Definition: common.h:108
#define HIDINGPAT_LEN
Definition: common.h:160
struct _EXT2_VOLUME_PROPERTY EXT2_VOLUME_PROPERTY
#define PS_MAX_TYPE_V2
Definition: common.h:38
EXT2_STAT_ARRAY_V1 Current
Definition: common.h:105
ULONG ReadDiskBuffer
Definition: common.h:59
struct _EXT2_PERF_STATISTICS_V1 EXT2_PERF_STATISTICS_V1
BOOLEAN bExt3Writable
Definition: common.h:167
char CHAR
Definition: xmlstorage.h:175
#define IRP_MJ_MAXIMUM_FUNCTION
EXT2_STAT_ARRAY_V2 Size
Definition: common.h:137
struct _EXT2_MOUNT_POINT * PEXT2_MOUNT_POINT
ULONG DirEntry
Definition: common.h:56
struct _EXT2_QUERY_PERFSTAT EXT2_QUERY_PERFSTAT
struct _EXT2_MOUNT_POINT EXT2_MOUNT_POINT
ULONG DirPattern
Definition: common.h:82
static int Link(const char **args)
Definition: vfdcmd.c:2414
ULONG DirPattern
Definition: common.h:57
EXT2_STAT_ARRAY_V1 Unit
Definition: common.h:102
EXT2_STAT_ARRAY_V2 Current
Definition: common.h:134
BOOLEAN bHidingSuffix
Definition: common.h:193
struct _EXT2_VOLUME_PROPERTY3 * PEXT2_VOLUME_PROPERTY3
struct _EXT2_PERF_STATISTICS_V1::@651 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
ULONG FileName
Definition: common.h:78
ULONG InodeName
Definition: common.h:55
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: common.h:194
unsigned char BOOLEAN
ULONG InodeName
Definition: common.h:80
ULONG IrpContext
Definition: common.h:45
Definition: bcd.h:202
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: common.h:195
EXT2_STAT_ARRAY_V2 Total
Definition: common.h:140
ULONG RwContext
Definition: common.h:76
EXT2_STAT_ARRAY_V1 Total
Definition: common.h:111
#define CODEPAGE_MAXLEN
Definition: common.h:159
ULONG ReadDiskEvent
Definition: common.h:83
ULONG ReadDiskBuffer
Definition: common.h:84
ULONG NameEntries
Definition: common.h:87
struct _EXT2_VOLUME_PROPERTY * PEXT2_VOLUME_PROPERTY
ULONG RwContext
Definition: common.h:51
ULONG BlockData
Definition: common.h:85
struct _EXT2_PERF_STATISTICS_V2 * PEXT2_PERF_STATISTICS_V2
unsigned char UCHAR
Definition: xmlstorage.h:181
ULONG BufferHead
Definition: common.h:88
struct _EXT2_VOLUME_PROPERTY2 * PEXT2_VOLUME_PROPERTY2
struct _EXT2_PERF_STATISTICS_V1 * PEXT2_PERF_STATISTICS_V1
unsigned __int64 Flags2
Definition: common.h:208
struct _EXT2_VOLUME_PROPERTY3 EXT2_VOLUME_PROPERTY3
CHAR Codepage[CODEPAGE_MAXLEN]
Definition: common.h:170
struct _EXT2_QUERY_PERFSTAT * PEXT2_QUERY_PERFSTAT
BOOLEAN bHidingPrefix
Definition: common.h:192
unsigned short USHORT
Definition: pedump.c:61
ULONG DirEntry
Definition: common.h:81
struct _EXT2_PERF_STATISTICS_V2::@652 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
struct _EXT2_VOLUME_PROPERTY2 EXT2_VOLUME_PROPERTY2
unsigned int ULONG
Definition: retypes.h:1
#define PS_MAX_TYPE_V1
Definition: common.h:37
ULONG IrpContext
Definition: common.h:70
static PLARGE_INTEGER Time
Definition: time.c:105
#define __int64
Definition: basetyps.h:16
ULONG FileName
Definition: common.h:53
struct _EXT2_VOLUME_PROPERTY_VERSION * PEXT2_VOLUME_PROPERTY_VERSION
ULONG ReadDiskEvent
Definition: common.h:58
EXT2_STAT_ARRAY_V2 Unit
Definition: common.h:131