Hey all,
I need to send packets from an NDIS Intermediate driver. The thing is, when
I get packets from the miniport, the format I see goes
Ethernet Header
IP Header
TCP Header
Payload
When I’m generating a packet within my intermediate driver, how much of this
structure do I need to make? I figured that since the ethernet header is
more of a miniport thing than a protocol thing, I make the IP Header, TCP
Header, and Payload, and assumed the miniport driver would stick on the
ethernet for me. Was this assumption correct?
Thanks
On Thu, 2004-08-12 at 18:15, Bryce Leung wrote:
Hey all,
I need to send packets from an NDIS Intermediate driver. The thing is, when
I get packets from the miniport, the format I see goes
Ethernet Header
IP Header
TCP Header
Payload
When I’m generating a packet within my intermediate driver, how much of this
structure do I need to make? I figured that since the ethernet header is
more of a miniport thing than a protocol thing, I make the IP Header, TCP
Header, and Payload, and assumed the miniport driver would stick on the
ethernet for me. Was this assumption correct?
Nope. This is a FAQ, for what it’s worth; check out www.pcausa.com and
www.ndis.com for Thomas Divine’s copius discussion of these topics.
The (ethernet) miniport expects to get a full, valid ethernet frame.
This includes everything starting from the destination address (you
don’t need the preamble) up to the end of the payload (no frame check
sequence either).
You should probably use the mac address of the outgoing card as the
source address.
Good luck.
-sd
> Ethernet Header
IP Header
TCP Header
Payload
When I’m generating a packet within my intermediate driver, how much of this
structure do I need to make?
All of them.
I figured that since the ethernet header is
more of a miniport thing than a protocol thing, I make the IP Header, TCP
Header, and Payload, and assumed the miniport driver would stick on the
ethernet for me. Was this assumption correct?
No, it is the protocol who generates the Ethernet header.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com