WDK Mini Filter Example
avscan/filter/utility.h File Reference

Go to the source code of this file.

Data Structures

union  _AV_FILE_REFERENCE
 
struct  _AV_GENERIC_TABLE_ENTRY
 

Macros

#define AV_STRING_TAG   'tSvA'
 
#define AV_RESOURCE_TAG   'cRvA'
 
#define AV_KEVENT_TAG   'eKvA'
 
#define AV_TABLE_ENTRY_TAG   'eTvA'
 
#define AV_INVALID_FILE_REFERENCE(_fileid_)
 
#define AV_SET_INVALID_FILE_REFERENCE(_fileid_)
 
#define AV_GENERIC_TABLE_ENTRY_SIZE   sizeof( AV_GENERIC_TABLE_ENTRY )
 
#define FS_SUPPORTS_FILE_STATE_CACHE(VolumeFilesystemType)
 
#define LIST_FOR_EACH_SAFE(curr, n, head)
 

Typedefs

typedef union _AV_FILE_REFERENCE AV_FILE_REFERENCE
 
typedef union _AV_FILE_REFERENCEPAV_FILE_REFERENCE
 
typedef struct _AV_GENERIC_TABLE_ENTRY AV_GENERIC_TABLE_ENTRY
 
typedef struct _AV_GENERIC_TABLE_ENTRYPAV_GENERIC_TABLE_ENTRY
 

Functions

FORCEINLINE PERESOURCE AvAllocateResource (VOID)
 
FORCEINLINE VOID AvFreeResource (_In_ PERESOURCE Resource)
 
FORCEINLINE PKEVENT AvAllocateKevent (VOID)
 
FORCEINLINE VOID AvFreeKevent (_In_ PKEVENT Event)
 
NTSTATUS AvGetFileId (_In_ PFLT_INSTANCE Instance, _In_ PFILE_OBJECT FileObject, _Out_ PAV_FILE_REFERENCE FileId)
 
NTSTATUS AvGetFileSize (_In_ PFLT_INSTANCE Instance, _In_ PFILE_OBJECT FileObject, _Out_ PLONGLONG Size)
 
NTSTATUS AvGetFileEncrypted (_In_ PFLT_INSTANCE Instance, _In_ PFILE_OBJECT FileObject, _Out_ PBOOLEAN Encrypted)
 
LONG AvExceptionFilter (_In_ PEXCEPTION_POINTERS ExceptionPointer, _In_ BOOLEAN AccessingUserBuffer)
 
FORCEINLINE VOID _Acquires_lock_ (_Global_critical_region_) AvAcquireResourceExclusive(_Inout_ _Acquires_exclusive_lock_(*Resource) PERESOURCE Resource)
 
FORCEINLINE VOID _Releases_lock_ (_Global_critical_region_) _Requires_lock_held_(_Global_critical_region_) AvReleaseResource(_Inout_ _Requires_lock_held_(*Resource) _Releases_lock_(*Resource) PERESOURCE Resource)
 

Variables

RTL_GENERIC_COMPARE_ROUTINE AvCompareEntry
 
RTL_GENERIC_ALLOCATE_ROUTINE AvAllocateGenericTableEntry
 
RTL_GENERIC_FREE_ROUTINE AvFreeGenericTableEntry
 

Macro Definition Documentation

◆ AV_GENERIC_TABLE_ENTRY_SIZE

#define AV_GENERIC_TABLE_ENTRY_SIZE   sizeof( AV_GENERIC_TABLE_ENTRY )

Definition at line 75 of file avscan/filter/utility.h.

◆ AV_INVALID_FILE_REFERENCE

#define AV_INVALID_FILE_REFERENCE (   _fileid_)
Value:
(((_fileid_).FileId64.UpperZeroes == 0ll) && \
((_fileid_).FileId64.Value == (ULONGLONG)FILE_INVALID_FILE_ID))

Definition at line 37 of file avscan/filter/utility.h.

◆ AV_KEVENT_TAG

#define AV_KEVENT_TAG   'eKvA'

Definition at line 26 of file avscan/filter/utility.h.

◆ AV_RESOURCE_TAG

#define AV_RESOURCE_TAG   'cRvA'

Definition at line 25 of file avscan/filter/utility.h.

◆ AV_SET_INVALID_FILE_REFERENCE

#define AV_SET_INVALID_FILE_REFERENCE (   _fileid_)
Value:
(_fileid_).FileId64.UpperZeroes = 0ll;\
(_fileid_).FileId64.Value = (ULONGLONG)FILE_INVALID_FILE_ID;

Definition at line 41 of file avscan/filter/utility.h.

◆ AV_STRING_TAG

#define AV_STRING_TAG   'tSvA'

Definition at line 24 of file avscan/filter/utility.h.

◆ AV_TABLE_ENTRY_TAG

#define AV_TABLE_ENTRY_TAG   'eTvA'

Definition at line 27 of file avscan/filter/utility.h.

◆ FS_SUPPORTS_FILE_STATE_CACHE

#define FS_SUPPORTS_FILE_STATE_CACHE (   VolumeFilesystemType)
Value:
( ((VolumeFilesystemType) == FLT_FSTYPE_NTFS) || \
((VolumeFilesystemType) == FLT_FSTYPE_CSVFS) || \
((VolumeFilesystemType) == FLT_FSTYPE_REFS) )

Definition at line 117 of file avscan/filter/utility.h.

◆ LIST_FOR_EACH_SAFE

#define LIST_FOR_EACH_SAFE (   curr,
  n,
  head 
)
Value:
for (curr = (head)->Flink , n = curr->Flink ; curr != (head); \
curr = n, n = curr->Flink )

Definition at line 247 of file avscan/filter/utility.h.

Typedef Documentation

◆ AV_FILE_REFERENCE

◆ AV_GENERIC_TABLE_ENTRY

◆ PAV_FILE_REFERENCE

◆ PAV_GENERIC_TABLE_ENTRY

Function Documentation

◆ _Acquires_lock_()

_Acquires_lock_ ( _Global_critical_region_  )

Definition at line 205 of file avscan/filter/utility.h.

◆ _Releases_lock_()

_Releases_lock_ ( _Global_critical_region_  )

Definition at line 233 of file avscan/filter/utility.h.

◆ AvAllocateKevent()

FORCEINLINE PKEVENT AvAllocateKevent ( VOID  )

Definition at line 152 of file avscan/filter/utility.h.

◆ AvAllocateResource()

FORCEINLINE PERESOURCE AvAllocateResource ( VOID  )

Definition at line 125 of file avscan/filter/utility.h.

◆ AvExceptionFilter()

LONG AvExceptionFilter ( _In_ PEXCEPTION_POINTERS  ExceptionPointer,
_In_ BOOLEAN  AccessingUserBuffer 
)

Definition at line 327 of file filter/utility.c.

◆ AvFreeKevent()

FORCEINLINE VOID AvFreeKevent ( _In_ PKEVENT  Event)

Definition at line 167 of file avscan/filter/utility.h.

◆ AvFreeResource()

FORCEINLINE VOID AvFreeResource ( _In_ PERESOURCE  Resource)

Definition at line 141 of file avscan/filter/utility.h.

◆ AvGetFileEncrypted()

NTSTATUS AvGetFileEncrypted ( _In_ PFLT_INSTANCE  Instance,
_In_ PFILE_OBJECT  FileObject,
_Out_ PBOOLEAN  Encrypted 
)

Definition at line 279 of file filter/utility.c.

◆ AvGetFileId()

NTSTATUS AvGetFileId ( _In_ PFLT_INSTANCE  Instance,
_In_ PFILE_OBJECT  FileObject,
_Out_ PAV_FILE_REFERENCE  FileId 
)

Definition at line 156 of file filter/utility.c.

◆ AvGetFileSize()

NTSTATUS AvGetFileSize ( _In_ PFLT_INSTANCE  Instance,
_In_ PFILE_OBJECT  FileObject,
_Out_ PLONGLONG  Size 
)

Definition at line 231 of file filter/utility.c.

Variable Documentation

◆ AvAllocateGenericTableEntry

RTL_GENERIC_ALLOCATE_ROUTINE AvAllocateGenericTableEntry

Definition at line 109 of file avscan/filter/utility.h.

◆ AvCompareEntry

RTL_GENERIC_COMPARE_ROUTINE AvCompareEntry

Definition at line 107 of file avscan/filter/utility.h.

◆ AvFreeGenericTableEntry

RTL_GENERIC_FREE_ROUTINE AvFreeGenericTableEntry

Definition at line 111 of file avscan/filter/utility.h.

Social Network


Services Overview

Architect, implement and test file system filter drivers for a wide range of functionality. We can offer several levels of assistance to meet your specific.

Contact Us

You are welcome to contact us for salse or partnership.

Sales: sales@easefilter.com
Support: support@easefilter.com
Info: info@easefilter.com