home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / ipxtfflt.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  2KB  |  72 lines

  1. /*
  2.     File  ipxfltdf.h
  3.  
  4.     Defines structures used with the ipx filter driver.
  5. */
  6.  
  7. #ifndef __ipxfltdf_h
  8. #define __ipxfltdf_h
  9.  
  10. //*** IPX Traffic Filters ***
  11. typedef struct _IPX_TRAFFIC_FILTER_GLOBAL_INFO {
  12.     ULONG    FilterAction;    // Action if there is a match with
  13.                     // any filter on the interface
  14. } IPX_TRAFFIC_FILTER_GLOBAL_INFO, *PIPX_TRAFFIC_FILTER_GLOBAL_INFO;
  15.  
  16. // FilterAction
  17.  
  18. #define IPX_TRAFFIC_FILTER_ACTION_PERMIT    1
  19. #define IPX_TRAFFIC_FILTER_ACTION_DENY        2
  20.  
  21. // general traffic filter info structure
  22.  
  23. typedef struct _IPX_TRAFFIC_FILTER_INFO {
  24.  
  25.     ULONG    FilterDefinition;
  26.     UCHAR    DestinationNetwork[4];
  27.     UCHAR    DestinationNetworkMask[4];
  28.     UCHAR    DestinationNode[6];
  29.     UCHAR    DestinationSocket[2];
  30.     UCHAR    SourceNetwork[4];
  31.     UCHAR    SourceNetworkMask[4];
  32.     UCHAR    SourceNode[6];
  33.     UCHAR    SourceSocket[2];
  34.     UCHAR    PacketType;
  35.     } IPX_TRAFFIC_FILTER_INFO, *PIPX_TRAFFIC_FILTER_INFO;
  36.  
  37. // FilterDefinition - Flags to specify relevant IPX address fields to filter on
  38. #define IPX_TRAFFIC_FILTER_ON_SRCNET    0x00000001
  39. #define IPX_TRAFFIC_FILTER_ON_SRCNODE    0x00000002
  40. #define IPX_TRAFFIC_FILTER_ON_SRCSOCKET    0x00000004
  41.  
  42. #define IPX_TRAFFIC_FILTER_ON_DSTNET    0x00000010
  43. #define IPX_TRAFFIC_FILTER_ON_DSTNODE    0x00000020
  44. #define IPX_TRAFFIC_FILTER_ON_DSTSOCKET    0x00000040
  45.  
  46. #define IPX_TRAFFIC_FILTER_ON_PKTTYPE    0x00000100
  47. #define IPX_TRAFFIC_FILTER_LOG_MATCHES    0x80000000
  48.  
  49. typedef struct _FLT_IF_SET_PARAMS {
  50.     ULONG            InterfaceIndex;    // Index of the interface
  51.     ULONG            FilterAction;    // Filter action
  52.     ULONG            FilterSize;    // sizeof (IPX_TRAFFIC_FILTER_INFO)
  53. } FLT_IF_SET_PARAMS, *PFLT_IF_SET_PARAMS;
  54.  
  55. typedef struct _FLT_IF_GET_PARAMS {
  56.     ULONG            FilterAction;    // Filter action
  57.     ULONG            FilterSize;    // sizeof (IPX_TRAFFIC_FILTER_INFO)
  58.     ULONG            TotalSize;    // Total size of filter description
  59.                         // array
  60. } FLT_IF_GET_PARAMS, *PFLT_IF_GET_PARAMS;
  61.  
  62. typedef struct _FLT_PACKET_LOG {
  63.     ULONG            SrcIfIdx;    // Index of source if (-1 - unknown)
  64.     ULONG            DstIfIdx;    // Index of dest if (-1 - unknown)
  65.     USHORT            DataSize;    // Total size of the data (at least 30)
  66.     USHORT            SeqNum;        // Sequence number to account for 
  67.                         // packets lost to lack of buffer space
  68.     UCHAR            Header[30];    // IPX packet header followed by the
  69.                         // data if any
  70. } FLT_PACKET_LOG, *PFLT_PACKET_LOG;
  71.  
  72. #endif