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.

110 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1987-1993 Microsoft Corporation
  3. Module Name:
  4. debug.h
  5. Abstract:
  6. NtLmSsp service debug support
  7. Author:
  8. Ported from Lan Man 2.0
  9. Revision History:
  10. 21-May-1991 (cliffv)
  11. Ported to NT. Converted to NT style.
  12. 09-Apr-1992 JohnRo
  13. Prepare for WCHAR.H (_wcsicmp vs _wcscmpi, etc).
  14. --*/
  15. #ifndef DEBUG_H
  16. #define DEBUG_H
  17. //
  18. // init.c will #include this file with DEBUG_ALLOCATE defined.
  19. // That will cause each of these variables to be allocated.
  20. //
  21. #ifdef DEBUG_ALLOCATE
  22. #define EXTERN
  23. #else
  24. #define EXTERN extern
  25. #endif
  26. ////////////////////////////////////////////////////////////////////////
  27. //
  28. // Debug Definititions
  29. //
  30. ////////////////////////////////////////////////////////////////////////
  31. #define SSP_INIT 0x00000001 // Initialization
  32. #define SSP_MISC 0x00000002 // Misc debug
  33. #define SSP_API 0x00000004 // API processing
  34. #define SSP_LPC 0x00000008 // LPC
  35. #define SSP_NTLMV2 0x00000010 // NTLMv2 specific
  36. #define SSP_CRED 0x00000020 // cred
  37. #define SSP_CRITICAL 0x00000100 // Only real important errors
  38. #define SSP_WARNING 0x00000200 // warning
  39. //
  40. // Very verbose bits
  41. //
  42. #define SSP_API_MORE 0x04000000 // verbose API
  43. #define SSP_LPC_MORE 0x08000000 // verbose LPC
  44. //
  45. // Control bits.
  46. //
  47. #define SSP_TIMESTAMP 0x20000000 // TimeStamp each output line
  48. #define SSP_REQUEST_TARGET 0x40000000 // Force client to ask for target name
  49. #define SSP_USE_OEM 0x80000000 // Force client to use OEM character set
  50. //
  51. // Name and directory of log file
  52. //
  53. #ifdef DEBUGRPC
  54. #define ASSERT(con) \
  55. if (!(con)) \
  56. SspPrint((SSP_MISC, "Assert %s(%d): "#con"\n", __FILE__, __LINE__));
  57. EXTERN ULONG SspGlobalDbflag;
  58. #define IF_DEBUG(Function) \
  59. if (SspGlobalDbflag & SSP_ ## Function)
  60. #define SspPrint(_x_) SspPrintRoutine _x_
  61. void
  62. SspPrintRoutine(
  63. IN ULONG DebugFlag,
  64. IN PCHAR FORMATSTRING, // PRINTF()-STYLE FORMAT STRING.
  65. ... // OTHER ARGUMENTS ARE POSSIBLE.
  66. );
  67. #else
  68. #define ASSERT(con)
  69. #define IF_DEBUG(Function) if (FALSE)
  70. // Nondebug version.
  71. #define SspPrint(_x_)
  72. #endif // DEBUGRPC
  73. #undef EXTERN
  74. #endif // DEBUG_H