diff options
author | Dan Winship <danw@src.gnome.org> | 2002-11-12 17:55:50 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-11-12 17:55:50 +0000 |
commit | f04f28a923af9dc07dca69525691a1d6a1125143 (patch) | |
tree | ef6ac207574f1d35007e43c37d365ff294f9cdb8 /configure.in | |
parent | e3172515fcfb95e994cf4eadadeb6fd62b5d221f (diff) | |
download | libsoup-f04f28a923af9dc07dca69525691a1d6a1125143.tar.gz |
Check for IPv6 support in networking headers.
* configure.in: Check for IPv6 support in networking headers.
* libsoup/soup-address.c: Make the internal structure of
SoupAddress entirely private, and make SoupAddress be more like a
hostent and less like a sockaddr. (Ie, make it not have a port
associated with it.) Document undocumented functions. Add
completely-untested support for IPv6.
(soup_address_new_from_sockaddr): New, to parse a sockaddr into a
SoupAddress and a port.
(soup_address_ipv4_any, soup_address_ipv6_any): Return static
addresses corresponding to the IPv6 and IPv6 "any" addresses.
(soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
(soup_address_make_sockaddr): Now constructs a new sockaddr, which
may be a sockaddr_in or sockaddr_in6.
(soup_address_gethostname, soup_address_gethostaddr): Remove
these. They aren't reliable, especially on multihomed hosts.
(soup_gethostbyname, soup_gethostbyaddr): support IPv6
(soup_address_new): Keep pending lookups in a separate hash table
from completed lookups. Fix a bug when canceling a lookup when
there was more one outstanding request for it.
(soup_address_lookup_in_cache): Removed.
* libsoup/soup-socket.c: Add a port field to SoupSocket (since
it's not in SoupAddress any more).
(soup_socket_connect): Simplify this. Don't use
soup_address_lookup_in_cache, just call soup_address_new, since we
already know the code can deal with the callback being invoked
immediately.
(soup_socket_new_sync, soup_socket_new): Take a port argument.
(soup_socket_server_new): Take a SoupAddress to use as the local
address to bind to. This lets the caller choose between the IPv4
and IPv6 "any" addresses, and also lets you bind to a single
interface of a multi-homed machine.
(soup_socket_server_accept, soup_socket_server_try_accept): Merge
the common code.
* libsoup/soup-server.c (soup_server_new): Pass
soup_address_ipv4_any() to soup_socket_server_new().
* libsoup/soup-socks.c (soup_connect_socks_proxy,
soup_socks_write): Fix up for the API changes, but it won't work
with IPv6 yet.
* tests/timeserver.c: Another really simple test, for the server
socket code.
* tests/Makefile.am: build timeserver
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 120fe91e..18b2e4a4 100644 --- a/configure.in +++ b/configure.in @@ -166,6 +166,14 @@ if test -z "$HAVE_GETHOSTBYNAME_R"; then malfunction in programs that use threads.]) fi +AC_CACHE_CHECK(IPv6 support, soup_cv_ipv6, [ + AC_EGREP_HEADER(sockaddr_in6, netinet/in.h, soup_cv_ipv6=yes, soup_cv_ipv6=no) +]) +case $soup_cv_ipv6 in +yes) + AC_DEFINE(HAVE_IPV6, 1, [Define if you have support for IPv6 sockets]) + ;; +esac dnl **************************************************** dnl *** SSL Library checks (Mozilla NSS, or OpenSSL) *** |