home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / ipxtfflt.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.5 KB  |  79 lines

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