Export (0) Print
Expand All

IPsecKeyManagerAddAndRegister0 function

The IPsecKeyManagerAddAndRegister0 function registers a Trusted Intermediary Agent (TIA) with IPsec.

Syntax


DWORD WINAPI IPsecKeyManagerAddAndRegister0(
  _In_   HANDLE engineHandle,
  _In_   const IPSEC_KEY_MANAGER0 *keyManager,
  _In_   const IPSEC_KEY_MANAGER_CALLBACKS0 *keyManagerCallbacks,
  _Out_  HANDLE *keyMgmtHandle
);

Parameters

engineHandle [in]

Type: HANDLE

A handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.

keyManager [in]

Type: const IPSEC_KEY_MANAGER0*

The set of key management callbacks which IPsec will invoke.

keyManagerCallbacks [in]

Type: const IPSEC_KEY_MANAGER_CALLBACKS0*

The set of callbacks which should be invoked by IPsec at various stages of SA negotiation.

keyMgmtHandle [out]

Type: HANDLE*

Address of the newly created registration.

Return value

Type: DWORD

Return code/valueDescription
ERROR_SUCCESS
0

The TIA was successfully registered.

FWP_E_* error code
0x80320001—0x80320039

A Windows Filtering Platform (WFP) specific error. See WFP Error Codes for details.

RPC_* error code
0x80010001—0x80010122

Failure to communicate with the remote or local firewall engine.

FWP_E_ALREADY_EXISTS
0x80320009L

The TIA was not registered successfully because another TIA has already been registered to dictate keys.

FWP_E_INVALID_INTERVAL
0x80320021L

The TIA was not registered successfully because keyDictationTimeoutHint exceeded the maximum allowed value of 10 seconds.

SEC_E_CANNOT_INSTALL
0x80090307L

The TIA was not registered successfully because the binary image has not set the IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY property.

 

Remarks

If the IPSEC_KEY_MANAGER_FLAG_DICTATE_KEY flag is set for keyManager, all three callback members of keyManagerCallbacks must be specified; otherwise, only the keyNotify callback should be specified

This function cannot be called from within a transaction. It will fail with FWP_E_TXN_IN_PROGRESS. See Object Management for more information about transactions.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Fwpmu.h

Library

Fwpuclnt.lib

DLL

Fwpuclnt.dll

See also

WFP Functions
IPSEC_KEY_MANAGER0
IPSEC_KEY_MANAGER_CALLBACKS0

 

 

Community Additions

ADD
Show:
© 2014 Microsoft