I have written a TDI filter driver. I works fine except for some conditions.
The problematic area is receive event handler. TDI documentation in DDK seems to be not updated since first version of NT. The way recv event handler behaves is not-understandable.
I believe I am at the verge of completing my driver. Only at some point AFD refuses to accept the data and TCP don’t passes me any data. My driver doesn’t have any control. I can’t even guess, what is the problem with my recv event handler.
If any TDI guru is reading this mail, please contact me. I am in a disaster.
And ya, its not a simple TDI filter driver. Its a buffered TDI filter driver.
I should have explained this point….
Generally filter drivers dont buffer data. If data is not accepted by upper driver, the filter driver also rejects the data.
In my case I buffer the data till my buffer is full. After that I start rejecting the data from TCP. Because of buffering I have to do lot of bookkeeping and handle various situation that might occur related to data-reception using TDI_RECEIVE irp and ClientEventReceive.