Hi,
Ethernet isn’t too hard, I have that one done. The one I am working on
now is the NdisMediumWan. I am going to have to write a function to decode
each NDIS_WAN_MEDIUM_SUBTYPE that I want to support I guess? Well that
kinda stinks…
Could you explain the OID_WAN_HEADER_FORMAT query? I noticed that the DDK
says that:
NdisWanHeaderNative
Selects the format native to the NdisWanMediumXxx subtype
supported by
the underlying driver. NDISWAN always uses Ethernet.
So what is the difference between NdisWanHeaderNative and
NdisWanHeaderEthernet
for the NDISWAN miniport? And when they say “NDISWAN” are they talking
about
NdisMediumWan, or the miniport driver?
Thanks,
-Jeff
-----Original Message-----
From: Michal Vodicka [mailto:xxxxx@veridicom.cz.nospam]
Sent: Wednesday, March 19, 2003 10:31 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Packet header in ndis hooking driver
From: xxxxx@concord.com[SMTP:xxxxx@concord.com]
Reply To: xxxxx@lists.osr.com
Sent: Thursday, March 20, 2003 4:16 AM
To: xxxxx@lists.osr.com
Subject: [ntdev] Packet header in ndis hooking driver
Hi,
I have an NDIS hooking driver, and I need to figure out
where the IP header begins. The problem is I can’t seem
to get it reliably. I don’t want to end up writing code for
each level 2 protocol type, is there a function that will
get this for me?
This is what you should do. It isn’t so hard, IIRC for Ethernet there are
only 2 possibilities. I’m not aware of a function and doubt there is one.
I have tried hooking OID_GEN_TRANSPORT_HEADER_OFFSET, calling
NDIS_GET_PACKET_HEADER_SIZE, and now I am looking at MDL->ByteCount
of the first buffer chained to the NDIS_PACKET. This works
sometimes, but TCP seems to randomly include the
IP header in the first buffer, which causes me to look too
far into the packet.
Driver must not depend on the way how buffers are chained to packet. It can
only examine data in buffers. TCPIP and any driver layered above yours is
allowed to use buffers any way; there could be even one buffer per data
byte. Also, you shouldn’t access buffers directly, there are functions and
macros for it.
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
You are currently subscribed to ntdev as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.
**********************************************************************