FwpsNetBufferListAssociateContext0 function (fwpsk.h)
The FwpsNetBufferListAssociateContext0 function associates the callout driver's context with a network buffer list and configures notification for network buffer list events.
Syntax
NTSTATUS FwpsNetBufferListAssociateContext0(
[in, out] NET_BUFFER_LIST *netBufferList,
[in] UINT16 layerId,
[in] UINT64 context,
[in] UINT64 contextTag,
GUID *providerGuid,
[in, out] void *deviceObject,
[in] FWPS_NET_BUFFER_LIST_NOTIFY_FN0 notifyFn,
[in] UINT32 flags
);
Parameters
[in, out] netBufferList
A network buffer list that indicates one or more packets of interest to the callout driver.
[in] layerId
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.
[in] context
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_FN0.
[in] contextTag
A locally unique identifier obtained by calling the FwpsNetBufferListGetTagForContext0 function.
providerGuid
The provider GUID.
[in, out] deviceObject
A pointer to the callout driver's device object.
[in] notifyFn
A pointer to the callout driver's FWPS_NET_BUFFER_LIST_NOTIFY_FN0 function. The filter engine will send status notifications to this function.
[in] flags
This parameter is reserved for future use and is set to zero.
Return value
The FwpsNetBufferListAssociateContext0 function returns one of the following NTSTATUS codes.
Return code | Description |
---|---|
|
The association was successful. |
|
An error occurred. |
Remarks
The FwpsNetBufferListAssociateContext0 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.
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
FwpsNetBufferListAssociateContext1
FwpsNetBufferListGetTagForContext0 FwpsNetBufferListRemoveContext0 FwpsNetBufferListRetrieveContext0