Find a file
Dmitriy Anisimkov 759f164802 [Ada] GNAT.Sockets: add IPv6 support
2018-12-11  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	* libgnat/g-socket.ads (Family_Type): Add new enumerated value
	Family_Unspec to be able to use it in Get_Address_Info parameter
	and find IPv4 together with IPv6 addresses.
	(Inet_Addr_Bytes_Length): Zero length for Family_Unspec.  New
	IPv6 predefined constant addresses.
	(IPv4_To_IPv6_Prefix): IPv4 mapped to IPv6 address prefix.
	(Is_IPv4_Address): Rename from Is_IP_Address and published.
	(Is_IPv6_Address): New routine.
	(Image of Inet_Addr_Type): Fix description about IPv6 address
	text representation.
	(Level_Type): New propocol level IP_Protocol_For_IPv6_Level.
	(Add_Membership_V4): New socket option equal to Add_Membership.
	(Drop_Membership_V4): New socket option equal to
	Drop_Membership.
	(Multicast_If_V4): New socket option equal to Multicast_If.
	(Multicast_Loop_V4, Add_Membership_V6, Drop_Membership_V6,
	Multicast_If_V6, Multicast_Loop_V6, Multicast_Hops, IPv6_Only):
	New socket option for IPv6.
	(Address_Info): New record to keep address info.
	(Address_Info_Array): Array to keep address info records.
	(Get_Address_Info): Routine to get address info records by host
	and service names.
	(Host_Service): Record to keep host and service names.
	(Get_Name_Info): New routine to get host and service names by
	address.
	(Create_Socket): Add Level parameter, IP_Protocol_For_IP_Level
	default.
	(Name_Array, Inet_Addr_Array): Change array index to Positive.
	* libgnat/g-socket.adb (IPV6_Mreq): New record definition for
	IPv6.
	(Hex_To_Char): Remove.
	(Short_To_Network, Network_To_Short): Move to package
	GNAT.Sockets.Thin_Common.
	(Is_IP_Address): Remove.
	(To_In_Addr, To_Inet_Addr): Move to package
	GNAT.Sockets.Thin_Common.
	(Get_Socket_Option): Get value of Multicast_Loop option as
	integer boolean, process IPv6 options. Don't try to get
	Add_Membership_V4, Add_Membership_V6, Drop_Membership_V4, and
	Drop_Membership_V6 as not supported by the socket API.
	(Set_Socket_Option): Set value of Multicast_Loop option as
	integer boolean, process IPv6 options.
	* gsocket.h
	(IPV6_ADD_MEMBERSHIP): Define from IPV6_JOIN_GROUP if necessary
	for VxWorks.
	(IPV6_DROP_MEMBERSHIP): Define from IPV6_LEAVE_GROUP if
	necessary for VxWorks
	(HAVE_INET_NTOP): New definition.
	(HAVE_INET_PTON): Includes VxWorks now.
	* socket.c (__gnat_getaddrinfo, __gnat_getnameinfo,
	__gnat_freeaddrinfo, __gnat_gai_strerror, __gnat_inet_ntop): New
	routines.
	* libgnat/g-sothco.ads, libgnat/g-sothco.adb
	(socklen_t, In6_Addr, To_In6_Addr): New.
	(To_In_Addr, To_Inet_Addr): Move from package body GNAT.Sockets.
	(To_Inet_Addr): New overload with In6_Addr type parmeter.
	(In_Addr_Access_Array): Remove.
	(Sockaddr): Unchecked_Union instead of Sockaddr_In and old
	defined generic Sockaddr.
	(Set_Address): Use it to set family, port and address into
	Sockaddr.
	(Get_Address): New routine to get Socket_Addr_Type from
	Sockaddr.
	(Addrinfo): Structure to use with getaddrinfo.
	(C_Getaddrinfo, C_Freeaddrinfo, C_Getnameinfo, C_GAI_Strerror,
	Inet_Ntop): New routine import.
	(Short_To_Network, Network_To_Short): Move from package body
	GNAT.Sockets.
	* libgnat/g-stsifd__sockets.adb: Use Sockaddr instead of
	Sockaddr_In.
	* s-oscons-tmplt.c (AF_UNSPEC, EAI_SYSTEM, SOCK_RAW,
	IPPROTO_IPV6, IP_RECVERR, SIZEOF_socklen_t, IF_NAMESIZE): New
	constants.
	(AI_xxxx_OFFSET): Constants to consider platform differences in
	field positions and sizes for addrinfo structure.
	(AI_xxxxx): Flags for getaddrinfo.
	(NI_xxxxx): Flags for getnameinfo.
	(IPV6_xxxxx): Socket options for IPv6.
	(Inet_Ntop_Linkname): New routine.

From-SVN: r267016
2018-12-11 11:12:32 +00:00
config iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. 2018-11-07 15:41:21 -07:00
contrib Delete powerpcspe 2018-12-10 20:40:27 +01:00
fixincludes Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
gcc [Ada] GNAT.Sockets: add IPv6 support 2018-12-11 11:12:32 +00:00
gnattools PR81878: fix --disable-bootstrap --enable-languages=ada 2018-11-20 00:07:47 +00:00
gotools Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
include Add a recursion limit to libiberty's demangling code. The limit is enabled by default, but can be disabled via a new demangling option. 2018-12-07 10:33:30 +00:00
INSTALL
intl iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. 2018-11-07 15:41:21 -07:00
libada Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libatomic Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libbacktrace [libbacktrace] Add tests for unused formats 2018-11-30 15:33:23 +00:00
libcc1 Eliminate source_location in favor of location_t 2018-11-13 20:05:03 +00:00
libcpp PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
libdecnumber Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libffi Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libgcc * udivmodhi4.c (__udivmodhi4): Fix loop end check. 2018-12-05 09:25:11 -05:00
libgfortran re PR libfortran/88411 (Random crashes for ASYNCHRONOUS writes (bad locking?)) 2018-12-09 18:54:47 +00:00
libgo runtime: add missing return for non-GNU/Linux version of tgkill 2018-12-07 14:22:55 +00:00
libgomp re PR libfortran/88411 (Random crashes for ASYNCHRONOUS writes (bad locking?)) 2018-12-09 18:54:47 +00:00
libhsail-rt Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libiberty Add a recursion limit to libiberty's demangling code. The limit is enabled by default, but can be disabled via a new demangling option. 2018-12-07 10:33:30 +00:00
libitm Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libobjc Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
liboffloadmic Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libphobos libphobos: Fix modify immutable error on Solaris. 2018-12-10 12:11:55 +00:00
libquadmath re PR c/88430 (-Wmissing-attributes warnings when including libquadmath headers) 2018-12-11 08:45:47 +01:00
libsanitizer Include patch in LOCAL_PATCHES. 2018-11-09 09:21:56 +00:00
libssp Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libstdc++-v3 documentation_hacking.xml: Update reference to epubcheck. 2018-12-11 04:00:00 +00:00
libvtv Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
lto-plugin Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
maintainer-scripts Add new maintainer script for PRs that can be closed. 2018-11-22 14:05:54 +00:00
zlib Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ChangeLog Delete powerpcspe 2018-12-10 20:40:27 +01:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in Add D front-end, libphobos library, and D2 testsuite. 2018-10-28 19:51:47 +00:00
config.guess Update config.guess and config.sub 2018-07-06 05:57:35 +00:00
config.rpath
config.sub Update config.sub 2018-07-06 06:22:08 +00:00
configure darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
configure.ac darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ltgcc.m4
ltmain.sh libtool.m4: Sort output of 'find' to enable deterministic builds. 2018-07-05 13:13:45 -06:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS Changed email ID to existing one. 2018-11-28 19:55:28 +05:30
Makefile.def Add D front-end, libphobos library, and D2 testsuite. 2018-10-28 19:51:47 +00:00
Makefile.in darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
Makefile.tpl darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
README
symlink-tree
test-driver Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.