Tech Support > Microsoft Windows > Drivers > redirect a TCP socket call
redirect a TCP socket call
Posted by kapital on August 11th, 2003


I'm interested to redirect a TCP call to a different type
of protocol without creating the TCP. So when the
application make the TCP call the call gets transfered to
UDP without application awarness. Have anybody done such
thing before?? do you know where I should start from?? Is
there a sample code that somebody can share it with me???
I believe that I should start looking at TDI is that a
correct place to look at???

thanx


Posted by kapital on August 12th, 2003


Maxim, thank you for your response but I'm affraid that I
don't quite underestand what you mean. Could you please
clarify.

thanx

Posted by Steve Jackowski on August 14th, 2003


Hi Kapital,

The easiest way to do this is to use a Winsock Layered
Service Provider (LSP). Microsoft provides samples. An
LSP sits between the application and WinSock and lets you
intercept all Winsock calls. As such, you can intercept
the TCP connection and do UDP instead.

One disadvantage to LSPs is that Microsoft hasn't
provided a consistent mechanism to order them. So, if
you run into another one, it may supercede yours. In
addition, LSPs tend to be very large and complex because
they need to handle Winsock call any application might
use.

We have solved this with a toolkit we use called the
Extensible Service Provide (ESP). It uses a plugin model
to enable you to avoid writing an LSP. Instead, you
write a DLL. You use the API we provide and you get only
the calls you want to see and handle.

Let me know offline if you're interested in more
information on ESP. Otherwise, check out the Microsoft
documentation and sample for LSPs.


Steve


Similar Posts