none
Mix the KMDF driver with the WinSock kernel model functions RRS feed

  • Question

  • Hello all.

    Tell please, whether it is possible to use functions from WSK (Windows Kernel Sockets) in the KMDF driver?

    I looked at WSK "WSK TCP Echo Server" example.

    But in this example the device isn't created. For example, there are no WdfDeviceCreate() (or IoCreateDevice()) functions and so on. Thus, I can't have access to my driver from the user space through DeviceIoControl().

    My initial purpose was creations of the driver which would use kernel sockets (for example WSK) and to which it would be possible to access from the user space and pass of some ioctl's (commands) to driver (for example, for initialization of sockets of a kernel, for receiving some statistics and other the service things).

    It is possible to do?

    Best regards,

    Denis


    • Edited by kuzulis Wednesday, January 22, 2014 8:57 AM
    Wednesday, January 22, 2014 8:56 AM

Answers

  • WSK doesn't take over the driver object dispatch table as far as I can tell, so yes, you can use KMDF and WDK. as pavel said, using sockets for UM to KM (and vice versa) communication is not recommended or encouraged, but using WSK for a network connection is fine.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, January 23, 2014 12:56 AM

All replies

  • WSK doesn't take over the driver object dispatch table as far as I can tell, so yes, you can use KMDF and WDK. as pavel said, using sockets for UM to KM (and vice versa) communication is not recommended or encouraged, but using WSK for a network connection is fine.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, January 23, 2014 12:56 AM
  • Hi Pavel,

    many thanks for your answer.

    Thursday, January 23, 2014 6:58 AM
  • Hi Doron,

    Many thanks, your answer very much encouraged for me.

    It is healthy that WSK can use into KMDF! :)

    Thursday, January 23, 2014 7:02 AM