ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

pfhook.h
Go to the documentation of this file.
00001 /*
00002  * pfhook.h
00003  *
00004  * Packet filter API
00005  *
00006  * This file is part of the w32api package.
00007  *
00008  * Contributors:
00009  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
00010  *
00011  * THIS SOFTWARE IS NOT COPYRIGHTED
00012  *
00013  * This source code is offered for use in the public domain. You may
00014  * use, modify or distribute it freely.
00015  *
00016  * This code is distributed in the hope that it will be useful but
00017  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00018  * DISCLAIMED. This includes but is not limited to warranties of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  *
00021  */
00022 
00023 #ifndef __PFHOOK_H
00024 #define __PFHOOK_H
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 #define DD_IPFLTRDRVR_DEVICE_NAME         L"\\Device\\IPFILTERDRIVER"
00031 
00032 #define INVALID_PF_IF_INDEX               0xffffffff
00033 #define ZERO_PF_IP_ADDR                   0
00034 
00035 typedef ULONG IPAddr;
00036 
00037 typedef enum _PF_FORWARD_ACTION {
00038     PF_FORWARD = 0,
00039     PF_DROP = 1,
00040     PF_PASS = 2,
00041     PF_ICMP_ON_DROP = 3
00042 } PF_FORWARD_ACTION;
00043 
00044 typedef PF_FORWARD_ACTION
00045 (NTAPI *PacketFilterExtensionPtr)(
00046   IN unsigned char  *PacketHeader,
00047   IN unsigned char  *Packet,
00048   IN unsigned int  PacketLength,
00049   IN unsigned int  RecvInterfaceIndex,
00050   IN unsigned int  SendInterfaceIndex,
00051   IN IPAddr  RecvLinkNextHop,
00052   IN IPAddr  SendLinkNextHop);
00053 
00054 typedef struct _PF_SET_EXTENSION_HOOK_INFO {
00055   PacketFilterExtensionPtr  ExtensionPointer;
00056 } PF_SET_EXTENSION_HOOK_INFO, *PPF_SET_EXTENSION_HOOK_INFO;
00057 
00058 #define FSCTL_IPFLTRDRVR_BASE             FILE_DEVICE_NETWORK
00059 
00060 #define _IPFLTRDRVR_CTL_CODE(function, method, access) \
00061   CTL_CODE(FSCTL_IPFLTRDRVR_BASE, function, method, access)
00062 
00063 #define IOCTL_PF_SET_EXTENSION_POINTER \
00064   _IPFLTRDRVR_CTL_CODE(22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 #endif /* __PFHOOK_H */

Generated on Sun May 27 2012 04:30:14 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.