VOID
NdisGetFirstBufferFromPacket(
IN PNDIS_PACKET _Packet,
OUT PNDIS_BUFFER *_FirstBuffer,
OUT PVOID *_FirstBufferVA,
OUT PUINT _FirstBufferLength,
OUT PUINT _TotalBufferLength
);
NdisGetFirstBufferFromPacket returns pointers to the buffer descriptor and base virtual address for the initial buffer chained to a given packet descriptor, along with the sizes of the initial buffer and total buffer in case the buffer is fragmented.
Parameters
Packet
Points to the packet descriptor from which this macro extracts information about the initial buffer.
FirstBuffer
Points to a caller-supplied variable in which this macro returns the address of the initial buffer descriptor chained to the given packet descriptor.
FirstBufferVA
Points to a caller-supplied variable in which this macro returns the base virtual address of the initial buffer associated with the packet.
FirstBufferLength
Points to a caller-supplied variable in which this macro returns the number of bytes mapped by the initial buffer descriptor chained to the packet descriptor.
TotalBufferLength
Points to a caller-supplied variable in which this macro returns the total number of bytes mapped by all buffer descriptors chained to the packet descriptor.
Comments
Drivers use this macro to get information about the initial buffer and amount of data associated with a given packet faster than they can by making calls to NdisQueryPacket and, then, NdisQueryBuffer.
Callers of NdisGetFirstBufferFromPacket run at IRQL <= DISPATCH_LEVEL.
See Also
MiniportSend, MiniportSendPackets, NdisGetNextBuffer, NDIS_PACKET, NdisQueryBuffer, NdisQueryPacket, ProtocolReceivePacket