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.

108 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. ripdbg.h
  5. Abstract:
  6. This module contains the debug utilities definitions
  7. Author:
  8. Stefan Solomon 03/03/1995
  9. Revision History:
  10. --*/
  11. #ifndef _RIPDBG_
  12. #define _RIPDBG_
  13. //*** Tracing Components IDs ***
  14. #define RIP_REQUEST_TRACE 0x00010000
  15. #define RIP_RESPONSE_TRACE 0x00020000
  16. #define SEND_TRACE 0x00040000
  17. #define RECEIVE_TRACE 0x00080000
  18. #define INIT_TRACE 0x00100000
  19. #define IFMGR_TRACE 0x00200000
  20. #define CHANGEBC_TRACE 0x00400000
  21. #define RTM_TRACE 0x00800000
  22. #define RIP_ALERT 0x80000000
  23. #if DBG
  24. //*** Definitions to enable debug printing
  25. extern DWORD DbgLevel;
  26. #define DEFAULT_DEBUG_LEVEL 0
  27. #define DEBUG if ( TRUE )
  28. #define IF_DEBUG(flag) if (DbgLevel & (DEBUG_ ## flag))
  29. VOID
  30. SsDbgInitialize(VOID);
  31. VOID
  32. SsAssert(
  33. IN PVOID FailedAssertion,
  34. IN PVOID FileName,
  35. IN ULONG LineNumber
  36. );
  37. VOID
  38. SsPrintf (
  39. char *Format,
  40. ...
  41. );
  42. VOID
  43. SsPrintPacket(PUCHAR packetp);
  44. #define SS_DBGINITIALIZE SsDbgInitialize()
  45. #define SS_PRINT(args) SsPrintf args
  46. #define SS_PRINT_PACKET(args) SsPrintPacket args
  47. #define SS_ASSERT(exp) if (!(exp)) SsAssert( #exp, __FILE__, __LINE__ )
  48. #else
  49. #define DEBUG if ( FALSE )
  50. #define IF_DEBUG(flag) if (FALSE)
  51. #define SS_DBGINITIALIZE
  52. #define SS_PRINT(args)
  53. #define SS_PRINT_PACKET(args)
  54. #define SS_ASSERT(exp)
  55. #endif // DBG
  56. VOID
  57. StartTracing(VOID);
  58. VOID
  59. Trace(ULONG ComponentID,
  60. char *Format,
  61. ...);
  62. VOID
  63. StopTracing(VOID);
  64. extern HANDLE RipEventLogHdl;
  65. extern DWORD RipEventLogMask;
  66. #define IF_LOG(Event) \
  67. if ((RipEventLogHdl!=NULL) && ((Event&RipEventLogMask)==Event))
  68. #endif // ndef _RIPDBG_
  69.