Share via


FwpsReferenceNetBufferList0 (Compact 2013)

3/26/2014

This function increments the reference count for a NET_BUFFER_LIST structure.

Syntax

VOID NTAPI
  FwpsReferenceNetBufferList0(
    IN OUT NET_BUFFER_LIST  *netBufferList
    IN BOOLEAN  intendToModify
    );

Parameters

  • netBufferList
    A pointer to the NET_BUFFER_LIST structure for which the reference count is being incremented
  • intendToModify
    A value that indicates whether a callout intends to modify the cloned net buffer list, whose parent is pointed to by the netBufferLIst parameter, after the classifyFn function has returned. If TRUE, the callout intends to modify the cloned net buffer list after classifyFn has returned (an out-of-band modification). Otherwise, set to FALSE.

Return Value

None

Remarks

A callout driver calls the FwpsReferenceNetBufferList0 function to increment the reference count for a NET_BUFFER_LIST structure so that the net buffer list remains valid outside the classifyFn function.

For example, when a callout driver reassembles a packet, it increments the reference count for each received NET_BUFFER_LIST structure that describes the packet fragments that make up an individual packet. This allows the new NET_BUFFER_LIST structure that describes the reassembled packet to safely reference the MDLs pointed to by the NET_BUFFER_LIST structures that describe the packet fragments. After the callout driver has injected the new NET_BUFFER_LIST structure into the network stack, it decrements the reference count for each NET_BUFFER_LIST structure that describes the packet fragments from its packet injection completion routine.

A callout driver must call the FwpsDereferenceNetBufferList0 function for the NET_BUFFER_LIST structure after the callout driver has finished referencing the structure.

Requirements

Header

fwpsk.h

See Also

Reference

Functions Called by Callout Drivers
NET_BUFFER_LIST
classifyFn
FwpsDereferenceNetBufferList0
WFP Callout Driver Functions