Test 1: Make WinTun work

This commit is contained in:
2025-12-17 18:34:07 +01:00
parent 5e3aef78a5
commit c047cb90f0
3 changed files with 75 additions and 33 deletions

View File

@@ -28,11 +28,11 @@
#include <arpa/inet.h>
#include <sys/poll.h>
#elif defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ws2tcpip.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <wintun/wintun.h>
#pragma comment(lib, "advapi32.lib")
#endif
namespace ColumnLynx::Net {
@@ -127,7 +127,9 @@ namespace ColumnLynx::Net {
std::string mIfName;
int mFd; // POSIX
#if defined(_WIN32)
HANDLE mHandle; // Windows
WINTUN_ADAPTER_HANDLE mAdapter = nullptr;
WINTUN_SESSION_HANDLE mSession = nullptr;
HANDLE mHandle = nullptr;
#endif
};
}