home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / IPXTFFLT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  2.4 KB  |  74 lines

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