diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2002-11-13 23:47:30 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2002-11-13 23:47:30 +0000 |
commit | 2ce59d7ffd962908289a426bdd24ecf929280be6 (patch) | |
tree | e2a3ee3f617643ae09b8a29a5c5b019954c8d635 /network_io/win32 | |
parent | bd7ce3484dd18373c5f6c4476cc0d209256586b6 (diff) | |
download | libapr-2ce59d7ffd962908289a426bdd24ecf929280be6.tar.gz |
add APR_IPV6_V6ONLY socket option
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64019 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/win32')
-rw-r--r-- | network_io/win32/sockopt.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/network_io/win32/sockopt.c b/network_io/win32/sockopt.c index 53f633265..c326f9dae 100644 --- a/network_io/win32/sockopt.c +++ b/network_io/win32/sockopt.c @@ -210,6 +210,20 @@ APR_DECLARE(apr_status_t) apr_socket_opt_set(apr_socket_t *sock, apr_set_option(&sock->netmask, APR_TCP_NODELAY, on); } break; + case APR_IPV6_V6ONLY: +#if APR_HAVE_IPV6 && defined(IPV6_V6ONLY) + /* we don't know the initial setting of this option, + * so don't check/set sock->netmask since that optimization + * won't work + */ + if (setsockopt(sock->socketdes, IPPROTO_IPV6, IPV6_V6ONLY, + (void *)&on, sizeof(int)) == -1) { + return apr_get_netos_error(); + } +#else + return APR_ENOTIMPL; +#endif + break; default: return APR_EINVAL; break; |