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.

212 lines
4.1 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. precomp.h
  5. Abstract:
  6. Precompiled header for winipsec.dll.
  7. Author:
  8. abhisheV 21-September-1999
  9. Environment:
  10. User Level: Win32
  11. Revision History:
  12. --*/
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #include <nt.h>
  17. #include <ntrtl.h>
  18. #include <nturtl.h>
  19. #include <stddef.h>
  20. #include <ntddrdr.h>
  21. #include <gpcifc.h>
  22. #ifdef __cplusplus
  23. }
  24. #endif
  25. #include <stdio.h>
  26. #include <stdlib.h>
  27. #include <string.h>
  28. #include <rpc.h>
  29. #include <windows.h>
  30. #include <imagehlp.h>
  31. #include <tchar.h>
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. #include <dsgetdc.h>
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #include "winioctl.h"
  40. #include "winsock2.h"
  41. #include "winsock.h"
  42. #include <userenv.h>
  43. #include <wchar.h>
  44. #include <winldap.h>
  45. #include "ipexport.h"
  46. #include <iphlpapi.h>
  47. #include <nhapi.h>
  48. #include <seopaque.h>
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52. #include <msaudite.h>
  53. #include <ntlsa.h>
  54. #include <lsarpc.h>
  55. #include <ntsam.h>
  56. #include <lsaisrv.h>
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #include "spd_s.h"
  61. #include "winipsec.h"
  62. #include "structs.h"
  63. #include "spdaudit.h"
  64. #include "audit.h"
  65. #include "interface.h"
  66. #include "address.h"
  67. #include "port.h"
  68. #include "protocol.h"
  69. #include "utils.h"
  70. #include "memory.h"
  71. #include "security.h"
  72. #include "init.h"
  73. #include "rpcserv.h"
  74. #include "iphlpwrp.h"
  75. #include "loopmgr.h"
  76. #include "ipsecspd.h"
  77. #include "qm-policy.h"
  78. #include "mm-policy.h"
  79. #include "ipsecshr.h"
  80. #include "mmauth.h"
  81. #include "txfilter.h"
  82. #include "txspecific.h"
  83. #include "tnfilter.h"
  84. #include "tnspecific.h"
  85. #include "mmfilter.h"
  86. #include "mmspecific.h"
  87. #include "ipsec.h"
  88. #include "driver.h"
  89. //
  90. // Policy Agent Store specific headers.
  91. //
  92. #include "oakdefs.h"
  93. #include "polstructs.h"
  94. #include "..\..\pastore\ldaputil.h"
  95. #include "..\..\pastore\structs.h"
  96. #include "..\..\pastore\dsstore.h"
  97. #include "..\..\pastore\regstore.h"
  98. #include "..\..\pastore\procrule.h"
  99. #include "..\..\pastore\persist.h"
  100. #include "..\..\pastore\utils.h"
  101. #include "polguids.h"
  102. #include "pamm-pol.h"
  103. #include "pammauth.h"
  104. #include "paqm-pol.h"
  105. #include "pamm-fil.h"
  106. #include "patx-fil.h"
  107. #include "patn-fil.h"
  108. #include "paupdate.h"
  109. #include "pastore.h"
  110. #include "oakdll.h"
  111. #include "externs.h"
  112. #include "safestr.h"
  113. #include "tracing.h"
  114. extern
  115. DWORD
  116. AllocateAndGetIfTableFromStack(
  117. OUT MIB_IFTABLE **ppIfTable,
  118. IN BOOL bOrder,
  119. IN HANDLE hHeap,
  120. IN DWORD dwFlags,
  121. IN BOOL bForceUpdate
  122. );
  123. #ifdef BAIL_ON_WIN32_ERROR
  124. #undef BAIL_ON_WIN32_ERROR
  125. #endif
  126. #ifdef BAIL_ON_LOCK_ERROR
  127. #undef BAIL_ON_LOCK_ERROR
  128. #endif
  129. #define BAIL_ON_WIN32_ERROR(dwError) \
  130. if (dwError) { \
  131. goto error; \
  132. }
  133. #define BAIL_ON_LOCK_ERROR(dwError) \
  134. if (dwError) { \
  135. goto lock; \
  136. }
  137. #define BAIL_OUT \
  138. goto error; \
  139. #define SET_IF_HARD_ERROR(dwError, gNegPolAction, bHardError) \
  140. { \
  141. if (dwError && \
  142. (IsBlocking(gNegPolAction) || IsSecure(gNegPolAction))) { \
  143. bHardError = TRUE; \
  144. } \
  145. }
  146. #define BAIL_ON_WIN32_SUCCESS(dwError) \
  147. if (!dwError) { \
  148. goto success; \
  149. }
  150. #define BAIL_ON_LOCK_SUCCESS(dwError) \
  151. if (!dwError) { \
  152. goto lock_success; \
  153. }
  154. #define BAIL_LOCK_SUCCESS \
  155. goto lock_success \
  156. #define ENTER_SPD_SECTION() \
  157. EnterCriticalSection(&gcSPDSection) \
  158. #define LEAVE_SPD_SECTION() \
  159. LeaveCriticalSection(&gcSPDSection) \