Thank you,
But what I need is, say,there is no incomming data comming for a connection and the application is waiting on a recv(). I have some data in the filter driver for the application waiting on recv() ( which I am getting in the driver from another application using a private IOCTL).Can I make an event in the Filter driver so that the data which I am having, can be passed to the application waiting on recv()?
----- Original Message -----
From: Maxim S. Shatskih
To: Windows System Software Devs Interest List
Sent: Monday, November 10, 2003 7:25 PM
Subject: [ntdev] Re: Adding data from user mode app in TDI Filter
This is a very, very complex thing, for instance, you must disable the chained receive handler at all, since you will need to cook your own buffer, and the client will call TdiReturnChainedReceives blindly, which requires the real buffer from the NIC miniport.
You will need to properly hook the complex state machine which consists of TDI_RECEIVE IRP and ClientEventReceive callback, which is rather complex and bug-prone.
I would better recommend to filter on top of AFD instead (OK, the IOCTL code to which WSPRecv is turned is undocumented, but can be discovered by 20 minutes of working with disassembly), or write an NDIS IM driver.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Prasanth M
To: Windows System Software Devs Interest List
Sent: Monday, November 10, 2003 1:22 PM
Subject: [ntdev] Re: Adding data from user mode app in TDI Filter
Hi,
This is the scenario which I want to solve.An application has initiated a socket and is connected to a server.
I have successfully hooked TDI_CONNECT in the filter driver .
When the application calls recv , I need to put my data into the buffer (ie,the data might be a modified) .But I am not getting a TDI_RECEIVE when the application calls a recv. How can the filter driver knows that the application has called a recv???
----- Original Message -----
From: Farooque Khan
Newsgroups: ntdev
To: Windows System Software Devs Interest List
Sent: Saturday, November 08, 2003 2:59 PM
Subject: [ntdev] Re: Adding data from user mode app in TDI Filter
changed data back. How can I attach the user mode data
> to the receive handler so that it will be received in
> the original application?
that will depend on what u r doing with the data. If your
application changes the size of the data somehow, you will
have to reallocate the buffers (MDL etc.), copy your changed
data to those and send them along. If you are not changing the
size, then you can just replace the data and that should work
for the TCP stack atleast. However, if the application which is getting
the data, keeps somekind of checksum etc, you can break those.
Also bear in mind that you are putting up a big bottle neck in the system
by making the data go through a user mode application. I would recommend you
bring all your data changing logic down to the driver itself.
HTH,
–
-Farooque Khan
http://farooque.150m.com
“Prasanth M” wrote in message news:xxxxx@ntdev…
Hi All,
I am writing TDI filter driver on \device\TCP.
I need to pass all the data send to a user mode
application, then application will change the data
and give to my driver again in order to pass this
changed data back. How can I attach the user mode data
to the receive handler so that it will be received in
the original application?
Regards,
Prasanth
—
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@calsoft.co.in
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@calsoft.co.in
To unsubscribe send a blank email to xxxxx@lists.osr.com