1
0
Fork 0
forked from fte/fteqw

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
This commit is contained in:
Spoike 2008-05-25 01:11:20 +00:00
parent 3c31702ffe
commit 1678c4feb6

View file

@ -18,7 +18,51 @@
#endif #endif
#ifdef IPPROTO_IPV6 #ifdef IPPROTO_IPV6
#include <ws2tcpip.h> #include <ws2tcpip.h>
#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 #endif
#else #else
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>