diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-11-18 14:53:47 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-11-18 14:53:47 +0000 |
commit | fe61446fbe7fecfa0946812215e42396da6e0b9b (patch) | |
tree | c7e35c1578c50d7c8f97f4b27ff64787cd33932a /pjlib/include/pj/compat | |
parent | 54f99f73d8f744c4558645906c99cbab480f5b8c (diff) |
Ticket #415: implement IPv6 support in PJLIB
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1585 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/compat')
-rw-r--r-- | pjlib/include/pj/compat/os_auto.h.in | 3 | ||||
-rw-r--r-- | pjlib/include/pj/compat/socket.h | 39 |
2 files changed, 42 insertions, 0 deletions
diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in index 58bf8690..336be7d5 100644 --- a/pjlib/include/pj/compat/os_auto.h.in +++ b/pjlib/include/pj/compat/os_auto.h.in @@ -72,6 +72,9 @@ #undef PJ_HAS_WINSOCK2_H #undef PJ_SOCK_HAS_INET_ATON +#undef PJ_SOCK_HAS_INET_PTON +#undef PJ_SOCK_HAS_INET_NTOP +#undef PJ_SOCK_HAS_GETADDRINFO /* Set 1 if native sockaddr_in has sin_len member. * Default: 0 diff --git a/pjlib/include/pj/compat/socket.h b/pjlib/include/pj/compat/socket.h index 7cc0d654..f44a623c 100644 --- a/pjlib/include/pj/compat/socket.h +++ b/pjlib/include/pj/compat/socket.h @@ -32,6 +32,45 @@ # include <winsock.h> #endif +/* + * IPv6 for Visual Studio's + * + * = Visual Studio 6 = + * + * Visual Studio 6 does not ship with IPv6 support, so you MUST + * download and install IPv6 Tehnology Preview (IPv6Kit) from: + * http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/ReadMe.asp + * Then put IPv6Kit\inc in your Visual Studio include path. + * + * In addition, by default IPv6Kit does not want to install on + * Windows 2000 SP4. Please see: + * http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/faq.asp + * on how to install IPv6Kit on Win2K SP4. + * + * + * = Visual Studio 2003, 2005 (including Express) = + * + * These VS uses Microsoft Platform SDK for Windows Server 2003 SP1, and + * it has built-in IPv6 support. + */ +#if defined(_MSC_VER) && defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0 +# ifndef s_addr +# define s_addr S_un.S_addr +# endif + +# include <ws2tcpip.h> + +# ifndef IPPROTO_IPV6 + /* Need to download and install IPv6Kit for this platform. + * Please see the comments above about Visual Studio 6. + */ +# include <tpipv6.h> +# endif + +# undef s_addr +#endif /* _MSC_VER */ + + #if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H != 0 # include <sys/types.h> #endif |