TDI_SET_EVENT_HANDLER Query

Hi,

I am doing exercise of writing Filter TDI from scratch.

I am stuck in implementation of TDI_SET_EVENT_HANDLER.
I can set new event handlers for tdi event in Minor
function TDI_SET_EVENT_HANDLER for “EventType” in PTDI_REQUEST_KERNEL_SET_EVENT param.

Now I am replacing EventHandler and EventContext to mine for
particular EventType. Here I have to remember old_handler and
old context so as Filter TDI would work transperently.
For this I make new Context and pass this as Context param to
new handler. In new handler now I can call old handler with
old context.

My problem is when and where to free this context ???

Is this old_handler and old_context are specific to each connection and address object pair ???
Or can we maintain some global table of these handler and context information ???

Waiting for reply
Cheers
Rajesh

IIRC, TDI_SET_EVENT_HANDLER is called twice
by any client, once for setting the event handler
and again when resetting it. While setting the
event handler function is set, while resetting it’s
NULL. May be you can decide based on that.

HTH,

-Farooque Khan
http://farooque.150m.com

“Rajesh Nikam” wrote in message news:xxxxx@ntdev…
Hi,

I am doing exercise of writing Filter TDI from scratch.

I am stuck in implementation of TDI_SET_EVENT_HANDLER.
I can set new event handlers for tdi event in Minor
function TDI_SET_EVENT_HANDLER for “EventType” in PTDI_REQUEST_KERNEL_SET_EVENT param.

Now I am replacing EventHandler and EventContext to mine for
particular EventType. Here I have to remember old_handler and
old context so as Filter TDI would work transperently.
For this I make new Context and pass this as Context param to
new handler. In new handler now I can call old handler with
old context.

My problem is when and where to free this context ???

Is this old_handler and old_context are specific to each connection and address object pair ???
Or can we maintain some global table of these handler and context information ???

Waiting for reply
Cheers
Rajesh