diff options
author | Jonathan Protzenko <Jonathan.Protzenko@ens-lyon.org> | 2012-07-13 12:15:57 +0000 |
---|---|---|
committer | Jonathan Protzenko <Jonathan.Protzenko@ens-lyon.org> | 2012-07-13 12:15:57 +0000 |
commit | 7bb9ab2e0cbdc2d07d12952703bba3a9de66952d (patch) | |
tree | 0cc280ab30afe6a88dc4dc091e9bfbb19285082b /otherlibs/win32unix/socketaddr.h | |
parent | 776c46fce82af1c7d8ac0ce490c42bc5106a5cf6 (diff) |
PR#5676: add ipv6 support on Windows.
Patch by Jérôme Vouillon <Jerome.Vouillon@pps.jussieu.fr>
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12710 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/win32unix/socketaddr.h')
-rw-r--r-- | otherlibs/win32unix/socketaddr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/otherlibs/win32unix/socketaddr.h b/otherlibs/win32unix/socketaddr.h index 26deff64b..a78f8a698 100644 --- a/otherlibs/win32unix/socketaddr.h +++ b/otherlibs/win32unix/socketaddr.h @@ -18,6 +18,9 @@ union sock_addr_union { struct sockaddr s_gen; struct sockaddr_in s_inet; +#ifdef HAS_IPV6 + struct sockaddr_in6 s_inet6; +#endif }; extern union sock_addr_union sock_addr; @@ -35,3 +38,8 @@ CAMLprim value alloc_sockaddr (union sock_addr_union * addr /*in*/, socklen_param_type addr_len, int close_on_error); CAMLprim value alloc_inet_addr (struct in_addr * inaddr); #define GET_INET_ADDR(v) (*((struct in_addr *) (v))) + +#ifdef HAS_IPV6 +CAMLexport value alloc_inet6_addr (struct in6_addr * inaddr); +#define GET_INET6_ADDR(v) (*((struct in6_addr *) (v))) +#endif |