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.

128 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. net\routing\ipx\sap\sapdebug.h
  5. Abstract:
  6. Header file for debugging support module for SAP agent
  7. Author:
  8. Vadim Eydelman 05-15-1995
  9. Revision History:
  10. --*/
  11. #ifndef _SAP_SAPDEBUG
  12. #define _SAP_SAPDEBUG
  13. extern HANDLE RouterEventLogHdl;
  14. extern DWORD EventLogMask;
  15. #define IF_LOG(Event) \
  16. if ((RouterEventLogHdl!=NULL) && ((Event&EventLogMask)==Event))
  17. // Debug flags supported by SAP agent componenets
  18. // Report failures in system routines
  19. #define DEBUG_FAILURES 0x00010000
  20. // Component wide events and external problems
  21. #define DEBUG_SYNCHRONIZATION 0x00020000
  22. #define DEBUG_SERVERDB 0x00040000
  23. #define DEBUG_INTERFACES 0x00080000
  24. #define DEBUG_TIMER 0x00100000
  25. #define DEBUG_LPC 0x00200000
  26. #define DEBUG_ADAPTERS 0x00400000 // Only one of
  27. #define DEBUG_ASYNCRESULT 0x00400000 // two can be operational
  28. #define DEBUG_NET_IO 0x00800000
  29. // Workers
  30. #define DEBUG_BCAST 0x01000000
  31. #define DEBUG_SREQ 0x02000000
  32. #define DEBUG_REQ 0x04000000
  33. #define DEBUG_RESP 0x08000000
  34. #define DEBUG_GET_NEAREST 0x10000000
  35. #define DEBUG_LPCREQ 0x20000000
  36. #define DEBUG_TREQ 0x40000000
  37. #define DEBUG_FILTERS 0x80000000
  38. #if DBG
  39. // Complement assert macros in nt rtl
  40. #define ASSERTERR(exp) \
  41. if (!(exp)) { \
  42. DbgPrint("Get last error= %d\n", GetLastError ()); \
  43. RtlAssert( #exp, __FILE__, __LINE__, NULL ); \
  44. }
  45. #define ASSERTERRMSG(msg,exp) \
  46. if (!(exp)) { \
  47. DbgPrint("Get last error= %d\n", GetLastError ()); \
  48. RtlAssert( #exp, __FILE__, __LINE__, msg ); \
  49. }
  50. #else
  51. #define ASSERTERR(exp)
  52. #define ASSERTERRMSG(msg,exp)
  53. #endif
  54. /*++
  55. *******************************************************************
  56. T r a c e
  57. Routine Description:
  58. Printf debugging info to console/file/debugger
  59. Arguments:
  60. componentID - id of the component that prints trace info
  61. format - format string
  62. Return Value:
  63. None
  64. *******************************************************************
  65. --*/
  66. VOID
  67. Trace (
  68. DWORD componentID,
  69. CHAR *format,
  70. ...
  71. );
  72. /*++
  73. *******************************************************************
  74. D b g I n i t i a l i z e
  75. Routine Description:
  76. Initializes debugging support stuff
  77. Arguments:
  78. hinstDll - dll module instance
  79. Return Value:
  80. None
  81. *******************************************************************
  82. --*/
  83. VOID
  84. DbgInitialize (
  85. HINSTANCE hinstDLL
  86. );
  87. /*++
  88. *******************************************************************
  89. D b g S t o p
  90. Routine Description:
  91. Cleanup debugging support stuff
  92. Arguments:
  93. None
  94. Return Value:
  95. None
  96. *******************************************************************
  97. --*/
  98. VOID
  99. DbgStop (
  100. void
  101. );
  102. #endif