Commit dfe692b6 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Added IPv6 support with IPv4 compatibility. (ChangeLog entry written

by ceder.  Some minor coding standard changes by ceder.  Three minor
problems noted by FIXME comments by ceder.)
parent d1278b06
2002-11-28 Thorild Seln <thorild@Update.UU.SE>
Added IPv6 support with IPv4 compatibility. (ChangeLog entry
written by ceder. Some minor coding standard changes by ceder.
Three minor problems noted by FIXME comments by ceder.)
* configure.in: Added --enable-ipv6 switch. Check for inet_ntop,
inet_pton, getipnodebyname, gethostbyname2, and struct
sockaddr_storage.
* src/isc.h: This commit includes three broken things; see FIXMEs
in the code.
Include <sys/socket.h> and <netinet/in.h>.
(SOCKADDR_STORAGE): Define it to struct sockaddr_storage or struct
sockaddr, depending on HAVE_STRUCT_SOCKADDR_STORAGE.
(union sockaddrs): New union.
(IscAddress): Use union sockaddrs instead of struct sockaddr.
* src/intern.h (isc_mkipaddress): Use SOCKADDR_STORAGE as
argument, not struct sockaddr.
(CHOOSE_IP4OR6): New macro.
(FOR_EACH_AF): New macro.
(FOR_EACH_PF): New macro.
(STORE_ADDR): New macro.
* src/isc_udp.c (isc_udp_read_fn): Handle IPv6.
(isc_udp_write_fn): Handle IPv6.
(isc_mkudpaddress): New argument: address_family. All callers
updated. Handle IPv6. Broadcast addresses are not supported.
(isc_createudp): Handle IPv6. The first argument of socket()
should be PF_INET for IPv4, not AF_INET.
(isc_bindudp): Handle IPv6.
(isc_connectudp): Handle IPv6.
* src/isc_tcp.c (isc_mktcpaddress): New argument: address_family.
All callers updated. Handle IPv6.
(isc_createtcp): Handle IPv6. The first argument of socket()
should be PF_INET for IPv4, not AF_INET.
(isc_bindtcp): Handle IPv6.
(isc_connecttcp): Handle IPv6.
* src/isc_socket.c (cast_to_sockaddr_in): Removed.
(isc_mkipaddress): Changed struct sockaddr to SOCKADDR_STORAGE.
(isc_getladdress): Ditto. Cast argument of getsockname from
SOCKADDR_STORAGE* to struct sockaddr*.
(isc_getraddress): Ditto (but for getpeername instead of
getsockname).
(isc_getipnum): Handle IPv6.
(isc_gethostname): Ditto.
(isc_getportnum): Ditto.
(isc_getservice): Use isc_getportnum to simplify code.
2002-11-25 Per Cederqvist <ceder@ceder.dyndns.org>
Port to Autoconf 2.56 and Automake 1.7.1.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment