aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/syshead.h
diff options
context:
space:
mode:
authorGert Doering2015-09-11 17:33:47 +0200
committerGert Doering2015-10-06 09:35:45 +0200
commit5fcd49336812053aa1503078c0ebb72a2737a6b8 (patch)
tree452477f51c0057cc5bfe451c8fc0ce2966b9c168 /src/openvpn/syshead.h
parentf96baabc6cf10edddedda1819a27a6927f274d8e (diff)
downloadopenvpn-5fcd49336812053aa1503078c0ebb72a2737a6b8.zip
openvpn-5fcd49336812053aa1503078c0ebb72a2737a6b8.tar.gz
get_default_gateway_ipv6(): Win32 implementation using GetBestRoute2()
To get access to that functionality, bump Windows API level for MinGW compilation from NTDDI_WINXP/_WIN32_WINNT_WINXP to ..._VISTA, and shuffle around WIN32 includes a bit in syshead.h MinGW 32 seems to be broken regarding MIB_TCP_STATE enum, so add typedef for that - surrounding #ifdefs found by googling do not work yet -> TODO! Extend add_route_ipv6() and delete_route_ipv6() to handle routes not on the tap adapter but on ifindex-addressed interfaces ("interface=nn"), and while at it, fix deletion of IPv6 routes with gateway address. NOTE: this breaks Windows XP compatibility as GetBestRoute2() is not available there, so even when not using IPv6, the binary will not run. (Lightly) tested on Win7/64. Signed-off-by: Gert Doering <gert@greenie.muc.de> Lazy-ACK-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1441985627-14822-11-git-send-email-gert@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/10085
Diffstat (limited to 'src/openvpn/syshead.h')
-rw-r--r--src/openvpn/syshead.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h
index 4bebb25..ba3b7e4 100644
--- a/src/openvpn/syshead.h
+++ b/src/openvpn/syshead.h
@@ -358,8 +358,13 @@
#endif /* TARGET_DARWIN */
#ifdef WIN32
-#include <iphlpapi.h>
+ // Missing declarations for MinGW 32.
+ // #if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 2
+ typedef int MIB_TCP_STATE;
+ // #endif
+#include <naptypes.h>
#include <ntddndis.h>
+#include <iphlpapi.h>
#include <wininet.h>
#include <shellapi.h>
/* The following two headers are needed of PF_INET6 */