Re: NDIS/Networking Newbie

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Not sure whether an NDIS Filter (so called "intermediate" = IM) driver
is the right approach for you. AFAIK, process context is not available
at driver (i.e. kernel-mode) level. Also, a TDI solution might serve
you better, but I am not a TDI expert after all.

Some thoughts on NDIS:

First note that each Windows version/variant usually introduces some
NDIS features, which is reflected by an incremented NDIS version
number. For a short overview, see here:

http://msdn.microsoft.com/library/
Win32 and COM Development
> Windows Driver Kit
> Device and Driver Technologies
> Network
> Design Guide
> Introduction to Network Drivers
> Network Driver Programming Considerations
> NDIS Versions in Network Drivers

[Currently, this URL points there, but unfortunately MS is either
unwilling or unable to provide stable URLs for MSDN library contents:
http://msdn2.microsoft.com/en-us/library/aa938306.aspx]

Although MS propagates NDIS 6 should be used for Vista, this
unfortunately also means this NDIS driver will not run on any previous
Windows version/variant.

Thus, you might want to consider writing an NDIS 5 driver, because it
will run on all of Windows 2000, XP, 2003, and Vista (and even on
Windows 98/ME).

1. Should I be writing a filter driver similar to passthru?

An NDIS Filter intermediate (IM) driver implements a 1:1 relation
between a protocol and a network adapter (=miniport) driver. It thus
usually only "filters" the packet flow between some protocol and some
adapter. A MUX IMs can implement other relations as well, i.e. 1:n, n:
1, and even n:n. Packets can be redirected from/to any protocols and
adapters in any way. A MUX IM however requires a more complex design
and implementation (e.g., a so-called Notify Object user-mode program
is usually also required).

2. Is it possible to capture process context for each outbound packet or is
the process context arbitrary?

Not sure but AFAIK you will not be able to get any originating process
context information at driver level. I might be wrong here.

3. The WDK and DDK docs hint that passthru may not be suitable for a
production driver. Is there anything significant missing from it?

Well, passthru simply does "nothing". Many people have used it as a
starting point for their production IM drivers.

HTH, Stephan
---
On Mar 19, 10:29 am, "Carl Woodward" <pppooiiiu...@xxxxxxxxxxxxxx>
wrote:
Dear all,

I am just beginning to start looking at NDIS and Networking and am
reasonably comfortable with the principles but am constantly confusing
myself and have found some of the NDIS documentation too technical. I guess
what I am looking for is an overview. Are there any resources on the
Internet that I can look at?

My first goal is to write a filter driver that captures all network activity
and the process context for the network request. I am principly interested
in TCP/IP connections but being able to filter all network traffic for all
adapters is my ultimate goal. My target platforms are XP, 2K3 and Vista.

Just to make sure that I am not wasting a vast amount of time, I am hoping
NDIS experts on here can set me straight on a few questions:

1. Should I be writing a filter driver similar to passthru?
2. Is it possible to capture process context for each outbound packet or is
the process context arbitrary?
3. The WDK and DDK docs hint that passthru may not be suitable for a
production driver. Is there anything significant missing from it?

Many thanks for any responses!

Carl


.



Relevant Pages

  • RE: NDIS 5.1 intermediate filter driver Vista (WHQL) compliancy
    ... the NDIS IM filters can only be certified under the "Unclassified Signature ... specifically talking about the IM filter drivers in Vista. ... driver certifications. ... and you can change the IOCTL code freely without worrying about ...
    (microsoft.public.development.device.drivers)
  • Re: Incorrect server name
    ... There is no primary WINS server defined for this adapter. ... Broadcom BCM5708C NetXtreme II GigE (NDIS VBD Client) ... Network Monitor Driver ...
    (microsoft.public.windows.server.general)
  • Re: Question about FILE_OBJECT
    ... NDIS IM is a driver that fully conforms to the model, ... I.E. every time they allocated a new context object they ...
    (microsoft.public.win32.programmer.kernel)
  • Re: NDIS 6.0 MUX Intermediate driver
    ... more logical and simple than "converntional" NDIS IM filters (i.e. ... Is the MUX NDIS 6.0 driver an ... different from NDIS 5.x MUX and are there any limitations in MUX 6 ... NDIS 6 - Use NDIS 6 Lighweight Filter Driver ...
    (microsoft.public.development.device.drivers)
  • Multiple NDIS IM driver have same filter class problem
    ... I have problem with NDIS IM filter driver. ... Filter driver 5.0 for packet filtering.it has filter class "failover". ... When i am trying to installed 3rd party VPN Client software on the ...
    (microsoft.public.development.device.drivers)