NdisRetreatNetBufferListDataStart - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// nblapi.h

NDIS_EXPORTED_ROUTINE NDIS_STATUS NdisRetreatNetBufferListDataStart(
  [in]           NET_BUFFER_LIST         *NetBufferList,
  [in]           ULONG                   DataOffsetDelta,
  [in]           ULONG                   DataBackFill,
  [in, optional] NET_BUFFER_ALLOCATE_MDL *AllocateMdlHandler,
  [in, optional] NET_BUFFER_FREE_MDL     *FreeMdlHandler
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-nblapi-ndisretreatnetbufferlistdatastart)

NdisRetreatNetBufferListDataStart function

Description

Call the NdisRetreatNetBufferListDataStart function to increase the used data space in all the NET_BUFFER structures in a NET_BUFFER_LIST structure.

Parameters

NetBufferList [in]

A pointer to a previously allocated NET_BUFFER_LIST structure.

DataOffsetDelta [in]

The amount of additional used data space in each NET_BUFFER structure. If there is not enough unused data space to satisfy the request, NDIS allocates more memory.

DataBackFill [in]

If NDIS must allocate memory, this parameter specifies the amount of data space in addition to the value of the DataOffsetDelta parameter to allocate.

AllocateMdlHandler [in, optional]

An optional entry point for an NetAllocateMdl function. If the caller specifies an entry point for the NetAllocateMdl function, NDIS calls NetAllocateMdl to allocate an MDL and memory.

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

NdisRetreatNetBufferListDataStart returns one of the following:

Return code Description
NDIS_STATUS_SUCCESS NdisRetreatNetBufferListDataStart successfully allocated the data space on all the NET_BUFFER structures either by reducing the value of the DataOffset member or by allocating new storage.
NDIS_STATUS_RESOURCES NdisRetreatNetBufferListDataStart failed due to insufficient resources.
NDIS_STATUS_FAILURE NdisRetreatNetBufferListDataStart failed for reasons other than insufficient resources.

Remarks

Calling NdisRetreatNetBufferListDataStart is the equivalent of calling the NdisRetreatNetBufferDataStart function for every NET_BUFFER structure on the NET_BUFFER_LIST structure. NdisRetreatNetBufferListDataStart attempts to satisfy the request by reducing the value of the DataOffset member in every NET_BUFFER structure. If there is not enough unused data space available, this function allocates a new buffer and MDL, and then chains the new MDL to the beginning of the MDL chain on the NET_BUFFER structure.

Call the NdisAdvanceNetBufferListDataStart function to release data space that was claimed in a previous NdisRetreatNetBufferListDataStart call. Alternatively, the driver can call the NdisAdvanceNetBufferDataStart function for each NET_BUFFER structure on the NET_BUFFER_LIST structure. Calling NdisAdvanceNetBufferListDataStart is more efficient.

See also

NET_BUFFER

NET_BUFFER_LIST

NdisAdvanceNetBufferDataStart

NdisAdvanceNetBufferListDataStart

NdisRetreatNetBufferDataStart

NetAllocateMdl

NetFreeMdl