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.

220 lines
12 KiB

  1. #ifndef _DFSMWML_H_
  2. #define _DFSMWML_H_
  3. #include "wmlmacro.h"
  4. #include "wmlum.h"
  5. #define _DFSM_ENABLE_0 0x0000
  6. #define _DFSM_ENABLE_DEFAULT 0x0001
  7. #define _DFSM_ENABLE_UNUSED11 0x0002
  8. #define _DFSM_ENABLE_FILEIO 0x0004
  9. #define _DFSM_ENABLE_FILEINFO 0x0008
  10. #define _DFSM_ENABLE_UNUSED10 0x0010
  11. #define _DFSM_ENABLE_UNUSED9 0x0020
  12. #define _DFSM_ENABLE_UNUSED8 0x0040
  13. #define _DFSM_ENABLE_UNUSED7 0x0080
  14. #define _DFSM_ENABLE_UNUSED6 0x0100
  15. #define _DFSM_ENABLE_UNUSED5 0x0200
  16. #define _DFSM_ENABLE_UNUSED4 0x0400
  17. #define _DFSM_ENABLE_UNUSED3 0x0800
  18. #define _DFSM_ENABLE_EVENT 0x1000
  19. #define _DFSM_ENABLE_ALL_ERROR 0x2000
  20. #define _DFSM_ENABLE_ERROR 0x4000
  21. #define _DFSM_ENABLE_MONITOR 0x8000
  22. #define _LEVEL_HIGH 0x1
  23. #define _LEVEL_NORM 0x2
  24. #define _LEVEL_LOW 0x4
  25. #define LOG_FLAGS(_flag) _DFSM_ENABLE_ ## _flag
  26. #define LOG_ENABLED( _level, _flags) \
  27. (( DfsRtlWmiReg.EnableLevel >= (_level) ) && \
  28. ( DfsRtlWmiReg.EnableFlags & _flags ))
  29. #define DFS_WML_LOG(_level, _flags, _id, _arg) \
  30. do { \
  31. if ( LOG_ENABLED(_level, _flags) ) { \
  32. wml.Trace( WML_ID(_id), \
  33. &DfsmRtlTraceGuid , \
  34. DfsRtlWmiReg.LoggerHandle, _arg 0); \
  35. } \
  36. } while (0)
  37. #define DFSM_LOG(_level, _flags, _type, _args) \
  38. DFS_WML_LOG(_level, _flags, _type, _args)
  39. #define DFSM_TRACE_NORM(_flags, _type, _args) \
  40. DFSM_LOG(_LEVEL_NORM, LOG_FLAGS(_flags), _type, _args)
  41. #define DFSM_TRACE_LOW(_flags, _type, _args) \
  42. DFSM_LOG(_LEVEL_LOW, LOG_FLAGS(_flags), _type, _args)
  43. #define DFSM_TRACE_HIGH( _flag, _type, _arg) \
  44. DFSM_LOG(_LEVEL_HIGH, LOG_FLAGS(_flag), _type, _arg)
  45. #define DFSM_TRACE_ERROR(_status, _flag, _type, _arg) \
  46. DFSM_LOG(_LEVEL_NORM, (LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : LOG_FLAGS(ERROR))), _type, _arg)
  47. #define DFSM_TRACE_ERROR_HIGH(_status, _flag, _type, _arg) \
  48. DFSM_LOG(_LEVEL_HIGH, (LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : LOG_FLAGS(ERROR))), _type, _arg)
  49. #define DFSM_TRACE_ERROR_LOW(_status, _flag, _type, _arg) \
  50. DFSM_LOG(_LEVEL_LOW, (LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : LOG_FLAGS(ERROR))), _type, _arg)
  51. # define WPP_DEFINE_MSG_ID(_a,_b) ( ((_a) << 16) | ( _b) )
  52. #define LOGNOTHING 0,
  53. #define WML_ID(_id) ((MSG_ID_ ## _id) & 0xFF)
  54. # define MSG_ID_CDfsServiceCreateExitPoint_Error_I_NetDfsGetVersion WPP_DEFINE_MSG_ID(0,111)
  55. # define MSG_ID_CDfsServiceCreateLocalVolume_I_NetDfsCreateLocalPartition WPP_DEFINE_MSG_ID(0,112)
  56. # define MSG_ID_CDfsServiceDeleteLocalVolume_Error_I_NetDfsDeleteLocalPartition WPP_DEFINE_MSG_ID(0,113)
  57. # define MSG_ID_CDfsServiceFixLocalVolume_Error_I_NetDfsFixLocalVolume WPP_DEFINE_MSG_ID(0,115)
  58. # define MSG_ID_CDfsServiceModifyPrefix_Error_I_NetDfsModifyPrefix WPP_DEFINE_MSG_ID(0,116)
  59. # define MSG_ID_CDfsServiceSetVolumeState_Error_I_NetDfsSetLocalVolumeState WPP_DEFINE_MSG_ID(0,114)
  60. # define MSG_ID_ClusCallBackFunction_Error_ClusterRegOpenKey WPP_DEFINE_MSG_ID(0,26)
  61. # define MSG_ID_DfsGetDsBlob_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,91)
  62. # define MSG_ID_DfsGetFtServersFromDs_Error_DsGetDcName WPP_DEFINE_MSG_ID(0,23)
  63. # define MSG_ID_DfsGetFtServersFromDs_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,24)
  64. # define MSG_ID_DfsGetFtServersFromDs_Error_ldap_search_sW_2 WPP_DEFINE_MSG_ID(0,25)
  65. # define MSG_ID_DfsInitializePrefixTable_Error1 WPP_DEFINE_MSG_ID(0,10)
  66. # define MSG_ID_DfsInitializePrefixTable_Error2 WPP_DEFINE_MSG_ID(0,11)
  67. # define MSG_ID_DfsInsertInPrefixTable_Error1 WPP_DEFINE_MSG_ID(0,12)
  68. # define MSG_ID_DfsInsertInPrefixTable_Error2 WPP_DEFINE_MSG_ID(0,13)
  69. # define MSG_ID_DfsInsertInPrefixTable_Error3 WPP_DEFINE_MSG_ID(0,14)
  70. # define MSG_ID_DfsInsertInPrefixTable_Error4 WPP_DEFINE_MSG_ID(0,15)
  71. # define MSG_ID_DfsLoadSiteTableFromDs_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,22)
  72. # define MSG_ID_DfsManagerAddService_Error_I_NetDfsManagerReportSiteInfo WPP_DEFINE_MSG_ID(0,90)
  73. # define MSG_ID_DfsManagerCreateVolumeObject_Error_I_NetDfsManagerReportSiteInfo WPP_DEFINE_MSG_ID(0,89)
  74. # define MSG_ID_DfsManagerStartDSSync_Error_NtCreateEvent WPP_DEFINE_MSG_ID(0,30)
  75. # define MSG_ID_DfsPutDsBlob_Error_ldap_modify_sW WPP_DEFINE_MSG_ID(0,92)
  76. # define MSG_ID_DfsRemoveFromPrefixTable_Error1 WPP_DEFINE_MSG_ID(0,16)
  77. # define MSG_ID_DfsmFlushStalePktEntries_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,129)
  78. # define MSG_ID_DfsmFlushStalePktEntries_Error_NtFsControl WPP_DEFINE_MSG_ID(0,130)
  79. # define MSG_ID_DfsmInitLocalPartitions_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,117)
  80. # define MSG_ID_DfsmInitLocalPartitions_Error_NtFsCOntrolFile WPP_DEFINE_MSG_ID(0,118)
  81. # define MSG_ID_DfsmMarkStalePktEntries_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,127)
  82. # define MSG_ID_DfsmMarkStalePktEntries_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,128)
  83. # define MSG_ID_DfsmPktFlushCache_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,125)
  84. # define MSG_ID_DfsmPktFlushCache_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,126)
  85. # define MSG_ID_DfsmResetPkt_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,123)
  86. # define MSG_ID_DfsmResetPkt_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,124)
  87. # define MSG_ID_DfsmStartDfs_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,119)
  88. # define MSG_ID_DfsmStartDfs_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,120)
  89. # define MSG_ID_DfsmStopDfs_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,121)
  90. # define MSG_ID_DfsmStopDfs_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,122)
  91. # define MSG_ID_DfspConnectToLdapServer_ERROR_DfspLdapOpen WPP_DEFINE_MSG_ID(0,17)
  92. # define MSG_ID_DfspCreateExitPoint_Error1 WPP_DEFINE_MSG_ID(0,99)
  93. # define MSG_ID_DfspCreateExitPoint_Error2 WPP_DEFINE_MSG_ID(0,100)
  94. # define MSG_ID_DfspCreateExitPoint_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,101)
  95. # define MSG_ID_DfspCreateFtDfsDsObj_Error_ldap_modify_sW_2 WPP_DEFINE_MSG_ID(0,132)
  96. # define MSG_ID_DfspCreateFtDfsDsObj_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,131)
  97. # define MSG_ID_DfspCreateRootServerList_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,135)
  98. # define MSG_ID_DfspDeleteExitPoint_Error1 WPP_DEFINE_MSG_ID(0,102)
  99. # define MSG_ID_DfspDeleteExitPoint_Error2 WPP_DEFINE_MSG_ID(0,103)
  100. # define MSG_ID_DfspDeleteExitPoint_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,104)
  101. # define MSG_ID_DfspGetCoveredSiteInfo_Error_DsGetSiteName WPP_DEFINE_MSG_ID(0,109)
  102. # define MSG_ID_DfspGetCoveredSiteInfo_Error_RegOpenKey WPP_DEFINE_MSG_ID(0,105)
  103. # define MSG_ID_DfspGetCoveredSiteInfo_Error_RegQueryInfoKey WPP_DEFINE_MSG_ID(0,106)
  104. # define MSG_ID_DfspGetCoveredSiteInfo_Error_RegQueryValueEx WPP_DEFINE_MSG_ID(0,107)
  105. # define MSG_ID_DfspGetCoveredSiteInfo_Error_RegQueryValueEx2 WPP_DEFINE_MSG_ID(0,108)
  106. # define MSG_ID_DfspGetOneEnumInfo_Error1 WPP_DEFINE_MSG_ID(0,87)
  107. # define MSG_ID_DfspGetOneEnumInfo_Error2 WPP_DEFINE_MSG_ID(0,88)
  108. # define MSG_ID_DfspGetPdc_Error_DsGetDcName WPP_DEFINE_MSG_ID(0,31)
  109. # define MSG_ID_DfspGetRemoteConfigInfo_Error_NetDfsManagerGetConfigInfo WPP_DEFINE_MSG_ID(0,110)
  110. # define MSG_ID_DfspLdapOpen_Error_ldap_bind_s WPP_DEFINE_MSG_ID(0,136)
  111. # define MSG_ID_DfspLdapOpen_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,137)
  112. # define MSG_ID_DfspRemoveFtDfsDsObj_Error_ldap_modify_sW WPP_DEFINE_MSG_ID(0,134)
  113. # define MSG_ID_DfspRemoveFtDfsDsObj_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,133)
  114. # define MSG_ID_GetDcName_Error_GetDcName WPP_DEFINE_MSG_ID(0,21)
  115. # define MSG_ID_InitializeNetDfsInterface_Error_RpcServerListen WPP_DEFINE_MSG_ID(0,29)
  116. # define MSG_ID_InitializeNetDfsInterface_Error_RpcServerRegisterIf WPP_DEFINE_MSG_ID(0,28)
  117. # define MSG_ID_InitializeNetDfsInterface_Error_RpcServerUseProtseqEpW WPP_DEFINE_MSG_ID(0,27)
  118. # define MSG_ID_MoveFileOrJP_Error1 WPP_DEFINE_MSG_ID(0,93)
  119. # define MSG_ID_MoveFileOrJP_Error2 WPP_DEFINE_MSG_ID(0,94)
  120. # define MSG_ID_MoveFileOrJP_Error3 WPP_DEFINE_MSG_ID(0,98)
  121. # define MSG_ID_MoveFileOrJP_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,95)
  122. # define MSG_ID_MoveFileOrJP_Error_NtCreateFile2 WPP_DEFINE_MSG_ID(0,96)
  123. # define MSG_ID_MoveFileOrJP_Error_NtSetInformationFile WPP_DEFINE_MSG_ID(0,97)
  124. # define MSG_ID_NetrDfsAdd2_End WPP_DEFINE_MSG_ID(0,41)
  125. # define MSG_ID_NetrDfsAdd2_Error1 WPP_DEFINE_MSG_ID(0,37)
  126. # define MSG_ID_NetrDfsAdd2_Error2 WPP_DEFINE_MSG_ID(0,39)
  127. # define MSG_ID_NetrDfsAdd2_Error_I_NetDfsManagerReportSiteInfo WPP_DEFINE_MSG_ID(0,40)
  128. # define MSG_ID_NetrDfsAdd2_Error_NetShareGetInfo WPP_DEFINE_MSG_ID(0,38)
  129. # define MSG_ID_NetrDfsAdd2_Start WPP_DEFINE_MSG_ID(0,36)
  130. # define MSG_ID_NetrDfsAddFtRoot_End WPP_DEFINE_MSG_ID(0,43)
  131. # define MSG_ID_NetrDfsAddFtRoot_Start WPP_DEFINE_MSG_ID(0,42)
  132. # define MSG_ID_NetrDfsAddStdRootForced_End WPP_DEFINE_MSG_ID(0,53)
  133. # define MSG_ID_NetrDfsAddStdRootForced_Start WPP_DEFINE_MSG_ID(0,52)
  134. # define MSG_ID_NetrDfsAddStdRoot_End WPP_DEFINE_MSG_ID(0,51)
  135. # define MSG_ID_NetrDfsAddStdRoot_Start WPP_DEFINE_MSG_ID(0,50)
  136. # define MSG_ID_NetrDfsAdd_End WPP_DEFINE_MSG_ID(0,35)
  137. # define MSG_ID_NetrDfsAdd_Start WPP_DEFINE_MSG_ID(0,34)
  138. # define MSG_ID_NetrDfsEnum200_Error1 WPP_DEFINE_MSG_ID(0,69)
  139. # define MSG_ID_NetrDfsEnum200_Error2 WPP_DEFINE_MSG_ID(0,70)
  140. # define MSG_ID_NetrDfsEnum200_Error3 WPP_DEFINE_MSG_ID(0,71)
  141. # define MSG_ID_NetrDfsEnum200_Error4 WPP_DEFINE_MSG_ID(0,72)
  142. # define MSG_ID_NetrDfsEnum200_Error5 WPP_DEFINE_MSG_ID(0,73)
  143. # define MSG_ID_NetrDfsEnum200_Error6 WPP_DEFINE_MSG_ID(0,74)
  144. # define MSG_ID_NetrDfsEnumEx_End WPP_DEFINE_MSG_ID(0,76)
  145. # define MSG_ID_NetrDfsEnumEx_Start WPP_DEFINE_MSG_ID(0,75)
  146. # define MSG_ID_NetrDfsEnum_End WPP_DEFINE_MSG_ID(0,68)
  147. # define MSG_ID_NetrDfsEnum_Start WPP_DEFINE_MSG_ID(0,67)
  148. # define MSG_ID_NetrDfsFlushFtTable_Error_NtCreateFile WPP_DEFINE_MSG_ID(0,49)
  149. # define MSG_ID_NetrDfsFlushFtTable_Start WPP_DEFINE_MSG_ID(0,48)
  150. # define MSG_ID_NetrDfsGetDcAddress_End WPP_DEFINE_MSG_ID(0,45)
  151. # define MSG_ID_NetrDfsGetDcAddress_Start WPP_DEFINE_MSG_ID(0,44)
  152. # define MSG_ID_NetrDfsGetInfo_End WPP_DEFINE_MSG_ID(0,66)
  153. # define MSG_ID_NetrDfsGetInfo_Start WPP_DEFINE_MSG_ID(0,65)
  154. # define MSG_ID_NetrDfsManagerGetConfigInfo_End WPP_DEFINE_MSG_ID(0,82)
  155. # define MSG_ID_NetrDfsManagerGetConfigInfo_Start WPP_DEFINE_MSG_ID(0,81)
  156. # define MSG_ID_NetrDfsManagerGetVersion_End WPP_DEFINE_MSG_ID(0,33)
  157. # define MSG_ID_NetrDfsManagerGetVersion_Start WPP_DEFINE_MSG_ID(0,32)
  158. # define MSG_ID_NetrDfsManagerInitialize_End WPP_DEFINE_MSG_ID(0,86)
  159. # define MSG_ID_NetrDfsManagerInitialize_Start WPP_DEFINE_MSG_ID(0,85)
  160. # define MSG_ID_NetrDfsManagerSendSiteInfo_End WPP_DEFINE_MSG_ID(0,84)
  161. # define MSG_ID_NetrDfsManagerSendSiteInfo_Start WPP_DEFINE_MSG_ID(0,83)
  162. # define MSG_ID_NetrDfsMove_End WPP_DEFINE_MSG_ID(0,78)
  163. # define MSG_ID_NetrDfsMove_Start WPP_DEFINE_MSG_ID(0,77)
  164. # define MSG_ID_NetrDfsRemove2_End WPP_DEFINE_MSG_ID(0,57)
  165. # define MSG_ID_NetrDfsRemove2_Start WPP_DEFINE_MSG_ID(0,56)
  166. # define MSG_ID_NetrDfsRemoveFtRoot_End WPP_DEFINE_MSG_ID(0,59)
  167. # define MSG_ID_NetrDfsRemoveFtRoot_Start WPP_DEFINE_MSG_ID(0,58)
  168. # define MSG_ID_NetrDfsRemoveStdRoot_End WPP_DEFINE_MSG_ID(0,61)
  169. # define MSG_ID_NetrDfsRemoveStdRoot_Start WPP_DEFINE_MSG_ID(0,60)
  170. # define MSG_ID_NetrDfsRemove_End WPP_DEFINE_MSG_ID(0,55)
  171. # define MSG_ID_NetrDfsRemove_Start WPP_DEFINE_MSG_ID(0,54)
  172. # define MSG_ID_NetrDfsRename_End WPP_DEFINE_MSG_ID(0,80)
  173. # define MSG_ID_NetrDfsRename_Start WPP_DEFINE_MSG_ID(0,79)
  174. # define MSG_ID_NetrDfsSetDcAddress_End WPP_DEFINE_MSG_ID(0,47)
  175. # define MSG_ID_NetrDfsSetDcAddress_Start WPP_DEFINE_MSG_ID(0,46)
  176. # define MSG_ID_NetrDfsSetInfo2_End WPP_DEFINE_MSG_ID(0,64)
  177. # define MSG_ID_NetrDfsSetInfo2_Error1 WPP_DEFINE_MSG_ID(0,63)
  178. # define MSG_ID_NetrDfsSetInfo2_Start WPP_DEFINE_MSG_ID(0,62)
  179. # define MSG_ID__FlushObjectTable_Error_ldap_modify_ext_sW WPP_DEFINE_MSG_ID(0,20)
  180. # define MSG_ID__IsObjectTableUpToDate_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,18)
  181. # define MSG_ID__ReadObjectTable_Error_ldap_search_sW WPP_DEFINE_MSG_ID(0,19)
  182. #if defined (c_plusplus) || defined (__cplusplus)
  183. extern "C" {
  184. extern WML_DATA wml;
  185. extern WMILIB_REG_STRUCT DfsRtlWmiReg;
  186. extern GUID DfsmRtlTraceGuid;
  187. };
  188. #else
  189. extern WML_DATA wml;
  190. extern WMILIB_REG_STRUCT DfsRtlWmiReg;
  191. extern GUID DfsmRtlTraceGuid;
  192. #endif //C_PLUS_PLUS
  193. #endif // _DFSMWML_H_