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.

116 lines
2.0 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: kerbp.h
  8. //
  9. // Contents: global include file for Kerberos security package
  10. //
  11. //
  12. // History: 16-April-1996 Created MikeSw
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __KERBP_H__
  16. #define __KERBP_H__
  17. //
  18. // All global variables declared as EXTERN will be allocated in the file
  19. // that defines KERBP_ALLOCATE
  20. //
  21. #ifndef UNICODE
  22. #define UNICODE
  23. #endif // UNICODE
  24. extern "C"
  25. {
  26. #include <ntosp.h>
  27. #include <ntlsa.h>
  28. #include <ntsam.h>
  29. #include <winerror.h>
  30. #ifndef SECURITY_WIN32
  31. #define SECURITY_WIN32
  32. #endif // SECURITY_WIN32
  33. #define SECURITY_KERNEL
  34. #define SECURITY_PACKAGE
  35. #define SECURITY_KERBEROS
  36. #include <security.h>
  37. #include <secint.h>
  38. #include <zwapi.h>
  39. }
  40. extern "C"
  41. {
  42. #include "kerblist.h"
  43. #include "ctxtmgr.h"
  44. }
  45. //
  46. // Macros for package information
  47. //
  48. #ifdef EXTERN
  49. #undef EXTERN
  50. #endif
  51. #ifdef KERBKRNL_ALLOCATE
  52. #define EXTERN
  53. #else
  54. #define EXTERN extern
  55. #endif // KERBP_ALLOCATE
  56. //
  57. // Global state variables
  58. //
  59. EXTERN ULONG KerberosPackageId;
  60. extern PSECPKG_KERNEL_FUNCTIONS KernelFunctions;
  61. //
  62. // Useful macros
  63. //
  64. #ifndef INVALID_HANDLE_VALUE
  65. #define INVALID_HANDLE_VALUE ((HANDLE)-1)
  66. #endif //ifndef INVALID_HANDLE_VALUE
  67. //
  68. // Macro to return the type field of a SecBuffer
  69. //
  70. #define BUFFERTYPE(_x_) ((_x_).BufferType & ~SECBUFFER_ATTRMASK)
  71. extern PVOID KerbPagedList ;
  72. extern PVOID KerbNonPagedList ;
  73. extern PVOID KerbActiveList ;
  74. extern POOL_TYPE KerbPoolType ;
  75. #define KerbAllocate( _x_ ) ExAllocatePoolWithTag( KerbPoolType, (_x_) , 'CbrK')
  76. #define KerbFree( _x_ ) ExFreePool(_x_)
  77. #if DBG
  78. #define DEB_ERROR 0x00000001
  79. #define DEB_WARN 0x00000002
  80. #define DEB_TRACE 0x00000004
  81. #define DEB_TRACE_LOCKS 0x00010000
  82. extern "C"
  83. {
  84. void KsecDebugOut(ULONG, const char *, ...);
  85. }
  86. #define DebugLog(x) KsecDebugOut x
  87. #else // DBG
  88. #define DebugLog(x)
  89. #endif // DBG
  90. #endif // __KERBP_H__