Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers...
[reactos.git] / drivers / filters / fltmgr / fltmgr.h
1 #ifndef _FLTMGR_H
2 #define _FLTMGR_H
3
4 #include <ntifs.h>
5 #include <ndk/obfuncs.h>
6 #include <ndk/exfuncs.h>
7 #include <fltkernel.h>
8 #include <pseh/pseh2.h>
9
10 #define DRIVER_NAME L"FltMgr"
11
12 #define FLT_MAJOR_VERSION 0x0200
13 #define FLT_MINOR_VERSION 0x0000 //win2k3
14
15 #define FM_TAG_DISPATCH_TABLE 'ifMF'
16 #define FM_TAG_REGISTRY_DATA 'rtMF'
17 #define FM_TAG_DEV_OBJ_PTRS 'ldMF'
18 #define FM_TAG_UNICODE_STRING 'suMF'
19 #define FM_TAG_FILTER 'lfMF'
20 #define FM_TAG_CONTEXT_REGISTA 'rcMF'
21
22 #define MAX_DEVNAME_LENGTH 64
23
24
25 typedef struct _DRIVER_DATA
26 {
27 PDRIVER_OBJECT DriverObject;
28 PDEVICE_OBJECT DeviceObject;
29 UNICODE_STRING ServiceKey;
30
31 PDEVICE_OBJECT CommsDeviceObject;
32
33 PFAST_IO_DISPATCH FastIoDispatch;
34
35 FAST_MUTEX FilterAttachLock;
36
37 } DRIVER_DATA, *PDRIVER_DATA;
38
39 typedef struct _FLTMGR_DEVICE_EXTENSION
40 {
41 /* The file system we're attached to */
42 PDEVICE_OBJECT AttachedToDeviceObject;
43
44 /* The storage stack(disk) associated with the file system device object we're attached to */
45 PDEVICE_OBJECT StorageStackDeviceObject;
46
47 /* Either physical drive for volume device objects otherwise
48 * it's the name of the control device we're attached to */
49 UNICODE_STRING DeviceName;
50 WCHAR DeviceNameBuffer[MAX_DEVNAME_LENGTH];
51
52 } FLTMGR_DEVICE_EXTENSION, *PFLTMGR_DEVICE_EXTENSION;
53
54
55 NTSTATUS
56 FltpRegisterContexts(
57 _In_ PFLT_FILTER Filter,
58 _In_ const FLT_CONTEXT_REGISTRATION *Context
59 );
60
61 VOID
62 FltpExInitializeRundownProtection(
63 _Out_ PEX_RUNDOWN_REF RundownRef
64 );
65
66 BOOLEAN
67 FltpExAcquireRundownProtection(
68 _Inout_ PEX_RUNDOWN_REF RundownRef
69 );
70
71 BOOLEAN
72 FltpExReleaseRundownProtection(
73 _Inout_ PEX_RUNDOWN_REF RundownRef
74 );
75
76 NTSTATUS
77 NTAPI
78 FltpObjectRundownWait(
79 _Inout_ PEX_RUNDOWN_REF RundownRef
80 );
81
82 BOOLEAN
83 FltpExRundownCompleted(
84 _Inout_ PEX_RUNDOWN_REF RundownRef
85 );
86
87 /////////// FIXME: put these into the correct header
88 NTSTATUS
89 FltpGetBaseDeviceObjectName(_In_ PDEVICE_OBJECT DeviceObject,
90 _Inout_ PUNICODE_STRING ObjectName);
91
92 NTSTATUS
93 FltpGetObjectName(_In_ PVOID Object,
94 _Inout_ PUNICODE_STRING ObjectName);
95
96 NTSTATUS
97 FltpReallocateUnicodeString(_In_ PUNICODE_STRING String,
98 _In_ SIZE_T NewLength,
99 _In_ BOOLEAN CopyExisting);
100
101 VOID
102 FltpFreeUnicodeString(_In_ PUNICODE_STRING String);
103 ////////////////////////////////////////////////
104
105
106
107
108
109
110
111
112
113
114
115
116 //FM ? ? -fltmgr.sys - Unrecognized FltMgr tag(update pooltag.w)
117 //FMac - fltmgr.sys - ASCII String buffers
118 //FMas - fltmgr.sys - ASYNC_IO_COMPLETION_CONTEXT structure
119 //FMcb - fltmgr.sys - FLT_CCB structure
120 //FMcr - fltmgr.sys - Context registration structures
121 //FMct - fltmgr.sys - TRACK_COMPLETION_NODES structure
122 //FMdl - fltmgr.sys - Array of DEVICE_OBJECT pointers
123 //FMea - fltmgr.sys - EA buffer for create
124 //FMfc - fltmgr.sys - FLTMGR_FILE_OBJECT_CONTEXT structure
125 //FMfi - fltmgr.sys - Fast IO dispatch table
126 //FMfk - fltmgr.sys - Byte Range Lock structure
127 //FMfl - fltmgr.sys - FLT_FILTER structure
128 //FMfn - fltmgr.sys - NAME_CACHE_NODE structure
129 //FMfr - fltmgr.sys - FLT_FRAME structure
130 //FMfz - fltmgr.sys - FILE_LIST_CTRL structure
131 //FMib - fltmgr.sys - Irp SYSTEM buffers
132 //FMic - fltmgr.sys - IRP_CTRL structure
133 //FMin - fltmgr.sys - FLT_INSTANCE name
134 //FMil - fltmgr.sys - IRP_CTRL completion node stack
135 //FMis - fltmgr.sys - FLT_INSTANCE structure
136 //FMla - fltmgr.sys - Per - processor IRPCTRL lookaside lists
137 //FMnc - fltmgr.sys - NAME_CACHE_CREATE_CTRL structure
138 //FMng - fltmgr.sys - NAME_GENERATION_CONTEXT structure
139 //FMol - fltmgr.sys - OPLOCK_CONTEXT structure
140 //FMos - fltmgr.sys - Operation status ctrl structure
141 //FMpl - fltmgr.sys - Cache aware pushLock
142 //FMpr - fltmgr.sys - FLT_PRCB structure
143 //FMrl - fltmgr.sys - FLT_OBJECT rundown logs
144 //FMrp - fltmgr.sys - Reparse point data buffer
145 //FMrr - fltmgr.sys - Per - processor Cache - aware rundown ref structure
146 //FMsd - fltmgr.sys - Security descriptors
147 //FMsl - fltmgr.sys - STREAM_LIST_CTRL structure
148 //FMtn - fltmgr.sys - Temporary file names
149 //FMtr - fltmgr.sys - Temporary Registry information
150 //FMts - fltmgr.sys - Tree Stack
151 //FMus - fltmgr.sys - Unicode string
152 //FMvf - fltmgr.sys - FLT_VERIFIER_EXTENSION structure
153 //FMvj - fltmgr.sys - FLT_VERIFIER_OBJECT structure
154 //FMvo - fltmgr.sys - FLT_VOLUME structure
155 //FMwi - fltmgr.sys - Work item structures
156 //FMcn - fltmgr.sys - Non paged context extension structures.
157 //FMtp - fltmgr.sys - Non Paged tx vol context structures.
158 //FMlp - fltmgr.sys - Paged stream list control entry structures.
159
160
161
162
163 /*
164 FltAcquirePushLockExclusive
165 FltAcquirePushLockShared
166 FltAcquireResourceExclusive
167 FltAcquireResourceShared
168 FltAllocateCallbackData
169 FltAllocateContext
170 FltAllocateDeferredIoWorkItem
171 FltAllocateFileLock
172 FltAllocateGenericWorkItem
173 FltAllocatePoolAlignedWithTag
174 FltAttachVolume
175 FltAttachVolumeAtAltitude
176 FltBuildDefaultSecurityDescriptor
177 FltCancelFileOpen
178 FltCancelIo
179 FltCbdqDisable
180 FltCbdqEnable
181 FltCbdqInitialize
182 FltCbdqInsertIo
183 FltCbdqRemoveIo
184 FltCbdqRemoveNextIo
185 FltCheckAndGrowNameControl
186 FltCheckLockForReadAccess
187 FltCheckLockForWriteAccess
188 FltCheckOplock
189 FltClearCallbackDataDirty
190 FltClearCancelCompletion
191 FltClose
192 FltCloseClientPort
193 FltCloseCommunicationPort
194 FltCompareInstanceAltitudes
195 FltCompletePendedPostOperation
196 FltCompletePendedPreOperation
197 FltCreateCommunicationPort
198 FltCreateFile
199 FltCreateFileEx
200 FltCreateSystemVolumeInformationFolder
201 FltCurrentBatchOplock
202 FltDecodeParameters
203 FltDeleteContext
204 FltDeleteFileContext
205 FltDeleteInstanceContext
206 FltDeletePushLock
207 FltDeleteStreamContext
208 FltDeleteStreamHandleContext
209 FltDeleteVolumeContext
210 FltDetachVolume
211 FltDeviceIoControlFile
212 FltDoCompletionProcessingWhenSafe
213 FltEnumerateFilterInformation
214 FltEnumerateFilters
215 FltEnumerateInstanceInformationByFilter
216 FltEnumerateInstanceInformationByVolume
217 FltEnumerateInstances
218 FltEnumerateVolumeInformation
219 FltEnumerateVolumes
220 FltFlushBuffers
221 FltFreeCallbackData
222 FltFreeDeferredIoWorkItem
223 FltFreeFileLock
224 FltFreeGenericWorkItem
225 FltFreePoolAlignedWithTag
226 FltFreeSecurityDescriptor
227 FltFsControlFile
228 FltGetBottomInstance
229 FltGetContexts
230 FltGetDestinationFileNameInformation
231 FltGetDeviceObject
232 FltGetDiskDeviceObject
233 FltGetFileContext
234 FltGetFileNameInformation
235 FltGetFileNameInformationUnsafe
236 FltGetFilterFromInstance
237 FltGetFilterFromName
238 FltGetFilterInformation
239 FltGetInstanceContext
240 FltGetInstanceInformation
241 FltGetIrpName
242 FltGetLowerInstance
243 FltGetRequestorProcess
244 FltGetRequestorProcessId
245 FltGetRoutineAddress
246 FltGetStreamContext
247 FltGetStreamHandleContext
248 FltGetSwappedBufferMdlAddress
249 FltGetTopInstance
250 FltGetTunneledName
251 FltGetUpperInstance
252 FltGetVolumeContext
253 FltGetVolumeFromDeviceObject
254 FltGetVolumeFromFileObject
255 FltGetVolumeFromInstance
256 FltGetVolumeFromName
257 FltGetVolumeGuidName
258 FltGetVolumeInstanceFromName
259 FltGetVolumeName
260 FltGetVolumeProperties
261 FltInitializeFileLock
262 FltInitializeOplock
263 FltInitializePushLock
264 FltIs32bitProcess
265 FltIsCallbackDataDirty
266 FltIsDirectory
267 FltIsIoCanceled
268 FltIsOperationSynchronous
269 FltIsVolumeWritable
270 FltLoadFilter
271 FltLockUserBuffer
272 FltNotifyFilterChangeDirectory
273 FltObjectDereference
274 FltObjectReference
275 FltOpenVolume
276 FltOplockFsctrl
277 FltOplockIsFastIoPossible
278 FltParseFileName
279 FltParseFileNameInformation
280 FltPerformAsynchronousIo
281 FltPerformSynchronousIo
282 FltProcessFileLock
283 FltPurgeFileNameInformationCache
284 FltQueryEaFile
285 FltQueryInformationFile
286 FltQuerySecurityObject
287 FltQueryVolumeInformation
288 FltQueryVolumeInformationFile
289 FltQueueDeferredIoWorkItem
290 FltQueueGenericWorkItem
291 FltReadFile
292 FltReferenceContext
293 FltReferenceFileNameInformation
294 FltRegisterFilter
295 FltReissueSynchronousIo
296 FltReleaseContext
297 FltReleaseContexts
298 FltReleaseFileNameInformation
299 FltReleasePushLock
300 FltReleaseResource
301 FltRequestOperationStatusCallback
302 FltRetainSwappedBufferMdlAddress
303 FltReuseCallbackData
304 FltSendMessage
305 FltSetCallbackDataDirty
306 FltSetCancelCompletion
307 FltSetEaFile
308 FltSetFileContext
309 FltSetInformationFile
310 FltSetInstanceContext
311 FltSetSecurityObject
312 FltSetStreamContext
313 FltSetStreamHandleContext
314 FltSetVolumeContext
315 FltSetVolumeInformation
316 FltStartFiltering
317 FltSupportsFileContexts
318 FltSupportsStreamContexts
319 FltSupportsStreamHandleContexts
320 FltTagFile
321 FltUninitializeFileLock
322 FltUninitializeOplock
323 FltUnloadFilter
324 FltUnregisterFilter
325 FltUntagFile
326 FltWriteFile
327 */
328
329
330
331
332 #endif /* _FLTMGR_H */