Microsoft Windows CE 3.0  

NdisAllocatePacket

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function allocates and initializes a packet descriptor.

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

Parameters

Status
Pointer to a caller-supplied variable in which this function returns the final status of the request; one of the following:
Value Description
NDIS_STATUS_SUCCESS The caller can use the packet descriptor returned by the Packetparameter.
NDIS_STATUS_RESOURCES The free list for the packet pool currently has no available entries. A subsequent call to the NdisFreePacketfunction returns the specified entry to the free list.
Packet
Pointer to a caller-supplied variable in which this function returns a pointer to the allocated packet descriptor.
PoolHandle
Handle returned by a preceding call to the NdisAllocatePacketPoolfunction.

Remarks

NDIS drivers must allocate packet descriptors from a packet pool. Protocol drivers call this function one or more times for their subsequent calls to the NdisSendfunction. Miniports call this function one or more times for subsequent calls to the NdisMIndicateReceivePacketfunction. NDIS intermediate drivers must call this function to repackage sends and receive indications in fresh packet descriptors before passing incoming transfer requests on to other NDIS drivers.

Each packet descriptor eventually has one or more buffer descriptors chained to it. This function initializes the packet descriptor at 0 and sets its buffer chain pointer to NULL. The caller must chain the buffer descriptor(s) mapping the packet data to the packet descriptor before it is sent or indicated. Most NDIS drivers allocate buffer descriptors with the NdisAllocateBufferfunction.

Drivers must use the NDIS_SET_PACKET_ XXXmacros to access or set up any out-of-band information associated with the packet descriptor.

A driver that calls this function runs at IRQL <=DISPATCH_LEVEL.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

NDIS_SET_PACKET_HEADER_SIZE, NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO, NDIS_SET_PACKET_STATUS, NDIS_SET_PACKET_TIME_RECEIVED, NDIS_SET_PACKET_TIME_SENT, NDIS_SET_PACKET_TIME_TO_SEND, NdisAllocateBuffer, NdisAllocatePacketPool, NdisFreePacket, NdisMEthIndicateReceive, NdisMIndicateReceivePacket, NdisSend



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.