IPsecSaContextUpdate0 function

The IPsecSaContextUpdate0 function updates an IPsec security association (SA) context.

Syntax

DWORD IPsecSaContextUpdate0(
  HANDLE                  engineHandle,
  UINT64                  flags,
  const IPSEC_SA_CONTEXT1 *newValues
);

Parameters

engineHandle

Type: HANDLE

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

flags

Type: UINT32

Flags indicating the specific field in the IPSEC_SA_CONTEXT1 structure that is being updated.

Possible values:

IPsec SA flag Meaning
IPSEC_SA_DETAILS_UPDATE_TRAFFIC
Updates the traffic member of the IPSEC_SA_DETAILS1 structure.
IPSEC_SA_DETAILS_UPDATE_UDP_ENCAPSULATION
Updates the udpEncapsulation member of the IPSEC_SA_DETAILS1 structure.
IPSEC_SA_BUNDLE_UPDATE_FLAGS
Updates the flags member of the IPSEC_SA_BUNDLE1 structure.
IPSEC_SA_BUNDLE_UPDATE_NAP_CONTEXT
Updates the napContext member of the IPSEC_SA_BUNDLE1 structure.
IPSEC_SA_BUNDLE_UPDATE_KEY_MODULE_STATE
Updates the keyModuleState member of the IPSEC_SA_BUNDLE1 structure.
IPSEC_SA_BUNDLE_UPDATE_PEER_V4_PRIVATE_ADDRESS
Updates the peerV4PrivateAddress member of the IPSEC_SA_BUNDLE1 structure.
IPSEC_SA_BUNDLE_UPDATE_MM_SA_ID
Updates the mmSaId member of the IPSEC_SA_BUNDLE1 structure.

newValues

Type: const IPSEC_SA_CONTEXT1*

An inbound and outbound SA pair.

Return Value

Type: DWORD

Return code/value Description
ERROR_SUCCESS
0
The IPsec SA context was updated successfully.
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.

Remarks

IPsecSaContextUpdate0 is a specific implementation of IPsecSaContextUpdate. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header fwpmu.h
Library Fwpuclnt.lib
DLL Fwpuclnt.dll

See Also

IPSEC_SA_CONTEXT1