Call the NdisAdvanceNetBufferDataStart function to release the used data space that was added with the NdisRetreatNetBufferDataStart function.
void NdisAdvanceNetBufferDataStart( PNET_BUFFER NetBuffer, ULONG DataOffsetDelta, BOOLEAN FreeMdl, NET_BUFFER_FREE_MDL_HANDLER FreeMdlHandler );
A pointer to a previously allocated NET_BUFFER structure.
The amount of used data space to release. NDIS adjusts the value of the DataOffset member of the NET_BUFFER structure accordingly.
A BOOLEAN value that, if TRUE, requests NDIS to free any MDLs that become unused in the advance operation. If FreeMdl is FALSE, NDIS retains unused MDLs for use in subsequent retreat operations.
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.
If NDIS allocated memory to satisfy a corresponding call to the NdisRetreatNetBufferDataStart function, then NdisAdvanceNetBufferDataStart frees the memory that NdisRetreatNetBufferDataStart allocated. Otherwise, the memory remains in the MDL and only the value of the DataOffset member of the NET_BUFFER structure is modified.
NDIS calls the NetFreeMdl function specified at FreeMdl if NdisAdvanceNetBufferDataStart must free memory. NDIS calls NetFreeMdl only to free the MDLs and memory that the driver allocated in the NetAllocateMdl function.
When protocol drivers call NdisAdvanceNetBufferDataStart on the receive path to access the various transport headers, the MDL chain should not be modified and FreeMdl is FALSE.
|Minimum supported client||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_NetBuffer_Function|