Export (0) Print
Expand All
Expand Minimize

NdisGetPoolFromPacket 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.

NdisGetPoolFromPacket returns the handle to the packet pool from which a packet was allocated.

Syntax


NDIS_HANDLE NdisGetPoolFromPacket(
  _In_  PNDIS_PACKET Packet
);

Parameters

Packet [in]

Pointer to an NDIS_PACKET structure that is the descriptor for a packet.

Return value

NdisGetPoolFromPacket returns a handle to the packet pool for the specified packet. If Packet points to an invalid packet descriptor, NdisGetPoolFromPacket returns an indeterminate value.

Remarks

After a descriptor for a send or receive packet returns to an intermediate driver at the conclusion of a data transfer, an intermediate driver can call NdisGetPoolFromPacket to retrieve the handle to the packet pool from which the packet was allocated. The intermediate driver compares the returned handle with the handle to the driver's own packet pool. If the handles are the same, the intermediate driver can reclaim the packet descriptor. If the handles are not the same, the intermediate driver cannot reclaim the packet descriptor; instead, it must allow the driver that allocated the packet descriptor to reclaim that descriptor.

System support for NdisGetPoolFromPacket is available in Windows XP and later versions.

Requirements

Version

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

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

NdisIMGetCurrentPacketStack

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft