Compartilhar via


NdisFreePacket function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisFreePacket releases a packet that was allocated from packet pool with NdisAllocatePacket and returns it to the free list.

Syntax

VOID NdisFreePacket(
  _In_ PNDIS_PACKET Packet
);

Parameters

Return value

None

Remarks

Before calling NdisFreePacket, 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.

The driver must release any spin lock it is holding before calling NdisFreePacket.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisFreeNetBuffer instead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

NdisAllocatePacket

NdisDprAllocatePacket

NdisFreeBuffer

NdisReleaseSpinLock

NdisUnchainBufferAtBack

NdisUnchainBufferAtFront

 

 

Send comments about this topic to Microsoft