• Stars
    star
    225
  • Rank 177,187 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created about 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Kernel-Mode Winsock library, supporting TCP, UDP and Unix sockets (DGRAM and STREAM).

libwsk

Actions Status LICENSE Windows Visual Studio

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
  1. git clone --recurse-submodules https://github.com/MiroKaku/libwsk.git
  2. Open the msvc/libwsk.sln and build it.
  3. Include libwsk.lib to your project. refer unittest.

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 โˆš
... ... ... -

Reference