Expand Minimize

FwpsNetBufferListAssociateContext1 function

The FwpsNetBufferListAssociateContext1 function associates the callout driver's context with a network buffer list and configures notification for network buffer list events.

Note  FwpsNetBufferListAssociateContext1 is the specific version of FwpsNetBufferListAssociateContext used in Windows 8 and later. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information. For Windows 7, FwpsNetBufferListAssociateContext0 is available.

Syntax


NTSTATUS NTAPI FwpsNetBufferListAssociateContext1(
  _Inout_  NET_BUFFER_LIST *netBufferList,
  _In_     UINT16 layerId,
  _In_     UINT64 context,
  _In_     UINT64 contextTag,
  _In_     GUID *providerGUID,
  _Inout_  void *deviceObject,
  _In_     FWPS_NET_BUFFER_LIST_NOTIFY_FN1 notifyFn,
  _In_     UINT32 flags
);

Parameters

netBufferList [in, out]

A network buffer list that indicates one or more packets of interest to the callout driver.

layerId [in]

The identifier of the layer in which the context is being associated. When calling this function from the NDIS receive path, set this parameter to FWPS_LAYER_NON_WFP.

context [in]

Arbitrary context information set by the callout driver. The filter engine will pass this context to the callout driver's FWPS_NET_BUFFER_LIST_NOTIFY_FN1 function.

contextTag [in]

A locally unique identifier obtained by calling the FwpsNetBufferListGetTagForContext0 function.

providerGUID [in]

The provider GUID.

deviceObject [in, out]

A pointer to the callout driver's device object.

notifyFn [in]

A pointer to the callout driver's FWPS_NET_BUFFER_LIST_NOTIFY_FN1 function. The filter engine will send status notifications to this function.

flags [in]

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

Return value

The FwpsNetBufferListAssociateContext1 function returns one of the following NTSTATUS codes.

Return codeDescription
STATUS_SUCCESS

The association was successful.

Other status codes

An error occurred.

 

Remarks

The FwpsNetBufferListAssociateContext1 function associates groups of packets with the callout driver. Packets of interest can be tracked for inspection through multiple layers in the stack.

Before calling this function, the FwpsNetBufferListGetTagForContext0 function must be called to obtain a context tag.

This function is essentially identical to the previous version, FwpsNetBufferListAssociateContext0. The only difference is the updated FWPS_NET_BUFFER_LIST_NOTIFY_FN1 function pointed to by the notifyFn parameter.

Requirements

Version

Available starting with Windows 8.

Header

Fwpsk.h (include Fwpsk.h)

IRQL

<= DISPATCH_LEVEL

See also

NET_BUFFER_LIST
FWPS_NET_BUFFER_LIST_NOTIFY_FN1
FwpsNetBufferListAssociateContext0
FwpsNetBufferListGetTagForContext0
FwpsNetBufferListRemoveContext0
FwpsNetBufferListRetrieveContext0
Using Packet Tagging

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft