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.

91 lines
1.8 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1996
  6. //
  7. // File: kerblist.h
  8. //
  9. // Contents: structure and protypes needed for generic Kerberos lists
  10. //
  11. //
  12. // History: 16-Apr-1996 MikeSw Created
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __KERBLIST_H__
  16. #define __KERBLIST_H__
  17. //
  18. // Generic list entry structure allowing common code for inserting
  19. // logon sessions, credentials, and contexts.
  20. //
  21. #if DBG
  22. #define KerbInitializeList( a, b ) KerbSafeInitializeList( a, b )
  23. #else
  24. #define KerbInitializeList( a, b ) KerbSafeInitializeList( a )
  25. #endif
  26. NTSTATUS
  27. KerbSafeInitializeList(
  28. IN PKERBEROS_LIST List
  29. #if DBG
  30. ,
  31. IN DWORD Enum
  32. #endif
  33. );
  34. VOID
  35. KerbFreeList(
  36. IN PKERBEROS_LIST List
  37. );
  38. VOID
  39. KerbInsertListEntry(
  40. IN PKERBEROS_LIST_ENTRY ListEntry,
  41. IN PKERBEROS_LIST List
  42. );
  43. VOID
  44. KerbInsertListEntryTail(
  45. IN PKERBEROS_LIST_ENTRY ListEntry,
  46. IN PKERBEROS_LIST List
  47. );
  48. VOID
  49. KerbReferenceListEntry(
  50. IN PKERBEROS_LIST List,
  51. IN PKERBEROS_LIST_ENTRY ListEntry,
  52. IN BOOLEAN RemoveFromList
  53. );
  54. BOOLEAN
  55. KerbDereferenceListEntry(
  56. IN PKERBEROS_LIST_ENTRY ListEntry,
  57. IN PKERBEROS_LIST List
  58. );
  59. VOID
  60. KerbInitializeListEntry(
  61. IN OUT PKERBEROS_LIST_ENTRY ListEntry
  62. );
  63. VOID
  64. KerbValidateListEx(
  65. IN PKERBEROS_LIST List
  66. );
  67. #if DBG
  68. #define KerbValidateList(_List_) KerbValidateListEx(_List_)
  69. #else
  70. #define KerbValidateList(_List_)
  71. #endif // DBG
  72. #define KerbLockList(_List_) SafeEnterCriticalSection(&(_List_)->Lock)
  73. #define KerbUnlockList(_List_) SafeLeaveCriticalSection(&(_List_)->Lock)
  74. #endif // __KERBLIST_H_