IPsecSaContextUpdate0 function (fwpmu.h)

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

Syntax

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

Parameters

[in] engineHandle

Type: HANDLE

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

[in] 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 [IPSEC_SA_DETAILS1](/windows/desktop/api/ipsectypes/ns-ipsectypes-ipsec_sa_details1) structure.
IPSEC_SA_DETAILS_UPDATE_UDP_ENCAPSULATION
Updates the [IPSEC_SA_DETAILS1](/windows/desktop/api/ipsectypes/ns-ipsectypes-ipsec_sa_details1) structure.
IPSEC_SA_BUNDLE_UPDATE_FLAGS
Updates the [IPSEC_SA_BUNDLE1](/windows/desktop/api/ipsectypes/ns-ipsectypes-ipsec_sa_bundle1) structure.
IPSEC_SA_BUNDLE_UPDATE_NAP_CONTEXT
Updates the [IPSEC_SA_BUNDLE1](/windows/desktop/api/ipsectypes/ns-ipsectypes-ipsec_sa_bundle1) structure.
IPSEC_SA_BUNDLE_UPDATE_KEY_MODULE_STATE
Updates the [IPSEC_SA_BUNDLE1](/windows/desktop/api/ipsectypes/ns-ipsectypes-ipsec_sa_bundle1) structure.
IPSEC_SA_BUNDLE_UPDATE_PEER_V4_PRIVATE_ADDRESS
Updates the [IPSEC_SA_BUNDLE1](/windows/desktop/api/ipsectypes/ns-ipsectypes-ipsec_sa_bundle1) structure.
IPSEC_SA_BUNDLE_UPDATE_MM_SA_ID
Updates the [IPSEC_SA_BUNDLE1](/windows/desktop/api/ipsectypes/ns-ipsectypes-ipsec_sa_bundle1) structure.

[in] newValues

Type: 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

Requirement Value
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