libwsk

January 27, 2025 · View on GitHub

Actions Status LICENSE Windows Visual Studio Downloads

About

libwsk is a wrapper for the WSK (Winsock-Kernel) interface. With libwsk, kernel-mode software modules can perform network I/O operations using the same socket programming concepts and interface that are supported by user-mode Winsock2.

Build and used

Windows 10 or higher

Right click on the project, select "Manage NuGet Packages". Search for Musa.libwsk, choose the version that suits you, and then click "Install".

Windows 7

  1. First modify the settings:
libwsk property pages -> Driver Settings -> Target OS Version = Windows 7
libwsk Property pages -> Driver Settings -> Target Platform   = Desktop
  1. Call BuildAllTargets.cmd

Supported progress

BSD socketsWSA (Windows Sockets API)WSK (Windows Sockets Kernel)State
-WSAStartupWSKStartup
-WSACleanupWSKCleanup
socketWSASocketWSKSocket
closesocketWSASocketWSKCloseSocket
bind-WSKBind
listen-WSKListen
connectWSAConnectWSKConnect
shutdownWSA[Recv/Send]DisconnectWSKDisconnect
acceptWSAAcceptWSKAccept
sendWSASendWSKSend
recvWSARecvWSKRecv
sendtoWSASendToWSKSendTo
recvfromWSARecvFromWSKRecvFrom
ioctlsocketWSAIoctlWSKIoctl
setsockopt-WSKSetSocketOpt
getsockopt-WSKGetSocketOpt
getaddrinfoGetAddrInfoExWSKGetAddrInfo
freeaddrinfoFreeAddrInfoExWSKFreeAddrInfo
getnameinfoGetNameInfoWSKGetNameInfo
inet_ntoaWSAAddressToStringWSKAddressToString
inet_addrWSAStringToAddressWSKStringToAddress
-WSACreateEventWSKCreateEvent
-WSAGetOverlappedResultWSKGetOverlappedResult
.........-

Reference