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.

60 lines
1.6 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 1992 - 1997
  6. //
  7. // File: timesync.h
  8. //
  9. // Contents: Prototypes for time-sync functions
  10. //
  11. //
  12. // History: 3-Nov-1997 MikeSw Created
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __TIMESYNC_H__
  16. #define __TIMESYNC_H__
  17. #ifdef EXTERN
  18. #undef EXTERN
  19. #endif
  20. #ifdef TIMESYNC_ALLOCATE
  21. #define EXTERN
  22. #else
  23. #define EXTERN extern
  24. #endif
  25. typedef struct _KERB_TIME_SKEW_ENTRY {
  26. TimeStamp RequestTime;
  27. BOOLEAN Skewed;
  28. } KERB_TIME_SKEW_ENTRY, *PKERB_TIME_SKEW_ENTRY;
  29. typedef struct _KERB_TIME_SKEW_STATE {
  30. TimeStamp LastSync; // time of last sync
  31. TimeStamp MinimumSyncLapse; // Minimum allowed time between sync requests
  32. ULONG SkewThreshold; // number of skews to trigger sync
  33. ULONG TotalRequests; // Number of entries to track
  34. ULONG SkewedRequests; // number of time skew events
  35. ULONG SuccessRequests; // number of success events
  36. ULONG LastRequest; // index into next skew entry
  37. LONG ActiveSyncs; // number of threads doing a sync
  38. PKERB_TIME_SKEW_ENTRY SkewEntries; // array of skew entries
  39. RTL_CRITICAL_SECTION Lock; // lock for skew state
  40. } KERB_TIME_SKEW_STATE, *PKERB_TIME_SKEW_STATE;
  41. EXTERN KERB_TIME_SKEW_ENTRY KerbSkewEntries[10];
  42. EXTERN KERB_TIME_SKEW_STATE KerbSkewState;
  43. VOID
  44. KerbUpdateSkewTime(
  45. IN BOOLEAN Skewed
  46. );
  47. NTSTATUS
  48. KerbInitializeSkewState(
  49. VOID
  50. );
  51. #endif // __TIMESYNC_H__