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.

208 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. globals.c
  5. Abstract:
  6. Holds global variable declarations.
  7. Author:
  8. abhisheV 30-September-1999
  9. Environment:
  10. User Level: Win32
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. BOOL gbSPDRPCServerUp = FALSE;
  15. HANDLE ghServiceStopEvent = NULL;
  16. CRITICAL_SECTION gcServerListenSection;
  17. DWORD gdwServersListening = 0;
  18. BOOL gbServerListenSection = FALSE;
  19. PIPSEC_INTERFACE gpInterfaceList = NULL;
  20. BOOL gbwsaStarted = FALSE;
  21. SOCKET gIfChangeEventSocket = INVALID_SOCKET;
  22. HANDLE ghIfChangeEvent = NULL;
  23. HANDLE ghOverlapEvent = NULL;
  24. WSAOVERLAPPED gwsaOverlapped;
  25. WSADATA gwsaData;
  26. //
  27. // Globals for transport-mode filters - txfilter.c
  28. //
  29. PINITXFILTER gpIniTxFilter = NULL;
  30. PINITXSFILTER gpIniTxSFilter = NULL;
  31. PTX_FILTER_HANDLE gpTxFilterHandle = NULL;
  32. CRITICAL_SECTION gcSPDSection;
  33. BOOL gbSPDSection = FALSE;
  34. //
  35. // Globals for quick mode policies - qm-policy.c
  36. //
  37. PINIQMPOLICY gpIniQMPolicy = NULL;
  38. PINIQMPOLICY gpIniDefaultQMPolicy = NULL;
  39. //
  40. // Globals for main mode policies - mm-policy.c
  41. //
  42. PINIMMPOLICY gpIniMMPolicy = NULL;
  43. PINIMMPOLICY gpIniDefaultMMPolicy = NULL;
  44. //
  45. // Globals for main mode filters - mmfilter.c
  46. //
  47. PINIMMFILTER gpIniMMFilter = NULL;
  48. PINIMMSFILTER gpIniMMSFilter = NULL;
  49. PMM_FILTER_HANDLE gpMMFilterHandle = NULL;
  50. //
  51. // Globals for main mode auth methods - mmauth.c
  52. //
  53. PINIMMAUTHMETHODS gpIniMMAuthMethods = NULL;
  54. PINIMMAUTHMETHODS gpIniDefaultMMAuthMethods = NULL;
  55. //
  56. // Policy Agent Store specific globals.
  57. //
  58. IPSEC_POLICY_STATE gIpsecPolicyState;
  59. PIPSEC_POLICY_STATE gpIpsecPolicyState = &gIpsecPolicyState;
  60. DWORD gCurrentPollingInterval = 0;
  61. DWORD gDefaultPollingInterval = 166*60; // (seconds).
  62. LPWSTR gpszIpsecDSPolicyKey = L"SOFTWARE\\Policies\\Microsoft\\Windows\\IPSec\\GPTIPSECPolicy";
  63. LPWSTR gpszIpsecLocalPolicyKey = L"SOFTWARE\\Policies\\Microsoft\\Windows\\IPSec\\Policy\\Local";
  64. LPWSTR gpszIpsecCachePolicyKey = L"SOFTWARE\\Policies\\Microsoft\\Windows\\IPSec\\Policy\\Cache";
  65. LPWSTR gpszDefaultISAKMPPolicyDN = L"SOFTWARE\\Policies\\Microsoft\\Windows\\IPSec\\Policy\\Local\\ipsecISAKMPPolicy{72385234-70FA-11D1-864C-14A300000000}";
  66. LPWSTR gpszLocPolicyAgent = L"SYSTEM\\CurrentControlSet\\Services\\PolicyAgent";
  67. DWORD gdwDSConnectivityCheck = 0;
  68. HANDLE ghNewDSPolicyEvent = NULL;
  69. HANDLE ghNewLocalPolicyEvent = NULL;
  70. HANDLE ghForcedPolicyReloadEvent = NULL;
  71. HANDLE ghPolicyChangeNotifyEvent = NULL;
  72. BOOL gbLoadedISAKMPDefaults = FALSE;
  73. //
  74. // PA Store to SPD intergration specific globals.
  75. //
  76. PMMPOLICYSTATE gpMMPolicyState = NULL;
  77. PMMAUTHSTATE gpMMAuthState = NULL;
  78. PMMFILTERSTATE gpMMFilterState = NULL;
  79. DWORD gdwMMPolicyCounter = 0;
  80. DWORD gdwMMFilterCounter = 0;
  81. PQMPOLICYSTATE gpQMPolicyState = NULL;
  82. DWORD gdwQMPolicyCounter = 0;
  83. PTXFILTERSTATE gpTxFilterState = NULL;
  84. DWORD gdwTxFilterCounter = 0;
  85. //
  86. // Globals for tunnel-mode filters - tnfilter.c
  87. //
  88. PINITNFILTER gpIniTnFilter = NULL;
  89. PINITNSFILTER gpIniTnSFilter = NULL;
  90. PTN_FILTER_HANDLE gpTnFilterHandle = NULL;
  91. PTNFILTERSTATE gpTnFilterState = NULL;
  92. DWORD gdwTnFilterCounter = 0;
  93. BOOL gbIsIKEUp = FALSE;
  94. PSECURITY_DESCRIPTOR gpSPDSD = NULL;
  95. BOOL gbIKENotify = FALSE;
  96. HANDLE ghIPSecDriver = INVALID_HANDLE_VALUE;
  97. BOOL gbLoadingPersistence = FALSE;
  98. SID gIpsecServerSid = { SID_REVISION,
  99. 1,
  100. SECURITY_NT_AUTHORITY,
  101. SECURITY_NETWORK_SERVICE_RID
  102. };
  103. PSID gpIpsecServerSid = &gIpsecServerSid;
  104. CRITICAL_SECTION gcSPDAuditSection;
  105. BOOL gbSPDAuditSection = FALSE;
  106. HMODULE ghIpsecServerModule = NULL;
  107. BOOL gbIsIoctlPended = FALSE;
  108. BOOL gbBackwardSoftSA = FALSE;