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.

86 lines
3.3 KiB

  1. #ifndef _SVCWML_H_
  2. #define _SVCWML_H_
  3. #include "wmlmacro.h"
  4. #include "wmlum.h"
  5. #define _DFSSVC_ENABLE_DEFAULT 0x0001
  6. #define _DFSSVC_ENABLE_UNUSED11 0x0002
  7. #define _DFSSVC_ENABLE_FILEIO 0x0004
  8. #define _DFSSVC_ENABLE_FILEINFO 0x0008
  9. #define _DFSSVC_ENABLE_UNUSED10 0x0010
  10. #define _DFSSVC_ENABLE_UNUSED9 0x0020
  11. #define _DFSSVC_ENABLE_UNUSED8 0x0040
  12. #define _DFSSVC_ENABLE_UNUSED7 0x0080
  13. #define _DFSSVC_ENABLE_UNUSED6 0x0100
  14. #define _DFSSVC_ENABLE_UNUSED5 0x0200
  15. #define _DFSSVC_ENABLE_UNUSED4 0x0400
  16. #define _DFSSVC_ENABLE_UNUSED3 0x0800
  17. #define _DFSSVC_ENABLE_UNUSED2 0x1000
  18. #define _DFSSVC_ENABLE_ALL_ERROR 0x2000
  19. #define _DFSSVC_ENABLE_ERROR 0x4000
  20. #define _DFSSVC_ENABLE_MONITOR 0x8000
  21. #define _LEVEL_HIGH 0x1
  22. #define _LEVEL_NORM 0x2
  23. #define _LEVEL_LOW 0x4
  24. #define LOG_FLAGS(_flag) _DFSSVC_ENABLE_ ## _flag
  25. #define LOG_ENABLED( _level, _flags) \
  26. (( DfsRtlWmiReg.EnableLevel >= (_level) ) && \
  27. ( DfsRtlWmiReg.EnableFlags & _flags ))
  28. #define DFS_WML_LOG(_level, _flags, _id, _arg) \
  29. do { \
  30. if ( LOG_ENABLED(_level, _flags) ) { \
  31. wml.Trace( WML_ID(_id), \
  32. &DfsRtlTraceGuid , \
  33. DfsRtlWmiReg.LoggerHandle, _arg 0); \
  34. } \
  35. } while (0)
  36. #define DFSSVC_LOG(_level, _flags, _type, _args) \
  37. DFS_WML_LOG(_level, _flags, _type, _args)
  38. #define DFSSVC_TRACE_HIGH(_flags, _type, _args) \
  39. DFSSVC_LOG(_LEVEL_HIGH, LOG_FLAGS(_flags), _type, _args)
  40. #define DFSSVC_TRACE_NORM(_flags, _type, _args) \
  41. DFSSVC_LOG(_LEVEL_NORM, LOG_FLAGS(_flags), _type, _args)
  42. #define DFSSVC_TRACE_LOW(_flags, _type, _args) \
  43. DFSSVC_LOG(_LEVEL_LOW, LOG_FLAGS(_flags), _type, _args)
  44. #define DFSSVC_TRACE_ERROR(_status, _flag, _type, _arg) \
  45. DFSSVC_LOG(_LEVEL_NORM, (LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : LOG_FLAGS(ERROR))), _type, _arg)
  46. #define DFSSVC_TRACE_ERROR_HIGH(_status, _flag, _type, _arg) \
  47. DFSSVC_LOG(_LEVEL_HIGH, (LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : LOG_FLAGS(ERROR))), _type, _arg)
  48. #define DFSSVC_TRACE_ERROR_LOW(_status, _flag, _type, _arg) \
  49. DFSSVC_LOG(_LEVEL_LOW, (LOG_FLAGS(_flag) | (NT_SUCCESS(_status) ? 0 : LOG_FLAGS(ERROR))), _type, _arg)
  50. # define WPP_DEFINE_MSG_ID(_a,_b) ( ((_a) << 16) | ( _b) )
  51. #define WML_ID(_id) ((MSG_ID_ ## _id) & 0xFF)
  52. # define MSG_ID_DfsCreateSiteArg_Entry WPP_DEFINE_MSG_ID(0,13)
  53. # define MSG_ID_DfsCreateSiteArg_Exit WPP_DEFINE_MSG_ID(0,14)
  54. # define MSG_ID_DfsDomainReferral_Entry WPP_DEFINE_MSG_ID(0,15)
  55. # define MSG_ID_DfsInitOurDomainDCs_Exit WPP_DEFINE_MSG_ID(0,10)
  56. # define MSG_ID_DfsInitRemainingDomainDCs_Error_NtFsControlFile WPP_DEFINE_MSG_ID(0,11)
  57. # define MSG_ID_DfsInitRemainingDomainDCs_Error_NtFsControlFile2 WPP_DEFINE_MSG_ID(0,12)
  58. # define MSG_ID_DfspInsertDsDomainList_Entry WPP_DEFINE_MSG_ID(0,17)
  59. # define MSG_ID_DfspInsertLsaDomainList_Entry WPP_DEFINE_MSG_ID(0,16)
  60. extern WML_DATA wml;
  61. extern WMILIB_REG_STRUCT DfsRtlWmiReg;
  62. extern GUID DfsRtlTraceGuid;
  63. void print(UINT level, PCHAR str);
  64. #endif // _SVCWML_H_