NdisAllocateCloneNetBufferList function

Call the NdisAllocateCloneNetBufferList function to create a new clone NET_BUFFER_LIST structure.


PNET_BUFFER_LIST NdisAllocateCloneNetBufferList(
  PNET_BUFFER_LIST OriginalNetBufferList,
  NDIS_HANDLE      NetBufferListPoolHandle,
  NDIS_HANDLE      NetBufferPoolHandle,
  ULONG            AllocateCloneFlags



A pointer to an existing NET_BUFFER_LIST structure.


A handle that was obtained from a call to the NdisAllocateNetBufferListPool function.


A NET_BUFFER structure pool handle that was previously returned from a call to NdisAllocateNetBufferPool.


NDIS flags that can be combined with an OR operation. The following flags are defined:


Reserved for NDIS.


If this flag is set, NDIS does not allocate new MDLs for the cloned NET_BUFFER_LIST. Instead, the cloned NET_BUFFER_LIST uses the same MDL chain as the original NET_BUFFER_LIST. If NDIS_CLONE_FLAGS_USE_ORIGINAL_MDLS is cleared, NDIS allocates new MDLs to reference the original data buffers.

Return Value

NdisAllocateCloneNetBufferList returns a pointer to the new clone NET_BUFFER_LIST structure. If the allocation was unsuccessful, this pointer is NULL.


Call NdisAllocateCloneNetBufferList to create a clone NET_BUFFER_LIST structure that you can use to send duplicate data on a separate data path.

Each NET_BUFFER structure in the original NET_BUFFER_LIST structure is only cloned from the start of the used data space, not the start of the entire data space. To get the offset from the beginning of the data space to the start of the used data space, use the NET_BUFFER_DATA_OFFSET macro.

If the cloned NET_BUFFER_LIST structure should have attributes that are associated with a given pool, the caller must specify the pool handle in the NetBufferListPoolHandle or NetBufferPoolHandle parameter. For example, the ProtocolType member of the NET_BUFFER_LIST structure is associated with the pool.

The clone NET_BUFFER_LIST structure describes the same data that is described by the NET_BUFFER_LIST structure at OriginalNetBufferList. NDIS does not copy the data that is described by the original MDLs to new data buffers. Instead, the cloned structures reference the original data buffers. The clone NET_BUFFER_LIST structure does not include an initial NET_BUFFER_LIST_CONTEXT structure.

Call the NdisFreeCloneNetBufferList function to free a NET_BUFFER_LIST structure and all of the associated structures and MDL chains that were allocated by calling NdisAllocateCloneNetBufferList.


Minimum supported client Supported in NDIS 6.0 and later.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
DDI compliance rules Irql_NetBuffer_Function

See Also