Sample Code

Windows Driver Samples/ Windows Filtering Platform Sample/ C++/ sys/ Framework_WFPSamplerCalloutDriver.h/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
////////////////////////////////////////////////////////////////////////////////////////////////////
//
//   Copyright (c) 2012 Microsoft Corporation.  All Rights Reserved.
//
//   Module Name:
//      Framework_WFPSamplerCalloutDriver.h
//
//   Abstract:
//
//   Author:
//      Dusty Harper      (DHarper)
//
//   Revision History:
//
//      [ Month ][Day] [Year] - [Revision]-[ Comments ]
//      May       01,   2010  -     1.0   -  Creation
//
////////////////////////////////////////////////////////////////////////////////////////////////////
 
#ifndef FRAMEWORK_WFP_SAMPLER_CALLOUT_DRIVER_H
#define FRAMEWORK_WFP_SAMPLER_CALLOUT_DRIVER_H
 
extern "C"
{
#pragma warning(push)
#pragma warning(disable: 4201) /// NAMELESS_STRUCT_UNION
#pragma warning(disable: 4324) /// STRUCTURE_PADDED
 
   #include <ntifs.h>                    /// IfsKit\Inc
   #include <ntddk.h>                    /// Inc
   #include <wdf.h>                      /// Inc\WDF\KMDF\1.9
   #include <ndis.h>                     /// Inc
   #include <fwpmk.h>                    /// Inc
   #include <fwpsk.h>                    /// Inc
   #include <netioddk.h>                 /// Inc
   #include <ntintsafe.h>                /// Inc
   #include <ntstrsafe.h>                /// Inc
   #include <stdlib.h>                   /// SDK\Inc\CRT
 
#pragma warning(pop)
}
 
#include "Identifiers.h"                     /// ..\Inc
#include "ProviderContexts.h"                /// ..\Inc
#include "HelperFunctions_Include.h"         /// ..\SysLib
#include "HelperFunctions_ExposedCallouts.h" /// .
#include "ClassifyFunctions_Include.h"       /// .
#include "CompletionFunctions_Include.h"     /// .
#include "NotifyFunctions_Include.h"         /// .
#include "SubscriptionFunctions_Include.h"   /// .
 
#define WFPSAMPLER_CALLOUT_DRIVER_TAG (UINT32)'DCSW'
 
typedef struct WFPSAMPLER_DEVICE_DATA_
{
   HANDLE*                pEngineHandle;
   INJECTION_HANDLE_DATA* pIPv4InboundInjectionHandles;
   INJECTION_HANDLE_DATA* pIPv4OutboundInjectionHandles;
   INJECTION_HANDLE_DATA* pIPv6InboundInjectionHandles;
   INJECTION_HANDLE_DATA* pIPv6OutboundInjectionHandles;
   INJECTION_HANDLE_DATA* pInboundInjectionHandles;
   INJECTION_HANDLE_DATA* pOutboundInjectionHandles;
}WFPSAMPLER_DEVICE_DATA, *PWFPSAMPLER_DEVICE_DATA;
 
typedef struct DEVICE_EXTENSION_
{
   VOID*            pRegistration;
   PCALLBACK_OBJECT pCallbackObject;
}DEVICE_EXTENSION, *PDEVICE_EXTENSION;
 
 
typedef struct SERIALIZATION_LIST_
{
   KSPIN_LOCK  spinlock;
   LIST_ENTRY  listHead;
   UINT64      numEntries;
}SERIALIZATION_LIST, *PSERIALIZATION_LIST;
 
extern PDEVICE_OBJECT g_pWDMDevice;
 
extern WDFDRIVER g_WDFDriver;
extern WDFDEVICE g_WDFDevice;
 
extern HANDLE g_bfeSubscriptionHandle;
 
extern WFPSAMPLER_DEVICE_DATA g_WFPSamplerDeviceData;
 
extern DEVICE_EXTENSION g_deviceExtension;
 
extern BOOLEAN g_calloutsRegistered;
 
extern SERIALIZATION_LIST g_bsiSerializationList;
 
#endif /// FRAMEWORK_WFP_SAMPLER_CALLOUT_DRIVER_H

Our Services

  • What our customers say about us?

© 2011-2025 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS