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.

242 lines
12 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. mupwml.h
  5. Abstract:
  6. This file defines macro for use by the mup driver
  7. Author:
  8. udayh
  9. Revision History:
  10. --*/
  11. #ifndef __MUP_MUPWML_H__
  12. #define __MUP_MUPWML_H__
  13. #include <dfsprocs.h>
  14. #define _NTDDK_
  15. #include "wmlkm.h"
  16. #include "wmlmacro.h"
  17. // Streams
  18. #define _MUP_TRACE_STREAM 0x00
  19. #define _MUP_PERF_STREAM 0x01
  20. #define _MUP_INSTR_STREAM 0x02
  21. #define _MUP_ENABLE_0 0x0000
  22. #define _MUP_ENABLE_DEFAULT 0x0001
  23. #define _MUP_ENABLE_TRACE_IRP 0x0004
  24. #define _MUP_ENABLE_FILEIO 0x0002
  25. #define _MUP_ENABLE_FILEINFO 0x0008
  26. #define _MUP_ENABLE_SURROGATE 0x0010
  27. #define _MUP_ENABLE_PKT 0x0020
  28. #define _MUP_ENABLE_KNOWN_PREFIX 0x0040
  29. #define _MUP_ENABLE_DNR 0x0080
  30. #define _MUP_ENABLE_UNUSED6 0x0100
  31. #define _MUP_ENABLE_UNUSED5 0x0200
  32. #define _MUP_ENABLE_UNUSED4 0x0400
  33. #define _MUP_ENABLE_UNUSED3 0x0800
  34. #define _MUP_ENABLE_UNUSED2 0x1000
  35. #define _MUP_ENABLE_ALL_ERROR 0x2000
  36. #define _MUP_ENABLE_ERROR 0x4000
  37. #define _MUP_ENABLE_MONITOR 0x8000
  38. #define _MUP_LEVEL_HIGH 0x1
  39. #define _MUP_LEVEL_NORM 0x2
  40. #define _MUP_LEVEL_LOW 0x4
  41. #define MUP_LOG_STREAM(_stream) _MUP_ ## _stream ## _STREAM
  42. #define MUP_LOG_FLAGS(_flag) _MUP_ENABLE_ ## _flag
  43. #define MUP_LOG_LEVEL(_level) _MUP_LEVEL_ ## _level
  44. #define MUP_LOG(_why, _level, _flag, _type, _arg) \
  45. WML_LOG(_MupDrv, MUP_LOG_STREAM(_why), MUP_LOG_LEVEL(_level), _flag, _type, _arg 0)
  46. #define LOGARG(_val) (_val),
  47. #define LOGNOTHING 0,
  48. #define MUP_TRACE_HIGH(_flag, _type, _arg) \
  49. MUP_LOG(TRACE, HIGH, MUP_LOG_FLAGS(_flag), _type, _arg)
  50. #define MUP_TRACE_NORM(_flag, _type, _arg) \
  51. MUP_LOG(TRACE, NORM, MUP_LOG_FLAGS(_flag), _type, _arg)
  52. #define MUP_TRACE_LOW(_flag, _type, _arg) \
  53. MUP_LOG(TRACE, LOW, MUP_LOG_FLAGS(_flag), _type, _arg)
  54. #define MUP_TRACE_ERROR(_status, _flag, _type, _arg) \
  55. MUP_LOG(TRACE, NORM, (MUP_LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : MUP_LOG_FLAGS(ERROR))), _type, _arg)
  56. #define MUP_TRACE_ERROR_HIGH(_status, _flag, _type, _arg) \
  57. MUP_LOG(TRACE, HIGH, (MUP_LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : MUP_LOG_FLAGS(ERROR))), _type, _arg)
  58. #define MUP_TRACE_ERROR_LOW(_status, _flag, _type, _arg) \
  59. MUP_LOG(TRACE, LOW, (MUP_LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : MUP_LOG_FLAGS(ERROR))), _type, _arg)
  60. #define MUP_PERF(_flag, _type, _arg) \
  61. MUP_LOG (PERF, HIGH, MUP_LOG_FLAGS(_flag), _type, _arg)
  62. #define MUP_INSTR(_flag, _type, _arg) \
  63. MUP_LOG (INSTR, HIGH, MUP_LOG_FLAGS(_flag), _type, _arg)
  64. #if 0
  65. #define MUP_PRINTF(_why, _flag, _type, _fmtstr, _arg) \
  66. WML_PRINTF(_MupDrv, MUP_LOG_STREAM(_why), MUP_LOG_FLAGS(_flag), _type, _fmtstr, _arg 0)
  67. #define MUP_DBG_PRINT(_flag, _fmtstr, _arg) \
  68. MUP_PRINTF(DBGLOG, _flag, MupDefault, _fmtstr, _arg)
  69. #define MUP_ERR_PRINT (_status, _fmtstr, _arg) \
  70. if (NT_SUCCESS(_status)) { \
  71. MUP_PRINTF (DBGLOG, LOG_ERROR, MupDefault, _fmtstr, _arg) \
  72. }
  73. #endif
  74. // from the WPP generated .h file
  75. // We use different macros, so need to do some cut and paste
  76. // Hopefully this will get automated in the future.
  77. # define WPP_DEFINE_MSG_ID(_a,_b) ( ((_a) << 16) | ( _b) )
  78. # define MSG_ID_BroadcastOpen_Error1 WPP_DEFINE_MSG_ID(0,47)
  79. # define MSG_ID_BroadcastOpen_Error2 WPP_DEFINE_MSG_ID(0,48)
  80. # define MSG_ID_BroadcastOpen_Error3 WPP_DEFINE_MSG_ID(0,50)
  81. # define MSG_ID_BroadcastOpen_Error_IoCreateFile WPP_DEFINE_MSG_ID(0,49)
  82. # define MSG_ID_BroadcastOpen_Error_ObReferenceObjectByHandle WPP_DEFINE_MSG_ID(0,51)
  83. # define MSG_ID_CreateRedirectedFile_Before_IoCallDriver WPP_DEFINE_MSG_ID(0,39)
  84. # define MSG_ID_CreateRedirectedFile_Entry WPP_DEFINE_MSG_ID(0,35)
  85. # define MSG_ID_CreateRedirectedFile_Error_EmptyFilename WPP_DEFINE_MSG_ID(0,36)
  86. # define MSG_ID_CreateRedirectedFile_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,40)
  87. # define MSG_ID_CreateRedirectedFile_Error_MupRerouteOpen WPP_DEFINE_MSG_ID(0,37)
  88. # define MSG_ID_CreateRedirectedFile_Exit WPP_DEFINE_MSG_ID(0,41)
  89. # define MSG_ID_CreateRedirectedFile_Exit_Mailslot WPP_DEFINE_MSG_ID(0,38)
  90. # define MSG_ID_DfsCommonCreate_Error_NullVcb WPP_DEFINE_MSG_ID(0,61)
  91. # define MSG_ID_DfsCommonCreate_Error_PagingFileNotAllowed WPP_DEFINE_MSG_ID(0,60)
  92. # define MSG_ID_DfsCommonFileSystemControl_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,87)
  93. # define MSG_ID_DfsCommonQueryVolumeInformation_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,117)
  94. # define MSG_ID_DfsCommonSetInformation_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,84)
  95. # define MSG_ID_DfsComposeFullName_Error1 WPP_DEFINE_MSG_ID(0,67)
  96. # define MSG_ID_DfsCreateConnection_Error_ZwCreateFile WPP_DEFINE_MSG_ID(0,83)
  97. # define MSG_ID_DfsFilePassThrough_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,15)
  98. # define MSG_ID_DfsFsctrlIsThisADfsPath_Error_DfsRootNameHasZeroLength WPP_DEFINE_MSG_ID(0,92)
  99. # define MSG_ID_DfsFsctrlIsThisADfsPath_Error_DfspIsSpecialShare_FALSE WPP_DEFINE_MSG_ID(0,94)
  100. # define MSG_ID_DfsFsctrlIsThisADfsPath_Error_DidNotFindSecondBackSlash WPP_DEFINE_MSG_ID(0,91)
  101. # define MSG_ID_DfsFsctrlIsThisADfsPath_Error_PathDoesNotBeginWithBackSlash WPP_DEFINE_MSG_ID(0,90)
  102. # define MSG_ID_DfsFsctrlIsThisADfsPath_Error_ShareNameHasZeroLength WPP_DEFINE_MSG_ID(0,93)
  103. # define MSG_ID_DfsFsctrlIsThisADfsPath_Exit_NotADfsPath WPP_DEFINE_MSG_ID(0,95)
  104. # define MSG_ID_DfsFsdCleanup_Entry WPP_DEFINE_MSG_ID(0,56)
  105. # define MSG_ID_DfsFsdCleanup_Exit WPP_DEFINE_MSG_ID(0,57)
  106. # define MSG_ID_DfsFsdClose_Entry WPP_DEFINE_MSG_ID(0,54)
  107. # define MSG_ID_DfsFsdClose_Exit WPP_DEFINE_MSG_ID(0,55)
  108. # define MSG_ID_DfsFsdCreate_Entry WPP_DEFINE_MSG_ID(0,58)
  109. # define MSG_ID_DfsFsdCreate_Exit WPP_DEFINE_MSG_ID(0,59)
  110. # define MSG_ID_DfsOpenDevice_Error_BadDisposition WPP_DEFINE_MSG_ID(0,62)
  111. # define MSG_ID_DfsOpenDevice_Error_CannotOpenAsDirectory WPP_DEFINE_MSG_ID(0,63)
  112. # define MSG_ID_DfsOpenDevice_Error_FileInUse WPP_DEFINE_MSG_ID(0,64)
  113. # define MSG_ID_DfsOpenDevice_Error_IoCheckShareAccess WPP_DEFINE_MSG_ID(0,65)
  114. # define MSG_ID_DfsOplockRequest_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,89)
  115. # define MSG_ID_DfsPassThroughRelativeOpen_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,66)
  116. # define MSG_ID_DfsRerouteOpenToMup_Error_NameTooLong WPP_DEFINE_MSG_ID(0,68)
  117. # define MSG_ID_DfsUserFsctl_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,88)
  118. # define MSG_ID_DfsVolumePassThrough_Entry WPP_DEFINE_MSG_ID(0,10)
  119. # define MSG_ID_DfsVolumePassThrough_Error1 WPP_DEFINE_MSG_ID(0,12)
  120. # define MSG_ID_DfsVolumePassThrough_Error2 WPP_DEFINE_MSG_ID(0,13)
  121. # define MSG_ID_DfsVolumePassThrough_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,11)
  122. # define MSG_ID_DfsVolumePassThrough_Exit WPP_DEFINE_MSG_ID(0,14)
  123. # define MSG_ID_DnrGetAuthenticatedConnection_Error_ObReferenceObjectByHandle WPP_DEFINE_MSG_ID(0,82)
  124. # define MSG_ID_DnrGetAuthenticatedConnection_Error_ZwCreateFile WPP_DEFINE_MSG_ID(0,81)
  125. # define MSG_ID_DnrNameResolve_Error3 WPP_DEFINE_MSG_ID(0,75)
  126. # define MSG_ID_DnrNameResolve_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,77)
  127. # define MSG_ID_DnrNameResolve_Error_ObReferenceObjectByHandle WPP_DEFINE_MSG_ID(0,76)
  128. # define MSG_ID_DnrNameResolve_Error_SeImpersonateClientEx WPP_DEFINE_MSG_ID(0,73)
  129. # define MSG_ID_DnrNameResolve_TopOfLoop WPP_DEFINE_MSG_ID(0,74)
  130. # define MSG_ID_DnrRedirectFileOpen_BeforeIoCallDriver WPP_DEFINE_MSG_ID(0,79)
  131. # define MSG_ID_DnrRedirectFileOpen_Entry WPP_DEFINE_MSG_ID(0,78)
  132. # define MSG_ID_DnrRedirectFileOpen_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,80)
  133. # define MSG_ID_DnrStartNameResolution_Entry WPP_DEFINE_MSG_ID(0,69)
  134. # define MSG_ID_DnrStartNameResolution_Error2 WPP_DEFINE_MSG_ID(0,71)
  135. # define MSG_ID_DnrStartNameResolution_Error_NameTooLong WPP_DEFINE_MSG_ID(0,70)
  136. # define MSG_ID_DnrStartNameResolution_Error_SeCreateClientSecurity WPP_DEFINE_MSG_ID(0,72)
  137. # define MSG_ID_MupCleanup_Entry WPP_DEFINE_MSG_ID(0,18)
  138. # define MSG_ID_MupCleanup_Error1 WPP_DEFINE_MSG_ID(0,20)
  139. # define MSG_ID_MupCleanup_Error_FileClosed WPP_DEFINE_MSG_ID(0,19)
  140. # define MSG_ID_MupCleanup_Exit WPP_DEFINE_MSG_ID(0,21)
  141. # define MSG_ID_MupClose_Entry WPP_DEFINE_MSG_ID(0,22)
  142. # define MSG_ID_MupClose_Error1 WPP_DEFINE_MSG_ID(0,23)
  143. # define MSG_ID_MupClose_Error2 WPP_DEFINE_MSG_ID(0,24)
  144. # define MSG_ID_MupClose_Exit WPP_DEFINE_MSG_ID(0,25)
  145. # define MSG_ID_MupCreate_Entry WPP_DEFINE_MSG_ID(0,27)
  146. # define MSG_ID_MupCreate_Error_CreateRedirectedFile WPP_DEFINE_MSG_ID(0,30)
  147. # define MSG_ID_MupCreate_Error_DfsFsdCreate WPP_DEFINE_MSG_ID(0,28)
  148. # define MSG_ID_MupCreate_Error_OpenMupFileSystem WPP_DEFINE_MSG_ID(0,29)
  149. # define MSG_ID_MupCreate_Exit WPP_DEFINE_MSG_ID(0,31)
  150. # define MSG_ID_MupDereferenceMasterQueryContext_CompleteRequest WPP_DEFINE_MSG_ID(0,17)
  151. # define MSG_ID_MupDereferenceMasterQueryContext_RerouteOpen WPP_DEFINE_MSG_ID(0,16)
  152. # define MSG_ID_MupFsControl_Entry WPP_DEFINE_MSG_ID(0,85)
  153. # define MSG_ID_MupFsControl_Exit WPP_DEFINE_MSG_ID(0,86)
  154. # define MSG_ID_MupRemoveKnownPrefixEntry WPP_DEFINE_MSG_ID(0,53)
  155. # define MSG_ID_MupRerouteOpenToDfs_Entry WPP_DEFINE_MSG_ID(0,44)
  156. # define MSG_ID_MupRerouteOpenToDfs_Error1 WPP_DEFINE_MSG_ID(0,45)
  157. # define MSG_ID_MupRerouteOpenToDfs_Error2 WPP_DEFINE_MSG_ID(0,46)
  158. # define MSG_ID_MupRerouteOpen_Error1 WPP_DEFINE_MSG_ID(0,42)
  159. # define MSG_ID_MupRerouteOpen_Error2 WPP_DEFINE_MSG_ID(0,43)
  160. # define MSG_ID_OpenMupFileSystem_Entry WPP_DEFINE_MSG_ID(0,32)
  161. # define MSG_ID_OpenMupFileSystem_Error_IoCheckShareAccess WPP_DEFINE_MSG_ID(0,33)
  162. # define MSG_ID_OpenMupFileSystem_Exit WPP_DEFINE_MSG_ID(0,34)
  163. # define MSG_ID_PktPostSystemWork_Error_KeWaitForSingleObject WPP_DEFINE_MSG_ID(0,115)
  164. # define MSG_ID_PktpCheckReferralNetworkAddress_Error_NullServerName WPP_DEFINE_MSG_ID(0,105)
  165. # define MSG_ID_PktpCheckReferralNetworkAddress_Error_ShareNameNotFound WPP_DEFINE_MSG_ID(0,108)
  166. # define MSG_ID_PktpCheckReferralNetworkAddress_Error_ShareNameZeroLength WPP_DEFINE_MSG_ID(0,107)
  167. # define MSG_ID_PktpCheckReferralNetworkAddress_Error_TooShortToBeValid WPP_DEFINE_MSG_ID(0,104)
  168. # define MSG_ID_PktpCheckReferralNetworkAddress_Error_ZeroLengthShareName WPP_DEFINE_MSG_ID(0,106)
  169. # define MSG_ID_PktpCheckReferralString_Error WPP_DEFINE_MSG_ID(0,103)
  170. # define MSG_ID_PktpCheckReferralString_Error_StringNotWordAlligned WPP_DEFINE_MSG_ID(0,102)
  171. # define MSG_ID_PktpCheckReferralSyntax_Error_InvalidBuffer2 WPP_DEFINE_MSG_ID(0,99)
  172. # define MSG_ID_PktpCheckReferralSyntax_Error_InvalidBuffer3 WPP_DEFINE_MSG_ID(0,100)
  173. # define MSG_ID_PktpCheckReferralSyntax_Error_InvalidBuffer4 WPP_DEFINE_MSG_ID(0,101)
  174. # define MSG_ID_QueryPathCompletionRoutine_Enter WPP_DEFINE_MSG_ID(0,52)
  175. # define MSG_ID_ReplFindFirstProvider_Error_NotFound WPP_DEFINE_MSG_ID(0,116)
  176. # define MSG_ID_TSGetRequestorSessionId_Error1 WPP_DEFINE_MSG_ID(0,26)
  177. # define MSG_ID__PktExpandSpecialName_Error_DCNameNotInitialized WPP_DEFINE_MSG_ID(0,111)
  178. # define MSG_ID__PktExpandSpecialName_Error_ExAllocatePoolWithTag WPP_DEFINE_MSG_ID(0,112)
  179. # define MSG_ID__PktExpandSpecialName_Error_NoSpecialReferralTable WPP_DEFINE_MSG_ID(0,109)
  180. # define MSG_ID__PktExpandSpecialName_Error_NotInSpecialReferralTable WPP_DEFINE_MSG_ID(0,110)
  181. # define MSG_ID__PktExpandSpecialName_Error_UnableToOpenRdr WPP_DEFINE_MSG_ID(0,113)
  182. # define MSG_ID__PktExpandSpecialName_Error_ZwFsControlFile WPP_DEFINE_MSG_ID(0,114)
  183. # define MSG_ID__PktGetReferral_Error_ExallocatePoolWithTag WPP_DEFINE_MSG_ID(0,97)
  184. # define MSG_ID__PktGetReferral_Error_UnableToOpenRdr WPP_DEFINE_MSG_ID(0,96)
  185. # define MSG_ID__PktGetReferral_Error_ZwFsControlFile WPP_DEFINE_MSG_ID(0,98)
  186. // end WPP stuff
  187. #define WML_ID(_id) ((MSG_ID_ ## _id) & 0xFF)
  188. #define WML_GUID(_id) ((MSG_ID_ ## _id) >> 8)
  189. extern WML_CONTROL_GUID_REG _MupDrv_ControlGuids[];
  190. //
  191. // Reserved Guids
  192. //
  193. //
  194. //
  195. //
  196. //
  197. //
  198. // 6dfa04f0-cf82-426e-ae9e-735f72faa11d
  199. // 5b5f4066-b952-48b5-a4cf-86c942a06968
  200. // 1fd9a84a-6373-4e6c-be34-c16013e3cb07
  201. // d621eecd-6863-4fc4-bb14-80e652739fcf
  202. #endif /* __MUP_MUPWML_H__ */