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.

86 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1998-2000 Microsoft Corporation
  3. Module Name:
  4. dbgmsg.h
  5. Abstract:
  6. Debug message macros and zones.
  7. Revision History:
  8. --*/
  9. #if DBG
  10. #define DEBUG_MSG 1
  11. #endif // DBG
  12. //
  13. // If DEBUG_MSG is defined, then we have DEBUGMSG turned on in this environment.
  14. //
  15. #ifdef DEBUG_MSG
  16. #define DTEXT(x) x
  17. extern uint DbgSettingsLevel;
  18. extern uint DbgSettingsZone;
  19. #define DEBUGZONE(n) (DbgSettingsZone & (0x00000001<<n))
  20. #define DEBUGLEVEL(n) (DbgSettingsLevel & (0x00000001<<n))
  21. typedef ULONG (__cdecl *PDBGMSG)(PCH pszFormat, ...);
  22. extern PDBGMSG g_pDbgMsg;
  23. #define DEBUGMSG(dbgs,format) ((dbgs) ? g_pDbgMsg format:0)
  24. extern VOID DebugMsgInit();
  25. #define DEBUGMSGINIT() DebugMsgInit()
  26. #define DBG_INIT DEBUGZONE(0)
  27. #define DBG_PNP DEBUGZONE(1)
  28. #define DBG_REQUEST DEBUGZONE(4)
  29. #define DBG_INTERFACE DEBUGZONE(5)
  30. #define DBG_OFFLOAD DEBUGZONE(6)
  31. #define DBG_REG DEBUGZONE(7)
  32. #define DBG_ROUTE DEBUGZONE(8)
  33. #define DBG_ARP DEBUGZONE(9)
  34. #define DBG_IP DEBUGZONE(10)
  35. #define DBG_TCP DEBUGZONE(11)
  36. #define DBG_UDP DEBUGZONE(12)
  37. #define DBG_ICMP DEBUGZONE(13)
  38. #define DBG_IGMP DEBUGZONE(14)
  39. #define DBG_RAW DEBUGZONE(15)
  40. #define DBG_TDI DEBUGZONE(16)
  41. #define DBG_NDIS DEBUGZONE(17)
  42. #define DBG_SETINFO DEBUGZONE(18)
  43. #define DBG_QUERYINFO DEBUGZONE(19)
  44. #define DBG_NOTIFY DEBUGZONE(20)
  45. #define DBG_DHCP DEBUGZONE(21)
  46. // These are very verbose!
  47. #define DBG_TX DEBUGZONE(29)
  48. #define DBG_RX DEBUGZONE(30)
  49. #define DBG_FWD DEBUGZONE(31)
  50. #define DBG_TRACE DEBUGLEVEL(0)
  51. #define DBG_INFO DEBUGLEVEL(1)
  52. #define DBG_WARN DEBUGLEVEL(2)
  53. #define DBG_ERROR DEBUGLEVEL(3)
  54. #define DBG_VERBOSE DEBUGLEVEL(31)
  55. #else // DEBUG_MSG
  56. //
  57. // No DEBUGMSGs.
  58. //
  59. #define DEBUGMSG(d,f) (0)
  60. #define DEBUGMSGINIT() (0)
  61. #endif // DEBUG_MSG