FwpsNetBufferListRetrieveContext0 function

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(
  NET_BUFFER_LIST *netBufferList,
  UINT64          contextTag,
  BOOLEAN         removeContext,
  UINT32          flags,
  UINT64          *context
);

Parameters

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.

contextTag

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

removeContext

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

flags

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

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

   
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