NdisAllocateReassembledNetBufferList function (ndis/nblapi.h)

Call the NdisAllocateReassembledNetBufferList function to reassemble a fragmented NET_BUFFER_LIST structure.

Syntax

NDIS_EXPORTED_ROUTINE NET_BUFFER_LIST * NdisAllocateReassembledNetBufferList(
                 NET_BUFFER_LIST *FragmentNetBufferList,
  [in, optional] NDIS_HANDLE     NetBufferAndNetBufferListPoolHandle,
  [in]           ULONG           StartOffset,
  [in]           ULONG           DataOffsetDelta,
  [in]           ULONG           DataBackFill,
  [in]           ULONG           AllocateReassembleFlags
);

Parameters

FragmentNetBufferList

A pointer to the NET_BUFFER_LIST structure to reassemble.

[in, optional] NetBufferAndNetBufferListPoolHandle

A NET_BUFFER_LIST structure pool handle that was previously returned from the NdisAllocateNetBufferListPool function. The fAllocateNetBuffer member of the NET_BUFFER_LIST_POOL_PARAMETERS structure that the caller passed to NdisAllocateNetBufferListPool must have been set to TRUE, and the DataSize member set to zero. If this parameter is NULL, NDIS uses an internal pool.

[in] StartOffset

The amount of data to skip at the beginning of each source NET_BUFFER structure. This amount is in addition to the value that is specified in the DataOffset member of the NET_BUFFER structure.

[in] DataOffsetDelta

The number of bytes of used data space to add to in the reassembled NET_BUFFER structure.

[in] DataBackFill

If allocation of unused data space (backfill space) is required, this parameter specifies the number of bytes of unused data space in addition to DataOffsetDelta to allocate.

[in] AllocateReassembleFlags

NDIS flags that can be combined with an OR operation. Set this parameter to zero. There are currently no flags defined for this function.

Return value

If the reassemble operation succeeds, NdisAllocateReassembledNetBufferList returns a reassembled NET_BUFFER_LIST structure. If the operation fails, it returns NULL.

Remarks

NdisAllocateReassembledNetBufferList allocates, initializes, and returns a new NET_BUFFER_LIST structure that includes one NET_BUFFER structure and one MDL chain. The new NET_BUFFER_LIST structure describes the same data as the fragmented source NET_BUFFER_LIST structure that the driver passed at FragmentedNetBufferList. After skipping the number of bytes specified in StartOffset in every fragmented NET_BUFFER structure, NDIS concatenates the remaining data in each fragmented NET_BUFFER structure into one reassembled NET_BUFFER structure. Reassembled NET_BUFFER_LIST structures do not include an initial NET_BUFFER_LIST_CONTEXT structure.

Call the NdisFreeReassembledNetBufferList function to free a reassembled NET_BUFFER_LIST structure and all of the associated NET_BUFFER structures and MDL chains.

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Universal
Header ndis/nblapi.h (include ndis.h)
Library Ndis.lib
IRQL <= DISPATCH_LEVEL
DDI compliance rules Irql_NetBuffer_Function(ndis), NdisAllocateReassembledNetBufferList(ndis), NdisAllocateReassembledNetBufferList_InitFail(ndis)

See also

NET_BUFFER

NET_BUFFER_LIST

NET_BUFFER_LIST_CONTEXT

NET_BUFFER_LIST_POOL_PARAMETERS

NdisAllocateNetBufferListPool NdisFreeReassembledNetBufferList