NdisDprAllocatePacket

VOID
    NdisDprAllocatePacket(
        OUT PNDIS_STATUS  Status,
        OUT PNDIS_PACKET  *Packet,
        IN NDIS_HANDLE  PoolHandle
        ); 

NdisDprAllocatePacket allocates and initializes a packet descriptor when the caller is running at IRQL DISPATCH_LEVEL.

Parameters

Status
Points to a caller-supplied variable in which this function returns the final status of the request, which can be one of the following:
NDIS_STATUS_SUCCESS
The caller can use the packet descriptor returned at Packet.
NDIS_STATUS_RESOURCES
The free list for the packet pool currently has no available entries. A subsequent call to NdisDprFreePacket or NdisFreePacket will return the given entry to the free list. The variable at Packet is set to NULL.
Packet
Points to a caller-supplied variable in which this function returns a pointer to the allocated packet descriptor.
PoolHandle
Specifies the handle returned by a preceding call to NdisAllocatePacketPool.

Comments

NdisDprAllocatePacket runs slightly faster than NdisAllocatePacket because NDIS can acquire the spin lock it uses to synchronize access to the packet pool without having to raise IRQL.

A caller of NdisDprAllocatePacket must be running at IRQL DISPATCH_LEVEL. Otherwise, the driver should call NdisAllocatePacket.

See Also

NdisAllocatePacket, NdisAllocatePacketPool, NdisDprAllocatePacketNonInterlocked, NdisDprFreePacket, NdisFreePacket, NdisReleaseSpinLock