libwsk
libwsk copied to clipboard
The Kernel-Mode Winsock library, supporting TCP, UDP and Unix sockets (DGRAM and STREAM).
libwsk
- 简体中文
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
IDE:Visual Studio 2019 or higher
if target OS is Windows7, please set these.
libwsk property pages -> Driver Settings -> Target OS Version = Windows 7 libwsk Property pages -> Driver Settings -> Target Platform = Desktop
git clone --recurse-submodules https://github.com/MiroKaku/libwsk.git- Open the
msvc/libwsk.slnand build it. - Include
libwsk.libto your project. referunittest.
Supported progress
| BSD sockets | WSA (Windows Sockets API) | WSK (Windows Sockets Kernel) | State |
|---|---|---|---|
| - | ~~WSAStartup~~ | WSKStartup | √ |
| - | ~~WSACleanup~~ | WSKCleanup | √ |
| socket | ~~WSASocket~~ | WSKSocket | √ |
| closesocket | ~~WSASocket~~ | WSKCloseSocket | √ |
| bind | - | WSKBind | √ |
| listen | - | WSKListen | √ |
| connect | ~~WSAConnect~~ | WSKConnect | √ |
| shutdown | ~~WSA[Recv/Send]Disconnect~~ | WSKDisconnect | √ |
| accept | ~~WSAAccept~~ | WSKAccept | √ |
| send | ~~WSASend~~ | WSKSend | √ |
| recv | ~~WSARecv~~ | WSKRecv | √ |
| sendto | ~~WSASendTo~~ | WSKSendTo | √ |
| recvfrom | ~~WSARecvFrom~~ | WSKRecvFrom | √ |
| ioctlsocket | ~~WSAIoctl~~ | WSKIoctl | √ |
| setsockopt | - | WSKSetSocketOpt | √ |
| getsockopt | - | WSKGetSocketOpt | √ |
| getaddrinfo | ~~GetAddrInfoEx~~ | WSKGetAddrInfo | √ |
| freeaddrinfo | ~~FreeAddrInfoEx~~ | WSKFreeAddrInfo | √ |
| getnameinfo | ~~GetNameInfo~~ | WSKGetNameInfo | √ |
| inet_ntoa | ~~WSAAddressToString~~ | WSKAddressToString | √ |
| inet_addr | ~~WSAStringToAddress~~ | WSKStringToAddress | √ |
| - | ~~WSACreateEvent~~ | WSKCreateEvent | √ |
| - | ~~WSAGetOverlappedResult~~ | WSKGetOverlappedResult | √ |
| ... | ... | ... | - |