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.

142 lines
3.1 KiB

  1. #ifndef _KDCTRACE_H
  2. #define _KDCTRACE_H
  3. /*++
  4. Copyright (c) 1998 Microsoft Corporation
  5. Module Name:
  6. kdctrace.h
  7. Abstract:
  8. Include file to contain variables required for event tracing of kerberos
  9. server
  10. Author:
  11. 07-May-1998 JeePang
  12. Revision History:
  13. --*/
  14. //
  15. //
  16. //
  17. #include <nt.h>
  18. #include <ntrtl.h>
  19. #include <nturtl.h>
  20. #include <windows.h>
  21. #include <wtypes.h>
  22. #ifdef __cplusplus
  23. extern "C"
  24. {
  25. #endif // __cplusplus
  26. #include <wmistr.h>
  27. #include <evntrace.h>
  28. #ifdef __cplusplus
  29. }
  30. #endif // __cplusplus
  31. EXTERN_C unsigned long KdcEventTraceFlag;
  32. EXTERN_C TRACEHANDLE KdcTraceRegistrationHandle;
  33. EXTERN_C TRACEHANDLE KdcTraceLoggerHandle;
  34. EXTERN_C
  35. ULONG
  36. KdcInitializeTrace();
  37. // The current limit is 8 MOF fields.
  38. // Each UNICODE strings needs two MOF fields.
  39. // The ClientRealm is available and should be added to the AS
  40. // if the MOF field limit is increased
  41. typedef struct _KDC_AS_EVENT_INFO
  42. {
  43. EVENT_TRACE_HEADER EventTrace;
  44. union {
  45. ULONG KdcOptions;
  46. MOF_FIELD eventInfo[7];
  47. };
  48. } KDC_AS_EVENT_INFO, *PKDC_AS_EVENT_INFO;
  49. // SID info is used in audit log, could be added to TGS event
  50. // if MOF limited increased.
  51. typedef struct _KDC_TGS_EVENT_INFO
  52. {
  53. EVENT_TRACE_HEADER EventTrace;
  54. union {
  55. ULONG KdcOptions;
  56. MOF_FIELD eventInfo[7];
  57. };
  58. } KDC_TGS_EVENT_INFO, *PKDC_TGS_EVENT_INFO;
  59. typedef struct _KDC_CHANGEPASS_INFO
  60. {
  61. EVENT_TRACE_HEADER EventTrace;
  62. MOF_FIELD MofData[7];
  63. } KDC_CHANGEPASS_INFO, *PKDC_CHANGEPASSINFO;
  64. #define KDC_TRACE_VERSION 1
  65. // be careful with INSERT_ULONG_INTO_MOF; it evaluates its arguments more than once
  66. #define INSERT_ULONG_INTO_MOF( x, MOF, Start ) \
  67. (MOF)[(Start)].DataPtr = (ULONGLONG)&(x); \
  68. (MOF)[(Start)].Length = sizeof(ULONG);
  69. // be careful with INSERT_UNICODE_STRING_INTO_MOF; it evaluates its arguments more than once
  70. #define INSERT_UNICODE_STRING_INTO_MOF( USTRING, MOF, Start ) \
  71. (MOF)[(Start)].DataPtr = (ULONGLONG)&((USTRING).Length); \
  72. (MOF)[(Start)].Length = sizeof ((USTRING).Length); \
  73. (MOF)[(Start)+1].DataPtr = (ULONGLONG) (USTRING).Buffer; \
  74. (MOF)[(Start)+1].Length = (USTRING).Length;
  75. //
  76. // This is the control Guid for the group of Guids traced below
  77. //
  78. DEFINE_GUID ( /* 24db8964-e6bc-11d1-916a-0000f8045b04 */
  79. KdcControlGuid,
  80. 0x24db8964,
  81. 0xe6bc,
  82. 0x11d1,
  83. 0x91, 0x6a, 0x00, 0x00, 0xf8, 0x04, 0x5b, 0x04
  84. );
  85. //
  86. // This is the Get AS Ticket transaction guid
  87. //
  88. DEFINE_GUID ( /* 50af5304-e6bc-11d1-916a-0000f8045b04 */
  89. KdcGetASTicketGuid,
  90. 0x50af5304,
  91. 0xe6bc,
  92. 0x11d1,
  93. 0x91, 0x6a, 0x00, 0x00, 0xf8, 0x04, 0x5b, 0x04
  94. );
  95. //
  96. // This is the Handle TGS Request transaction guid
  97. //
  98. DEFINE_GUID ( /* c11cf384-e6bd-11d1-916a-0000f8045b04 */
  99. KdcHandleTGSRequestGuid,
  100. 0xc11cf384,
  101. 0xe6bd,
  102. 0x11d1,
  103. 0x91, 0x6a, 0x00, 0x00, 0xf8, 0x04, 0x5b, 0x04
  104. );
  105. DEFINE_GUID ( /* a34d7f52-1dd0-434e-88a1-423e2a199946 */
  106. KdcChangePassGuid,
  107. 0xa34d7f52,
  108. 0x1dd0,
  109. 0x434e,
  110. 0x88, 0xa1, 0x42, 0x3e, 0x2a, 0x19, 0x99, 0x46
  111. );
  112. #endif /* _KDCTRACE_H */