Microsoft Windows CE 3.0  

NdisReinitializePacket

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 removes any chained buffers from a given packet and reinitializes it for reuse.

VOID NdisReinitializePacket(
IN OUT PNDIS_PACKET
Packet
);

Parameters

Packet
Pointer to the packet descriptor allocated by the caller.

Remarks

This function reinitializes a packet descriptor so that the MiniportReservedand ProtocolReservedarrays contain all 0s and the head of the buffer chain is set to NULL.

A driver can call this function only with packet descriptors allocated by that driver. For example, a MiniportReturnPacketfunction is likely to call this function to prepare a driver-allocated packet for use in a subsequent receive indication.

Before calling this function, a driver must call the NdisFreeBufferor the NdisUnchainBufferAt XXXfunctions as many times as necessary to release or to save all buffer descriptors chained to the packet. Otherwise, a call to this function causes a memory leak: all memory associated with the buffer descriptor chain cannot be used by NDIS or by the driver until the system is rebooted.

A driver can call the NdisQueryPacketfunction to determine how many buffer descriptors are chained to a given packet and, therefore, how many calls to NdisFreeBufferor NdisUnchainBufferAt XXXare required. It can call the NdisGetNextBufferfunction to retrieve each buffer descriptor pointer to pass to NdisFreeBuffer.

A call to this function has no effect on the NDIS_PACKET_OOB_DATAstructure associated with the packet descriptor. To prepare this block for reuse, the allocating driver can reset the relevant members with the appropriate NDIS_SET_PACKET_ XXXmacro(s).

A driver that calls this function can run at any IRQL.

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_TO_SEND, NdisAllocatePacket, NdisFreeBuffer, NdisGetNextBuffer, NdisQueryPacket, NdisUnchainBufferAtBack, NdisUnchainBufferAtFront, NdisZeroMemory



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.