In article <64281802-8548-462c-9ee7->, Nike Chen <> wrote:
>On 12=E6=9C=8828=E6=97=A5, =E4=B8=8B=E5=8D=884=E6=99=8258=E5=88=86, ta...@m=
>ongo.net (tanix) wrote:
>> Anybody has any ideas what's involved in getting the NDIS intermediate
>> driver equivalent functionality in Linux?
>>
>> How would you go about it?
>>
>> It is for monitoring firewall app and driver has to be high performance.
>> NDIS is just fine for it.
>>
>> I'd like it to sit just above the network card driver on the stack.
>
>Why do you just use netfilter mechanism in Linux kernel?
Well, I looked at it in passing a while back.
Did not have an impression it was either low enough on the stack
or could support things I need to do.
The rules need to be uploaded to the low level driver.
At high bandwidths, some queues, that hold some pending packets
may have to stay on that queue for minutes if not longer.
If some packet arrives and there is no rule for it,
the packet is not simply dropped because the user mode, the app
may be in a prompted mode. Meaning, until user comes back from
kitchen and clicks on one of the choices for unknown packet,
that packet is held in the driver queue untill either user
responds and a new rule is created and passed to a driver,
and a packed is allowed to pass through, or it simply times out.
Furethermore, I have at least 4 distinct rulesets, such as
Stealth, Trusted, Policy and per adapter. Some of these rulesets
are big. So performance at high bandwidth is a must.
And there are all sorts of intricate mechanisms in the driver.
My impression was that netfilter is a gadget on the user level.
Not that I ever remember anything of significance of it.
It was a couple of years ago.
Also, I need to control everything on the box as far as network
traffic goes. I should be able to intercept even a strandard
firewall traffic, such as netfilter. This is important.
For example, under Windows, this particular NDIS driver is
the only properly written and fully compliant driver in any
firewall I know off and does not violate the fundamental
principles of OS and driver design. All other drivers I saw
used hacks, poking into kernel mode data structures and ugly
things like that. As a result, you could not install more than
one of those net apps because your box would blue screen,
and I have verify it first hand.
So...
Things are a bit intricate and highest level of performance
and control of the wire are a must.
For example, if you simply click a single checkbox, you can
see every single packet in the monitor window, and that is
a LOT of processing. If a single element in the chaing of
events, interfaces is not up to snuff, you'll lock up your
box within milliseconds.
Things like that.
I did not have an impression that netfilter is going to do
the trick even though I am just beginning to look into this
port issue. Right now trying to get some bits and pieces of
info from people that know what they are talking about.
--
Programmer's Goldmine collections:
http://preciseinfo.org
Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript,
organized by major topics of language, tools, methods, techniques.