VOID
NdisCopyFromPacketToPacket(
IN PNDIS_PACKET Destination,
IN UINT DestinationOffset,
IN UINT BytesToCopy,
IN PNDIS_PACKET Source,
IN UINT SourceOffset,
OUT PUINT BytesCopied
);
NdisCopyFromPacketToPacket copies a specified range of data from one packet to another.
The caller of NdisCopyFromPacketToPacket allocates the destination packet, if not the source packet as well. The packet descriptor of the destination packet should have enough chained buffer descriptors to receive the data.
If the source packet runs out of data or the destination packet out of space before the specified number of bytes has been copied, the copy operation stops. In either case, NdisCopyFromPacketToPacket returns the number of bytes successfully copied from the source to the destination packet.
NdisCopyFromPacketToPacket does not copy any out-of-band information associated with the given Source to the Destination. To copy this information, the driver can use pointers returned by NDIS_OOB_DATA_FROM_PACKET and then call NdisMoveMemory.
The driver must release any spin lock it is holding before calling NdisCopyFromPacketToPacket.
Callers of NdisCopyFromPacketToPacket run at IRQL <= DISPATCH_LEVEL.
NdisAllocateBuffer, NdisAllocatePacket, NdisMoveMemory, NDIS_OOB_DATA_FROM_PACKET, NDIS_PACKET_OOB_DATA