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.

115 lines
2.7 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. //
  16. // kerbstub.cxx will #include this file with DEBUG_ALLOCATE defined.
  17. // That will cause each of these variables to be allocated.
  18. //
  19. #ifdef EXTERN
  20. #undef EXTERN
  21. #endif
  22. #ifdef DEBUG_ALLOCATE
  23. #define EXTERN
  24. #else
  25. #define EXTERN extern
  26. #endif
  27. ////////////////////////////////////////////////////////////////////////
  28. //
  29. // Debug Definititions
  30. //
  31. ////////////////////////////////////////////////////////////////////////
  32. #define SSP_INIT 0x00000001 // Initialization
  33. #define SSP_MISC 0x00000002 // Misc debug
  34. #define SSP_API 0x00000004 // API processing
  35. #define SSP_LPC 0x00000008 // LPC
  36. #define SSP_CRITICAL 0x00000100 // Only real important errors
  37. //
  38. // Very verbose bits
  39. //
  40. #define SSP_API_MORE 0x04000000 // verbose API
  41. #define SSP_LPC_MORE 0x08000000 // verbose LPC
  42. //
  43. // Control bits.
  44. //
  45. #define SSP_TIMESTAMP 0x20000000 // TimeStamp each output line
  46. #define SSP_REQUEST_TARGET 0x40000000 // Force client to ask for target name
  47. #define SSP_USE_OEM 0x80000000 // Force client to use OEM character set
  48. // bits from kerberos (from kerbdbg.h)
  49. #define DEB_ERROR 0x00000001
  50. #define DEB_WARN 0x00000002
  51. #define DEB_TRACE 0x00000004
  52. #define DEB_TRACE_API 0x00000008
  53. #define DEB_TRACE_CRED 0x00000010
  54. #define DEB_TRACE_CTXT 0x00000020
  55. #define DEB_TRACE_LSESS 0x00000040
  56. #define DEB_TRACE_LOGON 0x00000100
  57. #define DEB_TRACE_KDC 0x00000200
  58. #define DEB_TRACE_CTXT2 0x00000400
  59. #define DEB_TRACE_LOCKS 0x01000000
  60. #define DEB_T_SOCK 0x00000080
  61. // bits from kerberos (from security\dsysdbg.h)
  62. #define DSYSDBG_CLEAN 0x40000000
  63. //
  64. // Name and directory of log file
  65. //
  66. #define DEBUG_DIR L"\\debug"
  67. #define DEBUG_FILE L"\\ntlmssp.log"
  68. #define DEBUG_BAK_FILE L"\\ntlmssp.bak"
  69. //#if DBG
  70. #ifdef RETAIL_LOG_SUPPORT
  71. #define DebugLog(_x_) KerbPrintRoutine _x_
  72. VOID __cdecl
  73. KerbPrintRoutine(
  74. IN DWORD DebugFlag,
  75. IN LPCSTR FORMATSTRING, // PRINTF()-STYLE FORMAT STRING.
  76. ... // OTHER ARGUMENTS ARE POSSIBLE.
  77. );
  78. #else
  79. #define IF_DEBUG(Function) if (FALSE)
  80. // Nondebug version.
  81. #define DebugLog(_x_)
  82. #endif // DBG
  83. #undef EXTERN