NdisAdvanceNetBufferListDataStart function

Call the NdisAdvanceNetBufferListDataStart 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_opt_ NET_BUFFER_FREE_MDL_HANDLER FreeMdlHandler
);

Parameters

NetBufferList [in]

A pointer to a previously allocated NET_BUFFER_LIST structure.

DataOffsetDelta [in]

The amount of used data space to release.

FreeMdl [in]

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 [in, optional]

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 equivalent to 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

Target platform

Universal

Version

Supported in NDIS 6.0 and later.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

Irql_NetBuffer_Function

See also

NET_BUFFER
NET_BUFFER_LIST
NetAllocateMdl
NetFreeMdl
NdisAdvanceNetBufferDataStart
NdisRetreatNetBufferListDataStart

 

 

Send comments about this topic to Microsoft

Show: