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.

189 lines
4.5 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. wsdevice.h
  5. Abstract:
  6. Private header file to be included by Workstation service modules that
  7. need to call into the NT Redirector and the NT Datagram Receiver.
  8. Author:
  9. Rita Wong (ritaw) 15-Feb-1991
  10. Revision History:
  11. --*/
  12. #ifndef _WSDEVICE_INCLUDED_
  13. #define _WSDEVICE_INCLUDED_
  14. #include <ntddnfs.h> // Redirector include file
  15. #include <ntddbrow.h> // Datagram receiver include file
  16. //-------------------------------------------------------------------//
  17. // //
  18. // Type definitions //
  19. // //
  20. //-------------------------------------------------------------------//
  21. typedef enum _DDTYPE {
  22. Redirector,
  23. DatagramReceiver
  24. } DDTYPE, *PDDTYPE;
  25. //-------------------------------------------------------------------//
  26. // //
  27. // Function prototypes of support routines found in wsdevice.c //
  28. // //
  29. //-------------------------------------------------------------------//
  30. NET_API_STATUS
  31. WsDeviceControlGetInfo(
  32. IN DDTYPE DeviceDriverType,
  33. IN HANDLE FileHandle,
  34. IN ULONG DeviceControlCode,
  35. IN PVOID RequestPacket,
  36. IN ULONG RequestPacketLength,
  37. OUT LPBYTE *OutputBuffer,
  38. IN ULONG PreferedMaximumLength,
  39. IN ULONG BufferHintSize,
  40. OUT PULONG_PTR Information OPTIONAL
  41. );
  42. NET_API_STATUS
  43. WsInitializeRedirector(
  44. VOID
  45. );
  46. NET_API_STATUS
  47. WsShutdownRedirector(
  48. VOID
  49. );
  50. NET_API_STATUS
  51. WsRedirFsControl (
  52. IN HANDLE FileHandle,
  53. IN ULONG RedirControlCode,
  54. IN PLMR_REQUEST_PACKET Rrp,
  55. IN ULONG RrpLength,
  56. IN PVOID SecondBuffer OPTIONAL,
  57. IN ULONG SecondBufferLength,
  58. OUT PULONG_PTR Information OPTIONAL
  59. );
  60. NET_API_STATUS
  61. WsDgReceiverIoControl(
  62. IN HANDLE FileHandle,
  63. IN ULONG DgReceiverControlCode,
  64. IN PLMDR_REQUEST_PACKET Drp,
  65. IN ULONG DrpLength,
  66. IN PVOID SecondBuffer OPTIONAL,
  67. IN ULONG SecondBufferLength,
  68. OUT PULONG_PTR Information OPTIONAL
  69. );
  70. NET_API_STATUS
  71. WsBindTransport(
  72. IN LPTSTR TransportName,
  73. IN DWORD QualityOfService,
  74. OUT LPDWORD ErrorParameter OPTIONAL
  75. );
  76. NET_API_STATUS
  77. WsUnbindTransport(
  78. IN LPTSTR TransportName,
  79. IN DWORD ForceLevel
  80. );
  81. NET_API_STATUS
  82. WsDeleteDomainName(
  83. IN PLMDR_REQUEST_PACKET Drp,
  84. IN DWORD DrpLength,
  85. IN LPTSTR DomainName,
  86. IN DWORD DomainNameSize
  87. );
  88. NET_API_STATUS
  89. WsAddDomainName(
  90. IN PLMDR_REQUEST_PACKET Drp,
  91. IN DWORD DrpLength,
  92. IN LPTSTR DomainName,
  93. IN DWORD DomainNameSize
  94. );
  95. NET_API_STATUS
  96. WsUnloadDriver(
  97. IN LPTSTR DriverNameString
  98. );
  99. NET_API_STATUS
  100. WsLoadDriver(
  101. IN LPWSTR DriverNameString
  102. );
  103. //-------------------------------------------------------------------//
  104. // //
  105. // Global variables //
  106. // //
  107. //-------------------------------------------------------------------//
  108. // Global Registry key definitions for the new Redirector
  109. #define SERVICE_REGISTRY_KEY L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"
  110. #define SMB_MINIRDR L"MRxSmb"
  111. #define RDBSS L"Rdbss"
  112. // the key definition is relative to HKEY_LOCAL_MACHINE
  113. #define MRXSMB_REGISTRY_KEY L"System\\CurrentControlSet\\Services\\MRxSmb"
  114. #define LAST_LOAD_STATUS L"LastLoadStatus"
  115. #define REDIRECTOR L"RDR"
  116. //
  117. // Handle to the Redirector FSD
  118. //
  119. extern HANDLE WsRedirDeviceHandle;
  120. //
  121. // This variable is used to remember whether we loaded rdr.sys or mrxsmb.sys
  122. // and to act accordingly. at this stage, we only load mrxsmb.sys when certain
  123. // conditions are met.
  124. //
  125. extern BOOLEAN LoadedMRxSmbInsteadOfRdr;
  126. extern NET_API_STATUS
  127. WsLoadRedirector(
  128. VOID
  129. );
  130. extern VOID
  131. WsUnloadRedirector(
  132. VOID
  133. );
  134. extern NET_API_STATUS
  135. WsCSCReportStartRedir(
  136. VOID
  137. );
  138. extern NET_API_STATUS
  139. WsCSCWantToStopRedir(
  140. VOID
  141. );
  142. //
  143. // Handle to the Datagram Receiver DD
  144. //
  145. extern HANDLE WsDgReceiverDeviceHandle;
  146. #endif // ifndef _WSDEVICE_INCLUDED_