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.

153 lines
3.7 KiB

  1. #ifndef _KERBTRACE_H
  2. #define _KERBTRACE_H
  3. /*++
  4. Copyright (c) 2000 Microsoft Corporation
  5. Module Name:
  6. kerbtrace.h
  7. Abstract:
  8. Defines appropriate stuff for event tracing a/k/a wmi tracing a/k/a software tracing
  9. Author:
  10. 15 June 2000 t-ryanj (* largely stolen from kdctrace.h *)
  11. Revision History:
  12. --*/
  13. //
  14. //
  15. //
  16. #include <nt.h>
  17. #include <ntrtl.h>
  18. #include <nturtl.h>
  19. #include <windows.h>
  20. #include <wtypes.h>
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif // __cplusplus
  25. #include <wmistr.h>
  26. #include <evntrace.h>
  27. #ifdef __cplusplus
  28. }
  29. #endif // __cplusplus
  30. EXTERN_C BOOLEAN KerbEventTraceFlag;
  31. EXTERN_C TRACEHANDLE KerbTraceRegistrationHandle;
  32. EXTERN_C TRACEHANDLE KerbTraceLoggerHandle;
  33. EXTERN_C
  34. ULONG
  35. KerbInitializeTrace();
  36. // be careful with INSERT_ULONG_INTO_MOF; it evaluates its arguments more than once
  37. #define INSERT_ULONG_INTO_MOF( x, MOF, Start ) \
  38. (MOF)[(Start)].DataPtr = (ULONGLONG)&(x); \
  39. (MOF)[(Start)].Length = sizeof(ULONG);
  40. // be careful with INSERT_UNICODE_STRING_INTO_MOF; it evaluates its arguments more than once
  41. #define INSERT_UNICODE_STRING_INTO_MOF( USTRING, MOF, Start ) \
  42. (MOF)[(Start)].DataPtr = (ULONGLONG)&((USTRING).Length); \
  43. (MOF)[(Start)].Length = sizeof ((USTRING).Length); \
  44. (MOF)[(Start)+1].DataPtr = (ULONGLONG) (USTRING).Buffer; \
  45. (MOF)[(Start)+1].Length = (USTRING).Length;
  46. typedef struct _KERB_LOGON_INFO
  47. // Start {No Data}, End {Status, LogonType, (UserName), (LogonDomain)}
  48. {
  49. EVENT_TRACE_HEADER EventTrace;
  50. MOF_FIELD MofData[7];
  51. } KERB_LOGON_INFO, *PKERB_LOGON_INFO;
  52. typedef struct _KERB_INITSC_INFO
  53. // Start {No Data}, End {Status, CredSource, DomainName, UserName, Target, (KerbExtError), (Klininfo)}
  54. {
  55. EVENT_TRACE_HEADER EventTrace;
  56. MOF_FIELD MofData[11];
  57. } KERB_INITSC_INFO, *PKERB_INITSC_INFO;
  58. typedef struct _KERB_ACCEPTSC_INFO
  59. // Start {No Data}, End {Status, CredSource, DomainName, UserName, Target}
  60. {
  61. EVENT_TRACE_HEADER EventTrace;
  62. MOF_FIELD MofData[9];
  63. } KERB_ACCEPTSC_INFO, *PKERB_ACCEPTSC_INFO;
  64. typedef struct _KERB_SETPASS_INFO
  65. // Start {No Data}, End {Status, AccountName, AccountRealm, (ClientName), (ClientRealm), (KdcAddress)}
  66. {
  67. EVENT_TRACE_HEADER EventTrace;
  68. MOF_FIELD MofData[11];
  69. } KERB_SETPASS_INFO, *PKERB_SETPASS_INFO;
  70. typedef struct _KERB_CHANGEPASS_INFO
  71. // Start {No Data}, End {Status, AccountName, AccountRealm}
  72. {
  73. EVENT_TRACE_HEADER EventTrace;
  74. MOF_FIELD MofData[5];
  75. } KERB_CHANGEPASS_INFO, *PKERB_CHANGEPASS_INFO;
  76. // Control Guid
  77. DEFINE_GUID ( /* bba3add2-c229-4cdb-ae2b-57eb6966b0c4 */
  78. KerbControlGuid,
  79. 0xbba3add2,
  80. 0xc229,
  81. 0x4cdb,
  82. 0xae, 0x2b, 0x57, 0xeb, 0x69, 0x66, 0xb0, 0xc4
  83. );
  84. // LogonUser Guid
  85. DEFINE_GUID ( /* 8a3b8d86-db1e-47a9-9264-146e097b3c64 */
  86. KerbLogonGuid,
  87. 0x8a3b8d86,
  88. 0xdb1e,
  89. 0x47a9,
  90. 0x92, 0x64, 0x14, 0x6e, 0x09, 0x7b, 0x3c, 0x64
  91. );
  92. // InitializeSecurityContext Guid
  93. DEFINE_GUID ( /* 52e82f1a-7cd4-47ed-b5e5-fde7bf64cea6 */
  94. KerbInitSCGuid,
  95. 0x52e82f1a,
  96. 0x7cd4,
  97. 0x47ed,
  98. 0xb5, 0xe5, 0xfd, 0xe7, 0xbf, 0x64, 0xce, 0xa6
  99. );
  100. // AcceptSecurityContext Guid
  101. DEFINE_GUID ( /* 94acefe3-9e56-49e3-9895-7240a231c371 */
  102. KerbAcceptSCGuid,
  103. 0x94acefe3,
  104. 0x9e56,
  105. 0x49e3,
  106. 0x98, 0x95, 0x72, 0x40, 0xa2, 0x31, 0xc3, 0x71
  107. );
  108. DEFINE_GUID ( /* 94c79108-b23b-4418-9b7f-e6d75a3a0ab2 */
  109. KerbSetPassGuid,
  110. 0x94c79108,
  111. 0xb23b,
  112. 0x4418,
  113. 0x9b, 0x7f, 0xe6, 0xd7, 0x5a, 0x3a, 0x0a, 0xb2
  114. );
  115. DEFINE_GUID ( /* c55e606b-334a-488b-b907-384abaa97b04 */
  116. KerbChangePassGuid,
  117. 0xc55e606b,
  118. 0x334a,
  119. 0x488b,
  120. 0xb9, 0x07, 0x38, 0x4a, 0xba, 0xa9, 0x7b, 0x04
  121. );
  122. #endif /* _KERBTRACE_H */