Storage filter driver to intercept SRBs

Hello all,

I am relatively new to windows driver development and have been studying the “diskperf” filter driver sample provided by Microsoft.

I am doing an internship where I have been tasked with creating a lower filter driver that sits underneath the storage class driver and above the storage port driver. The objective of the filter driver is to intercept SRBs being sent to the storage port driver and display some of its member values. The long term goal of the filter driver is to modify the SRBs values and forward it down the driver stack for driver validation.

I am looking for a sample filter driver that intercepts SRBs that I can use as a template or any recourse that explains how to capture SRBs and display some of its members such as the LUN value. If you can point me to any resources that can help in writing the filter driver I would greatly appreciate it!

Best Regards,

Y

First this is an NTDEV question not a file system question. Second why
do you feel you need to be at this low a level? As far as implementing
this you need to know IRP_MJ_SCSI is the command you need to capture.
You can look at HTSScsiView (not sure it works on current systems) from
http://www.hollistech.com/ under resources but it does not include
source.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@gmail.com” wrote in message
news:xxxxx@ntfsd:

> Hello all,
>
> I am relatively new to windows driver development and have been studying the “diskperf” filter driver sample provided by Microsoft.
>
> I am doing an internship where I have been tasked with creating a lower filter driver that sits underneath the storage class driver and above the storage port driver. The objective of the filter driver is to intercept SRBs being sent to the storage port driver and display some of its member values. The long term goal of the filter driver is to modify the SRBs values and forward it down the driver stack for driver validation.
>
> I am looking for a sample filter driver that intercepts SRBs that I can use as a template or any recourse that explains how to capture SRBs and display some of its members such as the LUN value. If you can point me to any resources that can help in writing the filter driver I would greatly appreciate it!
>
> Best Regards,
>
> Y

My apologizes, should I post this question on the NTDEV list for future inquires?

" Second why do you feel you need to be at this low a level?"

The reason why I want to go to this low level is because according to the storage drive architecture on MSDN you can attach a upper filter driver above the class driver that intercepts IRPs. Or you can attach the driver as lower filter driver above the storage port driver to capture SRBs which I need to do.

I will research more about the IRP_MJ_SCSI command.

Thanks for recommending to take a look at HTSScsiView. Unfortunately, since I am looking to develop this filter driver as a KMDF I am looking for references using WDF.

Thanks,

Y

That is great to see your email. I am doing the same thing of the disk
filter driver. I want to intercept IRP or SRB from upper layer, and
change the write or read destination of the disk.

I read the diskperf filter driver too, it is an upper layer of disk
class driver.

I have confused to use which function to do write or read to the disk.
I mean write to disk by sector size with Logic Block Address
destination.

I find the function “IoBuildSynchronousFsdRequest” may do such thing
by writing or reading data block from disk device.

Does any one have some good suggestions?

Quoting xxxxx@gmail.com:

Hello all,

I am relatively new to windows driver development and have been
studying the “diskperf” filter driver sample provided by Microsoft.

I am doing an internship where I have been tasked with creating a
lower filter driver that sits underneath the storage class driver
and above the storage port driver. The objective of the filter
driver is to intercept SRBs being sent to the storage port driver
and display some of its member values. The long term goal of the
filter driver is to modify the SRBs values and forward it down the
driver stack for driver validation.

I am looking for a sample filter driver that intercepts SRBs that I
can use as a template or any recourse that explains how to capture
SRBs and display some of its members such as the LUN value. If you
can point me to any resources that can help in writing the filter
driver I would greatly appreciate it!

Best Regards,

Y


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer