ReactOS 0.4.15-dev-7659-ga55345b
pfhook.h
Go to the documentation of this file.
1/*
2 * pfhook.h
3 *
4 * Packet filter API
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
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.
20 *
21 */
22
23#ifndef __PFHOOK_H
24#define __PFHOOK_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#define DD_IPFLTRDRVR_DEVICE_NAME L"\\Device\\IPFILTERDRIVER"
31
32#define INVALID_PF_IF_INDEX 0xffffffff
33#define ZERO_PF_IP_ADDR 0
34
35typedef ULONG IPAddr;
36
37typedef enum _PF_FORWARD_ACTION {
43
46 IN unsigned char *PacketHeader,
47 IN unsigned char *Packet,
48 IN unsigned int PacketLength,
49 IN unsigned int RecvInterfaceIndex,
50 IN unsigned int SendInterfaceIndex,
51 IN IPAddr RecvLinkNextHop,
52 IN IPAddr SendLinkNextHop);
53
57
58#define FSCTL_IPFLTRDRVR_BASE FILE_DEVICE_NETWORK
59
60#define _IPFLTRDRVR_CTL_CODE(function, method, access) \
61 CTL_CODE(FSCTL_IPFLTRDRVR_BASE, function, method, access)
62
63#define IOCTL_PF_SET_EXTENSION_POINTER \
64 _IPFLTRDRVR_CTL_CODE(22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif /* __PFHOOK_H */
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1549
_PF_FORWARD_ACTION
Definition: pfhook.h:37
@ PF_ICMP_ON_DROP
Definition: pfhook.h:41
@ PF_DROP
Definition: pfhook.h:39
@ PF_PASS
Definition: pfhook.h:40
@ PF_FORWARD
Definition: pfhook.h:38
PF_FORWARD_ACTION(NTAPI * PacketFilterExtensionPtr)(IN unsigned char *PacketHeader, IN unsigned char *Packet, IN unsigned int PacketLength, IN unsigned int RecvInterfaceIndex, IN unsigned int SendInterfaceIndex, IN IPAddr RecvLinkNextHop, IN IPAddr SendLinkNextHop)
Definition: pfhook.h:45
struct _PF_SET_EXTENSION_HOOK_INFO * PPF_SET_EXTENSION_HOOK_INFO
ULONG IPAddr
Definition: pfhook.h:35
enum _PF_FORWARD_ACTION PF_FORWARD_ACTION
struct _PF_SET_EXTENSION_HOOK_INFO PF_SET_EXTENSION_HOOK_INFO
PacketFilterExtensionPtr ExtensionPointer
Definition: pfhook.h:55
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59