ReactOS  r76032
fltmgrint.h
Go to the documentation of this file.
1 #ifndef _FLTMGR_INTERNAL_H
2 #define _FLTMGR_INTERNAL_H
3 
4 
5 #define MAX_CONTEXT_TYPES 6
6 
7 
8 typedef enum _FLT_OBJECT_FLAGS
9 {
13  FLT_OBFL_TYPE_FILTER = 0x2000000,
15 
17 
18 typedef enum _FLT_FILTER_FLAGS
19 {
22 
24 
25 typedef struct _FLT_OBJECT // size = 0x14
26 {
31 
33 
35 {
40  char Flags;
42 
44 
46 {
50 
52 
53 typedef struct _FLT_MUTEX_LIST_HEAD
54 {
58 
60 
61 typedef struct _FLT_FILTER // size = 0x120
62 {
64  PVOID Frame; //FLTP_FRAME
76  PALLOCATE_CONTEXT_HEADER SupportedContextsListHead;
77  PALLOCATE_CONTEXT_HEADER SupportedContexts[MAX_CONTEXT_TYPES];
89 
91 
93 {
97 
99 
100 typedef struct _FLT_TYPE
101 {
104 
105 } FLT_TYPE, *PFLT_TYPE;
106 
107 typedef struct _FLT_INSTANCE // size = 0x144 (324)
108 {
111  PVOID Volume; //PFLT_VOLUME
112  PFLT_FILTER Filter;
118  PVOID Context; //PCONTEXT_NODE
119  PVOID TrackCompletionNodes; //PRACK_COMPLETION_NODES
120  PVOID CallbackNodes[50]; //PCALLBACK_NODE
121 
123 
124 // http://fsfilters.blogspot.co.uk/2010/02/filter-manager-concepts-part-1.html
125 typedef struct _FLTP_FRAME
126 {
129  unsigned int FrameID;
142  //FLT_PRCB *Prcb;
145  //FLTP_IRPCTRL_STACK_PROFILER IrpCtrlStackProfiler;
148  //STATIC_IRP_CONTROL GlobalSIC;
149 
151 
152 
153 // http://fsfilters.blogspot.co.uk/2010/02/filter-manager-concepts-part-6.html
154 typedef struct _STREAM_LIST_CTRL // size = 0xC8 (200)
155 {
159  //STREAM_LIST_CTRL_FLAGS Flags;
160  int UseCount;
162  //CONTEXT_LIST_CTRL StreamContexts;
163  //CONTEXT_LIST_CTRL StreamHandleContexts;
166  //NAME_CACHE_LIST_CTRL NormalizedNameCache;
167  // NAME_CACHE_LIST_CTRL ShortNameCache;
168  // NAME_CACHE_LIST_CTRL OpenedNameCache;
170 
172 
173 
175 {
180  PFLT_FILTER Filter;
185 
187 
188 
189 typedef struct _FLT_PORT_OBJECT
190 {
192  PFLT_SERVER_PORT_OBJECT ServerPort;
196  PVOID MsgQ; // FLT_MESSAGE_WAITER_QUEUE MsgQ;
200 
202 
203 
204 
205 
206 
207 VOID
209  _Out_ PEX_RUNDOWN_REF RundownRef
210 );
211 
212 BOOLEAN
214  _Inout_ PEX_RUNDOWN_REF RundownRef
215 );
216 
217 BOOLEAN
219  _Inout_ PEX_RUNDOWN_REF RundownRef
220 );
221 
222 NTSTATUS
223 NTAPI
225  _Inout_ PEX_RUNDOWN_REF RundownRef
226 );
227 
228 BOOLEAN
230  _Inout_ PEX_RUNDOWN_REF RundownRef
231 );
232 
233 
234 NTSTATUS
238 );
239 
240 NTSTATUS
242  _In_ PVOID Object,
244 );
245 
246 ULONG
248  _In_ PFLT_OBJECT Object
249 );
250 
251 VOID
253  _In_ PFLT_OBJECT Object
254 );
255 
256 NTSTATUS
260  _In_ BOOLEAN CopyExisting
261 );
262 
263 VOID
266 );
267 
268 
269 
270 NTSTATUS
274 );
275 
276 NTSTATUS
280 );
281 
282 
283 
284 #endif /* _FLTMGR_INTERNAL_H */
FLT_RESOURCE_LIST_HEAD InstanceList
Definition: fltmgrint.h:69
DWORD *typedef PVOID
Definition: winlogon.h:52
enum _FLT_OBJECT_FLAGS * PFLT_OBJECT_FLAGS
PVOID PreVolumeMount
Definition: fltmgrint.h:78
enum _FLT_FILTER_FLAGS FLT_FILTER_FLAGS
struct _STREAM_LIST_CTRL STREAM_LIST_CTRL
PVOID CallbackNodes[50]
Definition: fltmgrint.h:120
BOOLEAN FltpExAcquireRundownProtection(_Inout_ PEX_RUNDOWN_REF RundownRef)
Definition: Object.c:148
FLT_OBJECT Base
Definition: fltmgrint.h:109
_FLT_OBJECT_FLAGS
Definition: fltmgrint.h:8
struct _FLT_INSTANCE FLT_INSTANCE
NTSTATUS(FLTAPI * PFLT_FILTER_UNLOAD_CALLBACK)(FLT_FILTER_UNLOAD_FLAGS Flags)
Definition: fltkernel.h:654
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
FLT_CONTEXT_TYPE ContextType
Definition: fltmgrint.h:39
FLT_OBJECT Base
Definition: fltmgrint.h:63
#define MAX_CONTEXT_TYPES
Definition: fltmgrint.h:5
PVOID Context
Definition: fltmgrint.h:118
enum _FLT_FILTER_FLAGS * PFLT_FILTER_FLAGS
LIST_ENTRY FilterLink
Definition: fltmgrint.h:191
VOID FltpFreeUnicodeString(_In_ PUNICODE_STRING String)
Definition: Lib.c:24
enum _FLT_OBJECT_FLAGS FLT_OBJECT_FLAGS
_In_ PIRP Irp
Definition: csq.h:116
PFLT_NORMALIZE_CONTEXT_CLEANUP NormalizeContextCleanup
Definition: fltmgrint.h:82
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:177
PFLT_FILTER Filter
Definition: fltmgrint.h:112
struct _FLT_PORT_OBJECT FLT_PORT_OBJECT
struct _FLT_TYPE * PFLT_TYPE
struct _FLT_TYPE FLT_TYPE
USHORT FLT_CONTEXT_TYPE
Definition: fltkernel.h:436
NTSTATUS(FLTAPI * PFLT_GENERATE_FILE_NAME)(_In_ PFLT_INSTANCE Instance, _In_ PFILE_OBJECT FileObject, _In_opt_ PFLT_CALLBACK_DATA CallbackData, _In_ FLT_FILE_NAME_OPTIONS NameOptions, _Out_ PBOOLEAN CacheFileNameInformation, _Out_ PFLT_NAME_CONTROL FileName)
Definition: fltkernel.h:664
BOOLEAN FltpExReleaseRundownProtection(_Inout_ PEX_RUNDOWN_REF RundownRef)
Definition: Object.c:154
PVOID TrackCompletionNodes
Definition: fltmgrint.h:119
NTSTATUS FltpGetBaseDeviceObjectName(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PUNICODE_STRING ObjectName)
Definition: Object.c:175
NTSTATUS FltpReallocateUnicodeString(_In_ PUNICODE_STRING String, _In_ SIZE_T NewLength, _In_ BOOLEAN CopyExisting)
Definition: Lib.c:39
PFLT_INSTANCE_TEARDOWN_CALLBACK InstanceTeardownStart
Definition: fltmgrint.h:74
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG _Out_ PVOID _Out_ PIO_STATUS_BLOCK _In_ PDEVICE_OBJECT DeviceObject
Definition: npfs.h:636
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:62
ULONGLONG MessageId
Definition: fltmgrint.h:197
FLT_MUTEX_LIST_HEAD ActiveOpens
Definition: fltmgrint.h:85
struct _ALLOCATE_CONTEXT_HEADER * Next
Definition: fltmgrint.h:38
LIST_ENTRY PrimaryLink
Definition: fltmgrint.h:30
PFLT_FILTER_UNLOAD_CALLBACK OldDriverUnload
Definition: fltmgrint.h:84
struct _FLT_RESOURCE_LIST_HEAD FLT_RESOURCE_LIST_HEAD
PALLOCATE_CONTEXT_HEADER SupportedContexts[MAX_CONTEXT_TYPES]
Definition: fltmgrint.h:77
static USHORT USHORT * NewLength
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:252
FLT_MUTEX_LIST_HEAD AttachedFileSystems
Definition: fltmgrint.h:138
LIST_ENTRY MountingVolumes
Definition: fltmgrint.h:137
UNICODE_STRING Name
Definition: fltmgrint.h:115
PVOID VerifierExtension
Definition: fltmgrint.h:70
LIST_ENTRY mList
Definition: fltmgrint.h:56
CHAR16 * String
Definition: acefiex.h:201
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _FLT_PORT_OBJECT * PFLT_PORT_OBJECT
long LONG
Definition: pedump.c:60
EX_RUNDOWN_REF RundownRef
Definition: fltmgrint.h:29
NTSTATUS(FLTAPI * PFLT_NORMALIZE_NAME_COMPONENT)(_In_ PFLT_INSTANCE Instance, _In_ PCUNICODE_STRING ParentDirectory, _In_ USHORT VolumeNameLength, _In_ PCUNICODE_STRING Component, _Out_writes_bytes_(ExpandComponentNameLength) PFILE_NAMES_INFORMATION ExpandComponentName, _In_ ULONG ExpandComponentNameLength, _In_ FLT_NORMALIZE_NAME_FLAGS Flags, _Inout_ PVOID *NormalizationContext)
Definition: fltkernel.h:678
BOOLEAN Disconnected
Definition: fltmgrint.h:199
FLT_RESOURCE_LIST_HEAD AttachedVolumes
Definition: fltmgrint.h:136
struct _FLT_SERVER_PORT_OBJECT * PFLT_SERVER_PORT_OBJECT
NPAGED_LOOKASIDE_LIST LargeIrpCtrlLookasideList
Definition: fltmgrint.h:147
LIST_ENTRY VolumeLink
Definition: fltmgrint.h:158
enum _FLT_yINSTANCE_FLAGS * PFLT_INSTANCE_FLAGS
PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK InstanceQueryTeardown
Definition: fltmgrint.h:73
FAST_MUTEX DeviceObjectAttachLock
Definition: fltmgrint.h:141
LARGE_INTEGER LastRenameCompleted
Definition: fltmgrint.h:165
#define _Out_
Definition: no_sal2.h:323
PDRIVER_OBJECT DriverObject
Definition: fltmgrint.h:68
NTSTATUS FltpGetObjectName(_In_ PVOID Object, _Inout_ PUNICODE_STRING ObjectName)
Definition: Object.c:193
struct _FLT_FILTER * PFLT_FILTER
PFLT_INSTANCE_SETUP_CALLBACK InstanceSetup
Definition: fltmgrint.h:72
NTSTATUS(FLTAPI * PFLT_CONNECT_NOTIFY)(_In_ PFLT_PORT ClientPort, _In_opt_ PVOID ServerPortCookie, _In_reads_bytes_opt_(SizeOfContext) PVOID ConnectionContext, _In_ ULONG SizeOfContext, _Outptr_result_maybenull_ PVOID *ConnectionPortCookie)
Definition: fltkernel.h:848
struct _FLTP_FRAME FLTP_FRAME
VOID FltpExInitializeRundownProtection(_Out_ PEX_RUNDOWN_REF RundownRef)
Definition: Object.c:142
BOOLEAN FltpExRundownCompleted(_Inout_ PEX_RUNDOWN_REF RundownRef)
Definition: Object.c:161
FAST_MUTEX
Definition: extypes.h:17
PVOID Volume
Definition: fltmgrint.h:111
FLT_INSTANCE_FLAGS Flags
Definition: fltmgrint.h:113
unsigned char BOOLEAN
void * PrcbPoolToFree
Definition: fltmgrint.h:143
VOID(FLTAPI * PFLT_NORMALIZE_CONTEXT_CLEANUP)(_In_opt_ PVOID *NormalizationContext)
Definition: fltkernel.h:701
PVOID PostVolumeMount
Definition: fltmgrint.h:79
FLT_RESOURCE_LIST_HEAD RegisteredFilters
Definition: fltmgrint.h:135
void * LookasidePoolToFree
Definition: fltmgrint.h:144
uint64_t ULONGLONG
Definition: typedefs.h:65
_FLT_FILTER_FLAGS
Definition: fltmgrint.h:18
FSRTL_PER_STREAM_CONTEXT ContextCtrl
Definition: fltmgrint.h:157
PFLT_OPERATION_REGISTRATION Operations
Definition: fltmgrint.h:83
#define _Inout_
Definition: no_sal2.h:244
VOID FltpObjectPointerDereference(_In_ PFLT_OBJECT Object)
Definition: Object.c:265
static IUnknown Object
Definition: main.c:512
struct _FLT_RESOURCE_LIST_HEAD * PFLT_RESOURCE_LIST_HEAD
USHORT Size
Definition: fltmgrint.h:103
struct _FLT_OBJECT * PFLT_OBJECT
unsigned int FrameID
Definition: fltmgrint.h:129
VOID(FLTAPI * PFLT_CONTEXT_CLEANUP_CALLBACK)(_In_ PFLT_CONTEXT Context, _In_ FLT_CONTEXT_TYPE ContextType)
Definition: fltkernel.h:494
NTSTATUS FltpDispatchHandler(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
Definition: Dispatch.c:103
ULONG PointerCount
Definition: fltmgrint.h:28
Definition: typedefs.h:117
struct _ALLOCATE_CONTEXT_HEADER * PALLOCATE_CONTEXT_HEADER
PVOID Frame
Definition: fltmgrint.h:64
volatile FLT_OBJECT_FLAGS Flags
Definition: fltmgrint.h:27
NPAGED_LOOKASIDE_LIST SmallIrpCtrlLookasideList
Definition: fltmgrint.h:146
ERESOURCE FilterUnloadLock
Definition: fltmgrint.h:140
VOID(FLTAPI * PFLT_INSTANCE_TEARDOWN_CALLBACK)(_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_TEARDOWN_FLAGS Reason)
Definition: fltkernel.h:568
PFLT_FILTER_UNLOAD_CALLBACK FilterUnload
Definition: fltmgrint.h:71
struct _FLTP_FRAME * PFLTP_FRAME
KEVENT DisconnectEvent
Definition: fltmgrint.h:198
NTSTATUS(FLTAPI * PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK)(_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_QUERY_TEARDOWN_FLAGS Flags)
Definition: fltkernel.h:555
struct _STREAM_LIST_CTRL * PSTREAM_LIST_CTRL
#define _In_
Definition: no_sal2.h:204
ERESOURCE NameCacheLock
Definition: fltmgrint.h:164
UNICODE_STRING Name
Definition: fltmgrint.h:65
ULONG_PTR SIZE_T
Definition: typedefs.h:78
_FLT_yINSTANCE_FLAGS
Definition: fltmgrint.h:92
char SmallIrpCtrlStackSize
Definition: fltmgrint.h:134
LIST_ENTRY Links
Definition: fltmgrint.h:128
FLT_TYPE Type
Definition: fltmgrint.h:127
LONG NTSTATUS
Definition: DriverTester.h:11
PFLT_CONTEXT_CLEANUP_CALLBACK ContextCleanupCallback
Definition: fltmgrint.h:37
PFLT_NORMALIZE_NAME_COMPONENT NormalizeNameComponent
Definition: fltmgrint.h:81
unsigned short USHORT
Definition: pedump.c:61
FLT_FILTER_FLAGS Flags
Definition: fltmgrint.h:67
PALLOCATE_CONTEXT_HEADER SupportedContextsListHead
Definition: fltmgrint.h:76
NTSTATUS NTAPI FltpObjectRundownWait(_Inout_ PEX_RUNDOWN_REF RundownRef)
Definition: Object.c:168
EX_RUNDOWN_REF MsgNotifRundownRef
Definition: fltmgrint.h:194
UNICODE_STRING AltitudeIntervalHigh
Definition: fltmgrint.h:132
VOID(FLTAPI * PFLT_DISCONNECT_NOTIFY)(_In_opt_ PVOID ConnectionCookie)
Definition: fltkernel.h:856
struct _FLT_MUTEX_LIST_HEAD * PFLT_MUTEX_LIST_HEAD
int AllNameContextsTemporary
Definition: fltmgrint.h:169
FAST_MUTEX mLock
Definition: fltmgrint.h:55
FLT_MUTEX_LIST_HEAD ZombiedFltObjectContexts
Definition: fltmgrint.h:139
struct _ALLOCATE_CONTEXT_HEADER ALLOCATE_CONTEXT_HEADER
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:179
struct _FLT_SERVER_PORT_OBJECT FLT_SERVER_PORT_OBJECT
struct _FLT_OBJECT FLT_OBJECT
NTSTATUS(FLTAPI * PFLT_INSTANCE_SETUP_CALLBACK)(_In_ PCFLT_RELATED_OBJECTS FltObjects, _In_ FLT_INSTANCE_SETUP_FLAGS Flags, _In_ DEVICE_TYPE VolumeDeviceType, _In_ FLT_FILESYSTEM_TYPE VolumeFilesystemType)
Definition: fltkernel.h:546
PVOID PIRP
Definition: usb.h:38
ULONG ERESOURCE
Definition: env_spec_w32.h:594
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS(FLTAPI * PFLT_MESSAGE_NOTIFY)(_In_opt_ PVOID PortCookie, _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, _In_ ULONG InputBufferLength, _Out_writes_bytes_to_opt_(OutputBufferLength,*ReturnOutputBufferLength) PVOID OutputBuffer, _In_ ULONG OutputBufferLength, _Out_ PULONG ReturnOutputBufferLength)
Definition: fltkernel.h:839
FLT_MUTEX_LIST_HEAD PortList
Definition: fltmgrint.h:87
UNICODE_STRING AltitudeIntervalLow
Definition: fltmgrint.h:131
NTSTATUS FltpDeviceControlHandler(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
Definition: Dispatch.c:37
LIST_ENTRY FilterLink
Definition: fltmgrint.h:116
struct _FLT_INSTANCE * PFLT_INSTANCE
UNICODE_STRING Altitude
Definition: fltmgrint.h:114
USHORT Signature
Definition: fltmgrint.h:102
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:178
enum _FLT_yINSTANCE_FLAGS FLT_INSTANCE_FLAGS
PFLT_GENERATE_FILE_NAME GenerateFileName
Definition: fltmgrint.h:80
ERESOURCE AltitudeLock
Definition: fltmgrint.h:130
PFLT_INSTANCE_TEARDOWN_CALLBACK InstanceTeardownComplete
Definition: fltmgrint.h:75
EX_PUSH_LOCK PortLock
Definition: fltmgrint.h:88
ERESOURCE ContextLock
Definition: fltmgrint.h:161
PFLT_SERVER_PORT_OBJECT ServerPort
Definition: fltmgrint.h:192
UNICODE_STRING DefaultAltitude
Definition: fltmgrint.h:66
struct _FLT_FILTER FLT_FILTER
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:86
ULONG OperationRundownRef
Definition: fltmgrint.h:110
FAST_MUTEX Lock
Definition: fltmgrint.h:195
ERESOURCE ContextLock
Definition: fltmgrint.h:117
char LargeIrpCtrlStackSize
Definition: fltmgrint.h:133
struct _FLT_MUTEX_LIST_HEAD FLT_MUTEX_LIST_HEAD