Interacting intermediate NDIS drivers.

Hi,

In “passthru” sample code, I can’t see any IRPs. Then how does user-mode
applications interact with intermediate NDIS drivers. As in other drivers,
DeviceIoControl is the communication way to the driver ?

Amit Manocha

Amit,

Generally, the NDIS library creates its own environment and your driver
will never see IRPs – except in the case you cite: where you want to
communicate to your own user component. In that case, use
NdisMRegisterDevice in NDIS miniports and IM drivers. It wraps up the
call to IoCreateDevice and IoCreateSymbolicLink for you. You pass to
that function addresses for each of the dispatch routines you want to
handle including a handler for IRP_MJ_DEVICE_CONTROL. This is shown in
the sample. You might also look at the MUX sample.

Hope this helps.

Bryan S. Burgin
xxxxx@microsoft.com

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Amit Manocha
Sent: Friday, May 02, 2003 9:41 PM
To: NT Developers Interest List
Subject: [ntdev] Interacting intermediate NDIS drivers.

Hi,

In “passthru” sample code, I can’t see any IRPs. Then how does user-mode
applications interact with intermediate NDIS drivers. As in other
drivers,
DeviceIoControl is the communication way to the driver ?

Amit Manocha


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thank you Michal and Bryan.

Bryan, can you tell me which sample you are pointing in your mail.


Amit Manocha

“Bryan Burgin” wrote in message news:xxxxx@ntdev…

Amit,

Generally, the NDIS library creates its own environment and your driver
will never see IRPs – except in the case you cite: where you want to
communicate to your own user component. In that case, use
NdisMRegisterDevice in NDIS miniports and IM drivers. It wraps up the
call to IoCreateDevice and IoCreateSymbolicLink for you. You pass to
that function addresses for each of the dispatch routines you want to
handle including a handler for IRP_MJ_DEVICE_CONTROL. This is shown in
the sample. You might also look at the MUX sample.

Hope this helps.

Bryan S. Burgin
xxxxx@microsoft.com

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Amit Manocha
Sent: Friday, May 02, 2003 9:41 PM
To: NT Developers Interest List
Subject: [ntdev] Interacting intermediate NDIS drivers.

Hi,

In “passthru” sample code, I can’t see any IRPs. Then how does user-mode
applications interact with intermediate NDIS drivers. As in other
drivers,
DeviceIoControl is the communication way to the driver ?

Amit Manocha


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Look in the passthru sample at the call to NdisMRegisterDevice in
passthru.c and the function PtDispatch.

Bryan S. Burgin
xxxxx@microsoft.com

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Amit Manocha
Sent: Friday, May 02, 2003 11:52 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Interacting intermediate NDIS drivers.

Thank you Michal and Bryan.

Bryan, can you tell me which sample you are pointing in your mail.


Amit Manocha

“Bryan Burgin” wrote in message
news:xxxxx@ntdev…

Amit,

Generally, the NDIS library creates its own environment and your driver
will never see IRPs – except in the case you cite: where you want to
communicate to your own user component. In that case, use
NdisMRegisterDevice in NDIS miniports and IM drivers. It wraps up the
call to IoCreateDevice and IoCreateSymbolicLink for you. You pass to
that function addresses for each of the dispatch routines you want to
handle including a handler for IRP_MJ_DEVICE_CONTROL. This is shown in
the sample. You might also look at the MUX sample.

Hope this helps.

Bryan S. Burgin
xxxxx@microsoft.com

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Amit Manocha
Sent: Friday, May 02, 2003 9:41 PM
To: NT Developers Interest List
Subject: [ntdev] Interacting intermediate NDIS drivers.

Hi,

In “passthru” sample code, I can’t see any IRPs. Then how does user-mode
applications interact with intermediate NDIS drivers. As in other
drivers,
DeviceIoControl is the communication way to the driver ?

Amit Manocha


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I advise going through passthru, looking up each function call in the
DDK and studying what the DDK says about said function. Then it’ll be
clear that you’re not going to be seeing IRPs as such.

Or maybe you’re asking: Why were things done this way? Why not the WDM
model, with exposed IRPs? I think the answer is, History.


If replying by e-mail, please remove “nospam.” from the address.

James Antognini