Поделиться через


NdisAllocateReassembledNetBufferList (Compact 2013)

3/26/2014

Call this function to reassemble a fragmented NET_BUFFER_LIST structure.

Syntax

PNET_BUFFER_LIST
  NdisAllocateReassembledNetBufferList(
    IN PNET_BUFFER  FragmentedNetBufferList,
    IN NDIS_HANDLE  NetBufferAndNetBufferListPoolHandle OPTIONAL,
    IN ULONG  StartOffset,
    IN ULONG  DataOffsetDelta,
    IN ULONG  DataBackFill,
    IN ULONG  AllocateReassembleFlags
    );

Parameters

  • FragmentedNetBufferList
    A pointer to the NET_BUFFER_LIST structure to reassemble.
  • 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.
  • 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.
  • DataOffsetDelta
    The number of bytes of used data space to add to in the reassembled NET_BUFFER structure.
  • 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.
  • 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 the associated NET_BUFFER structures and MDL chains.

Requirements

Header

ndis.h

See Also

Reference

NDIS NET_BUFFER Functions
NdisAllocateNetBufferListPool
NdisFreeReassembledNetBufferList
NET_BUFFER
NET_BUFFER_LIST
NET_BUFFER_LIST_CONTEXT