NdisDprFreePacket

VOID
NdisDprFreePacket(
IN PNDIS_PACKET Packet
);

NdisDprFreePacket releases a driver-allocated packet descriptor and returns it to the free list when the caller is running at IRQL DISPATCH_LEVEL.

Parameters

Packet

Points to the packet descriptor returned by NdisDprAllocatePacket or NdisAllocatePacket.

Comments

Before calling NdisDprFreePacket, the driver either must call NdisFreeBuffer as many times as necessary to release all buffer descriptors chained to the packet, or it must call an NdisUnchainBufferAtXxx function as many times as necessary to save all pointers to buffer descriptors. Otherwise, memory associated with buffer descriptors in the chain remains unusable by the driver and by NDIS until the system is rebooted.

Callers of NdisDprFreePacket must be running at IRQL DISPATCH_LEVEL. Otherwise, drivers should call NdisFreePacket.

See Also

NdisAllocatePacket, NdisAllocatePacketPool, NdisDprAllocatePacket, NdisFreeBuffer, NdisFreePacket, NdisUnchainBufferAtBack, NdisUnchainBufferAtFront