In your architecture NDIS IM Driver 2 simply cannot ever exist. No
discussion about this. End of subject!
A NDIS IM driver MUST bind to one or more lower-level miniport at its
lower-edge AND must be bound to at least one or more higher-level protocol
at its upper-edge.
Driver 2 can be some other type of non-NDIS driver, but it cannot be a NDIS
IM driver or an NDIS driver of any type.
Thomas F. Divine
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of shobhit shingla
Sent: Friday, June 01, 2007 12:46 AM
To: Windows System Software Devs Interest List
Subject: Re: Re:[ntdev] Welcome to the NTDEV Discussion List!
Sorry the attachment is not allowed.
Here is the module structure
TCP/IP Protocol Stack
|
| All packets
| UDP Packets
NDIS IM Driver 1
<-----------------------------------> NDIS IM Driver 2
| UDP Packets
returned
|
|
|
Driver NIC
I have the following queries regarding this module structure
-
How can i bind NDIS IM Driver 1 to both the underlying NIC and to NDIS
IM Driver 2? -
How will NDIS IM Driver 1 differentiate between packet coming from TCP/IP
Stack and from NDIS IM Driver 2.?(Do i need to create a separate interface
for NDIS IM Driver 2).
On 5/31/07, Gianluca Varenni < mailto:xxxxx
xxxxx@gmail.com > wrote:
Yes, it’s feasible to create two drivers that communicate and pass data
between each other.
And as Thomas already said, it’s jst discouraged because
1. inter-driver communication is complex. The problem is not the data
flowing between the two drivers, the problem is the infrastracture you need
to set up in order to guarantee that the one driver acts properly when the
other one gets loaded/unloaded.
2. NDIS IM drivers are complicated on their own (they are already quite two
drivers, a miniport and a protocol driver, bundled within the same binary).
Add to that the communication with another driver, and you can get into
trouble.
Hope it helps
GV
----- Original Message -----
From: shobhit shingla mailto:xxxxx
To: Windows mailto:xxxxx System Software Devs Interest List
Sent: Thursday, May 31, 2007 6:02 AM
Subject: Re: Re:[ntdev] Welcome to the NTDEV Discussion List!
I know that it is difficult but i just want to know that whether it is
feasible or not.if not can you please explain me the reason for the same.
Thanks in adnvance
On 5/31/07, Thomas F. Divine mailto:xxxxx > wrote:
Your question is really too vague to be of help.
In you IM driver you can do anything you want with packets that are sent or
received. You can examine them, pas them through transparently (as in the
Passthru sample), or throw them away.
If your driver can communicate with another driver (a chore in itself…),
then you can exchange information between your IM driver and another driver.
One example of information that you could exchange between your IM driver
and another driver is the information contained within a packet.
At this point you need to carefully understand what a “NDIS packet” really
is. See the “NDIS Packet Discussion” at
http://www.christcollege.edu.ms/servlet/redirect.srv/p5.p1.pbcd.pwnte.pqdc/
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pwnte.pqdc/> .
After you understand what a “NDIS packet” really is, then you will probably
learn that you can pass the packet information to another driver. However,
the other driver must understand the structure of a “NDIS packet” and also
understand who owns the “NDIS packet” and how it must be returned to its
owner when you no longer have need of it.
The idea you are thinking of will be difficult to implement. I am sure that
most of the experienced NDIS developers on this list would avoid this
architecture at almost any cost.
Rethink your design approach. Try to follow GV’s advice: Process the packets
from within your IM driver!
Thomas F. Divine
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of shobhit shingla
Sent: Thursday, May 31, 2007 12:15 AM
To: Windows System Software Devs Interest List
Subject: Re: Re:[ntdev] Welcome to the NTDEV Discussion List!
I can but i just want to check whether it is feasible to pass UDP Packets to
another Driver and then get it back.
On 5/30/07, Gianluca Varenni wrote:
Out of curiosity, why can’t you process the UDP packets from within the same
IM driver?
Have a nice day
GV
----- Original Message -----
From: shobhit shingla mailto:xxxxx
To: Windows mailto:xxxxx System Software Devs Interest List
Sent: Wednesday, May 30, 2007 6:07 AM
Subject: Re:[ntdev] Welcome to the NTDEV Discussion List!
I am developing an NDIS intermediate driver for my application.
I want my NDIS IM Driver to select UDP Packets from the packets coming from
TCP/IP Stack and send them to another driver(Any Driver,can be another IM
Driver) and also send the remaining packets(Non-UDP) to the Driver NIC to be
sent to the network.
The UDP Packets received by the other driver should then be returned as it
is to the sending driver.
My question is how can i send packets from one driver to another driver and
receive them back?
And
Is it possible to send some packets to one driver and other to another
driver.?
Thanks in Advance.
Sunny
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet/redirect.srv/p5.p1.
pbcd.pxccaazxdv.pvih/article.cfm?id=256> To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet/redirect.srv/p5.p1.
pbcd.pxccaazxdv.pvih/page.cfm?name=ListServer>
—
Questions? First check the Kernel Driver FAQ at
http://www.christcollege.edu.ms/servlet/redirect.srv/p5.p1.pbcd.pxccaazxdv.p
vih//article.cfm?id=256
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet/redirect.srv/p5.p1.
pbcd.pxccaazxdv.pvih/article.cfm?id=256>
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet/redirect.srv/p5.p1.
pbcd.pxccaazxdv.pvih/page.cfm?name=ListServer>
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/article.cfm?id=256> To unsubscribe,
visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/page.cfm?name=ListServer>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/article.cfm?id=256>
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/page.cfm?name=ListServer>
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/article.cfm?id=256> To
unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/page.cfm?name=ListServer>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/article.cfm?id=256>
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:xaz.pbbt.pnu/servlet/redirect.srv/p5.p1.pbcd.plrcufhrecdxaz.pbbt.pnu/servlet
/redirect.srv/p5.p1.pbcd.pxccaazxdv.pvih/page.cfm?name=ListServer>
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></http:></http:></http:></http:></http:></http:></http:></http:></http:></mailto:xxxxx></mailto:xxxxx></http:></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>