FwpsNetBufferListRetrieveContext0 function (fwpsk.h)

The FwpsNetBufferListRetrieveContext0 function retrieves the context associated with a network buffer list that was tagged in another layer.

Note  FwpsNetBufferListRetrieveContext0 is a specific version of FwpsNetBufferListRetrieveContext. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.
 

Syntax

NTSTATUS FwpsNetBufferListRetrieveContext0(
  [in, out] NET_BUFFER_LIST *netBufferList,
  [in]      UINT64          contextTag,
  [in]      BOOLEAN         removeContext,
  [in]      UINT32          flags,
  [out]     UINT64          *context
);

Parameters

[in, out] netBufferList

A network buffer list that indicates one or more packets of interest to the callout driver. If removeContext is set, the network buffer list returned will have the context removed.

[in] contextTag

A locally unique identifier obtained by calling the FwpsNetBufferListGetTagForContext0 function. This is the context tag used in the initial call to FwpsNetBufferListAssociateContext0.

[in] removeContext

If set, FwpsNetBufferListRetrieveContext0 will remove the context association in addition to retrieving the context.

[in] flags

This parameter is reserved for future use and is set to zero.

[out] context

The context assigned to the packet by the callout driver in the initial call to FwpsNetBufferListAssociateContext0.

Return value

The FwpsNetBufferListRetrieveContext0 function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The association was successful.
Other status codes
An error occurred.

Remarks

The FwpsNetBufferListRetrieveContext0 function retrieves a network buffer list that was tagged in another layer.

You can also use this function to remove the context association by setting the removeContext parameter.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 7.
Target Platform Universal
Header fwpsk.h (include Fwpsk.h)
Library Fwpkclnt.lib
IRQL <= DISPATCH_LEVEL

See also

FwpsNetBufferListAssociateContext0 FwpsNetBufferListGetTagForContext0 FwpsNetBufferListRemoveContext0

NET_BUFFER_LIST