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.

189 lines
8.6 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. dfswml.h
  5. Abstract:
  6. This file defines macro for use by the mup driver
  7. Author:
  8. drewsam
  9. Revision History:
  10. --*/
  11. #ifndef __DFSWML_H__
  12. #define __DFSWML_H__
  13. #include <ntos.h>
  14. #include "wmlkm.h"
  15. #include "wmlmacro.h"
  16. // Streams
  17. #define _DFS_TRACE_STREAM 0x00
  18. #define _DFS_PERF_STREAM 0x01
  19. #define _DFS_INSTR_STREAM 0x02
  20. #define _DFS_ENABLE_DEFAULT 0x0001
  21. #define _DFS_ENABLE_PROVIDER 0x0002
  22. #define _DFS_ENABLE_TRACE_IRP 0x0004
  23. #define _DFS_ENABLE_FILEINFO 0x0008
  24. #define _DFS_ENABLE_SURROGATE 0x0010
  25. #define _DFS_ENABLE_UNUSED9 0x0020
  26. #define _DFS_ENABLE_UNUSED8 0x0040
  27. #define _DFS_ENABLE_UNUSED7 0x0080
  28. #define _DFS_ENABLE_UNUSED6 0x0100
  29. #define _DFS_ENABLE_UNUSED5 0x0200
  30. #define _DFS_ENABLE_UNUSED4 0x0400
  31. #define _DFS_ENABLE_UNUSED3 0x0800
  32. #define _DFS_ENABLE_EVENT 0x1000
  33. #define _DFS_ENABLE_ALL_ERROR 0x2000
  34. #define _DFS_ENABLE_ERROR 0x4000
  35. #define _DFS_ENABLE_MONITOR 0x8000
  36. #define _DFS_LEVEL_HIGH 0x1
  37. #define _DFS_LEVEL_NORM 0x2
  38. #define _DFS_LEVEL_LOW 0x4
  39. #define DFS_LOG_STREAM(_stream) _DFS_ ## _stream ## _STREAM
  40. #define DFS_LOG_FLAGS(_flag) _DFS_ENABLE_ ## _flag
  41. #define DFS_LOG_LEVEL(_level) _DFS_LEVEL_ ## _level
  42. #define DFS_LOG(_why, _level, _flag, _type, _arg) \
  43. WML_LOG(_DfsDrv, DFS_LOG_STREAM(_why), DFS_LOG_LEVEL(_level), _flag, _type, _arg 0)
  44. #define LOGARG(_val) (_val),
  45. #define LOGNOTHING 0,
  46. #define DFS_TRACE_HIGH(_flag, _type, _arg) \
  47. DFS_LOG(TRACE, HIGH, DFS_LOG_FLAGS(_flag), _type, _arg)
  48. #define DFS_TRACE_NORM(_flag, _type, _arg) \
  49. DFS_LOG(TRACE, NORM, DFS_LOG_FLAGS(_flag), _type, _arg)
  50. #define DFS_TRACE_LOW(_flag, _type, _arg) \
  51. DFS_LOG(TRACE, LOW, DFS_LOG_FLAGS(_flag), _type, _arg)
  52. #define DFS_TRACE_ERROR(_status, _flag, _type, _arg) \
  53. DFS_LOG(TRACE, NORM, (DFS_LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : DFS_LOG_FLAGS(ERROR))), _type, _arg)
  54. #define DFS_TRACE_ERROR_HIGH(_status, _flag, _type, _arg) \
  55. DFS_LOG(TRACE, HIGH, (DFS_LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : DFS_LOG_FLAGS(ERROR))), _type, _arg)
  56. #define DFS_TRACE_ERROR_LOW(_status, _flag, _type, _arg) \
  57. DFS_LOG(TRACE, LOW, (DFS_LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : DFS_LOG_FLAGS(ERROR))), _type, _arg)
  58. #define DFS_PERF(_flag, _type, _arg) \
  59. DFS_LOG (PERF, HIGH, DFS_LOG_FLAGS(_flag), _type, _arg)
  60. #define DFS_INSTR(_flag, _type, _arg) \
  61. DFS_LOG (INSTR, HIGH, DFS_LOG_FLAGS(_flag), _type, _arg)
  62. #if 0
  63. #define DFS_PRINTF(_why, _flag, _type, _fmtstr, _arg) \
  64. WML_PRINTF(_DfsDrv, DFS_LOG_STREAM(_why), DFS_LOG_FLAGS(_flag), _type, _fmtstr, _arg 0)
  65. #define DFS_DBG_PRINT(_flag, _fmtstr, _arg) \
  66. DFS_PRINTF(DBGLOG, _flag, DFSDefault, _fmtstr, _arg)
  67. #define DFS_ERR_PRINT (_status, _fmtstr, _arg) \
  68. if (NT_SUCCESS(_status)) { \
  69. DFS_PRINTF (DBGLOG, LOG_ERROR, DFSDefault, _fmtstr, _arg) \
  70. }
  71. #endif
  72. // from the WPP generated .h file
  73. // We use different macros, so need to do some cut and paste
  74. // Hopefully this will get automated in the future.
  75. # define WPP_DEFINE_MSG_ID(_a,_b) ( ((_a) << 16) | ( _b) )
  76. # define MSG_ID_DfsAttachToFileSystem_Error_IoCreateDevice WPP_DEFINE_MSG_ID(0,13)
  77. # define MSG_ID_DfsCommonDetInformation_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,30)
  78. # define MSG_ID_DfsCommonFileSystemControl_Entry WPP_DEFINE_MSG_ID(0,34)
  79. # define MSG_ID_DfsCommonFileSystemControl_Error_FS_IoCallDriver WPP_DEFINE_MSG_ID(0,37)
  80. # define MSG_ID_DfsCommonFileSystemControl_Error_FsctrlFromInvalidDeviceObj WPP_DEFINE_MSG_ID(0,35)
  81. # define MSG_ID_DfsCommonFileSystemControl_Error_Vol_IoCallDriver WPP_DEFINE_MSG_ID(0,36)
  82. # define MSG_ID_DfsCommonFileSystemControl_Exit WPP_DEFINE_MSG_ID(0,38)
  83. # define MSG_ID_DfsCommonSetInformation_Entry WPP_DEFINE_MSG_ID(0,29)
  84. # define MSG_ID_DfsCommonSetInformation_Exit WPP_DEFINE_MSG_ID(0,31)
  85. # define MSG_ID_DfsCreateExitPath_Error_ZwCreateFile WPP_DEFINE_MSG_ID(0,42)
  86. # define MSG_ID_DfsCreateExitPath_Error_ZwCreateFile2 WPP_DEFINE_MSG_ID(0,43)
  87. # define MSG_ID_DfsCreateExitPath_Error_ZwCreateFile3 WPP_DEFINE_MSG_ID(0,44)
  88. # define MSG_ID_DfsCreateRemoteExitPt_Entry WPP_DEFINE_MSG_ID(0,39)
  89. # define MSG_ID_DfsCreateRemoteExitPt_Error_ZwFsControlFile WPP_DEFINE_MSG_ID(0,40)
  90. # define MSG_ID_DfsCreateRemoteExitPt_Exit WPP_DEFINE_MSG_ID(0,41)
  91. # define MSG_ID_DfsDeleteExitPath_Error_ZwOpenFile WPP_DEFINE_MSG_ID(0,45)
  92. # define MSG_ID_DfsDeleteExitPath_Error_ZwSetInformationFile WPP_DEFINE_MSG_ID(0,46)
  93. # define MSG_ID_DfsFsctrlFindShare_End WPP_DEFINE_MSG_ID(0,79)
  94. # define MSG_ID_DfsFsctrlFindShare_Error1 WPP_DEFINE_MSG_ID(0,77)
  95. # define MSG_ID_DfsFsctrlFindShare_Error2 WPP_DEFINE_MSG_ID(0,78)
  96. # define MSG_ID_DfsFsctrlFindShare_Start WPP_DEFINE_MSG_ID(0,76)
  97. # define MSG_ID_DfsFsctrlGetReferals_Error1 WPP_DEFINE_MSG_ID(0,57)
  98. # define MSG_ID_DfsFsctrlGetReferals_Error2 WPP_DEFINE_MSG_ID(0,58)
  99. # define MSG_ID_DfsFsctrlGetReferrals_End WPP_DEFINE_MSG_ID(0,59)
  100. # define MSG_ID_DfsFsctrlGetReferrals_Error1 WPP_DEFINE_MSG_ID(0,56)
  101. # define MSG_ID_DfsFsctrlGetReferrals_Start WPP_DEFINE_MSG_ID(0,55)
  102. # define MSG_ID_DfsFsctrlIsShareInDfs_Error1 WPP_DEFINE_MSG_ID(0,74)
  103. # define MSG_ID_DfsFsctrlIsShareInDfs_Error2 WPP_DEFINE_MSG_ID(0,75)
  104. # define MSG_ID_DfsFsctrlTranslatePath_End WPP_DEFINE_MSG_ID(0,52)
  105. # define MSG_ID_DfsFsctrlTranslatePath_Error1 WPP_DEFINE_MSG_ID(0,51)
  106. # define MSG_ID_DfsFsctrlTranslatePath_Start WPP_DEFINE_MSG_ID(0,50)
  107. # define MSG_ID_DfsFsdCleanup_Entry WPP_DEFINE_MSG_ID(0,16)
  108. # define MSG_ID_DfsFsdCleanup_Exit WPP_DEFINE_MSG_ID(0,17)
  109. # define MSG_ID_DfsFsdClose_Entry WPP_DEFINE_MSG_ID(0,14)
  110. # define MSG_ID_DfsFsdClose_Exit WPP_DEFINE_MSG_ID(0,15)
  111. # define MSG_ID_DfsFsdCreate_Entry WPP_DEFINE_MSG_ID(0,18)
  112. # define MSG_ID_DfsFsdCreate_Exit WPP_DEFINE_MSG_ID(0,19)
  113. # define MSG_ID_DfsFsdFileSystemControl_Entry WPP_DEFINE_MSG_ID(0,32)
  114. # define MSG_ID_DfsFsdFileSystemControl_Exit WPP_DEFINE_MSG_ID(0,33)
  115. # define MSG_ID_DfsFsdSetInformation_Entry WPP_DEFINE_MSG_ID(0,27)
  116. # define MSG_ID_DfsFsdSetInformation_Exit WPP_DEFINE_MSG_ID(0,28)
  117. # define MSG_ID_DfsOpenDevice_Entry WPP_DEFINE_MSG_ID(0,23)
  118. # define MSG_ID_DfsOpenDevice_Error1 WPP_DEFINE_MSG_ID(0,24)
  119. # define MSG_ID_DfsOpenDevice_Error3 WPP_DEFINE_MSG_ID(0,25)
  120. # define MSG_ID_DfsOpenDevice_Exit WPP_DEFINE_MSG_ID(0,26)
  121. # define MSG_ID_DfsOpenFile_Entry WPP_DEFINE_MSG_ID(0,20)
  122. # define MSG_ID_DfsOpenFile_Error_IoCallDriver WPP_DEFINE_MSG_ID(0,21)
  123. # define MSG_ID_DfsOpenFile_Exit WPP_DEFINE_MSG_ID(0,22)
  124. # define MSG_ID_DfsSrvFsctrl_Error1 WPP_DEFINE_MSG_ID(0,47)
  125. # define MSG_ID_DfsSrvFsctrl_Error2 WPP_DEFINE_MSG_ID(0,48)
  126. # define MSG_ID_DfsSrvFsctrl_Error3 WPP_DEFINE_MSG_ID(0,49)
  127. # define MSG_ID_DfsVolumePassThrough_Error1 WPP_DEFINE_MSG_ID(0,12)
  128. # define MSG_ID_DfsVolumePassThrough_Error_FS_IoCallDriver WPP_DEFINE_MSG_ID(0,11)
  129. # define MSG_ID_DfsVolumePassThrough_Error_Vol_IoCallDriver WPP_DEFINE_MSG_ID(0,10)
  130. # define MSG_ID_DfspFormPrefix_Error1 WPP_DEFINE_MSG_ID(0,53)
  131. # define MSG_ID_DfspFormPrefix_Error2 WPP_DEFINE_MSG_ID(0,54)
  132. # define MSG_ID_DfspGetAllV3SpecialReferral_Error1 WPP_DEFINE_MSG_ID(0,67)
  133. # define MSG_ID_DfspGetAllV3SpecialReferral_Error2 WPP_DEFINE_MSG_ID(0,68)
  134. # define MSG_ID_DfspGetAllV3SpecialReferral_Error3 WPP_DEFINE_MSG_ID(0,69)
  135. # define MSG_ID_DfspGetOneV3SpecialReferral_Error1 WPP_DEFINE_MSG_ID(0,64)
  136. # define MSG_ID_DfspGetOneV3SpecialRefferal_Error1 WPP_DEFINE_MSG_ID(0,65)
  137. # define MSG_ID_DfspGetOneV3SpecialRefferal_Error2 WPP_DEFINE_MSG_ID(0,66)
  138. # define MSG_ID_DfspGetV2Referral_Error1 WPP_DEFINE_MSG_ID(0,60)
  139. # define MSG_ID_DfspGetV2Referral_Error2 WPP_DEFINE_MSG_ID(0,61)
  140. # define MSG_ID_DfspGetV3FtDfsReferral_Error1 WPP_DEFINE_MSG_ID(0,70)
  141. # define MSG_ID_DfspGetV3FtDfsReferral_Error2 WPP_DEFINE_MSG_ID(0,71)
  142. # define MSG_ID_DfspGetV3FtDfsReferral_Error3 WPP_DEFINE_MSG_ID(0,72)
  143. # define MSG_ID_DfspGetV3FtDfsReferral_Error4 WPP_DEFINE_MSG_ID(0,73)
  144. # define MSG_ID_DfspGetV3Referral_Error1 WPP_DEFINE_MSG_ID(0,62)
  145. # define MSG_ID_DfspGetV3Referral_Error2 WPP_DEFINE_MSG_ID(0,63)
  146. #define WML_ID(_id) ((MSG_ID_ ## _id) & 0xFF)
  147. #define WML_GUID(_id) ((MSG_ID_ ## _id) >> 8)
  148. extern WML_CONTROL_GUID_REG _DfsDrv_ControlGuids[];
  149. #endif /* __DFSWML_H__ */