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.

228 lines
4.4 KiB

  1. #define IPSEC_REGISTRY_PROVIDER 0
  2. #define IPSEC_DIRECTORY_PROVIDER 1
  3. #define IPSEC_FILE_PROVIDER 2
  4. typedef struct _IPSEC_AUTH_METHOD {
  5. DWORD dwAuthType;
  6. DWORD dwAuthLen;
  7. LPWSTR pszAuthMethod;
  8. DWORD dwAltAuthLen;
  9. PBYTE pAltAuthMethod;
  10. } IPSEC_AUTH_METHOD, *PIPSEC_AUTH_METHOD;
  11. typedef struct _IPSEC_FILTER_SPEC {
  12. LPWSTR pszSrcDNSName;
  13. LPWSTR pszDestDNSName;
  14. LPWSTR pszDescription;
  15. GUID FilterSpecGUID;
  16. DWORD dwMirrorFlag;
  17. IPSEC_FILTER Filter;
  18. } IPSEC_FILTER_SPEC, *PIPSEC_FILTER_SPEC;
  19. typedef struct _IPSEC_FILTER_DATA {
  20. GUID FilterIdentifier;
  21. DWORD dwNumFilterSpecs;
  22. PIPSEC_FILTER_SPEC * ppFilterSpecs;
  23. DWORD dwWhenChanged;
  24. LPWSTR pszIpsecName;
  25. LPWSTR pszDescription;
  26. } IPSEC_FILTER_DATA, *PIPSEC_FILTER_DATA;
  27. typedef IPSEC_ALG_TYPE IPSEC_SECURITY_METHOD, *PIPSEC_SECURITY_METHOD;
  28. typedef struct _IPSEC_NEGPOL_DATA {
  29. GUID NegPolIdentifier;
  30. GUID NegPolAction;
  31. GUID NegPolType;
  32. DWORD dwSecurityMethodCount;
  33. IPSEC_SECURITY_METHOD * pIpsecSecurityMethods;
  34. DWORD dwWhenChanged;
  35. LPWSTR pszIpsecName;
  36. LPWSTR pszDescription;
  37. } IPSEC_NEGPOL_DATA, *PIPSEC_NEGPOL_DATA;
  38. typedef struct _IPSEC_ISAKMP_DATA {
  39. GUID ISAKMPIdentifier;
  40. ISAKMP_POLICY ISAKMPPolicy;
  41. DWORD dwNumISAKMPSecurityMethods;
  42. PCRYPTO_BUNDLE pSecurityMethods;
  43. DWORD dwWhenChanged;
  44. } IPSEC_ISAKMP_DATA, *PIPSEC_ISAKMP_DATA;
  45. typedef struct _IPSEC_NFA_DATA {
  46. LPWSTR pszIpsecName;
  47. GUID NFAIdentifier;
  48. DWORD dwAuthMethodCount;
  49. PIPSEC_AUTH_METHOD * ppAuthMethods;
  50. DWORD dwInterfaceType;
  51. LPWSTR pszInterfaceName;
  52. DWORD dwTunnelIpAddr;
  53. DWORD dwTunnelFlags;
  54. DWORD dwActiveFlag;
  55. LPWSTR pszEndPointName;
  56. PIPSEC_FILTER_DATA pIpsecFilterData;
  57. PIPSEC_NEGPOL_DATA pIpsecNegPolData;
  58. DWORD dwWhenChanged;
  59. GUID NegPolIdentifier;
  60. GUID FilterIdentifier;
  61. LPWSTR pszDescription;
  62. } IPSEC_NFA_DATA, *PIPSEC_NFA_DATA;
  63. typedef struct _IPSEC_POLICY_DATA{
  64. GUID PolicyIdentifier;
  65. DWORD dwPollingInterval;
  66. PIPSEC_ISAKMP_DATA pIpsecISAKMPData;
  67. PIPSEC_NFA_DATA * ppIpsecNFAData;
  68. DWORD dwNumNFACount;
  69. DWORD dwWhenChanged;
  70. LPWSTR pszIpsecName;
  71. LPWSTR pszDescription;
  72. GUID ISAKMPIdentifier;
  73. } IPSEC_POLICY_DATA, *PIPSEC_POLICY_DATA;
  74. LPVOID
  75. AllocPolMem(
  76. DWORD cb
  77. );
  78. BOOL
  79. FreePolMem(
  80. LPVOID pMem
  81. );
  82. LPWSTR
  83. AllocPolStr(
  84. LPCWSTR pStr
  85. );
  86. BOOL
  87. FreePolStr(
  88. LPWSTR pStr
  89. );
  90. DWORD
  91. ReallocatePolMem(
  92. LPVOID * ppOldMem,
  93. DWORD cbOld,
  94. DWORD cbNew
  95. );
  96. BOOL
  97. ReallocPolStr(
  98. LPWSTR *ppStr,
  99. LPWSTR pStr
  100. );
  101. void
  102. FreeIpsecPolicyData(
  103. PIPSEC_POLICY_DATA pIpsecPolicyData
  104. );
  105. void
  106. FreeIpsecNegPolData(
  107. PIPSEC_NEGPOL_DATA pIpsecNegPolData
  108. );
  109. void
  110. FreeIpsecFilterData(
  111. PIPSEC_FILTER_DATA pIpsecFilterData
  112. );
  113. void
  114. FreeIpsecISAKMPData(
  115. PIPSEC_ISAKMP_DATA pIpsecISAKMPData
  116. );
  117. void
  118. FreeIpsecNFAData(
  119. PIPSEC_NFA_DATA pIpsecNFAData
  120. );
  121. DWORD
  122. CopyIpsecPolicyData(
  123. PIPSEC_POLICY_DATA pIpsecPolicyData,
  124. PIPSEC_POLICY_DATA * ppIpsecPolicyData
  125. );
  126. DWORD
  127. CopyIpsecNFAData(
  128. PIPSEC_NFA_DATA pIpsecNFAData,
  129. PIPSEC_NFA_DATA * ppIpsecNFAData
  130. );
  131. DWORD
  132. CopyIpsecAuthMethod(
  133. PIPSEC_AUTH_METHOD pAuthMethod,
  134. PIPSEC_AUTH_METHOD * ppAuthMethod
  135. );
  136. DWORD
  137. CopyIpsecISAKMPData(
  138. PIPSEC_ISAKMP_DATA pIpsecISAKMPData,
  139. PIPSEC_ISAKMP_DATA * ppIpsecISAKMPData
  140. );
  141. DWORD
  142. CopyIpsecFilterData(
  143. PIPSEC_FILTER_DATA pIpsecFilterData,
  144. PIPSEC_FILTER_DATA * ppIpsecFilterData
  145. );
  146. DWORD
  147. CopyIpsecFilterSpec(
  148. PIPSEC_FILTER_SPEC pFilterSpecs,
  149. PIPSEC_FILTER_SPEC * ppFilterSpecs
  150. );
  151. DWORD
  152. CopyIpsecNegPolData(
  153. PIPSEC_NEGPOL_DATA pIpsecNegPolData,
  154. PIPSEC_NEGPOL_DATA * ppIpsecNegPolData
  155. );
  156. void
  157. FreeMulIpsecFilterData(
  158. PIPSEC_FILTER_DATA * ppIpsecFilterData,
  159. DWORD dwNumFilterObjects
  160. );
  161. void
  162. FreeMulIpsecNegPolData(
  163. PIPSEC_NEGPOL_DATA * ppIpsecNegPolData,
  164. DWORD dwNumNegPolObjects
  165. );
  166. void
  167. FreeMulIpsecPolicyData(
  168. PIPSEC_POLICY_DATA * ppIpsecPolicyData,
  169. DWORD dwNumPolicyObjects
  170. );
  171. void
  172. FreeMulIpsecNFAData(
  173. PIPSEC_NFA_DATA * ppIpsecNFAData,
  174. DWORD dwNumNFAObjects
  175. );
  176. void
  177. FreeIpsecFilterSpecs(
  178. PIPSEC_FILTER_SPEC * ppIpsecFilterSpecs,
  179. DWORD dwNumFilterSpecs
  180. );
  181. void
  182. FreeIpsecFilterSpec(
  183. PIPSEC_FILTER_SPEC pIpsecFilterSpec
  184. );
  185. void
  186. FreeMulIpsecISAKMPData(
  187. PIPSEC_ISAKMP_DATA * ppIpsecISAKMPData,
  188. DWORD dwNumISAKMPObjects
  189. );