Share via


NdisAdvanceNetBufferListDataStart (Compact 2013)

3/26/2014

Call this function to release data space that was claimed in previous calls to the NdisRetreatNetBufferListDataStart function.

Syntax

VOID
  NdisAdvanceNetBufferListDataStart(
    IN PNET_BUFFER_LIST  NetBufferList,
    IN ULONG  DataOffsetDelta,
    IN BOOLEAN  FreeMdl,
    IN NET_BUFFER_FREE_MDL_HANDLER  FreeMdlHandler OPTIONAL
    );

Parameters

  • NetBufferList
    A pointer to a previously allocated NET_BUFFER_LIST structure.
  • DataOffsetDelta
    The amount of used data space to release.
  • FreeMdl
    If TRUE and NDIS allocated memory to satisfy the corresponding NdisRetreatNetBufferListDataStart call, this function frees the memory that was allocated and the associated MDL.
  • FreeMdlHandler
    An optional entry point for an NetFreeMdl function. If the caller specifies an entry point for the NetFreeMdl function, NDIS calls NetFreeMdl to free an MDL and memory.

Return Value

None

Remarks

NdisAdvanceNetBufferListDataStart releases used data space for all the NET_BUFFER structures in a NET_BUFFER_LIST structure. If FreeMdl is TRUE and NdisRetreatNetBufferListDataStart allocated memory to satisfy the corresponding allocation request, NdisAdvanceNetBufferListDataStart frees the allocated memory. Calling this function is the same as calling NdisAdvanceNetBufferDataStart for every NET_BUFFER structure on the NET_BUFFER_LIST structure. However, calling NdisAdvanceNetBufferListDataStart is more efficient.

When protocol drivers call NdisAdvanceNetBufferListDataStart on the receive path to access the various transport headers, the MDL chain should not be modified and FreeMdl is FALSE.

Requirements

Header

ndis.h

See Also

Reference

NDIS NET_BUFFER Functions
NET_BUFFER
NET_BUFFER_LIST
NetAllocateMdl
NetFreeMdl
NdisAdvanceNetBufferDataStart
NdisRetreatNetBufferListDataStart