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.

231 lines
4.8 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. srvio.h
  5. Abstract:
  6. This module defines functions for building I/O request packets for
  7. the LAN Manager server.
  8. Author:
  9. Chuck Lenzmeier (chuckl) 1-Dec-1989
  10. Revision History:
  11. --*/
  12. #ifndef _SRVIO_
  13. #define _SRVIO_
  14. //#include <ntos.h>
  15. //
  16. // I/O request packet builders
  17. //
  18. PIRP
  19. SrvBuildIoControlRequest (
  20. IN OUT PIRP Irp OPTIONAL,
  21. IN PFILE_OBJECT FileObject OPTIONAL,
  22. IN PVOID Context,
  23. IN UCHAR MajorFunction,
  24. IN ULONG IoControlCode,
  25. IN PVOID MainBuffer,
  26. IN ULONG InputBufferLength,
  27. IN PVOID AuxiliaryBuffer OPTIONAL,
  28. IN ULONG OutputBufferLength,
  29. IN OUT PMDL Mdl OPTIONAL,
  30. IN PIO_COMPLETION_ROUTINE CompletionRoutine OPTIONAL
  31. );
  32. VOID
  33. SrvBuildFlushRequest (
  34. IN PIRP Irp,
  35. IN PFILE_OBJECT FileObject,
  36. IN PVOID Context OPTIONAL
  37. );
  38. VOID
  39. SrvBuildLockRequest (
  40. IN PIRP Irp,
  41. IN PFILE_OBJECT FileObject,
  42. IN PVOID Context OPTIONAL,
  43. IN LARGE_INTEGER ByteOffset,
  44. IN LARGE_INTEGER Length,
  45. IN ULONG Key,
  46. IN BOOLEAN FailImmediately,
  47. IN BOOLEAN ExclusiveLock
  48. );
  49. VOID
  50. SrvBuildReadOrWriteRequest (
  51. IN OUT PIRP Irp,
  52. IN PFILE_OBJECT FileObject,
  53. IN PVOID Context OPTIONAL,
  54. IN UCHAR MajorFunction,
  55. IN UCHAR MinorFunction,
  56. IN PVOID Buffer OPTIONAL,
  57. IN ULONG Length,
  58. IN OUT PMDL Mdl OPTIONAL,
  59. IN LARGE_INTEGER ByteOffset,
  60. IN ULONG Key OPTIONAL
  61. );
  62. PIRP
  63. SrvBuildNotifyChangeRequest (
  64. IN OUT PIRP Irp,
  65. IN PFILE_OBJECT FileObject,
  66. IN PVOID Context OPTIONAL,
  67. IN ULONG CompletionFilter,
  68. IN PVOID Buffer,
  69. IN ULONG BufferLength,
  70. IN BOOLEAN WatchTree
  71. );
  72. VOID
  73. SrvBuildMailslotWriteRequest (
  74. IN PIRP Irp,
  75. IN PFILE_OBJECT FileObject,
  76. IN PVOID Context OPTIONAL,
  77. IN PVOID Buffer OPTIONAL,
  78. IN ULONG Length
  79. );
  80. NTSTATUS
  81. SrvIssueMdlCompleteRequest (
  82. IN PWORK_CONTEXT WorkContext OPTIONAL,
  83. IN PFILE_OBJECT FileObject OPTIONAL,
  84. IN PMDL Mdl,
  85. IN UCHAR Function,
  86. IN PLARGE_INTEGER ByteOffset,
  87. IN ULONG Length
  88. );
  89. NTSTATUS
  90. SrvIssueAssociateRequest (
  91. IN PFILE_OBJECT FileObject,
  92. IN PDEVICE_OBJECT *DeviceObject,
  93. IN HANDLE AddressFileHandle
  94. );
  95. NTSTATUS
  96. SrvIssueDisconnectRequest (
  97. IN PFILE_OBJECT FileObject,
  98. IN PDEVICE_OBJECT *DeviceObject,
  99. IN ULONG Flags
  100. );
  101. NTSTATUS
  102. SrvIssueTdiAction (
  103. IN PFILE_OBJECT FileObject,
  104. IN PDEVICE_OBJECT *DeviceObject,
  105. IN PCHAR Buffer,
  106. IN ULONG BufferLength
  107. );
  108. NTSTATUS
  109. SrvIssueTdiQuery (
  110. IN PFILE_OBJECT FileObject,
  111. IN PDEVICE_OBJECT *DeviceObject,
  112. IN PCHAR Buffer,
  113. IN ULONG BufferLength,
  114. IN ULONG QueryType
  115. );
  116. NTSTATUS
  117. SrvIssueQueryDirectoryRequest (
  118. IN HANDLE FileHandle,
  119. IN PCHAR Buffer,
  120. IN ULONG Length,
  121. IN FILE_INFORMATION_CLASS FileInformationClass,
  122. IN PUNICODE_STRING FileName OPTIONAL,
  123. IN PULONG FileIndex OPTIONAL,
  124. IN BOOLEAN RestartScan,
  125. IN BOOLEAN SingleEntriesOnly
  126. );
  127. NTSTATUS
  128. SrvIssueQueryEaRequest (
  129. IN HANDLE FileHandle,
  130. IN PVOID Buffer,
  131. IN ULONG Length,
  132. IN PVOID EaList OPTIONAL,
  133. IN ULONG EaListLength,
  134. IN BOOLEAN RestartScan,
  135. OUT PULONG EaErrorOffset OPTIONAL
  136. );
  137. NTSTATUS
  138. SrvIssueSendDatagramRequest (
  139. IN PFILE_OBJECT FileObject,
  140. IN PDEVICE_OBJECT *DeviceObject,
  141. IN PTDI_CONNECTION_INFORMATION SendDatagramInformation,
  142. IN PVOID Buffer,
  143. IN ULONG Length
  144. );
  145. NTSTATUS
  146. SrvIssueSetClientProcessRequest (
  147. IN PFILE_OBJECT FileObject,
  148. IN PDEVICE_OBJECT *DeviceObject,
  149. IN PCONNECTION Connection,
  150. IN PVOID ClientSession,
  151. IN PVOID ClientProcess
  152. );
  153. NTSTATUS
  154. SrvIssueSetEaRequest (
  155. IN HANDLE FileHandle,
  156. IN PVOID Buffer,
  157. IN ULONG Length,
  158. OUT PULONG EaErrorOffset OPTIONAL
  159. );
  160. NTSTATUS
  161. SrvIssueSetEventHandlerRequest (
  162. IN PFILE_OBJECT FileObject,
  163. IN PDEVICE_OBJECT *DeviceObject,
  164. IN ULONG EventType,
  165. IN PVOID EventHandler,
  166. IN PVOID EventContext
  167. );
  168. NTSTATUS
  169. SrvIssueUnlockRequest (
  170. IN PFILE_OBJECT FileObject,
  171. IN PDEVICE_OBJECT *DeviceObject,
  172. IN UCHAR UnlockOperation,
  173. IN LARGE_INTEGER ByteOffset,
  174. IN LARGE_INTEGER Length,
  175. IN ULONG Key
  176. );
  177. NTSTATUS
  178. SrvIssueUnlockSingleRequest (
  179. IN PFILE_OBJECT FileObject,
  180. IN PDEVICE_OBJECT *DeviceObject,
  181. IN LARGE_INTEGER ByteOffset,
  182. IN LARGE_INTEGER Length,
  183. IN ULONG Key
  184. );
  185. NTSTATUS
  186. SrvIssueWaitForOplockBreak (
  187. IN HANDLE FileHandle,
  188. PWAIT_FOR_OPLOCK_BREAK WaitForOplockBreak
  189. );
  190. VOID
  191. SrvQuerySendEntryPoint(
  192. IN PFILE_OBJECT FileObject,
  193. IN PDEVICE_OBJECT *DeviceObject,
  194. IN ULONG IoControlCode,
  195. IN PVOID *EntryPoint
  196. );
  197. #endif // ndef _SRVIO_