How to get the offset in the chained NDIS packet buffer?



Hi all,

I am a fledging in NDIS driver. Currently, I try to get the packet buffer
via the function
VOID
NdisGetFirstBufferFromPacket(
IN PNDIS_PACKET Packet,
OUT PNDIS_BUFFER *FirstBuffer,
OUT PVOID *FirstBufferVA,
OUT PUINT FirstBufferLength,
OUT PUINT TotalBufferLength
);

However, if the offset I want to get is out of the current buffer, for
example, the IP header, how can I get the pointer? Access FirstBufferVA[
sizeof( MAC_HEADER ) ] directly or go through the buffer list one by one?

And what should be considerated when I access virtual address and physical
address>

Many thanks!

-Liang


.