Efficient Inter-driver communication

Hi,

Introduction:
***************************
I have two drivers that SHOULD communicate with each other, communication is rapid so an efficient communication mechanism should be implemented, I have considered sending Irps from one driver to the other BUT I look for something more efficient ( such as the FastIO mechanism ).

The problem:
***************************
Is it possible, given a pointer to a method, for one driver to call a method that reside in the PE of a different driver? Should I map the address-space of one driver to the address-space of the other driver?
Is there any other EFFICIENT mechanism for synchronous inter driver communication ?

Any help pointer or sample would be appreciated.

Many thanks,
Nadav.


Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.

If you are implementing both the drivers then it is possible that one driver
can export functions which the other driver can directly call. You might
want to look at kernel mode dll’s article on OSR.

All drivers run in same kernel address space.
-Kiran


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nadav
Sent: Wednesday, May 18, 2005 5:11 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Efficient Inter-driver communication

Hi,

Introduction:
***************************
I have two drivers that SHOULD communicate with each other, communication is
rapid so an efficient communication mechanism should be implemented, I have
considered sending Irps from one driver to the other BUT I look for
something more efficient ( such as the FastIO mechanism ).

The problem:
***************************
Is it possible, given a pointer to a method, for one driver to call a method
that reside in the PE of a different driver? Should I map the address-space
of one driver to the address-space of the other driver?
Is there any other EFFICIENT mechanism for synchronous inter driver
communication ?

Any help pointer or sample would be appreciated.

Many thanks,
Nadav.


Yahoo! Mail Mobile
Take
http:rn/mail> Yahoo! Mail with you! Check email on your mobile phone. —
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed to
ntfsd as: xxxxx@calsoftinc.com To unsubscribe send a blank email to
xxxxx@lists.osr.com</http:>

“Nadav” wrote in message news:xxxxx@ntfsd…
> Is it possible, given a pointer to a method, for one driver to call a
> method that reside in the PE of a different driver? Should I map the
> address-space of one driver to the address-space of the other driver?
> Is there any other EFFICIENT mechanism for synchronous inter driver
> communication ?

Yes it is possible, if these driver are plug and play use
IoRegisterDeviceInterface and IoRegisterPlugPlayNotification. The device
interface is a structure with pointers to routines in one driver that can be
called by another driver. The toaster sample in the DDK uses this
mechanism.

If these drivers are not plug and play do this with an IOCTL from one driver
to the other to handle it, Just be careful to handle the case of one driver
being unloaded. See http://www.osronline.com/article.cfm?id=177 for a good
overview article.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

Surely this is possible. Use the INTERNAL_DEVICE_CONTROL from first driver to second to query the function pointer table.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Nadav
To: Windows File Systems Devs Interest List
Sent: Wednesday, May 18, 2005 3:40 PM
Subject: [ntfsd] Efficient Inter-driver communication

Hi,

Introduction:
***************************
I have two drivers that SHOULD communicate with each other, communication is rapid so an efficient communication mechanism should be implemented, I have considered sending Irps from one driver to the other BUT I look for something more efficient ( such as the FastIO mechanism ).

The problem:
***************************
Is it possible, given a pointer to a method, for one driver to call a method that reside in the PE of a different driver? Should I map the address-space of one driver to the address-space of the other driver?
Is there any other EFFICIENT mechanism for synchronous inter driver communication ?

Any help pointer or sample would be appreciated.

Many thanks,
Nadav.


Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone. — Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17 You are currently subscribed to ntfsd as: xxxxx@storagecraft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

> Is it possible, given a pointer to a method, for one driver

to call a method that reside in the PE of a different driver?

Yes. You may either create a “DLL” driver, which will export
a function, or you may send an IRP like IRP_MJ_GET_FUNCTION_TABLE
which will return all necessary functions you need to call.

Should I map the address-space of one driver to the
address-space of the other driver?

No. kernel address space is common to all drivers and the kernel,
no need to map anything.

L.