NdisAllocateNetBufferList - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// nblapi.h

NDIS_EXPORTED_ROUTINE NET_BUFFER_LIST * NdisAllocateNetBufferList(
  [in] NDIS_HANDLE PoolHandle,
  [in] USHORT      ContextSize,
  [in] USHORT      ContextBackFill
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-nblapi-ndisallocatenetbufferlist)

NdisAllocateNetBufferList function

Description

Call the NdisAllocateNetBufferList function to allocate and initialize a NET_BUFFER_LIST structure from a NET_BUFFER_LIST structure pool.

Parameters

PoolHandle [in]

A NET_BUFFER_LIST structure pool handle that was previously returned from a call to NdisAllocateNetBufferListPool.

ContextSize [in]

The amount of used data space in the NET_BUFFER_LIST_CONTEXT structure to reserve for the caller. The ContextSize must be a multiple of the value defined by MEMORY_ALLOCATION_ALIGNMENT.

ContextBackFill [in]

The amount of unused data space (backfill space) that the caller requires. NDIS adds this value to the ContextSize and allocates additional space. The ContextBackFill must be a multiple of the value defined by MEMORY_ALLOCATION_ALIGNMENT.

Return value

NdisAllocateNetBufferList returns a pointer to the allocated NET_BUFFER_LIST structure. If the allocation was unsuccessful, this pointer is NULL.

Remarks

You can call the NdisAllocateNetBufferList or NdisAllocateNetBufferAndNetBufferList function to allocate a NET_BUFFER_LIST structure from a pool.

Note NET_BUFFER and NET_BUFFER_LIST structures must be allocated from an NDIS buffer pool. A driver must not allocate and initialize a NET_BUFFER_LIST or NET_BUFFER structure from its private memory pool or the stack.

If you call NdisAllocateNetBufferList and the NET_BUFFER_LIST structure pool was allocated by calling the NdisAllocateNetBufferListPool function with the fAllocateNetBuffer member of the NET_BUFFER_LIST_POOL_PARAMETERS structure set to TRUE, NDIS allocates a NET_BUFFER_LIST, NET_BUFFER, MDL, and data.

Call the NdisFreeNetBufferList function to free a NET_BUFFER_LIST structure.

See also

NET_BUFFER

NET_BUFFER_LIST

NET_BUFFER_LIST_CONTEXT

NET_BUFFER_LIST_POOL_PARAMETERS

NdisAllocateNetBufferAndNetBufferList

NdisAllocateNetBufferListPool

NdisFreeNetBufferList