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.

215 lines
6.4 KiB

  1. /*++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. ioTestLib.h
  5. Abstract:
  6. This contains internal defintions from the fileSpy library
  7. // @@BEGIN_DDKSPLIT
  8. Author:
  9. Neal Christiansen (NealCH) 27-Sep-2000
  10. // @@END_DDKSPLIT
  11. Environment:
  12. Library used by both USER and KERNEL mode components
  13. // @@BEGIN_DDKSPLIT
  14. Revision History:
  15. // @@END_DDKSPLIT
  16. --*/
  17. #ifndef __IOTESTLIB_H__
  18. #define __IOTESTLIB_H__
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. //
  23. // The types FASTIO that are available for the Type field of the
  24. // RECORD_FASTIO structure.
  25. //
  26. typedef enum {
  27. CHECK_IF_POSSIBLE = 1,
  28. READ,
  29. WRITE,
  30. QUERY_BASIC_INFO,
  31. QUERY_STANDARD_INFO,
  32. LOCK,
  33. UNLOCK_SINGLE,
  34. UNLOCK_ALL,
  35. UNLOCK_ALL_BY_KEY,
  36. DEVICE_CONTROL,
  37. DETACH_DEVICE,
  38. QUERY_NETWORK_OPEN_INFO,
  39. MDL_READ,
  40. MDL_READ_COMPLETE,
  41. MDL_WRITE,
  42. MDL_WRITE_COMPLETE,
  43. READ_COMPRESSED,
  44. WRITE_COMPRESSED,
  45. MDL_READ_COMPLETE_COMPRESSED,
  46. PREPARE_MDL_WRITE,
  47. MDL_WRITE_COMPLETE_COMPRESSED,
  48. QUERY_OPEN,
  49. FASTIO_MAX_OPERATION=QUERY_OPEN
  50. } FASTIO_TYPE/*, *PFASTIO_TYPE*/;
  51. //
  52. // Size of return name buffers
  53. //
  54. #define OPERATION_NAME_BUFFER_SIZE 80
  55. //
  56. // Function prototypes
  57. //
  58. extern
  59. VOID
  60. GetIrpName (
  61. IN UCHAR MajorCode,
  62. IN UCHAR MinorCode,
  63. IN ULONG FsctlCode,
  64. OUT PCHAR MajorCodeName,
  65. OUT PCHAR MinorCodeName);
  66. extern
  67. VOID
  68. GetFastioName (
  69. IN FASTIO_TYPE FastioCode,
  70. OUT PCHAR FastioName);
  71. extern
  72. VOID
  73. GetFsFilterOperationName (
  74. IN UCHAR FsFilterOperation,
  75. OUT PCHAR FsFilterOperationName);
  76. //
  77. // Service definitions
  78. //
  79. #define IOTEST_SERVICE_NAME L"IoTest"
  80. #define IOTEST_SERVICE_ACCESS (STANDARD_RIGHTS_REQUIRED | \
  81. SERVICE_QUERY_CONFIG | \
  82. SERVICE_QUERY_STATUS | \
  83. SERVICE_START)
  84. //
  85. // These are copied from NTIFS.H because we need them in user mode.
  86. //
  87. #define IRP_MJ_CREATE 0x00
  88. #define IRP_MJ_CREATE_NAMED_PIPE 0x01
  89. #define IRP_MJ_CLOSE 0x02
  90. #define IRP_MJ_READ 0x03
  91. #define IRP_MJ_WRITE 0x04
  92. #define IRP_MJ_QUERY_INFORMATION 0x05
  93. #define IRP_MJ_SET_INFORMATION 0x06
  94. #define IRP_MJ_QUERY_EA 0x07
  95. #define IRP_MJ_SET_EA 0x08
  96. #define IRP_MJ_FLUSH_BUFFERS 0x09
  97. #define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a
  98. #define IRP_MJ_SET_VOLUME_INFORMATION 0x0b
  99. #define IRP_MJ_DIRECTORY_CONTROL 0x0c
  100. #define IRP_MJ_FILE_SYSTEM_CONTROL 0x0d
  101. #define IRP_MJ_DEVICE_CONTROL 0x0e
  102. #define IRP_MJ_INTERNAL_DEVICE_CONTROL 0x0f
  103. #define IRP_MJ_SHUTDOWN 0x10
  104. #define IRP_MJ_LOCK_CONTROL 0x11
  105. #define IRP_MJ_CLEANUP 0x12
  106. #define IRP_MJ_CREATE_MAILSLOT 0x13
  107. #define IRP_MJ_QUERY_SECURITY 0x14
  108. #define IRP_MJ_SET_SECURITY 0x15
  109. #define IRP_MJ_POWER 0x16
  110. #define IRP_MJ_SYSTEM_CONTROL 0x17
  111. #define IRP_MJ_DEVICE_CHANGE 0x18
  112. #define IRP_MJ_QUERY_QUOTA 0x19
  113. #define IRP_MJ_SET_QUOTA 0x1a
  114. #define IRP_MJ_PNP 0x1b
  115. #define IRP_MJ_MAXIMUM_FUNCTION 0x1b
  116. #define IRP_MN_QUERY_DIRECTORY 0x01
  117. #define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02
  118. #define IRP_MN_USER_FS_REQUEST 0x00
  119. #define IRP_MN_MOUNT_VOLUME 0x01
  120. #define IRP_MN_VERIFY_VOLUME 0x02
  121. #define IRP_MN_LOAD_FILE_SYSTEM 0x03
  122. #define IRP_MN_TRACK_LINK 0x04
  123. #define IRP_MN_LOCK 0x01
  124. #define IRP_MN_UNLOCK_SINGLE 0x02
  125. #define IRP_MN_UNLOCK_ALL 0x03
  126. #define IRP_MN_UNLOCK_ALL_BY_KEY 0x04
  127. #define IRP_MN_NORMAL 0x00
  128. #define IRP_MN_DPC 0x01
  129. #define IRP_MN_MDL 0x02
  130. #define IRP_MN_COMPLETE 0x04
  131. #define IRP_MN_COMPRESSED 0x08
  132. #define IRP_MN_MDL_DPC (IRP_MN_MDL | IRP_MN_DPC)
  133. #define IRP_MN_COMPLETE_MDL (IRP_MN_COMPLETE | IRP_MN_MDL)
  134. #define IRP_MN_COMPLETE_MDL_DPC (IRP_MN_COMPLETE_MDL | IRP_MN_DPC)
  135. #define IRP_MN_SCSI_CLASS 0x01
  136. #define IRP_MN_START_DEVICE 0x00
  137. #define IRP_MN_QUERY_REMOVE_DEVICE 0x01
  138. #define IRP_MN_REMOVE_DEVICE 0x02
  139. #define IRP_MN_CANCEL_REMOVE_DEVICE 0x03
  140. #define IRP_MN_STOP_DEVICE 0x04
  141. #define IRP_MN_QUERY_STOP_DEVICE 0x05
  142. #define IRP_MN_CANCEL_STOP_DEVICE 0x06
  143. #define IRP_MN_QUERY_DEVICE_RELATIONS 0x07
  144. #define IRP_MN_QUERY_INTERFACE 0x08
  145. #define IRP_MN_QUERY_CAPABILITIES 0x09
  146. #define IRP_MN_QUERY_RESOURCES 0x0A
  147. #define IRP_MN_QUERY_RESOURCE_REQUIREMENTS 0x0B
  148. #define IRP_MN_QUERY_DEVICE_TEXT 0x0C
  149. #define IRP_MN_FILTER_RESOURCE_REQUIREMENTS 0x0D
  150. #define IRP_MN_READ_CONFIG 0x0F
  151. #define IRP_MN_WRITE_CONFIG 0x10
  152. #define IRP_MN_EJECT 0x11
  153. #define IRP_MN_SET_LOCK 0x12
  154. #define IRP_MN_QUERY_ID 0x13
  155. #define IRP_MN_QUERY_PNP_DEVICE_STATE 0x14
  156. #define IRP_MN_QUERY_BUS_INFORMATION 0x15
  157. #define IRP_MN_DEVICE_USAGE_NOTIFICATION 0x16
  158. #define IRP_MN_SURPRISE_REMOVAL 0x17
  159. #define IRP_MN_QUERY_LEGACY_BUS_INFORMATION 0x18
  160. #define IRP_MN_WAIT_WAKE 0x00
  161. #define IRP_MN_POWER_SEQUENCE 0x01
  162. #define IRP_MN_SET_POWER 0x02
  163. #define IRP_MN_QUERY_POWER 0x03
  164. #define IRP_MN_QUERY_ALL_DATA 0x00
  165. #define IRP_MN_QUERY_SINGLE_INSTANCE 0x01
  166. #define IRP_MN_CHANGE_SINGLE_INSTANCE 0x02
  167. #define IRP_MN_CHANGE_SINGLE_ITEM 0x03
  168. #define IRP_MN_ENABLE_EVENTS 0x04
  169. #define IRP_MN_DISABLE_EVENTS 0x05
  170. #define IRP_MN_ENABLE_COLLECTION 0x06
  171. #define IRP_MN_DISABLE_COLLECTION 0x07
  172. #define IRP_MN_REGINFO 0x08
  173. #define IRP_MN_EXECUTE_METHOD 0x09
  174. //
  175. // Lists of IRP names and FASTIO names
  176. //
  177. extern PWCHAR IrpNameList[IRP_MJ_MAXIMUM_FUNCTION+1];
  178. extern PWCHAR FastIoNameList[FASTIO_MAX_OPERATION];
  179. #ifdef __cplusplus
  180. }
  181. #endif
  182. #endif __IOTESTLIB_H__