Source code of Windows XP (NT5)
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.

208 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. Rxdevice.h
  5. Abstract:
  6. Private header file for the Rx DRT ( Redirector FSCTL calls )
  7. Author:
  8. Balan Sethu Raman -- Created from the workstation service code
  9. Revision History:
  10. --*/
  11. #ifndef _RXDEVICE_INCLUDED_
  12. #define _RXDEVICE_INCLUDED_
  13. #include <ntddnfs2.h> // Rdr2 include file
  14. #include <ntddbrow.h> // Datagram receiver include file
  15. typedef struct _RX_BIND_REDIR {
  16. HANDLE EventHandle;
  17. BOOL Bound;
  18. IO_STATUS_BLOCK IoStatusBlock;
  19. LMR_REQUEST_PACKET Packet;
  20. } RX_BIND_REDIR, *PRX_BIND_REDIR;
  21. typedef struct _RX_BIND_DGREC {
  22. HANDLE EventHandle;
  23. BOOL Bound;
  24. IO_STATUS_BLOCK IoStatusBlock;
  25. LMDR_REQUEST_PACKET Packet;
  26. } RX_BIND_DGREC, *PRX_BIND_DGREC;
  27. typedef struct _RX_BIND {
  28. LIST_ENTRY ListEntry;
  29. PRX_BIND_REDIR Redir;
  30. PRX_BIND_DGREC Dgrec;
  31. ULONG TransportNameLength; // not including terminator
  32. WCHAR TransportName[1]; // Name of transport provider
  33. } RX_BIND, *PRX_BIND;
  34. typedef enum _DDTYPE {
  35. Redirector,
  36. DatagramReceiver
  37. } DDTYPE, *PDDTYPE;
  38. //
  39. // Binding/Unbinding related functions
  40. //
  41. extern NTSTATUS
  42. RxBindTransport(
  43. IN LPTSTR TransportName,
  44. IN DWORD QualityOfService,
  45. OUT LPDWORD ErrorParameter OPTIONAL
  46. );
  47. extern NTSTATUS
  48. RxBindToTransports(
  49. VOID
  50. );
  51. extern NTSTATUS
  52. RxUnbindTransport(
  53. IN LPTSTR TransportName,
  54. IN DWORD ForceLevel
  55. );
  56. extern NTSTATUS
  57. RxAsyncBindTransport(
  58. IN LPTSTR transportName,
  59. IN DWORD qualityOfService,
  60. IN PLIST_ENTRY pHeader
  61. );
  62. extern VOID
  63. RxUnbindTransport2(
  64. IN PRX_BIND pBind
  65. );
  66. //
  67. // Loading and unloading drivers
  68. //
  69. NTSTATUS
  70. RxUnloadDriver(
  71. IN LPTSTR DriverNameString
  72. );
  73. NTSTATUS
  74. RxLoadDriver(
  75. IN LPWSTR DriverNameString
  76. );
  77. //
  78. // FSCTL issued to the drivers.
  79. //
  80. extern NTSTATUS
  81. RxDeviceControlGetInfo(
  82. IN DDTYPE DeviceDriverType,
  83. IN HANDLE FileHandle,
  84. IN ULONG DeviceControlCode,
  85. IN PVOID RequestPacket,
  86. IN ULONG RequestPacketLength,
  87. OUT PVOID *OutputBuffer,
  88. IN ULONG PreferedMaximumLength,
  89. IN ULONG BufferHintSize,
  90. OUT PULONG Information
  91. );
  92. extern NTSTATUS
  93. RxRedirFsControl (
  94. IN HANDLE FileHandle,
  95. IN ULONG RedirControlCode,
  96. IN PLMR_REQUEST_PACKET Rrp,
  97. IN ULONG RrpLength,
  98. IN PVOID SecondBuffer OPTIONAL,
  99. IN ULONG SecondBufferLength,
  100. OUT PULONG Information OPTIONAL
  101. );
  102. extern NTSTATUS
  103. RxDgReceiverIoControl(
  104. IN HANDLE FileHandle,
  105. IN ULONG DgReceiverControlCode,
  106. IN PLMDR_REQUEST_PACKET Drp,
  107. IN ULONG DrpLength,
  108. IN PVOID SecondBuffer OPTIONAL,
  109. IN ULONG SecondBufferLength,
  110. OUT PULONG Information OPTIONAL
  111. );
  112. //
  113. // Start/Stop control for redirectors.
  114. //
  115. extern NTSTATUS
  116. RxOpenRedirector(
  117. VOID
  118. );
  119. extern NTSTATUS
  120. RxOpenDgReceiver (
  121. VOID
  122. );
  123. extern NTSTATUS
  124. RxStartRedirector(VOID);
  125. extern NTSTATUS
  126. RxStopRedirector(
  127. VOID
  128. );
  129. //
  130. // Miscellanous functions fro the DRT.
  131. //
  132. extern NTSTATUS
  133. RxDeleteDomainName(
  134. IN PLMDR_REQUEST_PACKET Drp,
  135. IN DWORD DrpLength,
  136. IN LPTSTR DomainName,
  137. IN DWORD DomainNameSize
  138. );
  139. NTSTATUS
  140. RxAddDomainName(
  141. IN PLMDR_REQUEST_PACKET Drp,
  142. IN DWORD DrpLength,
  143. IN LPTSTR DomainName,
  144. IN DWORD DomainNameSize
  145. );
  146. extern DWORD
  147. RxGetPrivilege(
  148. IN DWORD numPrivileges,
  149. IN PULONG pulPrivileges
  150. );
  151. extern DWORD
  152. RxReleasePrivilege(
  153. VOID
  154. );
  155. // //
  156. // Handles to the Redirector FSD, Datgram receiver FSd
  157. //
  158. extern HANDLE RxRedirDeviceHandle;
  159. extern HANDLE RxDgReceiverDeviceHandle;
  160. extern HANDLE RxRedirAsyncDeviceHandle; // redirector
  161. extern HANDLE RxDgrecAsyncDeviceHandle; // datagram receiver or "bowser"
  162. #endif // ifndef _RXDEVICE_INCLUDED_
  163.