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.

126 lines
3.7 KiB

  1. /* file: mbftdbg.h */
  2. #ifndef __MBFTDBG_H__
  3. #define __MBFTDBG_H__
  4. #ifdef __cplusplus
  5. extern "C"
  6. {
  7. #endif
  8. #ifdef _DEBUG
  9. VOID InitDebug(void);
  10. VOID DeInitDebugMbft(void);
  11. PCSTR FAR PASCAL GetMbftRcString(DWORD dwRc);
  12. LPCTSTR GetMcsErrorString(MCSError mcsError);
  13. #else
  14. #define InitDebug()
  15. #define DeInitDebugMbft()
  16. #endif
  17. #ifdef _DEBUG
  18. VOID DbgMsgMbft(PCHAR psz,...);
  19. extern HDBGZONE ghZoneMbft;
  20. #define ZONE_MBFT_SEND 0x0000
  21. #define ZONE_MBFT_MCS 0x0001
  22. #define ZONE_MBFT_RECEIVE 0x0002
  23. #define ZONE_MBFT_STATE 0x0003
  24. #define ZONE_MBFT_INIT 0x0004
  25. #define ZONE_MBFT_GCC 0x0005
  26. #define ZONE_MBFT_PDU 0x0006
  27. #define ZONE_MBFT_DELETE 0x0007
  28. #define ZONE_MBFT_API 0x0008
  29. #define ZONE_MBFT_COMPRESS 0x0009
  30. #define ZONE_MBFT_OTHER 0x000A
  31. #define _TRACE_SEND 0x0001
  32. #define _TRACE_MCS 0x0002
  33. #define _TRACE_RECEIVE 0x0004
  34. #define _TRACE_STATE 0x0008
  35. #define _TRACE_INIT 0x0010
  36. #define _TRACE_GCC 0x0020
  37. #define _TRACE_PDU 0x0040
  38. #define _TRACE_DELETE 0x0080
  39. #define _TRACE_API 0x0100
  40. #define _TRACE_COMPRESS 0x0200
  41. #define TRACE DBGMSG(ghZoneMbft, ZONE_MBFT_OTHER, ("Mbft Trace"));\
  42. DbgMsgMbft
  43. #define TRACESEND DBGMSG(ghZoneMbft, ZONE_MBFT_SEND, ("SEND(%Fp,%ld): ",m_lpParentEngine,m_EventHandle));\
  44. if(GETZONEMASK(ghZoneMbft) & _TRACE_SEND) \
  45. DbgMsgMbft
  46. #define TRACEMCS DBGMSG(ghZoneMbft, ZONE_MBFT_MCS, ("MCS(%Fp): ",this));\
  47. if(GETZONEMASK(ghZoneMbft) & _TRACE_MCS) \
  48. DbgMsgMbft
  49. #define TRACERECEIVE DBGMSG(ghZoneMbft, ZONE_MBFT_RECEIVE, ("RECEIVE(%Fp,%ld): ",m_lpParentEngine,m_EventHandle));\
  50. if(GETZONEMASK(ghZoneMbft) & _TRACE_RECEIVE) \
  51. DbgMsgMbft
  52. #define TRACEAPI DBGMSG(ghZoneMbft, ZONE_MBFT_API, ("API(%Fp): ",m_pEngine));\
  53. if(GETZONEMASK(ghZoneMbft) & _TRACE_API) \
  54. DbgMsgMbft
  55. #define TRACESTATE DBGMSG(ghZoneMbft, ZONE_MBFT_STATE, ("STATE(%Fp): ",this));\
  56. if(GETZONEMASK(ghZoneMbft) & _TRACE_STATE) \
  57. DbgMsgMbft
  58. #define TRACEINIT DBGMSG(ghZoneMbft, ZONE_MBFT_INIT, ("INIT(%Fp): ",m_lpParentEngine));\
  59. if(GETZONEMASK(ghZoneMbft) & _TRACE_INIT) \
  60. DbgMsgMbft
  61. #define TRACEGCC DBGMSG(ghZoneMbft, ZONE_MBFT_GCC, ("GCC(%Fp): ",this));\
  62. if(GETZONEMASK(ghZoneMbft) & _TRACE_GCC) \
  63. DbgMsgMbft
  64. #define TRACEPDU DBGMSG(ghZoneMbft, ZONE_MBFT_PDU, ("PDU(%Fp): ",this));\
  65. if(GETZONEMASK(ghZoneMbft) & _TRACE_PDU) \
  66. DbgMsgMbft
  67. #define TRACEDELETE DBGMSG(ghZoneMbft, ZONE_MBFT_DELETE, ("Mbft Delete"));\
  68. if(GETZONEMASK(ghZoneMbft) & _TRACE_DELETE) \
  69. DbgMsgMbft
  70. #define TRACECOMPRESS DBGMSG(ghZoneMbft, ZONE_MBFT_COMPRESS, ("Compression: "));\
  71. if(GETZONEMASK(ghZoneMbft) & _TRACE_COMPRESS) \
  72. DbgMsgMbft
  73. #else
  74. #define TRACE
  75. #define TRACESEND
  76. #define TRACEMCS
  77. #define TRACERECEIVE
  78. #define TRACEAPI
  79. #define TRACESTATE
  80. #define TRACEINIT
  81. #define TRACEGCC
  82. #define TRACEPDU
  83. #define TRACEDELETE
  84. #define TRACECOMPRESS
  85. #endif // _TRACE
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #endif //__MBFTDBG_H__