6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 #pragma GCC system_header
36 #define DD_IPFLTRDRVR_DEVICE_NAME L"\\Device\\IPFILTERDRIVER"
38 #define INVALID_PF_IF_INDEX 0xffffffff
39 #define ZERO_PF_IP_ADDR 0
43 typedef enum _PF_FORWARD_ACTION
{
50 typedef PF_FORWARD_ACTION STDCALL
51 (*PacketFilterExtensionPtr
)(
52 /*IN*/ unsigned char *PacketHeader
,
53 /*IN*/ unsigned char *Packet
,
54 /*IN*/ unsigned int PacketLength
,
55 /*IN*/ unsigned int RecvInterfaceIndex
,
56 /*IN*/ unsigned int SendInterfaceIndex
,
57 /*IN*/ IPAddr RecvLinkNextHop
,
58 /*IN*/ IPAddr SendLinkNextHop
);
60 typedef struct _PF_SET_EXTENSION_HOOK_INFO
{
61 PacketFilterExtensionPtr ExtensionPointer
;
62 } PF_SET_EXTENSION_HOOK_INFO
, *PPF_SET_EXTENSION_HOOK_INFO
;
64 #define FSCTL_IPFLTRDRVR_BASE FILE_DEVICE_NETWORK
66 #define _IPFLTRDRVR_CTL_CODE(function, method, access) \
67 CTL_CODE(FSCTL_IPFLTRDRVR_BASE, function, method, access)
69 #define IOCTL_PF_SET_EXTENSION_POINTER \
70 _IPFLTRDRVR_CTL_CODE(22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
76 #endif /* __PFHOOK_H */