From d72ed66a9f98ef7adec143e9b2a70392ea710d5f Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sun, 25 Jan 2009 17:13:12 +0000 Subject: [PATCH] Add WSAStartup --- README-win32.txt | 1 + src/iodine.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README-win32.txt b/README-win32.txt index a6184ae..a1a1c3d 100644 --- a/README-win32.txt +++ b/README-win32.txt @@ -29,6 +29,7 @@ The following fixable limitations apply: - DNS server IP can not be fetched automatically - Exactly one TAP32 interface must be installed - The TAP32 interface must be named "dns" +- Server cannot read packet destination address The following (probably) un-fixable limitations apply: - Server must be run with /30 netmask = 1 user at a time diff --git a/src/iodine.c b/src/iodine.c index 3664996..0c0085e 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -52,6 +52,11 @@ #include "tun.h" #include "version.h" +#ifdef WINDOWS32 +WORD req_version = MAKEWORD(1, 1); +WSADATA wsa_data; +#endif + static void send_ping(int fd); static void send_chunk(int fd); static int build_hostname(char *buf, size_t buflen, @@ -905,6 +910,10 @@ main(int argc, char **argv) b32 = get_base32_encoder(); dataenc = get_base32_encoder(); + +#ifdef WINDOWS32 + WSAStartup(req_version, &wsa_data); +#endif #if !defined(BSD) && !defined(__GLIBC__) __progname = strrchr(argv[0], '/');