NDIS packet structure

Hello All,

Is there a description of what a NDIS packet looks like when it arrives
at a Miniports SendPackets entry point? I guess I was wondering how each
layer in the stack adds data (does each layer add its own buffer?) to
the packet as it makes it way down the stack to the miniport for
transmission? So for instance, if the packet contains TCP/IP data, does
it have a Ethernet header in the first buffer, the IP header in the
next…?

Thanks
Ravi

NDIS packet structure
“Murty, Ravi” wrote in message news:xxxxx@ntdev…
Hello All,

Is there a description of what a NDIS packet looks like when it arrives at a Miniports SendPackets entry point? I guess I was wondering how each layer in the stack adds data (does each layer add its own buffer?) to the packet as it makes it way down the stack to the miniport for transmission? So for instance, if the packet contains TCP/IP data, does it have a Ethernet header in the first buffer, the IP header in the next.?

Thanks
Ravi

See the “NDIS Packet Discussion” at the URL:

http://www.ndis.com/papers/default.htm

Basically: Don’t assume anything! Any assumption that you make can be broken by a new NDIS IM driver that uses a strategy that you may never have thought of.

Good luck,

Thomas F. Divine, Windows DDK MVP

http://www.pcausa.com

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Thomas F. Divine[SMTP:xxxxx@hotmail.com]
Reply To: Windows System Software Devs Interest List
Sent: Friday, July 29, 2005 2:03 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] NDIS packet structure

See the “NDIS Packet Discussion” at the URL:

http:
>
> Basically: Don’t assume anything! Any assumption that you make can be broken by a new NDIS IM driver that uses a strategy that you may never have thought of.
>
Thomas is of course right. Years ago I wrote such a driver :slight_smile: Don’t assume anything and take NDIS packet as opaque structure as documentation says and use functions available for this purpose.

It’d be a good candidate for Driver Verifier test – send packets which’d pack every single byte to single NDIS_BUFFER. I wonder how much NDIS drivers would survive :wink: When I implemented communication stack which also uses chained buffers in our device firmware, I wrote such a test to verify implementation correctness and found few bugs this way.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]</http:>

Yes. This can be confirmed by traversing the mdl list
associated with the NDIS packet.


Calvin Guan (Windows DDK MVP)
Staff SW Engineer NetXtreme MINIPORT
Broadcom Corp. Irvine, CA
www.broadcom.com

— “Murty, Ravi” wrote:

> Hello All,
>
> Is there a description of what a NDIS packet looks
> like when it arrives
> at a Miniports SendPackets entry point? I guess I
> was wondering how each
> layer in the stack adds data (does each layer add
> its own buffer?) to
> the packet as it makes it way down the stack to the
> miniport for
> transmission? So for instance, if the packet
> contains TCP/IP data, does
> it have a Ethernet header in the first buffer, the
> IP header in the
> next…?
>
> Thanks
> Ravi
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
xxxxx@lists.osr.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

NDIS packet structure No guarantees at all. Relying on them is not a good thing.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Murty, Ravi
To: Windows System Software Devs Interest List
Sent: Friday, July 29, 2005 3:14 AM
Subject: [ntdev] NDIS packet structure

Hello All,

Is there a description of what a NDIS packet looks like when it arrives at a Miniports SendPackets entry point? I guess I was wondering how each layer in the stack adds data (does each layer add its own buffer?) to the packet as it makes it way down the stack to the miniport for transmission? So for instance, if the packet contains TCP/IP data, does it have a Ethernet header in the first buffer, the IP header in the next.?

Thanks
Ravi


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com