Porting TDI Drivers to Winsock Kernel

To port your TDI driver to Winsock Kernel (WSK), you'll need to convert TDI tasks to their WSK equivalents as shown in the following table.

TasksTDIWinsock Kernel (WSK)
Register and Deregister N/A WskRegister and WskDeregister
Capture and Release Provider NPIN/A WskCaptureProviderNPI and WskReleaseProviderNPI
Create Address File ObjectCreate EaBuffer, then call ZwCreateFile No longer necessary. See WskSocket.
Create Connection File ObjectCreate connection EaBuffer, then call ZwCreateFile No longer necessary. See WskSocket and WskAcceptEvent.
Associate Address TDI_ASSOCIATE_ADDRESS WskBind
Set Event Handlers TDI_SET_EVENT_HANDLER WskControlSocket or static variation using WskControlClient
Clear Event Handlers TDI_SET_EVENT_HANDLER WskControlSocket
Connect TDI_CONNECT WskConnect
Disconnect TDI_DISCONNECT WskDisconnect
Send TDI_SEND WskSend
Receive TDI_RECEIVE WskReceive
Receive Handler ClientEventReceive, TDI_RECEIVE WskReceiveEvent
Connect Handler ClientEventConnect, TDI_CONNECT WskAccept
Close Socket or Connection ObDereferenceObject or ZwClose WskCloseSocket




Send comments about this topic to Microsoft

© 2015 Microsoft