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.

120 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. debug.h
  5. Abstract:
  6. This module contains declarations for debugging and eventlogging support.
  7. Author:
  8. Abolade Gbadegesin (aboladeg) 2-Mar-1998
  9. Revision History:
  10. --*/
  11. #ifndef _NATHLP_DEBUG_H_
  12. #define _NATHLP_DEBUG_H_
  13. #define TRACE_FLAG_PROFILE ((ULONG)0x00010000 | TRACE_USE_MASK)
  14. #define TRACE_FLAG_SOCKET ((ULONG)0x00020000 | TRACE_USE_MASK)
  15. #define TRACE_FLAG_IF ((ULONG)0x00040000 | TRACE_USE_MASK)
  16. #define TRACE_FLAG_IO ((ULONG)0x00080000 | TRACE_USE_MASK)
  17. #define TRACE_FLAG_DHCP ((ULONG)0x00100000 | TRACE_USE_MASK)
  18. #define TRACE_FLAG_BUFFER ((ULONG)0x00200000 | TRACE_USE_MASK)
  19. #define TRACE_FLAG_INIT ((ULONG)0x00400000 | TRACE_USE_MASK)
  20. #define TRACE_FLAG_DNS ((ULONG)0x00800000 | TRACE_USE_MASK)
  21. #define TRACE_FLAG_NAT ((ULONG)0x01000000 | TRACE_USE_MASK)
  22. #define TRACE_FLAG_REG ((ULONG)0x02000000 | TRACE_USE_MASK)
  23. #define TRACE_FLAG_TIMER ((ULONG)0x04000000 | TRACE_USE_MASK)
  24. // MASK VALUE 0x08000000 is available,
  25. #define TRACE_FLAG_H323 ((ULONG)0x10000000 | TRACE_USE_MASK)
  26. #define TRACE_FLAG_FTP ((ULONG)0x20000000 | TRACE_USE_MASK)
  27. #define TRACE_FLAG_FWLOG ((ULONG)0x40000000 | TRACE_USE_MASK)
  28. #define TRACE_FLAG_ALG ((ULONG)0x80000000 | TRACE_USE_MASK)
  29. #if 1
  30. #define PROFILE(f) NhTrace(TRACE_FLAG_PROFILE, f)
  31. #else
  32. #if DBG
  33. #define PROFILE(f) NhTrace(TRACE_FLAG_PROFILE, f)
  34. #else
  35. #define PROFILE(f)
  36. #endif
  37. #endif
  38. extern HANDLE NhEventLogHandle;
  39. //
  40. // TRACING ROUTINE DECLARATIONS
  41. //
  42. VOID
  43. NhDump(
  44. ULONG Flags,
  45. PUCHAR Buffer,
  46. ULONG BufferLength,
  47. ULONG Width
  48. );
  49. VOID
  50. NhInitializeTraceManagement(
  51. VOID
  52. );
  53. VOID
  54. NhShutdownTraceManagement(
  55. VOID
  56. );
  57. VOID
  58. NhTrace(
  59. ULONG Flags,
  60. PCHAR Format,
  61. ...
  62. );
  63. //
  64. // EVENT-LOGGING ROUTINE DECLARATIONS
  65. //
  66. VOID
  67. NhInitializeEventLogManagement(
  68. VOID
  69. );
  70. VOID
  71. NhErrorLog(
  72. ULONG MessageId,
  73. ULONG ErrorCode,
  74. PCHAR Format,
  75. ...
  76. );
  77. VOID
  78. NhInformationLog(
  79. ULONG MessageId,
  80. ULONG ErrorCode,
  81. PCHAR Format,
  82. ...
  83. );
  84. VOID
  85. NhWarningLog(
  86. ULONG MessageId,
  87. ULONG ErrorCode,
  88. PCHAR Format,
  89. ...
  90. );
  91. VOID
  92. NhShutdownEventLogManagement(
  93. VOID
  94. );
  95. #endif // _NATHLP_DEBUG_H_