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.

607 lines
13 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. spd.idl
  5. Abstract:
  6. IDL file for IPSec WINAPIs.
  7. Author:
  8. krishnaG 21-September-1999
  9. Environment:
  10. User Level: Win32
  11. Revision History:
  12. abhisheV 29-September-1999 Added the structures.
  13. Added the rpc prototypes.
  14. --*/
  15. [
  16. uuid(12345678-1234-ABCD-EF00-0123456789AB),
  17. version(1.0),
  18. #ifdef __midl
  19. ms_union,
  20. #endif // __midl
  21. endpoint("mscn_np:[\\pipe\\ipsec]"),
  22. pointer_default(unique)
  23. ]
  24. interface winipsec
  25. {
  26. import "import.idl";
  27. typedef [context_handle] void * TRANSPORTFILTER_HANDLE;
  28. typedef [context_handle] void * TUNNELFILTER_HANDLE;
  29. typedef [context_handle] void * MMFILTER_HANDLE;
  30. typedef [context_handle] void * IKENEGOTIATION_HANDLE;
  31. typedef [context_handle] void * IKENOTIFY_HANDLE;
  32. typedef [handle] wchar_t * STRING_HANDLE;
  33. typedef struct _TRANSPORT_FILTER_CONTAINER {
  34. DWORD dwNumFilters;
  35. [size_is(dwNumFilters)] PTRANSPORT_FILTER pTransportFilters;
  36. } TRANSPORT_FILTER_CONTAINER, * PTRANSPORT_FILTER_CONTAINER;
  37. typedef struct _TUNNEL_FILTER_CONTAINER {
  38. DWORD dwNumFilters;
  39. [size_is(dwNumFilters)] PTUNNEL_FILTER pTunnelFilters;
  40. } TUNNEL_FILTER_CONTAINER, * PTUNNEL_FILTER_CONTAINER;
  41. typedef struct _IPSEC_QM_POLICY_CONTAINER {
  42. DWORD dwNumPolicies;
  43. [size_is(dwNumPolicies)] PIPSEC_QM_POLICY pPolicies;
  44. } IPSEC_QM_POLICY_CONTAINER, * PIPSEC_QM_POLICY_CONTAINER;
  45. typedef struct _IPSEC_MM_POLICY_CONTAINER {
  46. DWORD dwNumPolicies;
  47. [size_is(dwNumPolicies)] PIPSEC_MM_POLICY pPolicies;
  48. } IPSEC_MM_POLICY_CONTAINER, * PIPSEC_MM_POLICY_CONTAINER;
  49. typedef struct _MM_AUTH_METHODS_CONTAINER {
  50. DWORD dwNumAuthMethods;
  51. [size_is(dwNumAuthMethods)] PMM_AUTH_METHODS pMMAuthMethods;
  52. } MM_AUTH_METHODS_CONTAINER, * PMM_AUTH_METHODS_CONTAINER;
  53. typedef struct _MM_FILTER_CONTAINER {
  54. DWORD dwNumFilters;
  55. [size_is(dwNumFilters)] PMM_FILTER pMMFilters;
  56. } MM_FILTER_CONTAINER, * PMM_FILTER_CONTAINER;
  57. typedef struct _MM_SA_CONTAINER {
  58. DWORD dwNumMMSAs;
  59. [size_is(dwNumMMSAs)] PIPSEC_MM_SA pMMSAs;
  60. } MM_SA_CONTAINER, * PMM_SA_CONTAINER;
  61. typedef struct _IPSEC_STATISTICS_CONTAINER {
  62. DWORD dwNumIpsecStats;
  63. [size_is(dwNumIpsecStats)] PIPSEC_STATISTICS pIpsecStatistics;
  64. } IPSEC_STATISTICS_CONTAINER, * PIPSEC_STATISTICS_CONTAINER;
  65. typedef struct _QM_SA_CONTAINER {
  66. DWORD dwNumQMSAs;
  67. [size_is(dwNumQMSAs)] PIPSEC_QM_SA pQMSAs;
  68. } QM_SA_CONTAINER, * PQM_SA_CONTAINER;
  69. typedef struct _QM_FILTER_CONTAINER {
  70. DWORD dwNumFilters;
  71. [size_is(dwNumFilters)] PIPSEC_QM_FILTER pQMFilters;
  72. } QM_FILTER_CONTAINER, * PQM_FILTER_CONTAINER;
  73. typedef struct _IPSEC_INTERFACE_CONTAINER {
  74. DWORD dwNumInterfaces;
  75. [size_is(dwNumInterfaces)] PIPSEC_INTERFACE_INFO pIpsecInterfaces;
  76. } IPSEC_INTERFACE_CONTAINER, * PIPSEC_INTERFACE_CONTAINER;
  77. DWORD
  78. RpcAddTransportFilter(
  79. [in, string, unique] STRING_HANDLE pServerName,
  80. [in] DWORD dwFlags,
  81. [in] PTRANSPORT_FILTER_CONTAINER pFilterContainer,
  82. [out] TRANSPORTFILTER_HANDLE * phFilter
  83. );
  84. DWORD
  85. RpcDeleteTransportFilter(
  86. [in, out] TRANSPORTFILTER_HANDLE * phFilter
  87. );
  88. DWORD
  89. RpcEnumTransportFilters(
  90. [in, string, unique] STRING_HANDLE pServerName,
  91. [in] DWORD dwLevel,
  92. [in] GUID gGenericFilterID,
  93. [in, out] PTRANSPORT_FILTER_CONTAINER * ppFilterContainer,
  94. [in] DWORD dwPreferredNumEntries,
  95. [in, out, unique] LPDWORD pdwResumeHandle
  96. );
  97. DWORD
  98. RpcSetTransportFilter(
  99. [in] TRANSPORTFILTER_HANDLE hFilter,
  100. [in] PTRANSPORT_FILTER_CONTAINER pFilterContainer
  101. );
  102. DWORD
  103. RpcGetTransportFilter(
  104. [in] TRANSPORTFILTER_HANDLE hFilter,
  105. [in, out] PTRANSPORT_FILTER_CONTAINER * ppFilterContainer
  106. );
  107. DWORD
  108. RpcAddQMPolicy(
  109. [in, string, unique] STRING_HANDLE pServerName,
  110. [in] DWORD dwFlags,
  111. [in] PIPSEC_QM_POLICY_CONTAINER pQMPolicyContainer
  112. );
  113. DWORD
  114. RpcDeleteQMPolicy(
  115. [in, string, unique] STRING_HANDLE pServerName,
  116. [in, string, unique] LPWSTR pszPolicyName
  117. );
  118. DWORD
  119. RpcEnumQMPolicies(
  120. [in, string, unique] STRING_HANDLE pServerName,
  121. [in, out] PIPSEC_QM_POLICY_CONTAINER * ppQMPolicyContainer,
  122. [in] DWORD dwPreferredNumEntries,
  123. [in, out, unique] LPDWORD pdwResumeHandle
  124. );
  125. DWORD
  126. RpcSetQMPolicy(
  127. [in, string, unique] STRING_HANDLE pServerName,
  128. [in, string, unique] LPWSTR pszPolicyName,
  129. [in] PIPSEC_QM_POLICY_CONTAINER pQMPolicyContainer
  130. );
  131. DWORD
  132. RpcGetQMPolicy(
  133. [in, string, unique] STRING_HANDLE pServerName,
  134. [in, string, unique] LPWSTR pszPolicyName,
  135. [in, out] PIPSEC_QM_POLICY_CONTAINER * ppQMPolicyContainer
  136. );
  137. DWORD
  138. RpcAddMMPolicy(
  139. [in, string, unique] STRING_HANDLE pServerName,
  140. [in] DWORD dwFlags,
  141. [in] PIPSEC_MM_POLICY_CONTAINER pMMPolicyContainer
  142. );
  143. DWORD
  144. RpcDeleteMMPolicy(
  145. [in, string, unique] STRING_HANDLE pServerName,
  146. [in, string, unique] LPWSTR pszPolicyName
  147. );
  148. DWORD
  149. RpcEnumMMPolicies(
  150. [in, string, unique] STRING_HANDLE pServerName,
  151. [in, out] PIPSEC_MM_POLICY_CONTAINER * ppMMPolicyContainer,
  152. [in] DWORD dwPreferredNumEntries,
  153. [in, out, unique] LPDWORD pdwResumeHandle
  154. );
  155. DWORD
  156. RpcSetMMPolicy(
  157. [in, string, unique] STRING_HANDLE pServerName,
  158. [in, string, unique] LPWSTR pszPolicyName,
  159. [in] PIPSEC_MM_POLICY_CONTAINER pMMPolicyContainer
  160. );
  161. DWORD
  162. RpcGetMMPolicy(
  163. [in, string, unique] STRING_HANDLE pServerName,
  164. [in, string, unique] LPWSTR pszPolicyName,
  165. [in, out] PIPSEC_MM_POLICY_CONTAINER * ppMMPolicyContainer
  166. );
  167. DWORD
  168. RpcAddMMFilter(
  169. [in, string, unique] STRING_HANDLE pServerName,
  170. [in] DWORD dwFlags,
  171. [in] PMM_FILTER_CONTAINER pMMFilterContainer,
  172. [out] MMFILTER_HANDLE * phMMFilter
  173. );
  174. DWORD
  175. RpcDeleteMMFilter(
  176. [in, out] MMFILTER_HANDLE * phMMFilter
  177. );
  178. DWORD
  179. RpcEnumMMFilters(
  180. [in, string, unique] STRING_HANDLE pServerName,
  181. [in] DWORD dwLevel,
  182. [in] GUID gGenericFilterID,
  183. [in, out] PMM_FILTER_CONTAINER * ppMMFilterContainer,
  184. [in] DWORD dwPreferredNumEntries,
  185. [in, out, unique] LPDWORD pdwResumeHandle
  186. );
  187. DWORD
  188. RpcSetMMFilter(
  189. [in] MMFILTER_HANDLE hMMFilter,
  190. [in] PMM_FILTER_CONTAINER pMMFilterContainer
  191. );
  192. DWORD
  193. RpcGetMMFilter(
  194. [in] MMFILTER_HANDLE hMMFilter,
  195. [in, out] PMM_FILTER_CONTAINER * ppMMFilterContainer
  196. );
  197. DWORD
  198. RpcMatchMMFilter(
  199. [in, string, unique] STRING_HANDLE pServerName,
  200. [in] PMM_FILTER_CONTAINER pMMFilterContainer,
  201. [in] DWORD dwFlags,
  202. [in, out] PMM_FILTER_CONTAINER * ppMMFilterContainer,
  203. [in, out] PIPSEC_MM_POLICY_CONTAINER * ppMMPolicyContainer,
  204. [in, out] PMM_AUTH_METHODS_CONTAINER * ppMMAuthContainer,
  205. [in] DWORD dwPreferredNumEntries,
  206. [in, out, unique] LPDWORD pdwResumeHandle
  207. );
  208. DWORD
  209. RpcMatchTransportFilter(
  210. [in, string, unique] STRING_HANDLE pServerName,
  211. [in] PTRANSPORT_FILTER_CONTAINER pTxFilterContainer,
  212. [in] DWORD dwFlags,
  213. [in, out] PTRANSPORT_FILTER_CONTAINER * ppTxFilterContainer,
  214. [in, out] PIPSEC_QM_POLICY_CONTAINER * ppQMPolicyContainer,
  215. [in] DWORD dwPreferredNumEntries,
  216. [in, out, unique] LPDWORD pdwResumeHandle
  217. );
  218. DWORD
  219. RpcGetQMPolicyByID(
  220. [in, string, unique] STRING_HANDLE pServerName,
  221. [in] GUID gQMPolicyID,
  222. [in, out] PIPSEC_QM_POLICY_CONTAINER * ppQMPolicyContainer
  223. );
  224. DWORD
  225. RpcGetMMPolicyByID(
  226. [in, string, unique] STRING_HANDLE pServerName,
  227. [in] GUID gMMPolicyID,
  228. [in, out] PIPSEC_MM_POLICY_CONTAINER * ppMMPolicyContainer
  229. );
  230. DWORD
  231. RpcAddMMAuthMethods(
  232. [in, string, unique] STRING_HANDLE pServerName,
  233. [in] DWORD dwFlags,
  234. [in] PMM_AUTH_METHODS_CONTAINER pMMAuthContainer
  235. );
  236. DWORD
  237. RpcDeleteMMAuthMethods(
  238. [in, string, unique] STRING_HANDLE pServerName,
  239. [in] GUID gMMAuthID
  240. );
  241. DWORD
  242. RpcEnumMMAuthMethods(
  243. [in, string, unique] STRING_HANDLE pServerName,
  244. [in, out] PMM_AUTH_METHODS_CONTAINER * ppMMAuthContainer,
  245. [in] DWORD dwPreferredNumEntries,
  246. [in, out, unique] LPDWORD pdwResumeHandle
  247. );
  248. DWORD
  249. RpcSetMMAuthMethods(
  250. [in, string, unique] STRING_HANDLE pServerName,
  251. [in] GUID gMMAuthID,
  252. [in] PMM_AUTH_METHODS_CONTAINER pMMAuthContainer
  253. );
  254. DWORD
  255. RpcGetMMAuthMethods(
  256. [in, string, unique] STRING_HANDLE pServerName,
  257. [in] GUID gMMAuthID,
  258. [in, out] PMM_AUTH_METHODS_CONTAINER * ppMMAuthContainer
  259. );
  260. DWORD
  261. RpcInitiateIKENegotiation(
  262. [in, string, unique] STRING_HANDLE pServerName,
  263. [in] PQM_FILTER_CONTAINER pQMFilterContainer,
  264. [in] DWORD dwClientProcessId,
  265. [in] ULONG uhClientEvent,
  266. [in] DWORD dwFlags,
  267. [in, out, unique] IKENEGOTIATION_HANDLE * phIKENegotiation
  268. );
  269. DWORD
  270. RpcQueryIKENegotiationStatus(
  271. [in] IKENEGOTIATION_HANDLE hIKENegotiation,
  272. [out, ref] SA_NEGOTIATION_STATUS_INFO * pNegotiationStatus
  273. );
  274. DWORD
  275. RpcCloseIKENegotiationHandle(
  276. [in, out] IKENEGOTIATION_HANDLE * phIKENegotiation
  277. );
  278. DWORD
  279. RpcEnumMMSAs(
  280. [in, string, unique] STRING_HANDLE pServerName,
  281. [in] PMM_SA_CONTAINER pMMTemplate,
  282. [in, out] PMM_SA_CONTAINER * ppMMSAContainer,
  283. [in, out, unique] LPDWORD pdwNumEntries,
  284. [in, out, unique] LPDWORD pdwTotalMMsAvailable,
  285. [in, out, unique] LPDWORD pdwEnumHandle,
  286. [in] DWORD dwFlags
  287. );
  288. DWORD
  289. RpcDeleteMMSAs(
  290. [in, string, unique] STRING_HANDLE pServerName,
  291. [in] PMM_SA_CONTAINER pMMTemplate,
  292. [in] DWORD dwFlags
  293. );
  294. DWORD
  295. RpcDeleteQMSAs(
  296. [in, string, unique] STRING_HANDLE pServerName,
  297. [in] PQM_SA_CONTAINER pQMSAContainer,
  298. [in] DWORD dwFlags
  299. );
  300. DWORD
  301. RpcQueryIKEStatistics(
  302. [in, string, unique] STRING_HANDLE pServerName,
  303. [out, ref] IKE_STATISTICS * pIKEStatistics
  304. );
  305. DWORD
  306. RpcRegisterIKENotifyClient(
  307. [in, string, unique] STRING_HANDLE pServerName,
  308. [in] DWORD dwClientProcessId,
  309. [in] ULONG uhClientEvent,
  310. [in] PQM_SA_CONTAINER pQMSATemplateContainer,
  311. [out] IKENOTIFY_HANDLE *phNotifyHandle,
  312. [in] DWORD dwFlags
  313. );
  314. DWORD RpcQueryNotifyData(
  315. [in] IKENOTIFY_HANDLE uhNotifyHandle,
  316. [in,out] PDWORD pdwNumEntries,
  317. [in,out] PQM_SA_CONTAINER *ppQMSAContainer,
  318. [in] DWORD dwFlags
  319. );
  320. DWORD RpcCloseNotifyHandle(
  321. [in, out] IKENOTIFY_HANDLE *phHandle
  322. );
  323. DWORD
  324. RpcQueryIPSecStatistics(
  325. [in, string, unique] STRING_HANDLE pServerName,
  326. [in, out] PIPSEC_STATISTICS_CONTAINER * ppIpsecStatsContainer
  327. );
  328. DWORD
  329. RpcEnumQMSAs(
  330. [in, string, unique] STRING_HANDLE pServerName,
  331. [in] PQM_SA_CONTAINER pQMSATempContainer,
  332. [in, out] PQM_SA_CONTAINER * ppQMSAContainer,
  333. [in] DWORD dwPreferredNumEntries,
  334. [in, out, unique] LPDWORD pdwNumTotalQMSAs,
  335. [in, out, unique] LPDWORD pdwResumeHandle,
  336. [in] DWORD dwFlags
  337. );
  338. DWORD
  339. RpcAddTunnelFilter(
  340. [in, string, unique] STRING_HANDLE pServerName,
  341. [in] DWORD dwFlags,
  342. [in] PTUNNEL_FILTER_CONTAINER pFilterContainer,
  343. [out] TUNNELFILTER_HANDLE * phFilter
  344. );
  345. DWORD
  346. RpcDeleteTunnelFilter(
  347. [in, out] TUNNELFILTER_HANDLE * phFilter
  348. );
  349. DWORD
  350. RpcEnumTunnelFilters(
  351. [in, string, unique] STRING_HANDLE pServerName,
  352. [in] DWORD dwLevel,
  353. [in] GUID gGenericFilterID,
  354. [in, out] PTUNNEL_FILTER_CONTAINER * ppFilterContainer,
  355. [in] DWORD dwPreferredNumEntries,
  356. [in, out, unique] LPDWORD pdwResumeHandle
  357. );
  358. DWORD
  359. RpcSetTunnelFilter(
  360. [in] TUNNELFILTER_HANDLE hFilter,
  361. [in] PTUNNEL_FILTER_CONTAINER pFilterContainer
  362. );
  363. DWORD
  364. RpcGetTunnelFilter(
  365. [in] TUNNELFILTER_HANDLE hFilter,
  366. [in, out] PTUNNEL_FILTER_CONTAINER * ppFilterContainer
  367. );
  368. DWORD
  369. RpcMatchTunnelFilter(
  370. [in, string, unique] STRING_HANDLE pServerName,
  371. [in] PTUNNEL_FILTER_CONTAINER pTnFilterContainer,
  372. [in] DWORD dwFlags,
  373. [in, out] PTUNNEL_FILTER_CONTAINER * ppTnFilterContainer,
  374. [in, out] PIPSEC_QM_POLICY_CONTAINER * ppQMPolicyContainer,
  375. [in] DWORD dwPreferredNumEntries,
  376. [in, out, unique] LPDWORD pdwResumeHandle
  377. );
  378. DWORD
  379. RpcOpenMMFilterHandle(
  380. [in, string, unique] STRING_HANDLE pServerName,
  381. [in] PMM_FILTER_CONTAINER pMMFilterContainer,
  382. [out] MMFILTER_HANDLE * phMMFilter
  383. );
  384. DWORD
  385. RpcCloseMMFilterHandle(
  386. [in, out] MMFILTER_HANDLE * phMMFilter
  387. );
  388. DWORD
  389. RpcOpenTransportFilterHandle(
  390. [in, string, unique] STRING_HANDLE pServerName,
  391. [in] PTRANSPORT_FILTER_CONTAINER pFilterContainer,
  392. [out] TRANSPORTFILTER_HANDLE * phFilter
  393. );
  394. DWORD
  395. RpcCloseTransportFilterHandle(
  396. [in, out] TRANSPORTFILTER_HANDLE * phFilter
  397. );
  398. DWORD
  399. RpcOpenTunnelFilterHandle(
  400. [in, string, unique] STRING_HANDLE pServerName,
  401. [in] PTUNNEL_FILTER_CONTAINER pFilterContainer,
  402. [out] TUNNELFILTER_HANDLE * phFilter
  403. );
  404. DWORD
  405. RpcCloseTunnelFilterHandle(
  406. [in, out] TUNNELFILTER_HANDLE * phFilter
  407. );
  408. DWORD
  409. RpcEnumIpsecInterfaces(
  410. [in, string, unique] STRING_HANDLE pServerName,
  411. [in] PIPSEC_INTERFACE_CONTAINER pIpsecIfTempContainer,
  412. [in, out] PIPSEC_INTERFACE_CONTAINER * ppIpsecIfContainer,
  413. [in] DWORD dwPreferredNumEntries,
  414. [in, out, unique] LPDWORD pdwNumTotalInterfaces,
  415. [in, out, unique] LPDWORD pdwResumeHandle,
  416. [in] DWORD dwFlags
  417. );
  418. DWORD RpcIPSecAddSA(
  419. [in, string, unique] STRING_HANDLE pServerName,
  420. [in,out] PIPSEC_QM_POLICY_CONTAINER pQMPolicyContainer,
  421. [in] PQM_FILTER_CONTAINER pQMFilterContainer,
  422. [in,out] DWORD *uhLarvalContext,
  423. [in] DWORD dwInboundKeyMatLen,
  424. [in, size_is(dwInboundKeyMatLen)] BYTE *pInboundKeyMat,
  425. [in] DWORD dwOutboundKeyMatLen,
  426. [in, size_is(dwOutboundKeyMatLen)] BYTE *pOutboundKeyMat,
  427. [in, size_is(sizeof(IKE_COOKIE_PAIR))] BYTE *pContextInfo,
  428. DWORD dwFlags);
  429. }