Bewerken

Delen via


Cloned NET_BUFFER_LIST Structures

An NDIS driver creates a cloned NET_BUFFER_LIST structure from an existing NET_BUFFER_LIST structure. The cloned structure references the original structures data. Drivers can use this type of structure to efficiently transfer the same data to multiple paths.

The following figure shows the relationship between a parent NET_BUFFER_LIST structure and a cloned child structure.

Diagram showing the relationship between a parent NET_BUFFER_LIST structure and its cloned child structure.

The preceding figure contains a parent NET_BUFFER_LIST structure and a child structure that was derived from that parent. The parent structure has one NET_BUFFER_LIST_CONTEXT structure and one NET_BUFFER structure with MDLs attached. The parent structure's parent pointer is NULL indicating that it is not a derived structure.

The child NET_BUFFER_LIST structure has one NET_BUFFER structure with MDLs attached. The child NET_BUFFER_LIST has a pointer to the parent structure. The NULL where a NET_BUFFER_LIST_CONTEXT structure pointer would be indicates that the child has no NET_BUFFER_LIST_CONTEXT structure.

Drivers call the NdisAllocateCloneNetBufferList function to create a clone NET_BUFFER_LIST structure. NDIS allocates new NET_BUFFER structures and MDLs with the cloned NET_BUFFER_LIST structure. NDIS does not allocate a NET_BUFFER_LIST_CONTEXT structure for the cloned structure. The new NET_BUFFER structures and MDLs describe the same data as in the parent structure. The data is not copied.

Drivers call the NdisFreeCloneNetBufferList function to free a NET_BUFFER_LIST structure and all associated NET_BUFFER structures and MDL chains that were previously allocated by calling NdisAllocateCloneNetBufferList.

Derived NET_BUFFER_LIST Structures