Hello all,
Id like to express my appreciation to everyone who has helped me with
problems in the past. This mailing list is the only decent source of
NDIS driver development related information ( besides MS ) that I have
been able to locate. Thanks to ORS online and its contributing members!
On to my problem. I have developed a few NDIS drivers in recent years.
The two of interest are an NDIS 5 IM driver and an NDIS 6 LWF driver.
The purpose of these are to allow a user-land application to capture
packets that match a specified rule and inject packets up or down the
NDIS stack.
For packets to be injected, the user-land application does what I would
expect any IP send path would do … Check the source address of the
packet to determine the outbound adapter, check the destination address
to see if its in the local network or if it needs to be forwarded to a
router, and then adds an Ethernet header using the appropriate source
and destination MAC addresses. Afterwards, the packet is forwarded to
the IM/LWF driver which is in turn forwarded to the appropriate adapter
based on the source MAC address. This works flawlessly in all normal
cases. Unfortunately, MS Dialup adapters are a bit of a pain.
There doesn’t seem to be a lot of information available on how the MS
Dialup adapter operates under the hood. The MAC address reported to
user-land applications appears to only be relevant to MS TCP/IP. This
makes it difficult to determine which WAN_LINE to use when sending a
packet. I say this because I can’t find any correlation between info
reported to user-land and information included in the NDIS_WAN_LINE_UP
status notifications. As a hideous work around, I grubbed around in the
protocol space of the status message on 2K/XP and found the assigned IP
address. Using this information, I was able to send packets down to the
correct WAN_LINE instance by matching the packet source IP address (
instead of the MAC address ) to the appropriate WAN_LINE.
So now I need to support NDIS 6 and Vista. It would seem to me that MS
has been successful at pushing 3rd party vendors down an evolutionary
path towards NDIS 6 driver technology. Unfortunately, NDISWANIP appears
to be the same old crappy driver technology that is no longer supported
( or documented ) in NDIS 6. It sends NDIS_WAN_LINE_UP and DOWN
notifications just like 2K/XP. But with NDIS 6, the protocol space data
has been juggled around, presumably to support new features like IPv6.
Long story short, the IP address doesn’t appear to be included any more.
Please help! There must be a good way to match an NDIS kernel WAN_LINE
to a given adapter as reported to user-land applications. It don’t see
any documented method and would greatly, greatly appreciate some help
from someone with experience in this area.
Thanks in advance,
-Matthew