Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
5.4 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. private\inc\ipxtfflt.h
  5. Abstract:
  6. Interface with ipx filter driver
  7. Filter structure definitions
  8. Author:
  9. Vadim Eydelman
  10. Revision History:
  11. --*/
  12. #ifndef _IPXTFFLT_
  13. #define _IPXTFFLT_
  14. // Filter driver exported device object name
  15. #define IPXFLT_NAME L"\\Device\\NwLnkFlt"
  16. // Networks device (implies certain admin access privilegies)
  17. #define FILE_DEVICE_IPXFLT FILE_DEVICE_NETWORK
  18. // All our IOCLTS are custom (private to this driver only)
  19. #define IPXFWD_IOCTL_INDEX (ULONG)0x00000800
  20. // Starts the driver
  21. // Parameters:
  22. // IN InputBuffer - NULL
  23. // IN InputBufferSize - 0
  24. // IN OutputBuffer - NULL
  25. // IN OutputBufferSize - 0
  26. // Returns:
  27. // Status:
  28. // STATUS_SUCCESS - driver was started ok
  29. // STATUS_INVALID_PARAMETER - invalid input parameter
  30. // STATUS_INSUFFICIENT_RESOURCES - not enough resources to allocate
  31. // all internal structures
  32. #define IOCTL_FLT_START \
  33. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+0,METHOD_IN_DIRECT,FILE_ANY_ACCESS)
  34. // Sets input filters on interface
  35. // Parameters:
  36. // IN InputBuffer - FLT_IF_SET_PARAMS
  37. // IN InputBufferSize - sizeof (FLT_IF_SET_PARAMS)
  38. // IN OutputBuffer - array of TRAFFIC_FILTER_INFO blocks
  39. // IN OutputBufferSize - size of the OutputBuffer
  40. // Returns:
  41. // Status:
  42. // STATUS_SUCCESS - filters were set ok
  43. // STATUS_INVALID_PARAMETER - invalid input parameter
  44. // STATUS_INSUFFICIENT_RESOURCES - not enough memory to allocate
  45. // filter description block
  46. #define IOCTL_FLT_IF_SET_IN_FILTERS \
  47. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+1,METHOD_IN_DIRECT,FILE_ANY_ACCESS)
  48. // Sets output filters on interface
  49. // Parameters:
  50. // IN InputBuffer - FLT_IF_SET_PARAMS
  51. // IN InputBufferSize - sizeof (FLT_IF_SET_PARAMS)
  52. // IN OutputBuffer - array of TRAFFIC_FILTER_INFO blocks
  53. // IN OutputBufferSize - size of the OutputBuffer
  54. // Returns:
  55. // Status:
  56. // STATUS_SUCCESS - filters were set ok
  57. // STATUS_INVALID_PARAMETER - invalid input parameter
  58. // STATUS_INSUFFICIENT_RESOURCES - not enough memory to allocate
  59. // filter description block
  60. #define IOCTL_FLT_IF_SET_OUT_FILTERS \
  61. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+2,METHOD_IN_DIRECT,FILE_ANY_ACCESS)
  62. // Resets (deletes) all input filters on interface
  63. // Parameters:
  64. // IN InputBuffer - interface index
  65. // IN InputBufferSize - sizeof (ULONG)
  66. // IN OutputBuffer - NULL
  67. // IN OutputBufferSize - 0
  68. // Returns:
  69. // Status:
  70. // STATUS_SUCCESS - filters were reset ok
  71. // STATUS_INVALID_PARAMETER - invalid input parameter
  72. #define IOCTL_FLT_IF_RESET_IN_FILTERS \
  73. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+3,METHOD_BUFFERED,FILE_ANY_ACCESS)
  74. // Resets (deletes) all output filters on interface
  75. // Parameters:
  76. // IN InputBuffer - interface index
  77. // IN InputBufferSize - sizeof (ULONG)
  78. // IN OutputBuffer - NULL
  79. // IN OutputBufferSize - 0
  80. // Returns:
  81. // Status:
  82. // STATUS_SUCCESS - filters were reset ok
  83. // STATUS_INVALID_PARAMETER - invalid input parameter
  84. #define IOCTL_FLT_IF_RESET_OUT_FILTERS \
  85. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+4,METHOD_BUFFERED,FILE_ANY_ACCESS)
  86. // Returns input filters on interface
  87. // Parameters:
  88. // IN InputBuffer - interface index
  89. // IN InputBufferSize - sizeof (ULONG)
  90. // OUT OutputBuffer - buffer to receive FLT_IF_GET_PARAMS followed
  91. // by the TRAFFIC_FILTER_INFO array
  92. // IN OutputBufferSize - at least sizeof (FLT_IF_GET_PARAMS)
  93. // Returns:
  94. // Status:
  95. // STATUS_SUCCESS - all filters on interface were returned in
  96. // the output buffer
  97. // STATUS_BUFFER_OVERFLOW - out but buffer is too small to return
  98. // all the filters, only those that fit were
  99. // placed in the buffer
  100. // STATUS_INVALID_PARAMETER - invalid input parameter
  101. // Information:
  102. // Total number of bytes placed in the output buffer
  103. #define IOCTL_FLT_IF_GET_IN_FILTERS \
  104. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+5,METHOD_OUT_DIRECT,FILE_ANY_ACCESS)
  105. // Returns input filters on interface
  106. // Parameters:
  107. // IN InputBuffer - interface index
  108. // IN InputBufferSize - sizeof (ULONG)
  109. // OUT OutputBuffer - buffer to receive FLT_IF_GET_PARAMS followed
  110. // by the TRAFFIC_FILTER_INFO array
  111. // IN OutputBufferSize - at least sizeof (FLT_IF_GET_PARAMS)
  112. // Returns:
  113. // Status:
  114. // STATUS_SUCCESS - all filters on interface were returned in
  115. // the output buffer
  116. // STATUS_BUFFER_OVERFLOW - out but buffer is too small to return
  117. // all the filters, only those that fit were
  118. // placed in the buffer
  119. // STATUS_INVALID_PARAMETER - invalid input parameter
  120. // Information:
  121. // Total number of bytes placed in the output buffer
  122. #define IOCTL_FLT_IF_GET_OUT_FILTERS \
  123. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+6,METHOD_OUT_DIRECT,FILE_ANY_ACCESS)
  124. // Returns logged packets
  125. // Parameters:
  126. // IN InputBuffer - NULL
  127. // IN InputBufferSize - 0
  128. // OUT OutputBuffer - buffer to receive logged packets
  129. // IN OutputBufferSize - at least sizeof (FLT_PACKET_LOG)
  130. // Returns:
  131. // Status:
  132. // STATUS_SUCCESS - all filters on interface were returned in
  133. // the output buffer
  134. // STATUS_INVALID_PARAMETER - invalid input parameter
  135. // Information:
  136. // Total number of bytes placed in the output buffer
  137. #define IOCTL_FLT_GET_LOGGED_PACKETS \
  138. CTL_CODE(FILE_DEVICE_IPXFWD,IPXFWD_IOCTL_INDEX+7,METHOD_OUT_DIRECT,FILE_ANY_ACCESS)
  139. #endif