From 1678c4feb6ccc1d7744f155d75e2adb812a1d5f5 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 25 May 2008 01:11:20 +0000 Subject: [PATCH] Adds support for ipv6 on windows platforms that support it, even if the compiler (msvc6) does not. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2966 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/netinc.h | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/engine/common/netinc.h b/engine/common/netinc.h index 124659874..04e97bcd0 100644 --- a/engine/common/netinc.h +++ b/engine/common/netinc.h @@ -18,7 +18,51 @@ #endif #ifdef IPPROTO_IPV6 #include + #else + #define IPPROTO_IPV6 + #define EAI_NONAME 8 + struct ip6_scope_id + { + union + { + struct + { + u_long Zone : 28; + u_long Level : 4; + }; + u_long Value; + }; + }; + struct in6_addr + { + u_char s6_addr[16]; /* IPv6 address */ + }; + typedef struct sockaddr_in6 + { + short sin6_family; + u_short sin6_port; + u_long sin6_flowinfo; + struct in6_addr sin6_addr; + union + { + u_long sin6_scope_id; + struct ip6_scope_id sin6_scope_struct; + }; + }; + + struct addrinfo + { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char* ai_canonname; + struct sockaddr * ai_addr; + struct addrinfo * ai_next; + }; #endif + #else #include #include