Call the NdisAllocateCloneNetBufferList function to create a new clone NET_BUFFER_LIST structure.
PNET_BUFFER_LIST NdisAllocateCloneNetBufferList( _In_ PNET_BUFFER_LIST OriginalNetBufferList, _In_opt_ NDIS_HANDLE NetBufferListPoolHandle, _In_opt_ NDIS_HANDLE NetBufferPoolHandle, _In_ ULONG AllocateCloneFlags );
- OriginalNetBufferList [in]
A pointer to an existing NET_BUFFER_LIST structure.
- NetBufferListPoolHandle [in, optional]
A handle that was obtained from a call to the NdisAllocateNetBufferListPool function.
- NetBufferPoolHandle [in, optional]
- AllocateCloneFlags [in]
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.
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.
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.
|Supported in NDIS 6.0 and later.|
DDI compliance rules
Build date: 11/16/2013