--- adasockets-1.9.orig/aclocal.m4 +++ adasockets-1.9/aclocal.m4 @@ -573,7 +573,8 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further --- adasockets-1.9.orig/configure +++ adasockets-1.9/configure @@ -2888,12 +2888,13 @@ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi + ac_config_headers="$ac_config_headers src/config.h" # # Package description # -LIBVERSIONINFO=1:0:0 +LIBVERSIONINFO=5:0:0 case `pwd` in *\ * | *\ *) @@ -4819,7 +4820,8 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -5220,10 +5222,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5262,11 +5260,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -6344,7 +6342,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -6360,9 +6358,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6381,7 +6389,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -8189,7 +8200,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -8667,6 +8678,9 @@ openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -8888,7 +8902,7 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -9065,6 +9079,7 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then @@ -9518,7 +9533,7 @@ link_all_deplibs=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -10355,17 +10370,6 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -10482,7 +10486,7 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -10546,6 +10550,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no --- adasockets-1.9.orig/configure.ac +++ adasockets-1.9/configure.ac @@ -7,7 +7,7 @@ # # Package description # -LIBVERSIONINFO=1:0:0 +LIBVERSIONINFO=6:0:0 AC_SUBST(LIBVERSIONINFO) AM_PROG_LIBTOOL # --- adasockets-1.9.orig/debian/Makefile +++ adasockets-1.9/debian/Makefile @@ -0,0 +1,23 @@ +# By default, compile all of the demo programs: + +EXAMPLES=listener multi stream_listener stream_sender tcpreplay value + +all: $(EXAMPLES) + +$(EXAMPLES): FORCE + gnatmake -Pexamples + + +# "FORCE" just forces the depending rule to always be run. +# In particular, we always want to invoke gnatmake, which then checks to see if +# anything needs recompiling. + +FORCE: + + +clean: + rm -f $(EXAMPLES) *.o *.ali + + +# An alternative is to use commands of the form +# gnatmake `adasockets-config --cflags` $example -largs `adasockets-config --libs` --- adasockets-1.9.orig/debian/adasockets.gpr +++ adasockets-1.9/debian/adasockets.gpr @@ -0,0 +1,15 @@ +project Adasockets is + Version := "6"; + for Library_Dir use "/usr/lib"; + for Library_Name use "adasockets"; + for Library_Kind use "relocatable"; + for Library_Version use "libadasockets.so." & Version; + for Source_Dirs use ("/usr/share/ada/adainclude/adasockets"); + for Object_Dir use "/usr/lib/ada/adalib/adasockets"; + for Library_ALI_Dir use "/usr/lib/ada/adalib/adasockets"; + Linker_Switches := "-ladasockets"; + package Linker is + for Default_Switches ("Ada") use (Linker_Switches); + end Linker; + for Externally_Built use "true"; +end Adasockets; --- adasockets-1.9.orig/debian/changelog +++ adasockets-1.9/debian/changelog @@ -0,0 +1,425 @@ +adasockets (1.9-1.1) unstable; urgency=medium + + * Non maintainer upload. + * Rebuild with gnat-6, bump ALI and SO versions. Closes: #830383. + Conflict with previous -dev can be implicit via gnat-X per Ada policy. + When possible, copy versions automatically to ease next update. + + -- Nicolas Boulenguez Mon, 11 Jul 2016 16:07:44 +0200 + +adasockets (1.9-1) unstable; urgency=medium + + * New upstream release (closes: #756864). + * Bump standards version to 3.9.6. + * Add copyright notice from adasockets.texi to debian/copyright. + (Closes: #756385.) + * Apply patch from Breno Leitao to apply dh_autoconf, to fix FTBFS + on ppc64el. Thanks, Breno. (Closes: #756423.) + * Remove spurious ...info/dir.gz file. + + -- Phil Brooke Sat, 18 Oct 2014 14:24:09 +0100 + +adasockets (1.8.11-1) unstable; urgency=medium + + * New upstream release. + * Update GNAT version to 4.9. Bump to ALIVERSION 5, with configure + and some files renamed as required. (Closes: #755009.) + * Add lintian override for Ada file (hardening-no-relro). + * Bump standards version to 3.9.5. + + -- Phil Brooke Tue, 22 Jul 2014 13:54:04 +0100 + +adasockets (1.8.10-2) unstable; urgency=low + + * Fix GNAT project file that was missing Externally_Built attribute + (closes: #680045). Also needed Library_ALI_Dir attribute. + + -- Phil Brooke Tue, 03 Jul 2012 09:29:20 +0100 + +adasockets (1.8.10-1) unstable; urgency=low + + * New upstream release (closes: #670580). + * Bump standards version to 3.9.3. + + -- Phil Brooke Mon, 11 Jun 2012 11:35:47 +0100 + +adasockets (1.8.9-1) unstable; urgency=low + + * New upstream release. + * Bump gnat version to 4.6 (closes: #642611). + * ALI version changes from 3 to 4. + * New lib and dev packages, name is libadasockets4(-dev). + * New soname libadasockets.so.4. + * New shared library file name libadasockets.so.4.0.0. + * Modified soname in configure/configure.ac. + * Bump to standards version 3.9.2. + * Fix build targets. + + -- Phil Brooke Wed, 07 Dec 2011 11:53:11 +0000 + +adasockets (1.8.8-2) unstable; urgency=low + + * Fix build-depends for Ada compiler. + * Set debian/source/format. + * Bump to standards version 3.9.0. + * Fix copyright address. + + -- Phil Brooke Wed, 30 Jun 2010 17:29:02 +0100 + +adasockets (1.8.8-1) unstable; urgency=low + + * New upstream release. + * ALI version changes from 2 to 3, new soname. + * New library and dev packages. + * Rename libadasockets-dev to libadasockets3-dev (Closes: #580907). + Also adding conflicts: and replaces: to previous versions. + * Update copyright file. + + -- Phil Brooke Tue, 22 Jun 2010 09:29:48 +0100 + +adasockets (1.8.6-3) unstable; urgency=low + + * Bump gnat version to 4.4. + * ALI version changes from 1 to 2. + * New library package, name is libadasockets2. + * New soname libadasockets.so.2. + * New shared library file name libadasockets.so.2.0.0. + * Modified soname in configure/configure.ac. + (Closes: #562872). + * Change architecture to any (to match gnat-4.4). + (Closes: #568433, #542409). + * Bump standards version to 3.8.4. + * Add ${misc:Depends} to Depends. + * Bump debian/compat to 6 and build-depends on debhelper. + * Add dpkg (>= 1.15.4) | install-info to -dev package depends. + * Patch assorted source files for "(style) "in" should be omitted" + errors. Patch provided by Arno Schuring -- thank you. + * Modified Makefile.in to not provide info...dir.gz file. + + -- Phil Brooke Sat, 06 Feb 2010 16:22:05 +0000 + +adasockets (1.8.6-2) unstable; urgency=low + + * Bump gnat version to 4.3. + * Add mips and mipsel architectures. + * Depend on texlive instead of tetex-bin. + * Bump standards version to 3.8.0. + + -- Phil Brooke Fri, 18 Jul 2008 07:31:54 +0100 + +adasockets (1.8.6-1) unstable; urgency=low + + * New upstream release. + * Very minor fix to adasockets.texi (added `@' to email address). + * Added @dircategory (Ada libraries) to adasockets.texi. + * Info file installed using dh_installinfo now. + * DH_COMPAT removed from rules, added debian/compat. + * Bumped standards version to 3.7.3. + * No longer ignore distclean errors. Also removed the dependency in + the clean target (closes: #449088). + * Change substvar to use binary:Version, not Source-Version. + * Changed Debian copyright file encoding to UTF-8. + * Modified src/Makefile.am to make sure that SONAME stays as .1 + (thanks Neil Williams). + * Delete doc/adasockets.info in debian/rules clean target: this is + ignored when building source. Avoids spurious changes being recorded. + + -- Phil Brooke Thu, 20 Dec 2007 21:48:26 +0000 + +adasockets (1.8.4.7-5) unstable; urgency=low + + * Two suggestions from Ludovic Brenta (thanks!): + * Corrected CFLAGS in adasockets-config.in. + * debian/control: added depends on gnat-4.1 for + libadasockets-dev. + + -- Phil Brooke Thu, 14 Dec 2006 19:33:22 +0000 + +adasockets (1.8.4.7-4) unstable; urgency=medium + + * Corrected architecture for new gnat -- it's not `any'. + * Changed build-depends to include version >= 4.1 on gnat. + * Modified doc/Makefile.in to stop it removing some .texi sources on + clean. Removed nasty hack using `orig' directory and replaced by + previous fix to doc/Makefile.in. Also use `dpkg-buildpackage + -idoc/adasockets.info' + * Added tetex-bin to build-depends: needed to make .ps and .pdf + documents. + * Documentation directory reorganised. + * Assorted suggestions from Ludovic Brenta (thanks!): + * libadasockets-dev: .ads and .adb files are now in + /usr/share/ada/adainclude/adasockets. + * libadasockets-dev: .ali files are now in + /usr/lib/ada/adalib/adasockets. + * adasockets-config.in also modified. Will not remove this file + as requested by bug 383434 because it might be useful to users still. + * Added Debian-specific GNAT project file named + /usr/share/ada/adainclude/adasockets.gpr. Examples directory + has new Makefile and .gpr file. + * No longer need to explicitly handle .ali file permissions, + letting dh_fixperms deal with them. + * The example files are now excluded from compression by dh_compress. + closes: #383429. + * GNAT 4.1 has a new ABI. + * New library package, name is libadasockets1; + new soname libadasockets.so.1; + new shared library file name libadasockets.so.1.0.0. + * -dev package is renamed: it conflicts with and replaces + libadasockets0-dev. + * Associated changes within debian/ directory. + * Modified configure.ac/configure for LIBVERSIONINFO. + * Closes: #383430. + + -- Phil Brooke Mon, 2 Oct 2006 12:35:45 +0100 + +adasockets (1.8.4.7-3) unstable; urgency=medium + + * Fixed FTBFS by changing (build-)depends to gnat (closes: #377986). + * Change to newer gnat means that architecture can be `any'. + * Bumped standards-version to 3.7.2. + + -- Phil Brooke Wed, 26 Jul 2006 18:58:59 +0000 + +adasockets (1.8.4.7-2) unstable; urgency=low + + * Changed build-depends for GNU/kFreeBSD (closes: #345058). + * Bumped DH_COMPAT and debhelper version to 4. + * Bumped standards-version to 3.6.2. + + -- Phil Brooke Tue, 17 Jan 2006 14:37:03 +0000 + +adasockets (1.8.4.7-1) unstable; urgency=low + + * New upstream release. + * Refreshed the debian/orig directory. + * Fixed synopsis in package descriptions. + + -- Phil Brooke Sat, 8 Jan 2005 19:25:44 +0000 + +adasockets (1.8.4.4-1) unstable; urgency=low + + * New upstream release. + * Refreshed the debian/orig directory. + * Added texinfo package to build depends so that `makeinfo' is available + (closes: #253703). + + -- Phil Brooke Sat, 26 Jun 2004 16:31:30 +0100 + +adasockets (1.8.4.3-1) unstable; urgency=low + + * New upstream release. + * Refreshed the debian/orig directory. + + -- Phil Brooke Mon, 28 Mar 2004 12:34:32 +0000 + +adasockets (1.8.4.2-1) unstable; urgency=low + + * New upstream release. + * Refreshed the debian/orig directory. + + -- Phil Brooke Thu, 15 Jan 2004 12:54:49 +0000 + +adasockets (1.8.3-1) unstable; urgency=low + + * New upstream release. + * Refreshed the debian/orig directory. + * Modified support/adacompiler so that if doesn't try to move a file + onto itself. + + -- Phil Brooke Wed, 13 Dec 2003 20:38:00 +0000 + +adasockets (1.8.2-1) unstable; urgency=low + + * New upstream release. + * Moved from GNAT 3.14 to GNAT 3.15. + * Moved the `orig' hack directory (see revision 1.6-1) to within the + debian/ directory. + + -- Phil Brooke Mon, 17 Nov 2003 10:52:37 +0000 + +adasockets (1.7-2) unstable; urgency=low + + * Modified debian/rules to set the .ali files to read-only. This is + to stop gnatmake trying to rebuild the .ali and .o files in a + local directory when they're used. + + -- Phil Brooke Mon, 25 Aug 2003 16:14:24 +0100 + +adasockets (1.7-1) unstable; urgency=low + + * New upstream release. + * libadasockets0-dev package now in section libdevel. + * Working around dpkg-source's objections to doc/adasockets.pdf being + regenerated. + + -- Phil Brooke Wed, 6 Aug 2003 23:26:07 +0100 + +adasockets (1.6-1) unstable; urgency=low + + * New upstream release + * Update to standards version 3.5.9.0. + * Move info directory to FHS-compliant location. + * Added shlibs and shlibsdep calls. + * Tweaked upstream README to indicate a different order when calling + gnatmake. + * Added configure as dependency for clean target in debian/rules. + Otherwise we don't always have the needed makefile. + * Added hack (the orig directory) to fix a problem with essential + upstream files being deleted during distclean. + + -- Phil Brooke Fri, 28 Mar 2003 22:51:06 +0000 + +adasockets (1.2-1) unstable; urgency=low + + * New upstream release. + * New maintainer (closes: #154104). + * Changed libadasockets0 section: was devel, is now libs + (closes: #157053). + + -- Phil Brooke Wed, 28 Aug 2002 21:34:17 +0100 + +adasockets (1.0-1) unstable; urgency=low + + * New upstream version. + * Install no manpage in /usr/man. Closes: #138078. + + -- Samuel Tardieu Thu, 14 Mar 2002 19:13:47 +0100 + +adasockets (0.1.19-3) unstable; urgency=low + + * Recompile for GNAT 3.14p. + + -- Samuel Tardieu Sat, 2 Feb 2002 20:37:30 +0100 + +adasockets (0.1.19-2) unstable; urgency=low + + * Use debhelper instead of yada. + + -- Samuel Tardieu Fri, 14 Dec 2001 19:53:17 +0100 + +adasockets (0.1.19-1) unstable; urgency=low + + * New upstream version. + + -- Samuel Tardieu Fri, 26 Oct 2001 18:49:03 +0200 + +adasockets (0.1.15-1) unstable; urgency=low + + * New upstream version. + + -- Samuel Tardieu Mon, 24 Sep 2001 18:16:32 +0200 + +adasockets (0.1.14-1) unstable; urgency=low + + * New upstream version. + + -- Samuel Tardieu Tue, 24 Jul 2001 11:37:40 +0200 + +adasockets (0.1.13-2) unstable; urgency=low + + * GNAT is no longer Architecture: any, so this package has to follow. + Closes: #100291. + + -- Samuel Tardieu Sat, 9 Jun 2001 18:12:53 +0200 + +adasockets (0.1.13-1) unstable; urgency=low + + * New upstream release. + + -- Samuel Tardieu Tue, 13 Mar 2001 21:03:19 +0100 + +adasockets (0.1.11-1) unstable; urgency=low + + * New upstream release. + * Remove spurious symlink. Closes: #71064. + + -- Samuel Tardieu Fri, 27 Oct 2000 18:40:00 +0200 + +adasockets (0.1.10-1) unstable; urgency=low + + * New upstream release. + + -- Samuel Tardieu Wed, 13 Sep 2000 14:06:48 +0200 + +adasockets (0.1.9-2) unstable; urgency=low + + * Add Build-Depends line. Closes: #70066. + + -- Samuel Tardieu Wed, 30 Aug 2000 12:25:51 +0200 + +adasockets (0.1.9-1) unstable; urgency=low + + * New upstream release. + + -- Samuel Tardieu Thu, 3 Aug 2000 16:23:13 +0200 + +adasockets (0.1.8-1) unstable; urgency=low + + * New upstream release. + + -- Samuel Tardieu Mon, 22 May 2000 18:50:03 +0200 + +adasockets (0.1.6-1) unstable; urgency=low + + * New upstream release. + + -- Samuel Tardieu Sat, 8 Jan 2000 16:39:32 +0100 + +adasockets (0.1.4-1) unstable; urgency=low + + * New upstream release. + + -- Samuel Tardieu Tue, 14 Dec 1999 15:20:03 +0100 + +adasockets (0.1.3-6) unstable; urgency=low + + * Recompile for GNAT 3.12p. + + -- Samuel Tardieu Tue, 14 Dec 1999 15:19:58 +0100 + +adasockets (0.1.3-5) unstable; urgency=low + + * Apply patch from Tristan Gingold. + + -- Samuel Tardieu Thu, 1 Jul 1999 19:37:30 +0200 + +adasockets (0.1.3-4) unstable; urgency=low + + * Previous description was empty. Fix it. + + -- Samuel Tardieu Tue, 27 Apr 1999 21:23:09 +0200 + +adasockets (0.1.3-3) unstable; urgency=low + + * Include examples. + * Recompiled using YADA. + + -- Samuel Tardieu Tue, 27 Apr 1999 21:04:51 +0200 + +adasockets (0.1.3-2) unstable; urgency=low + + * Recompiled for GNAT 3.11p-9. + + -- Samuel Tardieu Wed, 24 Feb 1999 13:13:02 +0100 + +adasockets (0.1.3-1) unstable; urgency=low + + * New upstream release. + + * Compiled for GNAT 3.11p. + + * Switched to dh-make. + + -- Samuel Tardieu Wed, 27 Jan 1999 11:28:57 +0100 + +adasockets (0.1.2-2) unstable; urgency=low + + * Reword description. + + -- Samuel Tardieu Fri, 9 Oct 1998 10:51:35 +0200 + +adasockets (0.1.2-1) unstable; urgency=low + + * Initial Release. + + -- Samuel Tardieu Thu, 24 Sep 1998 13:17:57 +0200 --- adasockets-1.9.orig/debian/compat +++ adasockets-1.9/debian/compat @@ -0,0 +1 @@ +6 --- adasockets-1.9.orig/debian/control +++ adasockets-1.9/debian/control @@ -0,0 +1,29 @@ +Source: adasockets +Maintainer: Phil Brooke +Section: devel +Priority: extra +Standards-Version: 3.9.6 +Build-Depends: gnat, gnat-6, debhelper (>= 6.0.0), texinfo, texlive, dh-autoreconf + +Package: libadasockets6-dev +Architecture: any +Depends: gnat, gnat-6, libadasockets6 (=${binary:Version}), ${misc:Depends}, dpkg (>= 1.15.4) | install-info +Section: libdevel +Description: bindings for socket services in Ada + This package provides a binding for socket services to be used with GNAT + (the GNU Ada compiler). One can use it to write clients and servers that + will talk with programs written in Ada or any other programming language. + . + This package provides the Ada programmer with headers and libraries used + to build Ada programs that use sockets services. + +Package: libadasockets6 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Section: libs +Description: bindings for socket services in Ada + This package provides a binding for socket services to be used with GNAT + (the GNU Ada compiler). One can use it to write clients and servers that + will talk with programs written in Ada or any other programming language. + . + This package contains the library needed to execute Ada program using sockets. --- adasockets-1.9.orig/debian/copyright +++ adasockets-1.9/debian/copyright @@ -0,0 +1,52 @@ +This is the Debian version of adasockets. + +AdaSockets has been written by Samuel Tardieu with +the contribution of many users. + +Copyright (C) 1998-2010 Samuel Tardieu +Copyright (C) 1999-2003 ENST http://www.enst.fr/ + +Licence (from adasocket's GMGPL file): + + AdaSockets is free software; you can redistribute it and/or modify it + under terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. AdaSockets is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. You should have received a + copy of the GNU General Public License distributed with AdaSockets; + see file COPYING. If not, write to the Free Software Foundation, + [old address omitted]. + + As a special exception, if other files instantiate generics from this + unit, or you link this unit with other files to produce an executable, + this unit does not by itself cause the resulting executable to be + covered by the GNU General Public License. This exception does not + however invalidate any other reasons why the executable file might be + covered by the GNU Public License. + +The GNU General Public License can be found in /usr/share/common-licenses. + + +The documentation is released under the following copyright (extracted +from adasockets.texi): + + Copyright (C) 2002-2013 Samuel Tardieu + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + are preserved on all copies. + + Permission is granted to process this file through TeX and print the + results, provided the printed document carries a copying permission + notice identical to this one except for the removal of this paragraph + (this paragraph not being relevant to the printed manual). + + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided also that + the entire resulting derived work is distributed under the terms of a + permission notice identical to this one. + + Permission is granted to copy and distribute translations of this manual + into another language, under the above conditions for modified versions. --- adasockets-1.9.orig/debian/examples.gpr +++ adasockets-1.9/debian/examples.gpr @@ -0,0 +1,9 @@ +with "adasockets"; +project Examples is + for Main use ("listener", + "multi", + "stream_listener", + "stream_sender", + "tcprelay", + "value"); +end Examples; --- adasockets-1.9.orig/debian/libadasockets6.lintian-overrides +++ adasockets-1.9/debian/libadasockets6.lintian-overrides @@ -0,0 +1 @@ +hardening-no-relro usr/lib/libadasockets.so.* --- adasockets-1.9.orig/debian/protect/sockets-multicast.texi +++ adasockets-1.9/debian/protect/sockets-multicast.texi @@ -0,0 +1,136 @@ + +The @code{Sockets.Multicast} allows the creation of IP multicast +sockets. + +@deftypefn Sockets.Multicast.Multicast_Socket_FD type Multicast_Socket_FD is new Socket_FD with private; +The @code{Multicast_Socket_FD} tagged type derives from the +@code{Socket_FD} type. It gets initialized by calling +@ref{Create_Multicast_Socket (function)}. An uninitialized +@code{Multicast_Socket_FD} can be succesfully compared to +@code{Null_Multicast_Socket_FD}. + +@end deftypefn + +@menu +* Create_Multicast_Socket (function):: + Create an IP multicast socket +* Create_Multicast_Socket (function):: + Create an IP multicast socket +@end menu + +@node Create_Multicast_Socket (function) +@unnumberedsubsec Create_Multicast_Socket (function) +@cindex Creating a socket +@cindex Creating a multicast socket + +@table @sc +@item Purpose +Create an IP multicast socket +@item Prototype +@deftypefn Sockets.Multicast.Create_Multicast_Socket function Create_Multicast_Socket (@w{@var{Group} : String}; @w{@var{Port} : Positive}; @w{@var{TTL} : Positive := 16}; @w{@var{Self_Loop} : Boolean := True}; @w{@var{Local_If} : String := 0.0.0.0})@*@w{return Multicast_Socket_FD;} +@end deftypefn +@fnindex Sockets.Multicast.Create_Multicast_Socket + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Group} @tab in @tab IP address of the multicast group to join +@item @var{Port} @tab in @tab Port of the multicast group to join +@item @var{TTL} @tab in @tab Time-to-live of sent packets +@item @var{Self_Loop} @tab in @tab Should the socket receive the packets +sent from the local host? +@item @var{Local_If} @tab in @tab Address of the local interface +to use +@end multitable + +@item Return value +The new initialized multicast socket + +@item Description +This function creates an IP multicast socket attached to a given +group, identified by its class E IP address and port. + +Be careful when choosing the TTL parameter of your IP multicast +socket. Most IP multicast routers do implement threshold-based +filtering and will not let IP multicast packets leave your +organization if the TTL on the last router is smaller than 16. + + + +@item Example +@example +declare + Sock : Multicast_Socket_FD; +begin + -- Create a multicast socket on group 224.1.2.3 port 8763 + Sock := Create_Multicast_Socket ("224.1.2.3", 8763); + -- Perform some operations on socket + [...] + -- Shutdown the socket in both directions + Shutdown (Sock, Both); +end; +@end example + + +@item See also +@ref{Send (procedure)},@*@ref{Shutdown (procedure)}. + +@end table + +@node Create_Multicast_Socket (function) +@unnumberedsubsec Create_Multicast_Socket (function) +@cindex Creating a socket +@cindex Creating a multicast socket + +@table @sc +@item Purpose +Create an IP multicast socket +@item Prototype +@deftypefn Sockets.Multicast.Create_Multicast_Socket function Create_Multicast_Socket (@w{@var{Group} : String}; @w{@var{Port} : Positive}; @w{@var{Local_Port} : Natural}; @w{@var{TTL} : Positive := 16}; @w{@var{Local_If} : String := 0.0.0.0})@*@w{return Multicast_Socket_FD;} +@end deftypefn +@fnindex Sockets.Multicast.Create_Multicast_Socket + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Group} @tab in @tab IP address of the multicast group to join +@item @var{Port} @tab in @tab Port of the multicast group to join +@item @var{Local_Port} @tab in @tab Local port number to use +@item @var{TTL} @tab in @tab Time-to-live of sent packets +@item @var{Local_If} @tab in @tab Address of the local interface +to use +@end multitable + +@item Return value +The new initialized multicast socket + +@item Description +This function creates an IP multicast socket attached to a given +group, identified by its class E IP address and port. If +Local_Port is 0, a free port will automatically be chosen by +your operating system. + +This function should be used when you want to send packets +to a multicast group without receiving any packet yourself. + + + +@item Example +@example +declare + Sock : Multicast_Socket_FD; +begin + -- Create a multicast socket on group 224.1.2.3 port 8763 + Sock := Create_Multicast_Socket ("224.1.2.3", 8763); + -- Perform some operations on socket + [...] + -- Shutdown the socket in both directions + Shutdown (Sock, Both); +end; +@end example + + +@item See also +@ref{Send (procedure)},@*@ref{Shutdown (procedure)}. + +@end table + + --- adasockets-1.9.orig/debian/protect/sockets-naming.texi +++ adasockets-1.9/debian/protect/sockets-naming.texi @@ -0,0 +1,397 @@ + +The @code{Sockets.Naming} package contains types and helper functions +needed to manipulate Internet host names and addresses. + +@deftypefn Sockets.Naming.Address type Address is record@*@w{ }H1, H2, H3, H4 : Address_Component;@*end record; +This type represents an IPv4 address with @code{H1} being the first +octet and @code{H4} the last one. For example, 137.194.161.2 is +represented by @code{H1=137, H2=194, H3=161, H4=2}. + +@end deftypefn + +@deftypefn Sockets.Naming.Address_Array type Address_Array is array (Positive range <>) of Address; +Helper type + +@end deftypefn + +@deftypefn Sockets.Naming.Address_Component type Address_Component is Natural range 0 .. 255; +Helper type + +@end deftypefn + +@deftypefn Sockets.Naming.Host_Entry type Host_Entry (N_Aliases, N_Addresses : Natural) is new Ada.Finalization.Controlled with record@*@w{ } Name : String_Access;@*@w{ } Aliases : String_Array (1 .. N_Aliases);@*@w{ } Addresses : Address_Array (1 .. N_Addresses);@* end record; +The @code{Host_Entry} type holds a set of names and IP addresses +associated with a host. Each host can have several IP address +as well as several aliases. + +@end deftypefn + +@deftypefn Sockets.Naming.String_Access type String_Access is access String; +Helper type + +@end deftypefn + +@deftypefn Sockets.Naming.String_Array type String_Array is array (Positive range <>) of String_Access; +Helper type + +@end deftypefn + +@menu +* Address_Of (function):: + Get the IP address of a host +* Any_Address (function):: + Special address representing any address on the local host +* Get_Peer_Addr (function):: + Retrieve IP address of remote host +* Get_Peer_Port (function):: + Retrieve port used by remote host +* Get_Sock_Addr (function):: + Retrieve IP address of local host +* Get_Sock_Port (function):: + Retrieve port used by local host +* Host_Name (function):: + Get the name of the current host +* Image (function):: Make a string from an address +* Info_Of_Name_Or_IP (function):: + Get addresses and names of a host +* Is_IP_Address (function):: + Check if given string is a valid IP address +* Name_Of (function):: Official name of the host +* Value (function):: Transform a string into an address +@end menu + +@node Address_Of (function) +@unnumberedsubsec Address_Of (function) + +@table @sc +@item Purpose +Get the IP address of a host +@item Prototype +@deftypefn Sockets.Naming.Address_Of function Address_Of (@w{@var{Something} : String})@*@w{return Address;} +@end deftypefn +@fnindex Sockets.Naming.Address_Of + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Something} @tab in @tab Host name or IP address +@end multitable + +@item Return value +IPv4 address + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Naming_Error} @tab No information available for this name or address@exindex Naming_Error +@end multitable + + + + + +@item See also +@ref{Name_Of (function)}. + +@end table + +@node Any_Address (function) +@unnumberedsubsec Any_Address (function) + +@table @sc +@item Purpose +Special address representing any address on the local host +@item Prototype +@deftypefn Sockets.Naming.Any_Address function Any_Address +@end deftypefn +@fnindex Sockets.Naming.Any_Address + +@item Return value +Equivalent to @code{INADDR_ANY} in the C programming language + + + + +@end table + +@node Get_Peer_Addr (function) +@unnumberedsubsec Get_Peer_Addr (function) + +@table @sc +@item Purpose +Retrieve IP address of remote host +@item Prototype +@deftypefn Sockets.Naming.Get_Peer_Addr function Get_Peer_Addr (@w{@var{Socket} : Socket_FD})@*@w{return Address;} +@end deftypefn +@fnindex Sockets.Naming.Get_Peer_Addr + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Connected socket object +@end multitable + +@item Return value +Peer address + + + + +@item See also +@ref{Get_Peer_Port (function)},@*@ref{Get_Sock_Addr (function)}. + +@end table + +@node Get_Peer_Port (function) +@unnumberedsubsec Get_Peer_Port (function) + +@table @sc +@item Purpose +Retrieve port used by remote host +@item Prototype +@deftypefn Sockets.Naming.Get_Peer_Port function Get_Peer_Port (@w{@var{Socket} : Socket_FD})@*@w{return Positive;} +@end deftypefn +@fnindex Sockets.Naming.Get_Peer_Port + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Connected socket object +@end multitable + +@item Return value +Port used on the remote host + + + + +@item See also +@ref{Get_Sock_Port (function)},@*@ref{Get_Peer_Addr (function)}. + +@end table + +@node Get_Sock_Addr (function) +@unnumberedsubsec Get_Sock_Addr (function) + +@table @sc +@item Purpose +Retrieve IP address of local host +@item Prototype +@deftypefn Sockets.Naming.Get_Sock_Addr function Get_Sock_Addr (@w{@var{Socket} : Socket_FD})@*@w{return Address;} +@end deftypefn +@fnindex Sockets.Naming.Get_Sock_Addr + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Connected socket object +@end multitable + +@item Return value +Address of local interface used + + + + +@item See also +@ref{Get_Sock_Port (function)},@*@ref{Get_Peer_Addr (function)}. + +@end table + +@node Get_Sock_Port (function) +@unnumberedsubsec Get_Sock_Port (function) + +@table @sc +@item Purpose +Retrieve port used by local host +@item Prototype +@deftypefn Sockets.Naming.Get_Sock_Port function Get_Sock_Port (@w{@var{Socket} : Socket_FD})@*@w{return Positive;} +@end deftypefn +@fnindex Sockets.Naming.Get_Sock_Port + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Connected socket object +@end multitable + +@item Return value +Port used on the local host + + + + +@item See also +@ref{Get_Peer_Port (function)},@*@ref{Get_Sock_Addr (function)}. + +@end table + +@node Host_Name (function) +@unnumberedsubsec Host_Name (function) + +@table @sc +@item Purpose +Get the name of the current host +@item Prototype +@deftypefn Sockets.Naming.Host_Name function Host_Name +@end deftypefn +@fnindex Sockets.Naming.Host_Name + +@item Return value +Name of the current host + +@item Description +This function returns the name of the current host. Depending on +the local configuration, it may or may not be a fully qualified +domain name (FQDN). + + + + +@end table + +@node Image (function) +@unnumberedsubsec Image (function) +@cindex Representing IP addresses + +@table @sc +@item Purpose +Make a string from an address +@item Prototype +@deftypefn Sockets.Naming.Image function Image (@w{@var{Add} : Address})@*@w{return String;} +@end deftypefn +@fnindex Sockets.Naming.Image + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Add} @tab in @tab IP address +@end multitable + +@item Return value +String representation of the IP address + + + + +@item See also +@ref{Value (function)}. + +@end table + +@node Info_Of_Name_Or_IP (function) +@unnumberedsubsec Info_Of_Name_Or_IP (function) + +@table @sc +@item Purpose +Get addresses and names of a host +@item Prototype +@deftypefn Sockets.Naming.Info_Of_Name_Or_IP function Info_Of_Name_Or_IP (@w{@var{Something} : String})@*@w{return Host_Entry;} +@end deftypefn +@fnindex Sockets.Naming.Info_Of_Name_Or_IP + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Something} @tab in @tab Host name or IP address +@end multitable + +@item Return value +Corresponding host entry + +@item Description +This function extracts all the names and addresses from the +naming service. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Naming_Error} @tab No information available for this name or address@exindex Naming_Error +@end multitable + + + + + +@end table + +@node Is_IP_Address (function) +@unnumberedsubsec Is_IP_Address (function) + +@table @sc +@item Purpose +Check if given string is a valid IP address +@item Prototype +@deftypefn Sockets.Naming.Is_IP_Address function Is_IP_Address (@w{@var{Something} : String})@*@w{return Boolean;} +@end deftypefn +@fnindex Sockets.Naming.Is_IP_Address + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Something} @tab in @tab String to check +@end multitable + +@item Return value +@samp{True} if @var{Something} is an IP address + + + + +@end table + +@node Name_Of (function) +@unnumberedsubsec Name_Of (function) + +@table @sc +@item Purpose +Official name of the host +@item Prototype +@deftypefn Sockets.Naming.Name_Of function Name_Of (@w{@var{Something} : String})@*@w{return String;} +@end deftypefn +@fnindex Sockets.Naming.Name_Of + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Something} @tab in @tab Host name or IP address +@end multitable + +@item Return value +Name of the host + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Naming_Error} @tab No information available for this name or address@exindex Naming_Error +@end multitable + + + + + +@item See also +@ref{Address_Of (function)}. + +@end table + +@node Value (function) +@unnumberedsubsec Value (function) +@cindex Representing IP addresses + +@table @sc +@item Purpose +Transform a string into an address +@item Prototype +@deftypefn Sockets.Naming.Value function Value (@w{@var{Add} : String})@*@w{return Address;} +@end deftypefn +@fnindex Sockets.Naming.Value + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Add} @tab in @tab Textual representation of an IP address +@end multitable + +@item Return value +Corresponding Address + + + + +@item See also +@ref{Image (function)}. + +@end table + + --- adasockets-1.9.orig/debian/protect/sockets.texi +++ adasockets-1.9/debian/protect/sockets.texi @@ -0,0 +1,1078 @@ + +The @code{Sockets} package contains all the definitions and +subprograms needed to build a simple unicast client or server. + +@deftypefn Sockets.Socket_FD type Socket_FD is tagged private; +The @code{Socket_FD} tagged type is the root type of all +sockets. It gets initialized by calling @ref{Socket (procedure)}. +An uninitialized @code{Socket_FD} can be succesfully compared to +@code{Null_Socket_FD}. + +@end deftypefn + +@menu +* Accept_Socket (procedure):: + Accept an incoming connection +* Bind (procedure):: Associate a local port to a socket +* Connect (procedure):: Connect a socket on a given host/port +* Get (function):: Get a string from a remote host +* Get_Char (function):: Get a character from a remote host +* Get_Line (function):: Get a whole line from a remote host +* Get_Line (procedure):: + Get a whole line from a remote host +* Get_Receive_Queue_Size (function):: + Return the size of the unread data in the input queue +* Get_Send_Queue_Size (function):: + Return the size of the unsent data in the output queue +* Getsockopt (procedure):: + Retrieve a socket option +* Listen (procedure):: Establish a listen queue +* New_Line (procedure):: + Send a CR/LF to a remote host +* Put (procedure):: Send a string to a remote host +* Put_Line (procedure):: + Send a CR/LF terminated string to a remote host +* Receive (function):: Receive raw data over a socket +* Receive (procedure):: Receive raw data over a socket +* Receive_Some (procedure):: + Receive raw data over a socket +* Send (procedure):: Send raw data over a socket +* Set_Buffer (procedure):: + Install a line-oriented buffer of the socket object +* Setsockopt (procedure):: + Set a socket option +* Shutdown (procedure):: + Shutdown a socket +* Socket (procedure):: Create a socket of the given mode +* Unset_Buffer (procedure):: + Deinstall the line-oriented buffer of the socket object +@end menu + +@node Accept_Socket (procedure) +@unnumberedsubsec Accept_Socket (procedure) +@cindex Accepting a new connection +@cindex Handling a new connection + +@table @sc +@item Purpose +Accept an incoming connection +@item Prototype +@deftypefn Sockets.Accept_Socket procedure Accept_Socket (@w{@var{Socket} : Socket_FD}; @w{@var{New_Socket} : out Socket_FD}); +@end deftypefn +@fnindex Sockets.Accept_Socket + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized +@item @var{New_Socket} @tab out @tab Incoming socket object +@end multitable + + +@item Description +This procedure creates a new socket corresponding to an incoming +connection on TCP socket @var{Socket}. All the communications +with the peer will take place on @var{New_Socket}, while the +program can accept another connection on @var{Socket}. + +@var{New_Socket} must not be initialized before calling this +procedure, or must have been cleaned up by calling +@code{Shutdown}, in order to avoid a file descriptors leak. + +@code{Accept_Socket} will block until an incoming connection is +ready to be accepted. + + + +@item Example +@example +declare + Sock : Socket_FD; + Incoming : Socket_FD; +begin + -- Create a TCP socket listening on local port 4161 + Socket (Sock, PF_INET, SOCK_STREAM); + Bind (Sock, 4161); + Listen (Sock, 3); + -- One-connection-at-a-time server (3 may be pending) + loop + -- Wait for a new connection and accept it + Accept_Socket (Sock, Incoming); + -- Do some dialog with the remote host + Do_Some_Dialog (Incoming); + -- Close incoming socket and wait for next connection + Shutdown (Incoming); + end loop; +end; +@end example + + +@item See also +@ref{Bind (procedure)},@*@ref{Listen (procedure)},@*@ref{Shutdown (procedure)},@*@ref{Socket (procedure)}. + +@end table + +@node Bind (procedure) +@unnumberedsubsec Bind (procedure) +@cindex Binding a socket +@cindex Assigning a local port +@cindex Creating a server + +@table @sc +@item Purpose +Associate a local port to a socket +@item Prototype +@deftypefn Sockets.Bind procedure Bind (@w{@var{Socket} : Socket_FD}; @w{@var{Port} : Natural}; @w{@var{Host} : String := @w{}""}); +@end deftypefn +@fnindex Sockets.Bind + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized socket object +@item @var{Port} @tab in @tab Local port to bind to +@item @var{Host} @tab in @tab Local interface to bind to +@end multitable + + +@item Description +This procedure requests a local port from the operating +system. If 0 is given in @var{Port}, the system will assign a +free port whose number can later be retrieved using +@ref{Get_Sock_Port (function)}. Also, most operating systems require +special privileges if you want to bind to ports below 1024. + +If @var{Host} is not the empty string, it must contain the +IP address of a local interface to bind to, or a name which +resolves into such an address. If an empty string is given (the +default), the socket will be bound to all the available +interfaces. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Socket_Error} @tab Requested port or interface not available@exindex Socket_Error +@end multitable + + + + + +@item See also +@ref{Listen (procedure)},@*@ref{Socket (procedure)}. + +@end table + +@node Connect (procedure) +@unnumberedsubsec Connect (procedure) +@cindex Connecting a socket + +@table @sc +@item Purpose +Connect a socket on a given host/port +@item Prototype +@deftypefn Sockets.Connect procedure Connect (@w{@var{Socket} : Socket_FD}; @w{@var{Host} : String}; @w{@var{Port} : Positive}); +@end deftypefn +@fnindex Sockets.Connect + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized socket object +@item @var{Host} @tab in @tab Host to connect to +@item @var{Port} @tab in @tab Port to connect to +@end multitable + + +@item Description +This procedure connects an initialized socket to a given host on +a given port. In the case of a TCP socket, a real connection is +attempted. In the case of a UDP socket, no connection takes place +but the endpoint coordinates are recorded. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Refused} @tab The connection has been refused by the server@exindex Connection_Refused +@item @code{Socket_Error} @tab Another error occurred during the connection@exindex Socket_Error +@end multitable + + + + + +@item Example +@example +declare + Sock : Socket_FD; +begin + -- Create a TCP socket + Socket (Sock, PF_INET, SOCK_STREAM); + -- Connect it to rfc1149.net's mail server + Connect (Sock, "mail.rfc1149.net", 25); + -- Do a mail transaction then close the socket + [...] +end; +@end example + + +@item See also +@ref{Socket (procedure)}. + +@end table + +@node Get (function) +@unnumberedsubsec Get (function) +@cindex Receiving data + +@table @sc +@item Purpose +Get a string from a remote host +@item Prototype +@deftypefn Sockets.Get function Get (@w{@var{Socket} : Socket_FD'Class})@*@w{return String;} +@end deftypefn +@fnindex Sockets.Get + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@end multitable + +@item Return value +Some characters that have been received + +@item Description +This function receives some characters from a remote host. +As soon that at least one character is available, the current +reception buffer is returned. + +There is usually little gain in using this function whose behaviour is +comparable to the one of @ref{Receive (function)}. Other +functions such as @ref{Get_Char (function)}, or +@ref{Get_Line (function)}, allow more structured programming. + +However, this function may be used to avoid loosing characters +when calling @ref{Unset_Buffer (procedure)}, if, for some reason, +the remote host may have sent some. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has closed the connection before sending any data@exindex Connection_Closed +@end multitable + + + + + +@end table + +@node Get_Char (function) +@unnumberedsubsec Get_Char (function) +@cindex Receiving data + +@table @sc +@item Purpose +Get a character from a remote host +@item Prototype +@deftypefn Sockets.Get_Char function Get_Char (@w{@var{Socket} : Socket_FD'Class})@*@w{return Character;} +@end deftypefn +@fnindex Sockets.Get_Char + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@end multitable + +@item Return value +One character sent by the remote host + +@item Description +This function receives exactly one character from the remote host. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has closed the connection before sending the character@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Get (function)},@*@ref{Get_Line (function)},@*@ref{Get_Line (procedure)},@*@ref{Receive (procedure)},@*@ref{Set_Buffer (procedure)}. + +@end table + +@node Get_Line (function) +@unnumberedsubsec Get_Line (function) +@cindex Receiving data + +@table @sc +@item Purpose +Get a whole line from a remote host +@item Prototype +@deftypefn Sockets.Get_Line function Get_Line (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Max_Length} : Positive := 2048})@*@w{return String;} +@end deftypefn +@fnindex Sockets.Get_Line + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@item @var{Max_Length} @tab in @tab Maximum returned line length +@end multitable + +@item Return value +A line without the CR and LF separators + +@item Description +@ctindex CR +@ctindex LF +This function receives one line from the remote host. A line +consists into zero or more characters followed by an optional CR +and by a LF. Those terminators are stripped before the line is +returned. + +This function blocks until one full line has been received. The line +length is limited with the value of the Max_Length argument, to avoid +exhaustion of the secondary stack. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has closed the connection before sending a whole line@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Get (function)},@*@ref{Get_Char (function)},@*@ref{Get_Line (procedure)},@*@ref{Receive (procedure)},@*@ref{Set_Buffer (procedure)}. + +@end table + +@node Get_Line (procedure) +@unnumberedsubsec Get_Line (procedure) +@cindex Receiving data + +@table @sc +@item Purpose +Get a whole line from a remote host +@item Prototype +@deftypefn Sockets.Get_Line procedure Get_Line (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Str} : in out String}; @w{@var{Last} : out Natural}); +@end deftypefn +@fnindex Sockets.Get_Line + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@item @var{Str} @tab in out @tab String to fill +@item @var{Last} @tab out @tab Last index used in the string +@end multitable + + +@item Description +@ctindex CR +@ctindex LF +This procedure receives one line from the remote host. A line +consists into zero or more characters followed by an optional CR +and by a LF. Those terminators are stripped before the line is +returned. + +This procedure blocks until one full line has been received. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has closed the connection before sending a whole line@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Get (function)},@*@ref{Get_Char (function)},@*@ref{Get_Line (function)},@*@ref{Receive (procedure)},@*@ref{Set_Buffer (procedure)}. + +@end table + +@node Get_Receive_Queue_Size (function) +@unnumberedsubsec Get_Receive_Queue_Size (function) +@cindex Receiving data + +@table @sc +@item Purpose +Return the size of the unread data in the input queue +@item Prototype +@deftypefn Sockets.Get_Receive_Queue_Size function Get_Receive_Queue_Size (@w{@var{Socket} : Socket_FD'Class})@*@w{return Integer;} +@end deftypefn +@fnindex Sockets.Get_Receive_Queue_Size + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@end multitable + +@item Return value +The non-negative size in bytes of the input queue + +@item Description +This function is only available on Linux platforms. On other operating +systems, it will return -2 to indicate that the necessary mechanisms to +retrieve the information are not available. + + + + +@item See also +@ref{Receive (procedure)}. + +@end table + +@node Get_Send_Queue_Size (function) +@unnumberedsubsec Get_Send_Queue_Size (function) +@cindex Sending data + +@table @sc +@item Purpose +Return the size of the unsent data in the output queue +@item Prototype +@deftypefn Sockets.Get_Send_Queue_Size function Get_Send_Queue_Size (@w{@var{Socket} : Socket_FD'Class})@*@w{return Integer;} +@end deftypefn +@fnindex Sockets.Get_Send_Queue_Size + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@end multitable + +@item Return value +The non-negative size in bytes of the output queue + +@item Description +This function is only available on Linux platforms. On other operating +systems, it will return -2 to indicate that the necessary mechanisms to +retrieve the information are not available. + + + + +@item See also +@ref{Send (procedure)}. + +@end table + +@node Getsockopt (procedure) +@unnumberedsubsec Getsockopt (procedure) +@cindex Manipulating socket options +@cindex Retrieving socket options + +@table @sc +@item Purpose +Retrieve a socket option +@item Prototype +@deftypefn Sockets.Getsockopt procedure Getsockopt (@w{@var{Socket} : Socket_FD}; @w{@var{Level} : Socket_Level := SOL_SOCKET}; @w{@var{Optname} : Socket_Option}; @w{@var{Optval} : out Integer}); +@end deftypefn +@fnindex Sockets.Getsockopt + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and bound socket object +@item @var{Level} @tab in @tab Protocol level +@item @var{Optname} @tab in @tab Option name +@item @var{Optval} @tab out @tab Option value +@end multitable + + +@item Description +@ctindex Sockets.SOL_SOCKET +@ctindex Sockets.IPPROTO_IP +@ctindex Sockets.SO_REUSEADDR +@ctindex Sockets.SO_REUSEPORT +@ctindex Sockets.IP_MULTICAST_TTL +@ctindex Sockets.IP_ADD_MEMBERSHIP +@ctindex Sockets.IP_DROP_MEMBERSHIP +@ctindex Sockets.IP_MULTICAST_LOOP +@ctindex Sockets.SO_SNDBUF +@ctindex Sockets.SO_RCVBUF +@ctindex SOL_SOCKET +@ctindex IPPROTO_IP +@ctindex SO_REUSEADDR +@ctindex SO_REUSEPORT +@ctindex IP_MULTICAST_TTL +@ctindex IP_ADD_MEMBERSHIP +@ctindex IP_DROP_MEMBERSHIP +@ctindex IP_MULTICAST_LOOP +@ctindex SO_SNDBUF +@ctindex SO_RCVBUF +This procedure retrieves options applicable to a socket. Please +see your operating system manual for usable levels and options. + +Two levels are defined: @code{SOL_SOCKET} (the default) and +@code{IPPROTO_IP}. The options are @code{SO_REUSEADDR}, +@code{SO_REUSEPORT}, @code{IP_MULTICAST_TTL}, +@code{IP_ADD_MEMBERSHIP}, @code{IP_DROP_MEMBERSHIP}, +@code{IP_MULTICAST_LOOP}, @code{SO_SNDBUF} and +@code{IP_RCVBUF}. + +Note that unlike their C language counterpart, @code{Getsockopt} +and @code{Setsockopt} do not require an extra parameter +representing the length in bytes of the option value. AdaSockets +nows the right size for every option. + + + + +@item See also +@ref{Setsockopt (procedure)}. + +@end table + +@node Listen (procedure) +@unnumberedsubsec Listen (procedure) +@cindex Establishing a listen queue +@cindex Listen queue + +@table @sc +@item Purpose +Establish a listen queue +@item Prototype +@deftypefn Sockets.Listen procedure Listen (@w{@var{Socket} : Socket_FD}; @w{@var{Queue_Size} : Positive := 5}); +@end deftypefn +@fnindex Sockets.Listen + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and bound socket object +@item @var{Queue_Size} @tab in @tab Requested slots in the listen queue +@end multitable + + +@item Description +This procedure establishes a listen queue after a TCP socket as been +initialized and bound. Each slot in the queue can hold one +incoming connection that has not been accepted yet. Note that +most operating systems ignore queue sizes larger than five. + + + + +@item See also +@ref{Accept_Socket (procedure)},@*@ref{Bind (procedure)},@*@ref{Socket (procedure)}. + +@end table + +@node New_Line (procedure) +@unnumberedsubsec New_Line (procedure) +@cindex Sending data + +@table @sc +@item Purpose +Send a CR/LF to a remote host +@item Prototype +@deftypefn Sockets.New_Line procedure New_Line (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Count} : Natural := 1}); +@end deftypefn +@fnindex Sockets.New_Line + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@item @var{Count} @tab in @tab Number of CR/LF sequences to send +@end multitable + + +@item Description +@ctindex CR +@ctindex LF +This procedure sends one or more CR/LF combinations to the peer. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has prematurely closed the connection@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Put (procedure)},@*@ref{Put_Line (procedure)}. + +@end table + +@node Put (procedure) +@unnumberedsubsec Put (procedure) +@cindex Sending data + +@table @sc +@item Purpose +Send a string to a remote host +@item Prototype +@deftypefn Sockets.Put procedure Put (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Str} : String}); +@end deftypefn +@fnindex Sockets.Put + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@item @var{Str} @tab in @tab String to send +@end multitable + + +@item Description +This procedure sends the content of @var{Str} over an outgoing +or incoming socket. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has prematurely closed the connection@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{New_Line (procedure)},@*@ref{Put_Line (procedure)},@*@ref{Send (procedure)}. + +@end table + +@node Put_Line (procedure) +@unnumberedsubsec Put_Line (procedure) +@cindex Sending data + +@table @sc +@item Purpose +Send a CR/LF terminated string to a remote host +@item Prototype +@deftypefn Sockets.Put_Line procedure Put_Line (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Str} : String}); +@end deftypefn +@fnindex Sockets.Put_Line + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@item @var{Str} @tab in @tab String to send +@end multitable + + +@item Description +This procedure sends the content of @var{Str} plus a CR/LF combination +over an outgoing or incoming socket. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has prematurely closed the connection@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{New_Line (procedure)},@*@ref{Put (procedure)},@*@ref{Send (procedure)}. + +@end table + +@node Receive (function) +@unnumberedsubsec Receive (function) +@cindex Receiving data + +@table @sc +@item Purpose +Receive raw data over a socket +@item Prototype +@deftypefn Sockets.Receive function Receive (@w{@var{Socket} : Socket_FD}; @w{@var{Max} : Ada.Streams.Stream_Element_Count := 4096})@*@w{return Ada.Streams.Stream_Element_Array;} +@end deftypefn +@fnindex Sockets.Receive + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and bound or connected socket object +@item @var{Max} @tab in @tab Maximum data length +@end multitable + +@item Return value +Received raw data + +@item Description +@tindex Ada.Streams.Stream_Element_Count +@tindex Ada.Streams.Stream_Element_Array +@tindex Stream_Element_Count +@tindex Stream_Element_Array +This procedure receives data from a bound UDP socket or a connected +TCP socket. Only one system call will be performed; this +function will return whatever data has arrived. Note that in +GNAT the secondary stack may be used to store the data and may +result in stack storage exhaustion. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has closed the connection before sending any data@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Receive (procedure)},@*@ref{Receive_Some (procedure)},@*@ref{Get_Line (function)},@*@ref{Get_Line (procedure)}. + +@end table + +@node Receive (procedure) +@unnumberedsubsec Receive (procedure) +@cindex Receiving data + +@table @sc +@item Purpose +Receive raw data over a socket +@item Prototype +@deftypefn Sockets.Receive procedure Receive (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Data} : out Ada.Streams.Stream_Element_Array}); +@end deftypefn +@fnindex Sockets.Receive + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and bound or connected socket object +@item @var{Data} @tab out @tab Incoming data buffer +@end multitable + + +@item Description +@tindex Ada.Streams.Stream_Element_Array +@tindex Stream_Element_Array +This procedure receives data from a bound UDP socket or a connected +TCP socket. It will block until the @var{Data} reception buffer +has been totally filled. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has closed the connection before @code{Data'Length} bytes@* +were received@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Get_Line (function)},@*@ref{Get_Line (procedure)},@*@ref{Receive (function)},@*@ref{Receive_Some (procedure)}. + +@end table + +@node Receive_Some (procedure) +@unnumberedsubsec Receive_Some (procedure) +@cindex Receiving data + +@table @sc +@item Purpose +Receive raw data over a socket +@item Prototype +@deftypefn Sockets.Receive_Some procedure Receive_Some (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Data} : out Ada.Streams.Stream_Element_Array}; @w{@var{Last} : out Ada.Streams.Stream_Element_Offset}); +@end deftypefn +@fnindex Sockets.Receive_Some + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and bound or connected socket object +@item @var{Data} @tab out @tab Incoming data buffer +@item @var{Last} @tab out @tab Index of last element placed into @var{Data} +@end multitable + + +@item Description +@tindex Ada.Streams.Stream_Element_Array +@tindex Stream_Element_Array +@tindex Ada.Streams.Stream_Element_Count +@tindex Stream_Element_Count +This procedure receives data from a bound UDP socket or a connected +TCP socket. As soon as at least one byte has been read, it returns +with @var{Last} set to the index of the latest written element +of @var{Data}. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has closed the connection before sending any data@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Get_Line (function)},@*@ref{Get_Line (procedure)},@*@ref{Receive (function)},@*@ref{Receive (procedure)}. + +@end table + +@node Send (procedure) +@unnumberedsubsec Send (procedure) +@cindex Sending data + +@table @sc +@item Purpose +Send raw data over a socket +@item Prototype +@deftypefn Sockets.Send procedure Send (@w{@var{Socket} : Socket_FD}; @w{@var{Data} : out Ada.Streams.Stream_Element_Array}); +@end deftypefn +@fnindex Sockets.Send + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@item @var{Data} @tab out @tab Data to be sent +@end multitable + + +@item Description +@tindex Ada.Streams.Stream_Element_Array +@tindex Stream_Element_Array +This procedure sends data over a connected outgoing socket or +over an incoming socket. + + +@item Exceptions +@multitable {XXXXXXXXXXXXXXXX} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @code{Connection_Closed} @tab Peer has prematurely closed the connection@exindex Connection_Closed +@end multitable + + + + + +@item See also +@ref{Put (procedure)},@*@ref{Put_Line (procedure)}. + +@end table + +@node Set_Buffer (procedure) +@unnumberedsubsec Set_Buffer (procedure) +@cindex Receiving data + +@table @sc +@item Purpose +Install a line-oriented buffer of the socket object +@item Prototype +@deftypefn Sockets.Set_Buffer procedure Set_Buffer (@w{@var{Socket} : Socket_FD'Class}; @w{@var{Length} : Positive := 1500}); +@end deftypefn +@fnindex Sockets.Set_Buffer + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@item @var{Length} @tab in @tab Size in bytes of the newly installed buffer +@end multitable + + +@item Description +This procedure puts the socket object in buffered mode. If the +socket was already buffered, the content of the previous buffer +will be lost. The buffered mode only affects character- and +line-oriented read operation such as @ref{Get (function)}, +@ref{Get_Char (function)}, and @ref{Get_Line (function)}. Other +reception subprograms will not function properly if buffered mode +is used at the same time. + +The size of the buffer has to be greater than the biggest +possible packet sent by the remote host, otherwise data loss may +occur. + + + + +@item See also +@ref{Unset_Buffer (procedure)}. + +@end table + +@node Setsockopt (procedure) +@unnumberedsubsec Setsockopt (procedure) +@cindex Manipulating socket options +@cindex Setting socket options + +@table @sc +@item Purpose +Set a socket option +@item Prototype +@deftypefn Sockets.Setsockopt procedure Setsockopt (@w{@var{Socket} : Socket_FD}; @w{@var{Level} : Socket_Level := SOL_SOCKET}; @w{@var{Optname} : Socket_Option}; @w{@var{Optval} : Integer}); +@end deftypefn +@fnindex Sockets.Setsockopt + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and bound socket object +@item @var{Level} @tab in @tab Protocol level +@item @var{Optname} @tab in @tab Option name +@item @var{Optval} @tab in @tab Option value +@end multitable + + +@item Description +@ctindex Sockets.SOL_SOCKET +@ctindex Sockets.IPPROTO_IP +@ctindex Sockets.SO_REUSEADDR +@ctindex Sockets.SO_REUSEPORT +@ctindex Sockets.IP_MULTICAST_TTL +@ctindex Sockets.IP_ADD_MEMBERSHIP +@ctindex Sockets.IP_DROP_MEMBERSHIP +@ctindex Sockets.IP_MULTICAST_LOOP +@ctindex Sockets.SO_SNDBUF +@ctindex Sockets.SO_RCVBUF +@ctindex SOL_SOCKET +@ctindex IPPROTO_IP +@ctindex SO_REUSEADDR +@ctindex SO_REUSEPORT +@ctindex IP_MULTICAST_TTL +@ctindex IP_ADD_MEMBERSHIP +@ctindex IP_DROP_MEMBERSHIP +@ctindex IP_MULTICAST_LOOP +@ctindex SO_SNDBUF +@ctindex SO_RCVBUF +This procedure sets options applicable to a socket. Please +see your operating system manual for usable levels and options. + +Two levels are defined: @code{SOL_SOCKET} (the default) and +@code{IPPROTO_IP}. The options are @code{SO_REUSEADDR}, +@code{SO_REUSEPORT}, @code{IP_MULTICAST_TTL}, +@code{IP_ADD_MEMBERSHIP}, @code{IP_DROP_MEMBERSHIP}, +@code{IP_MULTICAST_LOOP}, @code{SO_SNDBUF} and +@code{IP_RCVBUF}. + +Note that unlike their C language counterpart, @code{Getsockopt} +and @code{Setsockopt} do not require an extra parameter +representing the length in bytes of the option value. AdaSockets +nows the right size for every option. + + + + +@item See also +@ref{Getsockopt (procedure)}. + +@end table + +@node Shutdown (procedure) +@unnumberedsubsec Shutdown (procedure) +@cindex Closing a socket +@cindex Socket shutdown + +@table @sc +@item Purpose +Shutdown a socket +@item Prototype +@deftypefn Sockets.Shutdown procedure Shutdown (@w{@var{Socket} : in out Socket_FD}; @w{@var{How} : Shutdown_Type := Both}); +@end deftypefn +@fnindex Sockets.Shutdown + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in out @tab Socket object to shutdown +@item @var{How} @tab in @tab Direction to shutdown +@end multitable + + +@item Description +@ctindex Send +@ctindex Receive +@ctindex Both +This procedure shutdowns either direction of the socket. @var{How} +can take the value @samp{Send}, @samp{Receive} or @samp{Both}. + + + + +@item See also +@ref{Socket (procedure)}. + +@end table + +@node Socket (procedure) +@unnumberedsubsec Socket (procedure) +@cindex Creating a socket + +@table @sc +@item Purpose +Create a socket of the given mode +@item Prototype +@deftypefn Sockets.Socket procedure Socket (@w{@var{Socket} : out Socket_FD}; @w{@var{Domain} : Socket_Domain := PF_INET}; @w{@var{Typ} : Socket_Type := SOCK_STREAM}); +@end deftypefn +@fnindex Sockets.Socket + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab out @tab Socket object to initialize +@item @var{Domain} @tab in @tab Protocol family +@item @var{Typ} @tab in @tab Kind of sockets +@end multitable + + +@item Description +@ctindex PF_INET +@ctindex AF_INET +@ctindex SOCK_STREAM +@ctindex SOCK_DGRAM +This procedure initializes a new socket object by reserving a file +descriptor to the operating system. For backward compatibility with +older versions of this library, @code{AF_INET} is still accepted as +a value but should be replaced as soon as possible with the proper +@code{PF_INET}. Using @code{SOCK_STREAM} for the @var{Typ} +argument will create a TCP socket while a @code{SOCK_DGRAM} will +create a UDP one. + + + +@item Example +@example +declare + Sock : Socket_FD; +begin + -- Create a TCP socket + Socket (Sock, PF_INET, SOCK_STREAM); + -- Perform some operations on socket + [...] + -- Shutdown the socket in both directions + Shutdown (Sock, Both); +end; +@end example + + +@item See also +@ref{Shutdown (procedure)}. + +@end table + +@node Unset_Buffer (procedure) +@unnumberedsubsec Unset_Buffer (procedure) +@cindex Receiving data + +@table @sc +@item Purpose +Deinstall the line-oriented buffer of the socket object +@item Prototype +@deftypefn Sockets.Unset_Buffer procedure Unset_Buffer (@w{@var{Socket} : Socket_FD'Class}); +@end deftypefn +@fnindex Sockets.Unset_Buffer + +@item Parameters +@multitable {XXXXXXXX} {in out X} {XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} +@item @var{Socket} @tab in @tab Initialized and connected socket object +@end multitable + + +@item Description +This procedure deinstalls the buffer previously installed by +@ref{Set_Buffer (procedure)}. If any data is still present in +the buffer, it will be lost. To avoid this situation, the buffer +can be flushed by calling @ref{Get (function)}. + + + + +@end table + + --- adasockets-1.9.orig/debian/rules +++ adasockets-1.9/debian/rules @@ -0,0 +1,122 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS +ALIVERSION=6 +SOVERSION=6 +DEV_PKG=libadasockets$(ALIVERSION)-dev +LIB_PKG=libadasockets$(SOVERSION) + +configure: configure-stamp +configure-stamp: + dh_testdir + dh_autoreconf + ./configure --prefix=/usr + touch configure-stamp + +build-arch: build + +build-indep: build + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + # PB: We need to keep the sockets*.texi files. But they keep + # being deleted by the automake's clean. + cp doc/sockets*.texi `pwd`/debian/protect + chmod 644 `pwd`/debian/protect/* + dh_autoreconf_clean + rm -f build-stamp configure-stamp + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean + cp `pwd`/debian/protect/* doc + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + dh_installdirs -p$(DEV_PKG) usr/share/ada/adainclude/adasockets usr/lib/ada/adalib/adasockets + $(MAKE) DESTDIR=`pwd`/debian/libadasockets$(ALIVERSION)-dev install + dh_installdocs -plibadasockets$(ALIVERSION) README + rm -rf debian/libadasockets$(ALIVERSION)-dev/usr/man + dh_installman -plibadasockets$(ALIVERSION)-dev man/adasockets-config.1 + dh_installexamples -plibadasockets$(ALIVERSION)-dev examples/*.adb debian/Makefile debian/examples.gpr + dh_installchangelogs -plibadasockets$(ALIVERSION) NEWS + dh_movefiles --sourcedir=debian/libadasockets$(ALIVERSION)-dev -p$(LIB_PKG) usr/lib/libadasockets.so.* + mv debian/libadasockets$(ALIVERSION)-dev/usr/share/doc/libadasockets$(ALIVERSION)-dev \ + debian/libadasockets$(ALIVERSION)-dev/usr/share/doc/libadasockets$(ALIVERSION) + # Debian Ada policy directories. + mv `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/lib/adasockets/*.ads `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/ada/adainclude/adasockets + mv `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/lib/adasockets/*.adb `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/ada/adainclude/adasockets + mv `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/lib/adasockets/*.ali `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/lib/ada/adalib/adasockets + rmdir `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/lib/adasockets + # All documentation out of the adasockets directory. + mv `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/doc/adasockets/* `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/doc/libadasockets$(ALIVERSION) + rmdir `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/doc/adasockets + # Debian specific gpr file. + cp -f debian/adasockets.gpr `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/ada/adainclude + dh_lintian + +# This single target is used to build all the packages, all at once, or +# one at a time. So keep in mind: any options passed to commands here will +# affect _all_ packages. Anything you want to only affect one package +# should be put in another target, such as the install target. +binary-common: + dh_testdir + dh_testroot +# dh_installdebconf +# dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installman +# dh_installcron + rm `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/info/adasockets.info + dh_installinfo `pwd`/doc/adasockets.info + # Remove the spurious dir.gz file. + -rm `pwd`/debian/libadasockets$(ALIVERSION)-dev/usr/share/info/dir +# dh_undocumented +# dh_installchangelogs + dh_strip + dh_link + dh_link -p$(DEV_PKG) usr/share/doc/$(LIB_PKG) usr/share/doc/$(DEV_PKG) + dh_compress -X.adb -X.ads + dh_fixperms + dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture independant packages using the common target. +binary-indep: build install +# (Uncomment this next line if you have such packages.) +# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build install + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +# Any other binary targets build just one binary package at a time. +binary-%: build install + make -f debian/rules binary-common DH_OPTIONS=-p$* + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- adasockets-1.9.orig/debian/source/format +++ adasockets-1.9/debian/source/format @@ -0,0 +1 @@ +1.0 --- adasockets-1.9.orig/doc/Makefile.in +++ adasockets-1.9/doc/Makefile.in @@ -339,9 +339,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile + $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ --- adasockets-1.9.orig/doc/adasockets.aux +++ adasockets-1.9/doc/adasockets.aux @@ -0,0 +1,156 @@ +@xrdef{What is AdaSockets?-title}{What is AdaSockets?} +@xrdef{What is AdaSockets?-snt}{Chapter@tie 1} +@xrdef{What is AdaSockets?-pg}{1} +@xrdef{Installing AdaSockets-title}{Installing AdaSockets} +@xrdef{Installing AdaSockets-snt}{Chapter@tie 2} +@xrdef{Installing AdaSockets-pg}{3} +@xrdef{Using AdaSockets-title}{Using AdaSockets} +@xrdef{Using AdaSockets-snt}{Chapter@tie 3} +@xrdef{Compiling an Ada application-title}{Compiling an Ada application} +@xrdef{Compiling an Ada application-snt}{Section@tie 3.1} +@xrdef{Setting up unicast sockets-title}{Setting up unicast sockets} +@xrdef{Setting up unicast sockets-snt}{Section@tie 3.2} +@xrdef{Setting up multicast sockets-title}{Setting up multicast sockets} +@xrdef{Setting up multicast sockets-snt}{Section@tie 3.3} +@xrdef{Sending and receiving data-title}{Sending and receiving data} +@xrdef{Sending and receiving data-snt}{Section@tie 3.4} +@xrdef{Using AdaSockets-pg}{5} +@xrdef{Compiling an Ada application-pg}{5} +@xrdef{Setting up unicast sockets-pg}{5} +@xrdef{Setting up multicast sockets-pg}{5} +@xrdef{Raw data manipulation-title}{Raw data manipulation} +@xrdef{Raw data manipulation-snt}{Section@tie 3.4.1} +@xrdef{String-oriented exchanges-title}{String-oriented exchanges} +@xrdef{String-oriented exchanges-snt}{Section@tie 3.4.2} +@xrdef{Sending and receiving data-pg}{6} +@xrdef{Raw data manipulation-pg}{6} +@xrdef{String-oriented exchanges-pg}{6} +@xrdef{Sockets package-title}{Sockets package} +@xrdef{Sockets package-snt}{Chapter@tie 4} +@xrdef{Accept_Socket (procedure)-title}{Accept_Socket (procedure)} +@xrdef{Accept_Socket (procedure)-snt}{} +@xrdef{Sockets package-pg}{7} +@xrdef{Accept_Socket (procedure)-pg}{7} +@xrdef{Bind (procedure)-title}{Bind (procedure)} +@xrdef{Bind (procedure)-snt}{} +@xrdef{Connect (procedure)-title}{Connect (procedure)} +@xrdef{Connect (procedure)-snt}{} +@xrdef{Bind (procedure)-pg}{8} +@xrdef{Connect (procedure)-pg}{8} +@xrdef{Get (function)-title}{Get (function)} +@xrdef{Get (function)-snt}{} +@xrdef{Get_Char (function)-title}{Get_Char (function)} +@xrdef{Get_Char (function)-snt}{} +@xrdef{Get (function)-pg}{9} +@xrdef{Get_Char (function)-pg}{9} +@xrdef{Get_Line (function)-title}{Get_Line (function)} +@xrdef{Get_Line (function)-snt}{} +@xrdef{Get_Line (procedure)-title}{Get_Line (procedure)} +@xrdef{Get_Line (procedure)-snt}{} +@xrdef{Get_Line (function)-pg}{10} +@xrdef{Get_Line (procedure)-pg}{10} +@xrdef{Get_Receive_Queue_Size (function)-title}{Get_Receive_Queue_Size (function)} +@xrdef{Get_Receive_Queue_Size (function)-snt}{} +@xrdef{Get_Send_Queue_Size (function)-title}{Get_Send_Queue_Size (function)} +@xrdef{Get_Send_Queue_Size (function)-snt}{} +@xrdef{Get_Receive_Queue_Size (function)-pg}{11} +@xrdef{Get_Send_Queue_Size (function)-pg}{11} +@xrdef{Getsockopt (procedure)-title}{Getsockopt (procedure)} +@xrdef{Getsockopt (procedure)-snt}{} +@xrdef{Listen (procedure)-title}{Listen (procedure)} +@xrdef{Listen (procedure)-snt}{} +@xrdef{Getsockopt (procedure)-pg}{12} +@xrdef{Listen (procedure)-pg}{12} +@xrdef{New_Line (procedure)-title}{New_Line (procedure)} +@xrdef{New_Line (procedure)-snt}{} +@xrdef{Put (procedure)-title}{Put (procedure)} +@xrdef{Put (procedure)-snt}{} +@xrdef{Put_Line (procedure)-title}{Put_Line (procedure)} +@xrdef{Put_Line (procedure)-snt}{} +@xrdef{New_Line (procedure)-pg}{13} +@xrdef{Put (procedure)-pg}{13} +@xrdef{Receive (function)-title}{Receive (function)} +@xrdef{Receive (function)-snt}{} +@xrdef{Receive (procedure)-title}{Receive (procedure)} +@xrdef{Receive (procedure)-snt}{} +@xrdef{Put_Line (procedure)-pg}{14} +@xrdef{Receive (function)-pg}{14} +@xrdef{Receive_Some (procedure)-title}{Receive_Some (procedure)} +@xrdef{Receive_Some (procedure)-snt}{} +@xrdef{Send (procedure)-title}{Send (procedure)} +@xrdef{Send (procedure)-snt}{} +@xrdef{Receive (procedure)-pg}{15} +@xrdef{Receive_Some (procedure)-pg}{15} +@xrdef{Set_Buffer (procedure)-title}{Set_Buffer (procedure)} +@xrdef{Set_Buffer (procedure)-snt}{} +@xrdef{Setsockopt (procedure)-title}{Setsockopt (procedure)} +@xrdef{Setsockopt (procedure)-snt}{} +@xrdef{Send (procedure)-pg}{16} +@xrdef{Set_Buffer (procedure)-pg}{16} +@xrdef{Setsockopt (procedure)-pg}{16} +@xrdef{Shutdown (procedure)-title}{Shutdown (procedure)} +@xrdef{Shutdown (procedure)-snt}{} +@xrdef{Socket (procedure)-title}{Socket (procedure)} +@xrdef{Socket (procedure)-snt}{} +@xrdef{Shutdown (procedure)-pg}{17} +@xrdef{Socket (procedure)-pg}{17} +@xrdef{Unset_Buffer (procedure)-title}{Unset_Buffer (procedure)} +@xrdef{Unset_Buffer (procedure)-snt}{} +@xrdef{Unset_Buffer (procedure)-pg}{18} +@xrdef{Sockets.Multicast package-title}{Sockets.Multicast package} +@xrdef{Sockets.Multicast package-snt}{Chapter@tie 5} +@xrdef{Create_Multicast_Socket (function)-title}{Create_Multicast_Socket (function)} +@xrdef{Create_Multicast_Socket (function)-snt}{} +@xrdef{Sockets.Multicast package-pg}{19} +@xrdef{Create_Multicast_Socket (function)-pg}{19} +@xrdef{Create_Multicast_Socket (function)-title}{Create_Multicast_Socket (function)} +@xrdef{Create_Multicast_Socket (function)-snt}{} +@xrdef{Create_Multicast_Socket (function)-pg}{20} +@xrdef{Sockets.Naming package-title}{Sockets.Naming package} +@xrdef{Sockets.Naming package-snt}{Chapter@tie 6} +@xrdef{Address_Of (function)-title}{Address_Of (function)} +@xrdef{Address_Of (function)-snt}{} +@xrdef{Any_Address (function)-title}{Any_Address (function)} +@xrdef{Any_Address (function)-snt}{} +@xrdef{Sockets.Naming package-pg}{21} +@xrdef{Address_Of (function)-pg}{21} +@xrdef{Get_Peer_Addr (function)-title}{Get_Peer_Addr (function)} +@xrdef{Get_Peer_Addr (function)-snt}{} +@xrdef{Get_Peer_Port (function)-title}{Get_Peer_Port (function)} +@xrdef{Get_Peer_Port (function)-snt}{} +@xrdef{Get_Sock_Addr (function)-title}{Get_Sock_Addr (function)} +@xrdef{Get_Sock_Addr (function)-snt}{} +@xrdef{Any_Address (function)-pg}{22} +@xrdef{Get_Peer_Addr (function)-pg}{22} +@xrdef{Get_Peer_Port (function)-pg}{22} +@xrdef{Get_Sock_Addr (function)-pg}{22} +@xrdef{Get_Sock_Port (function)-title}{Get_Sock_Port (function)} +@xrdef{Get_Sock_Port (function)-snt}{} +@xrdef{Host_Name (function)-title}{Host_Name (function)} +@xrdef{Host_Name (function)-snt}{} +@xrdef{Image (function)-title}{Image (function)} +@xrdef{Image (function)-snt}{} +@xrdef{Info_Of_Name_Or_IP (function)-title}{Info_Of_Name_Or_IP (function)} +@xrdef{Info_Of_Name_Or_IP (function)-snt}{} +@xrdef{Get_Sock_Port (function)-pg}{23} +@xrdef{Host_Name (function)-pg}{23} +@xrdef{Image (function)-pg}{23} +@xrdef{Is_IP_Address (function)-title}{Is_IP_Address (function)} +@xrdef{Is_IP_Address (function)-snt}{} +@xrdef{Name_Of (function)-title}{Name_Of (function)} +@xrdef{Name_Of (function)-snt}{} +@xrdef{Value (function)-title}{Value (function)} +@xrdef{Value (function)-snt}{} +@xrdef{Info_Of_Name_Or_IP (function)-pg}{24} +@xrdef{Is_IP_Address (function)-pg}{24} +@xrdef{Name_Of (function)-pg}{24} +@xrdef{Value (function)-pg}{25} +@xrdef{Contributors-title}{Contributors} +@xrdef{Contributors-snt}{Appendix@tie @char65{}} +@xrdef{Contributors-pg}{27} +@xrdef{Resources on the Internet-title}{Resources on the Internet} +@xrdef{Resources on the Internet-snt}{Appendix@tie @char66{}} +@xrdef{Resources on the Internet-pg}{29} +@xrdef{Index-title}{Index} +@xrdef{Index-snt}{} +@xrdef{Index-pg}{31} --- adasockets-1.9.orig/doc/adasockets.cp +++ adasockets-1.9/doc/adasockets.cp @@ -0,0 +1,231 @@ +\entry{AdaSockets presentation}{1}{AdaSockets presentation} +\entry{Comparaison with GNAT.Sockets}{1}{Comparaison with \code {GNAT.Sockets}} +\entry{Installing AdaSockets}{3}{Installing AdaSockets} +\entry{Unicast sockets}{5}{Unicast sockets} +\entry{Creating a unicast socket}{5}{Creating a unicast socket} +\entry{Creating a TCP socket}{5}{Creating a TCP socket} +\entry{Creating a UDP socket}{5}{Creating a UDP socket} +\entry{TCP socket}{5}{TCP socket} +\entry{UDP socket}{5}{UDP socket} +\entry{Creating a socket}{5}{Creating a socket} +\entry{Socket_FD}{5}{\code {Socket_FD}} +\entry{Sockets.Socket}{5}{\code {Sockets.Socket}} +\entry{Socket}{5}{\code {Socket}} +\entry{Multicast sockets}{5}{Multicast sockets} +\entry{Creating a multicast socket}{5}{Creating a multicast socket} +\entry{Mbone}{5}{Mbone} +\entry{Group communication}{5}{Group communication} +\entry{Create_Multicast_Socket}{5}{\code {Create_Multicast_Socket}} +\entry{Sockets.Multicast.Create_Multicast_Socket}{5}{\code {Sockets.Multicast.Create_Multicast_Socket}} +\entry{Multicast_Socket_FD}{5}{\code {Multicast_Socket_FD}} +\entry{Sending data}{6}{Sending data} +\entry{Receiving data}{6}{Receiving data} +\entry{Raw data manipulation}{6}{Raw data manipulation} +\entry{Ada.Streams.Stream_Element_Array}{6}{\code {Ada.Streams.Stream_Element_Array}} +\entry{Stream_Element_Array}{6}{\code {Stream_Element_Array}} +\entry{Socket_FD}{7}{\code {Socket_FD}} +\entry{Accepting a new connection}{7}{Accepting a new connection} +\entry{Handling a new connection}{7}{Handling a new connection} +\entry{Accept_Socket}{7}{\code {Accept_Socket}} +\entry{Sockets.Accept_Socket}{7}{\code {Sockets.Accept_Socket}} +\entry{Binding a socket}{8}{Binding a socket} +\entry{Assigning a local port}{8}{Assigning a local port} +\entry{Creating a server}{8}{Creating a server} +\entry{Bind}{8}{\code {Bind}} +\entry{Sockets.Bind}{8}{\code {Sockets.Bind}} +\entry{Socket_Error}{8}{\code {Socket_Error}} +\entry{Connecting a socket}{8}{Connecting a socket} +\entry{Connect}{8}{\code {Connect}} +\entry{Sockets.Connect}{8}{\code {Sockets.Connect}} +\entry{Connection_Refused}{8}{\code {Connection_Refused}} +\entry{Socket_Error}{8}{\code {Socket_Error}} +\entry{Receiving data}{9}{Receiving data} +\entry{Get}{9}{\code {Get}} +\entry{Sockets.Get}{9}{\code {Sockets.Get}} +\entry{Connection_Closed}{9}{\code {Connection_Closed}} +\entry{Receiving data}{9}{Receiving data} +\entry{Get_Char}{9}{\code {Get_Char}} +\entry{Sockets.Get_Char}{9}{\code {Sockets.Get_Char}} +\entry{Connection_Closed}{10}{\code {Connection_Closed}} +\entry{Receiving data}{10}{Receiving data} +\entry{Get_Line}{10}{\code {Get_Line}} +\entry{Sockets.Get_Line}{10}{\code {Sockets.Get_Line}} +\entry{CR}{10}{\code {CR}} +\entry{LF}{10}{\code {LF}} +\entry{Connection_Closed}{10}{\code {Connection_Closed}} +\entry{Receiving data}{10}{Receiving data} +\entry{Get_Line}{11}{\code {Get_Line}} +\entry{Sockets.Get_Line}{11}{\code {Sockets.Get_Line}} +\entry{CR}{11}{\code {CR}} +\entry{LF}{11}{\code {LF}} +\entry{Connection_Closed}{11}{\code {Connection_Closed}} +\entry{Receiving data}{11}{Receiving data} +\entry{Get_Receive_Queue_Size}{11}{\code {Get_Receive_Queue_Size}} +\entry{Sockets.Get_Receive_Queue_Size}{11}{\code {Sockets.Get_Receive_Queue_Size}} +\entry{Sending data}{11}{Sending data} +\entry{Get_Send_Queue_Size}{12}{\code {Get_Send_Queue_Size}} +\entry{Sockets.Get_Send_Queue_Size}{12}{\code {Sockets.Get_Send_Queue_Size}} +\entry{Manipulating socket options}{12}{Manipulating socket options} +\entry{Retrieving socket options}{12}{Retrieving socket options} +\entry{Getsockopt}{12}{\code {Getsockopt}} +\entry{Sockets.Getsockopt}{12}{\code {Sockets.Getsockopt}} +\entry{Sockets.SOL_SOCKET}{12}{\code {Sockets.SOL_SOCKET}} +\entry{Sockets.IPPROTO_IP}{12}{\code {Sockets.IPPROTO_IP}} +\entry{Sockets.SO_REUSEADDR}{12}{\code {Sockets.SO_REUSEADDR}} +\entry{Sockets.SO_REUSEPORT}{12}{\code {Sockets.SO_REUSEPORT}} +\entry{Sockets.IP_MULTICAST_TTL}{12}{\code {Sockets.IP_MULTICAST_TTL}} +\entry{Sockets.IP_ADD_MEMBERSHIP}{12}{\code {Sockets.IP_ADD_MEMBERSHIP}} +\entry{Sockets.IP_DROP_MEMBERSHIP}{12}{\code {Sockets.IP_DROP_MEMBERSHIP}} +\entry{Sockets.IP_MULTICAST_LOOP}{12}{\code {Sockets.IP_MULTICAST_LOOP}} +\entry{Sockets.SO_SNDBUF}{12}{\code {Sockets.SO_SNDBUF}} +\entry{Sockets.SO_RCVBUF}{12}{\code {Sockets.SO_RCVBUF}} +\entry{SOL_SOCKET}{12}{\code {SOL_SOCKET}} +\entry{IPPROTO_IP}{12}{\code {IPPROTO_IP}} +\entry{SO_REUSEADDR}{12}{\code {SO_REUSEADDR}} +\entry{SO_REUSEPORT}{12}{\code {SO_REUSEPORT}} +\entry{IP_MULTICAST_TTL}{12}{\code {IP_MULTICAST_TTL}} +\entry{IP_ADD_MEMBERSHIP}{12}{\code {IP_ADD_MEMBERSHIP}} +\entry{IP_DROP_MEMBERSHIP}{12}{\code {IP_DROP_MEMBERSHIP}} +\entry{IP_MULTICAST_LOOP}{12}{\code {IP_MULTICAST_LOOP}} +\entry{SO_SNDBUF}{12}{\code {SO_SNDBUF}} +\entry{SO_RCVBUF}{12}{\code {SO_RCVBUF}} +\entry{Establishing a listen queue}{12}{Establishing a listen queue} +\entry{Listen queue}{12}{Listen queue} +\entry{Listen}{12}{\code {Listen}} +\entry{Sockets.Listen}{12}{\code {Sockets.Listen}} +\entry{Sending data}{13}{Sending data} +\entry{New_Line}{13}{\code {New_Line}} +\entry{Sockets.New_Line}{13}{\code {Sockets.New_Line}} +\entry{CR}{13}{\code {CR}} +\entry{LF}{13}{\code {LF}} +\entry{Connection_Closed}{13}{\code {Connection_Closed}} +\entry{Sending data}{13}{Sending data} +\entry{Put}{13}{\code {Put}} +\entry{Sockets.Put}{13}{\code {Sockets.Put}} +\entry{Connection_Closed}{13}{\code {Connection_Closed}} +\entry{Sending data}{14}{Sending data} +\entry{Put_Line}{14}{\code {Put_Line}} +\entry{Sockets.Put_Line}{14}{\code {Sockets.Put_Line}} +\entry{Connection_Closed}{14}{\code {Connection_Closed}} +\entry{Receiving data}{14}{Receiving data} +\entry{Receive}{14}{\code {Receive}} +\entry{Sockets.Receive}{14}{\code {Sockets.Receive}} +\entry{Ada.Streams.Stream_Element_Count}{14}{\code {Ada.Streams.Stream_Element_Count}} +\entry{Ada.Streams.Stream_Element_Array}{14}{\code {Ada.Streams.Stream_Element_Array}} +\entry{Stream_Element_Count}{14}{\code {Stream_Element_Count}} +\entry{Stream_Element_Array}{14}{\code {Stream_Element_Array}} +\entry{Connection_Closed}{14}{\code {Connection_Closed}} +\entry{Receiving data}{15}{Receiving data} +\entry{Receive}{15}{\code {Receive}} +\entry{Sockets.Receive}{15}{\code {Sockets.Receive}} +\entry{Ada.Streams.Stream_Element_Array}{15}{\code {Ada.Streams.Stream_Element_Array}} +\entry{Stream_Element_Array}{15}{\code {Stream_Element_Array}} +\entry{Connection_Closed}{15}{\code {Connection_Closed}} +\entry{Receiving data}{15}{Receiving data} +\entry{Receive_Some}{15}{\code {Receive_Some}} +\entry{Sockets.Receive_Some}{15}{\code {Sockets.Receive_Some}} +\entry{Ada.Streams.Stream_Element_Array}{15}{\code {Ada.Streams.Stream_Element_Array}} +\entry{Stream_Element_Array}{15}{\code {Stream_Element_Array}} +\entry{Ada.Streams.Stream_Element_Count}{15}{\code {Ada.Streams.Stream_Element_Count}} +\entry{Stream_Element_Count}{15}{\code {Stream_Element_Count}} +\entry{Connection_Closed}{15}{\code {Connection_Closed}} +\entry{Sending data}{16}{Sending data} +\entry{Send}{16}{\code {Send}} +\entry{Sockets.Send}{16}{\code {Sockets.Send}} +\entry{Ada.Streams.Stream_Element_Array}{16}{\code {Ada.Streams.Stream_Element_Array}} +\entry{Stream_Element_Array}{16}{\code {Stream_Element_Array}} +\entry{Connection_Closed}{16}{\code {Connection_Closed}} +\entry{Receiving data}{16}{Receiving data} +\entry{Set_Buffer}{16}{\code {Set_Buffer}} +\entry{Sockets.Set_Buffer}{16}{\code {Sockets.Set_Buffer}} +\entry{Manipulating socket options}{16}{Manipulating socket options} +\entry{Setting socket options}{16}{Setting socket options} +\entry{Setsockopt}{17}{\code {Setsockopt}} +\entry{Sockets.Setsockopt}{17}{\code {Sockets.Setsockopt}} +\entry{Sockets.SOL_SOCKET}{17}{\code {Sockets.SOL_SOCKET}} +\entry{Sockets.IPPROTO_IP}{17}{\code {Sockets.IPPROTO_IP}} +\entry{Sockets.SO_REUSEADDR}{17}{\code {Sockets.SO_REUSEADDR}} +\entry{Sockets.SO_REUSEPORT}{17}{\code {Sockets.SO_REUSEPORT}} +\entry{Sockets.IP_MULTICAST_TTL}{17}{\code {Sockets.IP_MULTICAST_TTL}} +\entry{Sockets.IP_ADD_MEMBERSHIP}{17}{\code {Sockets.IP_ADD_MEMBERSHIP}} +\entry{Sockets.IP_DROP_MEMBERSHIP}{17}{\code {Sockets.IP_DROP_MEMBERSHIP}} +\entry{Sockets.IP_MULTICAST_LOOP}{17}{\code {Sockets.IP_MULTICAST_LOOP}} +\entry{Sockets.SO_SNDBUF}{17}{\code {Sockets.SO_SNDBUF}} +\entry{Sockets.SO_RCVBUF}{17}{\code {Sockets.SO_RCVBUF}} +\entry{SOL_SOCKET}{17}{\code {SOL_SOCKET}} +\entry{IPPROTO_IP}{17}{\code {IPPROTO_IP}} +\entry{SO_REUSEADDR}{17}{\code {SO_REUSEADDR}} +\entry{SO_REUSEPORT}{17}{\code {SO_REUSEPORT}} +\entry{IP_MULTICAST_TTL}{17}{\code {IP_MULTICAST_TTL}} +\entry{IP_ADD_MEMBERSHIP}{17}{\code {IP_ADD_MEMBERSHIP}} +\entry{IP_DROP_MEMBERSHIP}{17}{\code {IP_DROP_MEMBERSHIP}} +\entry{IP_MULTICAST_LOOP}{17}{\code {IP_MULTICAST_LOOP}} +\entry{SO_SNDBUF}{17}{\code {SO_SNDBUF}} +\entry{SO_RCVBUF}{17}{\code {SO_RCVBUF}} +\entry{Closing a socket}{17}{Closing a socket} +\entry{Socket shutdown}{17}{Socket shutdown} +\entry{Shutdown}{17}{\code {Shutdown}} +\entry{Sockets.Shutdown}{17}{\code {Sockets.Shutdown}} +\entry{Send}{17}{\code {Send}} +\entry{Receive}{17}{\code {Receive}} +\entry{Both}{17}{\code {Both}} +\entry{Creating a socket}{17}{Creating a socket} +\entry{Socket}{17}{\code {Socket}} +\entry{Sockets.Socket}{17}{\code {Sockets.Socket}} +\entry{PF_INET}{18}{\code {PF_INET}} +\entry{AF_INET}{18}{\code {AF_INET}} +\entry{SOCK_STREAM}{18}{\code {SOCK_STREAM}} +\entry{SOCK_DGRAM}{18}{\code {SOCK_DGRAM}} +\entry{Receiving data}{18}{Receiving data} +\entry{Unset_Buffer}{18}{\code {Unset_Buffer}} +\entry{Sockets.Unset_Buffer}{18}{\code {Sockets.Unset_Buffer}} +\entry{Multicast_Socket_FD}{19}{\code {Multicast_Socket_FD}} +\entry{Creating a socket}{19}{Creating a socket} +\entry{Creating a multicast socket}{19}{Creating a multicast socket} +\entry{Create_Multicast_Socket}{19}{\code {Create_Multicast_Socket}} +\entry{Sockets.Multicast.Create_Multicast_Socket}{19}{\code {Sockets.Multicast.Create_Multicast_Socket}} +\entry{Creating a socket}{20}{Creating a socket} +\entry{Creating a multicast socket}{20}{Creating a multicast socket} +\entry{Create_Multicast_Socket}{20}{\code {Create_Multicast_Socket}} +\entry{Sockets.Multicast.Create_Multicast_Socket}{20}{\code {Sockets.Multicast.Create_Multicast_Socket}} +\entry{Address}{21}{\code {Address}} +\entry{Address_Array}{21}{\code {Address_Array}} +\entry{Address_Component}{21}{\code {Address_Component}} +\entry{Host_Entry}{21}{\code {Host_Entry}} +\entry{String_Access}{21}{\code {String_Access}} +\entry{String_Array}{21}{\code {String_Array}} +\entry{Address_Of}{21}{\code {Address_Of}} +\entry{Sockets.Naming.Address_Of}{21}{\code {Sockets.Naming.Address_Of}} +\entry{Naming_Error}{21}{\code {Naming_Error}} +\entry{Any_Address}{22}{\code {Any_Address}} +\entry{Sockets.Naming.Any_Address}{22}{\code {Sockets.Naming.Any_Address}} +\entry{Get_Peer_Addr}{22}{\code {Get_Peer_Addr}} +\entry{Sockets.Naming.Get_Peer_Addr}{22}{\code {Sockets.Naming.Get_Peer_Addr}} +\entry{Get_Peer_Port}{22}{\code {Get_Peer_Port}} +\entry{Sockets.Naming.Get_Peer_Port}{22}{\code {Sockets.Naming.Get_Peer_Port}} +\entry{Get_Sock_Addr}{22}{\code {Get_Sock_Addr}} +\entry{Sockets.Naming.Get_Sock_Addr}{22}{\code {Sockets.Naming.Get_Sock_Addr}} +\entry{Get_Sock_Port}{23}{\code {Get_Sock_Port}} +\entry{Sockets.Naming.Get_Sock_Port}{23}{\code {Sockets.Naming.Get_Sock_Port}} +\entry{Host_Name}{23}{\code {Host_Name}} +\entry{Sockets.Naming.Host_Name}{23}{\code {Sockets.Naming.Host_Name}} +\entry{Representing IP addresses}{23}{Representing IP addresses} +\entry{Image}{23}{\code {Image}} +\entry{Sockets.Naming.Image}{23}{\code {Sockets.Naming.Image}} +\entry{Info_Of_Name_Or_IP}{24}{\code {Info_Of_Name_Or_IP}} +\entry{Sockets.Naming.Info_Of_Name_Or_IP}{24}{\code {Sockets.Naming.Info_Of_Name_Or_IP}} +\entry{Naming_Error}{24}{\code {Naming_Error}} +\entry{Is_IP_Address}{24}{\code {Is_IP_Address}} +\entry{Sockets.Naming.Is_IP_Address}{24}{\code {Sockets.Naming.Is_IP_Address}} +\entry{Name_Of}{24}{\code {Name_Of}} +\entry{Sockets.Naming.Name_Of}{24}{\code {Sockets.Naming.Name_Of}} +\entry{Naming_Error}{24}{\code {Naming_Error}} +\entry{Representing IP addresses}{25}{Representing IP addresses} +\entry{Value}{25}{\code {Value}} +\entry{Sockets.Naming.Value}{25}{\code {Sockets.Naming.Value}} +\entry{Contributing}{27}{Contributing} +\entry{Sending patches}{29}{Sending patches} +\entry{Reporting a bug}{29}{Reporting a bug} +\entry{Suggesting a feature}{29}{Suggesting a feature} +\entry{Finding AdaSockets on the Internet}{29}{Finding AdaSockets on the Internet} +\entry{Contributing}{29}{Contributing} --- adasockets-1.9.orig/doc/adasockets.cps +++ adasockets-1.9/doc/adasockets.cps @@ -0,0 +1,164 @@ +\initial {A} +\entry {\code {Accept_Socket}}{7} +\entry {Accepting a new connection}{7} +\entry {\code {Ada.Streams.Stream_Element_Array}}{6, 14, 15, 16} +\entry {\code {Ada.Streams.Stream_Element_Count}}{14, 15} +\entry {AdaSockets presentation}{1} +\entry {\code {Address}}{21} +\entry {\code {Address_Array}}{21} +\entry {\code {Address_Component}}{21} +\entry {\code {Address_Of}}{21} +\entry {\code {AF_INET}}{18} +\entry {\code {Any_Address}}{22} +\entry {Assigning a local port}{8} +\initial {B} +\entry {\code {Bind}}{8} +\entry {Binding a socket}{8} +\entry {\code {Both}}{17} +\initial {C} +\entry {Closing a socket}{17} +\entry {Comparaison with \code {GNAT.Sockets}}{1} +\entry {\code {Connect}}{8} +\entry {Connecting a socket}{8} +\entry {\code {Connection_Closed}}{9, 10, 11, 13, 14, 15, 16} +\entry {\code {Connection_Refused}}{8} +\entry {Contributing}{27, 29} +\entry {\code {CR}}{10, 11, 13} +\entry {\code {Create_Multicast_Socket}}{5, 19, 20} +\entry {Creating a multicast socket}{5, 19, 20} +\entry {Creating a server}{8} +\entry {Creating a socket}{5, 17, 19, 20} +\entry {Creating a TCP socket}{5} +\entry {Creating a UDP socket}{5} +\entry {Creating a unicast socket}{5} +\initial {E} +\entry {Establishing a listen queue}{12} +\initial {F} +\entry {Finding AdaSockets on the Internet}{29} +\initial {G} +\entry {\code {Get}}{9} +\entry {\code {Get_Char}}{9} +\entry {\code {Get_Line}}{10, 11} +\entry {\code {Get_Peer_Addr}}{22} +\entry {\code {Get_Peer_Port}}{22} +\entry {\code {Get_Receive_Queue_Size}}{11} +\entry {\code {Get_Send_Queue_Size}}{12} +\entry {\code {Get_Sock_Addr}}{22} +\entry {\code {Get_Sock_Port}}{23} +\entry {\code {Getsockopt}}{12} +\entry {Group communication}{5} +\initial {H} +\entry {Handling a new connection}{7} +\entry {\code {Host_Entry}}{21} +\entry {\code {Host_Name}}{23} +\initial {I} +\entry {\code {Image}}{23} +\entry {\code {Info_Of_Name_Or_IP}}{24} +\entry {Installing AdaSockets}{3} +\entry {\code {IP_ADD_MEMBERSHIP}}{12, 17} +\entry {\code {IP_DROP_MEMBERSHIP}}{12, 17} +\entry {\code {IP_MULTICAST_LOOP}}{12, 17} +\entry {\code {IP_MULTICAST_TTL}}{12, 17} +\entry {\code {IPPROTO_IP}}{12, 17} +\entry {\code {Is_IP_Address}}{24} +\initial {L} +\entry {\code {LF}}{10, 11, 13} +\entry {\code {Listen}}{12} +\entry {Listen queue}{12} +\initial {M} +\entry {Manipulating socket options}{12, 16} +\entry {Mbone}{5} +\entry {Multicast sockets}{5} +\entry {\code {Multicast_Socket_FD}}{5, 19} +\initial {N} +\entry {\code {Name_Of}}{24} +\entry {\code {Naming_Error}}{21, 24} +\entry {\code {New_Line}}{13} +\initial {P} +\entry {\code {PF_INET}}{18} +\entry {\code {Put}}{13} +\entry {\code {Put_Line}}{14} +\initial {R} +\entry {Raw data manipulation}{6} +\entry {\code {Receive}}{14, 15, 17} +\entry {\code {Receive_Some}}{15} +\entry {Receiving data}{6, 9, 10, 11, 14, 15, 16, 18} +\entry {Reporting a bug}{29} +\entry {Representing IP addresses}{23, 25} +\entry {Retrieving socket options}{12} +\initial {S} +\entry {\code {Send}}{16, 17} +\entry {Sending data}{6, 11, 13, 14, 16} +\entry {Sending patches}{29} +\entry {\code {Set_Buffer}}{16} +\entry {\code {Setsockopt}}{17} +\entry {Setting socket options}{16} +\entry {\code {Shutdown}}{17} +\entry {\code {SO_RCVBUF}}{12, 17} +\entry {\code {SO_REUSEADDR}}{12, 17} +\entry {\code {SO_REUSEPORT}}{12, 17} +\entry {\code {SO_SNDBUF}}{12, 17} +\entry {\code {SOCK_DGRAM}}{18} +\entry {\code {SOCK_STREAM}}{18} +\entry {\code {Socket}}{5, 17} +\entry {Socket shutdown}{17} +\entry {\code {Socket_Error}}{8} +\entry {\code {Socket_FD}}{5, 7} +\entry {\code {Sockets.Accept_Socket}}{7} +\entry {\code {Sockets.Bind}}{8} +\entry {\code {Sockets.Connect}}{8} +\entry {\code {Sockets.Get}}{9} +\entry {\code {Sockets.Get_Char}}{9} +\entry {\code {Sockets.Get_Line}}{10, 11} +\entry {\code {Sockets.Get_Receive_Queue_Size}}{11} +\entry {\code {Sockets.Get_Send_Queue_Size}}{12} +\entry {\code {Sockets.Getsockopt}}{12} +\entry {\code {Sockets.IP_ADD_MEMBERSHIP}}{12, 17} +\entry {\code {Sockets.IP_DROP_MEMBERSHIP}}{12, 17} +\entry {\code {Sockets.IP_MULTICAST_LOOP}}{12, 17} +\entry {\code {Sockets.IP_MULTICAST_TTL}}{12, 17} +\entry {\code {Sockets.IPPROTO_IP}}{12, 17} +\entry {\code {Sockets.Listen}}{12} +\entry {\code {Sockets.Multicast.Create_Multicast_Socket}}{5, 19, 20} +\entry {\code {Sockets.Naming.Address_Of}}{21} +\entry {\code {Sockets.Naming.Any_Address}}{22} +\entry {\code {Sockets.Naming.Get_Peer_Addr}}{22} +\entry {\code {Sockets.Naming.Get_Peer_Port}}{22} +\entry {\code {Sockets.Naming.Get_Sock_Addr}}{22} +\entry {\code {Sockets.Naming.Get_Sock_Port}}{23} +\entry {\code {Sockets.Naming.Host_Name}}{23} +\entry {\code {Sockets.Naming.Image}}{23} +\entry {\code {Sockets.Naming.Info_Of_Name_Or_IP}}{24} +\entry {\code {Sockets.Naming.Is_IP_Address}}{24} +\entry {\code {Sockets.Naming.Name_Of}}{24} +\entry {\code {Sockets.Naming.Value}}{25} +\entry {\code {Sockets.New_Line}}{13} +\entry {\code {Sockets.Put}}{13} +\entry {\code {Sockets.Put_Line}}{14} +\entry {\code {Sockets.Receive}}{14, 15} +\entry {\code {Sockets.Receive_Some}}{15} +\entry {\code {Sockets.Send}}{16} +\entry {\code {Sockets.Set_Buffer}}{16} +\entry {\code {Sockets.Setsockopt}}{17} +\entry {\code {Sockets.Shutdown}}{17} +\entry {\code {Sockets.SO_RCVBUF}}{12, 17} +\entry {\code {Sockets.SO_REUSEADDR}}{12, 17} +\entry {\code {Sockets.SO_REUSEPORT}}{12, 17} +\entry {\code {Sockets.SO_SNDBUF}}{12, 17} +\entry {\code {Sockets.Socket}}{5, 17} +\entry {\code {Sockets.SOL_SOCKET}}{12, 17} +\entry {\code {Sockets.Unset_Buffer}}{18} +\entry {\code {SOL_SOCKET}}{12, 17} +\entry {\code {Stream_Element_Array}}{6, 14, 15, 16} +\entry {\code {Stream_Element_Count}}{14, 15} +\entry {\code {String_Access}}{21} +\entry {\code {String_Array}}{21} +\entry {Suggesting a feature}{29} +\initial {T} +\entry {TCP socket}{5} +\initial {U} +\entry {UDP socket}{5} +\entry {Unicast sockets}{5} +\entry {\code {Unset_Buffer}}{18} +\initial {V} +\entry {\code {Value}}{25} --- adasockets-1.9.orig/doc/adasockets.info +++ adasockets-1.9/doc/adasockets.info @@ -1,10 +1,12 @@ -This is adasockets.info, produced by makeinfo version 4.13 from ./adasockets.texi. +This is adasockets.info, produced by makeinfo version 5.2 from +adasockets.texi. +INFO-DIR-SECTION Libraries START-INFO-DIR-ENTRY * adasockets: (adasockets). AdaSockets reference manual END-INFO-DIR-ENTRY - Copyright (C) 2002-2013 Samuel Tardieu +Copyright (C) 2002-2013 Samuel Tardieu Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -12,8 +14,8 @@ Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also -that the entire resulting derived work is distributed under the terms -of a permission notice identical to this one. +that the entire resulting derived work is distributed under the terms of +a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified @@ -24,29 +26,30 @@ * Menu: -* What is AdaSockets?:: -* Installing AdaSockets:: -* Using AdaSockets:: -* Sockets package:: -* Sockets.Multicast package:: -* Sockets.Naming package:: -* Contributors:: -* Resources on the Internet:: -* Index:: +* What is AdaSockets?:: +* Installing AdaSockets:: +* Using AdaSockets:: +* Sockets package:: +* Sockets.Multicast package:: +* Sockets.Naming package:: +* Contributors:: +* Resources on the Internet:: +* Index:: - --- The Detailed Node Listing --- + -- The Detailed Node Listing -- Using AdaSockets -* Compiling an Ada application:: -* Setting up unicast sockets:: -* Setting up multicast sockets:: -* Sending and receiving data:: +* Compiling an Ada application:: +* Setting up unicast sockets:: +* Setting up multicast sockets:: +* Sending and receiving data:: Sending and receiving data -* Raw data manipulation:: -* String-oriented exchanges:: +* Raw data manipulation:: +* String-oriented exchanges:: +  File: adasockets.info, Node: What is AdaSockets?, Next: Installing AdaSockets, Prev: Top, Up: Top @@ -56,17 +59,17 @@ AdaSockets is a set of free software Ada packages allowing Ada programmers to use the so-called BSD sockets from their favourite -programming language. AdaSockets has been designed and tested with the +programming language. AdaSockets has been designed and tested with the GNAT free software Ada compiler, but should be portable to other compilers quite easily. Starting from release 3.14, the GNAT compiler started to integrate a -`GNAT.Sockets' package. However, this package is GNAT specific and -contains at this time less features than AdaSockets. At some point, -AdaSockets may use `GNAT.Sockets' as its underlying sockets structure. +'GNAT.Sockets' package. However, this package is GNAT specific and +contains at this time less features than AdaSockets. At some point, +AdaSockets may use 'GNAT.Sockets' as its underlying sockets structure. AdaSockets philosophy is to help the Ada programmer by providing -easy-to-use objects. Special care has been taken to ensure that +easy-to-use objects. Special care has been taken to ensure that performances do however remain good.  @@ -76,26 +79,26 @@ *********************** Installing AdaSockets on a Unix or OpenVMS machine is as simple as -typing a few commands. Once you got the latest version of AdaSockets +typing a few commands. Once you got the latest version of AdaSockets (*note Resources on the Internet::), uncompress and untar it and go to the top-level directory of the distribution. You must configure the AdaSockets distribution by using the -`configure' command, such as in: +'configure' command, such as in: ./configure --prefix=/users/sam/adasockets - If you want to install AdaSockets under the `/usr/local' hierarchy, -you do not need to specify the `--prefix' option. Make sure you have + If you want to install AdaSockets under the '/usr/local' hierarchy, +you do not need to specify the '--prefix' option. Make sure you have write permission on the target directories. Once AdaSockets is configured, you can compile and install it by -using the `make' command: +using the 'make' command: make install - The GNU make program is recommended but not mandatory. On your -system, it may be installed under the `gmake' name. + The GNU make program is recommended but not mandatory. On your +system, it may be installed under the 'gmake' name.  File: adasockets.info, Node: Using AdaSockets, Next: Sockets package, Prev: Installing AdaSockets, Up: Top @@ -105,10 +108,10 @@ * Menu: -* Compiling an Ada application:: -* Setting up unicast sockets:: -* Setting up multicast sockets:: -* Sending and receiving data:: +* Compiling an Ada application:: +* Setting up unicast sockets:: +* Setting up multicast sockets:: +* Sending and receiving data::  File: adasockets.info, Node: Compiling an Ada application, Next: Setting up unicast sockets, Prev: Using AdaSockets, Up: Using AdaSockets @@ -116,11 +119,11 @@ 3.1 Compiling an Ada application ================================ -AdaSockets comes with an `adasockets-config' application that can be -used to retrieve installation parameters while using `gnatmake' to -compile your Ada application. The `--cflags' parameters tells -`adasockets-config' to output the path to the Ada packages sources, -while `--libs' asks for the path to the Ada library. +AdaSockets comes with an 'adasockets-config' application that can be +used to retrieve installation parameters while using 'gnatmake' to +compile your Ada application. The '--cflags' parameters tells +'adasockets-config' to output the path to the Ada packages sources, +while '--libs' asks for the path to the Ada library. gnatmake `adasockets-config --cflags` mainprog -largs `adasockets-config --libs` @@ -132,25 +135,25 @@ ============================== Unicast sockets are used everywhere on the Internet, for surfing the -web, sending electronic mails or accessing remote files. They come in +web, sending electronic mails or accessing remote files. They come in two flavours: TCP TCP is a connected mode, in which packets are sent in a reliable - and ordered way. Everything sent at one end will eventually arrive - in the same order at the other end, the underlying operating - system takes care of retransmitting missing packets and reordering + and ordered way. Everything sent at one end will eventually arrive + in the same order at the other end, the underlying operating system + takes care of retransmitting missing packets and reordering out-of-order ones. UDP - UDP is a non-connected mode. A packet sent on a UDP socket may or - may not arrive at the other end. This is a much lighter protocol + UDP is a non-connected mode. A packet sent on a UDP socket may or + may not arrive at the other end. This is a much lighter protocol when reliability is not needed as the operating system does not - have to use large buffers to reorder packets. Also, this generates + have to use large buffers to reorder packets. Also, this generates less traffic as no acknowledgments need to be sent by the kernels. - The package `Sockets' defines a `Socket_FD' tagged type. An instance + The package 'Sockets' defines a 'Socket_FD' tagged type. An instance of this type (or of any of its descendants) represents an incoming or -outgoing socket. Two different kinds of sockets can be created: unicast +outgoing socket. Two different kinds of sockets can be created: unicast (one-to-one) and multicast (many-to-many).  @@ -159,24 +162,24 @@ 3.3 Setting up multicast sockets ================================ -Multicast sockets are used for group communication over the Internet. To -use multicast sockets, you must be connected to a multicast network and -use a multicast-enabled operating system (such as most Unices, Linux or -even recent Windows versions). Unless you are connected to the mbone -(multicast backbone) or have setup a private multicast network, you -will only be able to use multicast on your local network. +Multicast sockets are used for group communication over the Internet. +To use multicast sockets, you must be connected to a multicast network +and use a multicast-enabled operating system (such as most Unices, Linux +or even recent Windows versions). Unless you are connected to the mbone +(multicast backbone) or have setup a private multicast network, you will +only be able to use multicast on your local network. A multicast socket is somewhat similar to a UDP socket; in particular, packets may be lost or misordered. You can create a multicast socket using the function -`Create_Multicast_Socket' in the package `Sockets.Multicast'. This -function returns a `Multicast_Socket_FD' object, which derives from -`Socket_FD'. - - `Create_Multicast_Socket' takes care of the whole setup of your -multicast socket. You do not need to call any additionnal subprogram -before using it. In particular, `Create_Multicast_Socket' will take +'Create_Multicast_Socket' in the package 'Sockets.Multicast'. This +function returns a 'Multicast_Socket_FD' object, which derives from +'Socket_FD'. + + 'Create_Multicast_Socket' takes care of the whole setup of your +multicast socket. You do not need to call any additionnal subprogram +before using it. In particular, 'Create_Multicast_Socket' will take care of registering the multicast socket to the operating system, so that the latter can tell the connected routers to propagate the subscription to the mbone as needed. @@ -192,8 +195,8 @@ * Menu: -* Raw data manipulation:: -* String-oriented exchanges:: +* Raw data manipulation:: +* String-oriented exchanges::  File: adasockets.info, Node: Raw data manipulation, Next: String-oriented exchanges, Prev: Sending and receiving data, Up: Sending and receiving data @@ -202,8 +205,8 @@ --------------------------- Raw data is manipulated using the predefined -`Ada.Streams.Stream_Element_Array' Ada type. This corresponds to an -array of bytes, or an `unsigned char *' in the C programming language. +'Ada.Streams.Stream_Element_Array' Ada type. This corresponds to an +array of bytes, or an 'unsigned char *' in the C programming language.  File: adasockets.info, Node: String-oriented exchanges, Prev: Raw data manipulation, Up: Sending and receiving data @@ -211,22 +214,22 @@ 3.4.2 String-oriented exchanges ------------------------------- -String-oriented exchanges provides the programmer with `Ada.Text_IO' -like subprograms. Most Internet protocols are line-oriented and those +String-oriented exchanges provides the programmer with 'Ada.Text_IO' +like subprograms. Most Internet protocols are line-oriented and those subprograms are perfectly suited to implement those. - When sending data, the classical `CR + LF' sequence will be sent at -the end of each line. When receiving data, `CR' characters are -discarded and `LF' is used as the end-of-line marker. - - The `Get' function is tied to the size of the operating system -buffer. It is better to use `Get_Line' to get a full line. The line can -be as long as the length of the Ada buffer. The Ada buffer can be -adjusted by using the `Set_Buffer' and `Unset_Buffer' procedures. + When sending data, the classical 'CR + LF' sequence will be sent at +the end of each line. When receiving data, 'CR' characters are +discarded and 'LF' is used as the end-of-line marker. + + The 'Get' function is tied to the size of the operating system +buffer. It is better to use 'Get_Line' to get a full line. The line +can be as long as the length of the Ada buffer. The Ada buffer can be +adjusted by using the 'Set_Buffer' and 'Unset_Buffer' procedures. When using string-oriented exchanges with datagram protocols such as -UDP, setting a buffer using `Set_Buffer' for the receiving socket is -mandatory. If you don't, the receiving socket will loose data and will +UDP, setting a buffer using 'Set_Buffer' for the receiving socket is +mandatory. If you don't, the receiving socket will loose data and will be unable to reconstitute the string.  @@ -235,15 +238,14 @@ 4 Sockets package ***************** -The `Sockets' package contains all the definitions and subprograms +The 'Sockets' package contains all the definitions and subprograms needed to build a simple unicast client or server. -- Sockets.Socket_FD: type Socket_FD is tagged private; - The `Socket_FD' tagged type is the root type of all sockets. It + The 'Socket_FD' tagged type is the root type of all sockets. It gets initialized by calling *note Socket (procedure)::. An - uninitialized `Socket_FD' can be succesfully compared to - `Null_Socket_FD'. - + uninitialized 'Socket_FD' can be succesfully compared to + 'Null_Socket_FD'. * Menu: @@ -284,34 +286,33 @@ Deinstall the line-oriented buffer of the socket object  -File: adasockets.info, Node: Accept_Socket (procedure) +File: adasockets.info, Node: Accept_Socket (procedure), Next: Bind (procedure), Up: Sockets package Accept_Socket (procedure) -------------------------- +========================= PURPOSE Accept an incoming connection - PROTOTYPE -- Sockets.Accept_Socket: procedure Accept_Socket (SOCKET : Socket_FD; NEW_SOCKET : out Socket_FD); - + PARAMETERS SOCKET in Initialized NEW_SOCKET out Incoming socket object DESCRIPTION This procedure creates a new socket corresponding to an incoming - connection on TCP socket SOCKET. All the communications with the + connection on TCP socket SOCKET. All the communications with the peer will take place on NEW_SOCKET, while the program can accept another connection on SOCKET. NEW_SOCKET must not be initialized before calling this procedure, - or must have been cleaned up by calling `Shutdown', in order to + or must have been cleaned up by calling 'Shutdown', in order to avoid a file descriptors leak. - `Accept_Socket' will block until an incoming connection is ready - to be accepted. + 'Accept_Socket' will block until an incoming connection is ready to + be accepted. EXAMPLE declare @@ -339,58 +340,54 @@ *note Shutdown (procedure)::, *note Socket (procedure)::. -  -File: adasockets.info, Node: Bind (procedure) +File: adasockets.info, Node: Bind (procedure), Next: Connect (procedure), Prev: Accept_Socket (procedure), Up: Accept_Socket (procedure) Bind (procedure) ---------------- PURPOSE Associate a local port to a socket - PROTOTYPE -- Sockets.Bind: procedure Bind (SOCKET : Socket_FD; PORT : Natural; HOST : String := ""); - + PARAMETERS SOCKET in Initialized socket object PORT in Local port to bind to HOST in Local interface to bind to DESCRIPTION - This procedure requests a local port from the operating system. If - 0 is given in PORT, the system will assign a free port whose - number can later be retrieved using *note Get_Sock_Port - (function)::. Also, most operating systems require special - privileges if you want to bind to ports below 1024. + This procedure requests a local port from the operating system. If + 0 is given in PORT, the system will assign a free port whose number + can later be retrieved using *note Get_Sock_Port (function)::. + Also, most operating systems require special privileges if you want + to bind to ports below 1024. If HOST is not the empty string, it must contain the IP address of - a local interface to bind to, or a name which resolves into such - an address. If an empty string is given (the default), the socket + a local interface to bind to, or a name which resolves into such an + address. If an empty string is given (the default), the socket will be bound to all the available interfaces. EXCEPTIONS - `Socket_Error' Requested port or interface not available + 'Socket_Error' Requested port or interface not available SEE ALSO *note Listen (procedure)::, *note Socket (procedure)::. -  -File: adasockets.info, Node: Connect (procedure) +File: adasockets.info, Node: Connect (procedure), Next: Get (function), Prev: Bind (procedure), Up: Accept_Socket (procedure) Connect (procedure) ------------------- PURPOSE Connect a socket on a given host/port - PROTOTYPE -- Sockets.Connect: procedure Connect (SOCKET : Socket_FD; HOST : String; PORT : Positive); - + PARAMETERS SOCKET in Initialized socket object HOST in Host to connect to @@ -398,13 +395,15 @@ DESCRIPTION This procedure connects an initialized socket to a given host on a - given port. In the case of a TCP socket, a real connection is - attempted. In the case of a UDP socket, no connection takes place + given port. In the case of a TCP socket, a real connection is + attempted. In the case of a UDP socket, no connection takes place but the endpoint coordinates are recorded. EXCEPTIONS - `Connection_Refused'The connection has been refused by the server - `Socket_Error' Another error occurred during the connection + 'Connection_Refused'The connection has been refused by the + server + 'Socket_Error' Another error occurred during the + connection EXAMPLE declare @@ -421,20 +420,18 @@ SEE ALSO *note Socket (procedure)::. -  -File: adasockets.info, Node: Get (function) +File: adasockets.info, Node: Get (function), Next: Get_Char (function), Prev: Connect (procedure), Up: Accept_Socket (procedure) Get (function) -------------- PURPOSE Get a string from a remote host - PROTOTYPE -- Sockets.Get: function Get (SOCKET : Socket_FD'Class) return String; - + PARAMETERS SOCKET in Initialized and connected socket object @@ -442,37 +439,35 @@ Some characters that have been received DESCRIPTION - This function receives some characters from a remote host. As - soon that at least one character is available, the current - reception buffer is returned. - - There is usually little gain in using this function whose - behaviour is comparable to the one of *note Receive (function)::. - Other functions such as *note Get_Char (function)::, or *note - Get_Line (function)::, allow more structured programming. - - However, this function may be used to avoid loosing characters - when calling *note Unset_Buffer (procedure)::, if, for some reason, - the remote host may have sent some. + This function receives some characters from a remote host. As soon + that at least one character is available, the current reception + buffer is returned. + + There is usually little gain in using this function whose behaviour + is comparable to the one of *note Receive (function)::. Other + functions such as *note Get_Char (function)::, or *note Get_Line + (function)::, allow more structured programming. + + However, this function may be used to avoid loosing characters when + calling *note Unset_Buffer (procedure)::, if, for some reason, the + remote host may have sent some. EXCEPTIONS - `Connection_Closed'Peer has closed the connection before + 'Connection_Closed'Peer has closed the connection before sending any data -  -File: adasockets.info, Node: Get_Char (function) +File: adasockets.info, Node: Get_Char (function), Next: Get_Line (function), Prev: Get (function), Up: Accept_Socket (procedure) Get_Char (function) ------------------- PURPOSE Get a character from a remote host - PROTOTYPE -- Sockets.Get_Char: function Get_Char (SOCKET : Socket_FD'Class) return Character; - + PARAMETERS SOCKET in Initialized and connected socket object @@ -483,7 +478,7 @@ This function receives exactly one character from the remote host. EXCEPTIONS - `Connection_Closed'Peer has closed the connection before + 'Connection_Closed'Peer has closed the connection before sending the character SEE ALSO @@ -493,21 +488,19 @@ *note Receive (procedure)::, *note Set_Buffer (procedure)::. -  -File: adasockets.info, Node: Get_Line (function) +File: adasockets.info, Node: Get_Line (function), Next: Get_Line (procedure), Prev: Get_Char (function), Up: Accept_Socket (procedure) Get_Line (function) ------------------- PURPOSE Get a whole line from a remote host - PROTOTYPE -- Sockets.Get_Line: function Get_Line (SOCKET : Socket_FD'Class; MAX_LENGTH : Positive := 2048) return String; - + PARAMETERS SOCKET in Initialized and connected socket object MAX_LENGTH in Maximum returned line length @@ -516,17 +509,17 @@ A line without the CR and LF separators DESCRIPTION - This function receives one line from the remote host. A line + This function receives one line from the remote host. A line consists into zero or more characters followed by an optional CR and by a LF. Those terminators are stripped before the line is returned. - This function blocks until one full line has been received. The + This function blocks until one full line has been received. The line length is limited with the value of the Max_Length argument, to avoid exhaustion of the secondary stack. EXCEPTIONS - `Connection_Closed'Peer has closed the connection before + 'Connection_Closed'Peer has closed the connection before sending a whole line SEE ALSO @@ -536,28 +529,25 @@ *note Receive (procedure)::, *note Set_Buffer (procedure)::. -  -File: adasockets.info, Node: Get_Line (procedure) +File: adasockets.info, Node: Get_Line (procedure), Next: Get_Receive_Queue_Size (function), Prev: Get_Line (function), Up: Accept_Socket (procedure) Get_Line (procedure) -------------------- PURPOSE Get a whole line from a remote host - PROTOTYPE - -- Sockets.Get_Line: procedure Get_Line - (SOCKET : Socket_FD'Class; STR : in out String; - LAST : out Natural); - + -- Sockets.Get_Line: procedure Get_Line (SOCKET : Socket_FD'Class; + STR : in out String; LAST : out Natural); + PARAMETERS SOCKET in Initialized and connected socket object STR in out String to fill LAST out Last index used in the string DESCRIPTION - This procedure receives one line from the remote host. A line + This procedure receives one line from the remote host. A line consists into zero or more characters followed by an optional CR and by a LF. Those terminators are stripped before the line is returned. @@ -565,7 +555,7 @@ This procedure blocks until one full line has been received. EXCEPTIONS - `Connection_Closed'Peer has closed the connection before + 'Connection_Closed'Peer has closed the connection before sending a whole line SEE ALSO @@ -575,21 +565,19 @@ *note Receive (procedure)::, *note Set_Buffer (procedure)::. -  -File: adasockets.info, Node: Get_Receive_Queue_Size (function) +File: adasockets.info, Node: Get_Receive_Queue_Size (function), Next: Get_Send_Queue_Size (function), Prev: Get_Line (procedure), Up: Accept_Socket (procedure) Get_Receive_Queue_Size (function) --------------------------------- PURPOSE Return the size of the unread data in the input queue - PROTOTYPE - -- Sockets.Get_Receive_Queue_Size: function - Get_Receive_Queue_Size (SOCKET : Socket_FD'Class) + -- Sockets.Get_Receive_Queue_Size: function Get_Receive_Queue_Size + (SOCKET : Socket_FD'Class) return Integer; - + PARAMETERS SOCKET in Initialized and connected socket object @@ -597,28 +585,26 @@ The non-negative size in bytes of the input queue DESCRIPTION - This function is only available on Linux platforms. On other - operating systems, it will return -2 to indicate that the - necessary mechanisms to retrieve the information are not available. + This function is only available on Linux platforms. On other + operating systems, it will return -2 to indicate that the necessary + mechanisms to retrieve the information are not available. SEE ALSO *note Receive (procedure)::. -  -File: adasockets.info, Node: Get_Send_Queue_Size (function) +File: adasockets.info, Node: Get_Send_Queue_Size (function), Next: Getsockopt (procedure), Prev: Get_Receive_Queue_Size (function), Up: Accept_Socket (procedure) Get_Send_Queue_Size (function) ------------------------------ PURPOSE Return the size of the unsent data in the output queue - PROTOTYPE -- Sockets.Get_Send_Queue_Size: function Get_Send_Queue_Size (SOCKET : Socket_FD'Class) return Integer; - + PARAMETERS SOCKET in Initialized and connected socket object @@ -626,28 +612,26 @@ The non-negative size in bytes of the output queue DESCRIPTION - This function is only available on Linux platforms. On other - operating systems, it will return -2 to indicate that the - necessary mechanisms to retrieve the information are not available. + This function is only available on Linux platforms. On other + operating systems, it will return -2 to indicate that the necessary + mechanisms to retrieve the information are not available. SEE ALSO *note Send (procedure)::. -  -File: adasockets.info, Node: Getsockopt (procedure) +File: adasockets.info, Node: Getsockopt (procedure), Next: Listen (procedure), Prev: Get_Send_Queue_Size (function), Up: Accept_Socket (procedure) Getsockopt (procedure) ---------------------- PURPOSE Retrieve a socket option - PROTOTYPE -- Sockets.Getsockopt: procedure Getsockopt (SOCKET : Socket_FD; LEVEL : Socket_Level := SOL_SOCKET; OPTNAME : Socket_Option; OPTVAL : out Integer); - + PARAMETERS SOCKET in Initialized and bound socket object LEVEL in Protocol level @@ -655,44 +639,42 @@ OPTVAL out Option value DESCRIPTION - This procedure retrieves options applicable to a socket. Please + This procedure retrieves options applicable to a socket. Please see your operating system manual for usable levels and options. - Two levels are defined: `SOL_SOCKET' (the default) and - `IPPROTO_IP'. The options are `SO_REUSEADDR', `SO_REUSEPORT', - `IP_MULTICAST_TTL', `IP_ADD_MEMBERSHIP', `IP_DROP_MEMBERSHIP', - `IP_MULTICAST_LOOP', `SO_SNDBUF' and `IP_RCVBUF'. - - Note that unlike their C language counterpart, `Getsockopt' and - `Setsockopt' do not require an extra parameter representing the - length in bytes of the option value. AdaSockets nows the right + Two levels are defined: 'SOL_SOCKET' (the default) and + 'IPPROTO_IP'. The options are 'SO_REUSEADDR', 'SO_REUSEPORT', + 'IP_MULTICAST_TTL', 'IP_ADD_MEMBERSHIP', 'IP_DROP_MEMBERSHIP', + 'IP_MULTICAST_LOOP', 'SO_SNDBUF' and 'IP_RCVBUF'. + + Note that unlike their C language counterpart, 'Getsockopt' and + 'Setsockopt' do not require an extra parameter representing the + length in bytes of the option value. AdaSockets nows the right size for every option. SEE ALSO *note Setsockopt (procedure)::. -  -File: adasockets.info, Node: Listen (procedure) +File: adasockets.info, Node: Listen (procedure), Next: New_Line (procedure), Prev: Getsockopt (procedure), Up: Accept_Socket (procedure) Listen (procedure) ------------------ PURPOSE Establish a listen queue - PROTOTYPE -- Sockets.Listen: procedure Listen (SOCKET : Socket_FD; QUEUE_SIZE : Positive := 5); - + PARAMETERS SOCKET in Initialized and bound socket object QUEUE_SIZE in Requested slots in the listen queue DESCRIPTION This procedure establishes a listen queue after a TCP socket as - been initialized and bound. Each slot in the queue can hold one - incoming connection that has not been accepted yet. Note that most + been initialized and bound. Each slot in the queue can hold one + incoming connection that has not been accepted yet. Note that most operating systems ignore queue sizes larger than five. SEE ALSO @@ -700,20 +682,18 @@ *note Bind (procedure)::, *note Socket (procedure)::. -  -File: adasockets.info, Node: New_Line (procedure) +File: adasockets.info, Node: New_Line (procedure), Next: Put (procedure), Prev: Listen (procedure), Up: Accept_Socket (procedure) New_Line (procedure) -------------------- PURPOSE Send a CR/LF to a remote host - PROTOTYPE - -- Sockets.New_Line: procedure New_Line - (SOCKET : Socket_FD'Class; COUNT : Natural := 1); - + -- Sockets.New_Line: procedure New_Line (SOCKET : Socket_FD'Class; + COUNT : Natural := 1); + PARAMETERS SOCKET in Initialized and connected socket object COUNT in Number of CR/LF sequences to send @@ -722,26 +702,24 @@ This procedure sends one or more CR/LF combinations to the peer. EXCEPTIONS - `Connection_Closed'Peer has prematurely closed the connection + 'Connection_Closed'Peer has prematurely closed the connection SEE ALSO *note Put (procedure)::, *note Put_Line (procedure)::. -  -File: adasockets.info, Node: Put (procedure) +File: adasockets.info, Node: Put (procedure), Next: Put_Line (procedure), Prev: New_Line (procedure), Up: Accept_Socket (procedure) Put (procedure) --------------- PURPOSE Send a string to a remote host - PROTOTYPE -- Sockets.Put: procedure Put (SOCKET : Socket_FD'Class; STR : String); - + PARAMETERS SOCKET in Initialized and connected socket object STR in String to send @@ -751,27 +729,25 @@ incoming socket. EXCEPTIONS - `Connection_Closed'Peer has prematurely closed the connection + 'Connection_Closed'Peer has prematurely closed the connection SEE ALSO *note New_Line (procedure)::, *note Put_Line (procedure)::, *note Send (procedure)::. -  -File: adasockets.info, Node: Put_Line (procedure) +File: adasockets.info, Node: Put_Line (procedure), Next: Receive (function), Prev: Put (procedure), Up: Accept_Socket (procedure) Put_Line (procedure) -------------------- PURPOSE Send a CR/LF terminated string to a remote host - PROTOTYPE - -- Sockets.Put_Line: procedure Put_Line - (SOCKET : Socket_FD'Class; STR : String); - + -- Sockets.Put_Line: procedure Put_Line (SOCKET : Socket_FD'Class; + STR : String); + PARAMETERS SOCKET in Initialized and connected socket object STR in String to send @@ -781,28 +757,26 @@ over an outgoing or incoming socket. EXCEPTIONS - `Connection_Closed'Peer has prematurely closed the connection + 'Connection_Closed'Peer has prematurely closed the connection SEE ALSO *note New_Line (procedure)::, *note Put (procedure)::, *note Send (procedure)::. -  -File: adasockets.info, Node: Receive (function) +File: adasockets.info, Node: Receive (function), Next: Receive (procedure), Prev: Put_Line (procedure), Up: Accept_Socket (procedure) Receive (function) ------------------ PURPOSE Receive raw data over a socket - PROTOTYPE -- Sockets.Receive: function Receive (SOCKET : Socket_FD; MAX : Ada.Streams.Stream_Element_Count := 4096) return Ada.Streams.Stream_Element_Array; - + PARAMETERS SOCKET in Initialized and bound or connected socket object @@ -813,13 +787,13 @@ DESCRIPTION This procedure receives data from a bound UDP socket or a connected - TCP socket. Only one system call will be performed; this function - will return whatever data has arrived. Note that in GNAT the - secondary stack may be used to store the data and may result in + TCP socket. Only one system call will be performed; this function + will return whatever data has arrived. Note that in GNAT the + secondary stack may be used to store the data and may result in stack storage exhaustion. EXCEPTIONS - `Connection_Closed'Peer has closed the connection before + 'Connection_Closed'Peer has closed the connection before sending any data SEE ALSO @@ -828,20 +802,18 @@ *note Get_Line (function)::, *note Get_Line (procedure)::. -  -File: adasockets.info, Node: Receive (procedure) +File: adasockets.info, Node: Receive (procedure), Next: Receive_Some (procedure), Prev: Receive (function), Up: Accept_Socket (procedure) Receive (procedure) ------------------- PURPOSE Receive raw data over a socket - PROTOTYPE -- Sockets.Receive: procedure Receive (SOCKET : Socket_FD'Class; DATA : out Ada.Streams.Stream_Element_Array); - + PARAMETERS SOCKET in Initialized and bound or connected socket object @@ -849,12 +821,12 @@ DESCRIPTION This procedure receives data from a bound UDP socket or a connected - TCP socket. It will block until the DATA reception buffer has been + TCP socket. It will block until the DATA reception buffer has been totally filled. EXCEPTIONS - `Connection_Closed'Peer has closed the connection before - `Data'Length' bytes + 'Connection_Closed'Peer has closed the connection before + 'Data'Length' bytes were received SEE ALSO @@ -863,22 +835,20 @@ *note Receive (function)::, *note Receive_Some (procedure)::. -  -File: adasockets.info, Node: Receive_Some (procedure) +File: adasockets.info, Node: Receive_Some (procedure), Next: Send (procedure), Prev: Receive (procedure), Up: Accept_Socket (procedure) Receive_Some (procedure) ------------------------ PURPOSE Receive raw data over a socket - PROTOTYPE -- Sockets.Receive_Some: procedure Receive_Some (SOCKET : Socket_FD'Class; DATA : out Ada.Streams.Stream_Element_Array; LAST : out Ada.Streams.Stream_Element_Offset); - + PARAMETERS SOCKET in Initialized and bound or connected socket object @@ -887,11 +857,11 @@ DESCRIPTION This procedure receives data from a bound UDP socket or a connected - TCP socket. As soon as at least one byte has been read, it returns + TCP socket. As soon as at least one byte has been read, it returns with LAST set to the index of the latest written element of DATA. EXCEPTIONS - `Connection_Closed'Peer has closed the connection before + 'Connection_Closed'Peer has closed the connection before sending any data SEE ALSO @@ -900,20 +870,18 @@ *note Receive (function)::, *note Receive (procedure)::. -  -File: adasockets.info, Node: Send (procedure) +File: adasockets.info, Node: Send (procedure), Next: Set_Buffer (procedure), Prev: Receive_Some (procedure), Up: Accept_Socket (procedure) Send (procedure) ---------------- PURPOSE Send raw data over a socket - PROTOTYPE -- Sockets.Send: procedure Send (SOCKET : Socket_FD; DATA : out Ada.Streams.Stream_Element_Array); - + PARAMETERS SOCKET in Initialized and connected socket object DATA out Data to be sent @@ -923,37 +891,35 @@ an incoming socket. EXCEPTIONS - `Connection_Closed'Peer has prematurely closed the connection + 'Connection_Closed'Peer has prematurely closed the connection SEE ALSO *note Put (procedure)::, *note Put_Line (procedure)::. -  -File: adasockets.info, Node: Set_Buffer (procedure) +File: adasockets.info, Node: Set_Buffer (procedure), Next: Setsockopt (procedure), Prev: Send (procedure), Up: Accept_Socket (procedure) Set_Buffer (procedure) ---------------------- PURPOSE Install a line-oriented buffer of the socket object - PROTOTYPE -- Sockets.Set_Buffer: procedure Set_Buffer (SOCKET : Socket_FD'Class; LENGTH : Positive := 1500); - + PARAMETERS SOCKET in Initialized and connected socket object LENGTH in Size in bytes of the newly installed buffer DESCRIPTION - This procedure puts the socket object in buffered mode. If the + This procedure puts the socket object in buffered mode. If the socket was already buffered, the content of the previous buffer - will be lost. The buffered mode only affects character- and + will be lost. The buffered mode only affects character- and line-oriented read operation such as *note Get (function)::, *note - Get_Char (function)::, and *note Get_Line (function)::. Other + Get_Char (function)::, and *note Get_Line (function)::. Other reception subprograms will not function properly if buffered mode is used at the same time. @@ -963,21 +929,19 @@ SEE ALSO *note Unset_Buffer (procedure)::. -  -File: adasockets.info, Node: Setsockopt (procedure) +File: adasockets.info, Node: Setsockopt (procedure), Next: Shutdown (procedure), Prev: Set_Buffer (procedure), Up: Accept_Socket (procedure) Setsockopt (procedure) ---------------------- PURPOSE Set a socket option - PROTOTYPE -- Sockets.Setsockopt: procedure Setsockopt (SOCKET : Socket_FD; LEVEL : Socket_Level := SOL_SOCKET; OPTNAME : Socket_Option; OPTVAL : Integer); - + PARAMETERS SOCKET in Initialized and bound socket object LEVEL in Protocol level @@ -985,62 +949,58 @@ OPTVAL in Option value DESCRIPTION - This procedure sets options applicable to a socket. Please see + This procedure sets options applicable to a socket. Please see your operating system manual for usable levels and options. - Two levels are defined: `SOL_SOCKET' (the default) and - `IPPROTO_IP'. The options are `SO_REUSEADDR', `SO_REUSEPORT', - `IP_MULTICAST_TTL', `IP_ADD_MEMBERSHIP', `IP_DROP_MEMBERSHIP', - `IP_MULTICAST_LOOP', `SO_SNDBUF' and `IP_RCVBUF'. - - Note that unlike their C language counterpart, `Getsockopt' and - `Setsockopt' do not require an extra parameter representing the - length in bytes of the option value. AdaSockets nows the right + Two levels are defined: 'SOL_SOCKET' (the default) and + 'IPPROTO_IP'. The options are 'SO_REUSEADDR', 'SO_REUSEPORT', + 'IP_MULTICAST_TTL', 'IP_ADD_MEMBERSHIP', 'IP_DROP_MEMBERSHIP', + 'IP_MULTICAST_LOOP', 'SO_SNDBUF' and 'IP_RCVBUF'. + + Note that unlike their C language counterpart, 'Getsockopt' and + 'Setsockopt' do not require an extra parameter representing the + length in bytes of the option value. AdaSockets nows the right size for every option. SEE ALSO *note Getsockopt (procedure)::. -  -File: adasockets.info, Node: Shutdown (procedure) +File: adasockets.info, Node: Shutdown (procedure), Next: Socket (procedure), Prev: Setsockopt (procedure), Up: Accept_Socket (procedure) Shutdown (procedure) -------------------- PURPOSE Shutdown a socket - PROTOTYPE -- Sockets.Shutdown: procedure Shutdown (SOCKET : in out Socket_FD; HOW : Shutdown_Type := Both); - + PARAMETERS SOCKET in out Socket object to shutdown HOW in Direction to shutdown DESCRIPTION - This procedure shutdowns either direction of the socket. HOW can - take the value `Send', `Receive' or `Both'. + This procedure shutdowns either direction of the socket. HOW can + take the value 'Send', 'Receive' or 'Both'. SEE ALSO *note Socket (procedure)::. -  -File: adasockets.info, Node: Socket (procedure) +File: adasockets.info, Node: Socket (procedure), Next: Unset_Buffer (procedure), Prev: Shutdown (procedure), Up: Accept_Socket (procedure) Socket (procedure) ------------------ PURPOSE Create a socket of the given mode - PROTOTYPE -- Sockets.Socket: procedure Socket (SOCKET : out Socket_FD; DOMAIN : Socket_Domain := PF_INET; TYP : Socket_Type := SOCK_STREAM); - + PARAMETERS SOCKET out Socket object to initialize DOMAIN in Protocol family @@ -1048,11 +1008,11 @@ DESCRIPTION This procedure initializes a new socket object by reserving a file - descriptor to the operating system. For backward compatibility with - older versions of this library, `AF_INET' is still accepted as a - value but should be replaced as soon as possible with the proper - `PF_INET'. Using `SOCK_STREAM' for the TYP argument will create a - TCP socket while a `SOCK_DGRAM' will create a UDP one. + descriptor to the operating system. For backward compatibility + with older versions of this library, 'AF_INET' is still accepted as + a value but should be replaced as soon as possible with the proper + 'PF_INET'. Using 'SOCK_STREAM' for the TYP argument will create a + TCP socket while a 'SOCK_DGRAM' will create a UDP one. EXAMPLE declare @@ -1069,45 +1029,41 @@ SEE ALSO *note Shutdown (procedure)::. -  -File: adasockets.info, Node: Unset_Buffer (procedure) +File: adasockets.info, Node: Unset_Buffer (procedure), Prev: Socket (procedure), Up: Accept_Socket (procedure) Unset_Buffer (procedure) ------------------------ PURPOSE Deinstall the line-oriented buffer of the socket object - PROTOTYPE -- Sockets.Unset_Buffer: procedure Unset_Buffer (SOCKET : Socket_FD'Class); - + PARAMETERS SOCKET in Initialized and connected socket object DESCRIPTION This procedure deinstalls the buffer previously installed by *note - Set_Buffer (procedure)::. If any data is still present in the - buffer, it will be lost. To avoid this situation, the buffer can + Set_Buffer (procedure)::. If any data is still present in the + buffer, it will be lost. To avoid this situation, the buffer can be flushed by calling *note Get (function)::. -  File: adasockets.info, Node: Sockets.Multicast package, Next: Sockets.Naming package, Prev: Sockets package, Up: Top 5 Sockets.Multicast package *************************** -The `Sockets.Multicast' allows the creation of IP multicast sockets. +The 'Sockets.Multicast' allows the creation of IP multicast sockets. -- Sockets.Multicast.Multicast_Socket_FD: type Multicast_Socket_FD is new Socket_FD with private; - The `Multicast_Socket_FD' tagged type derives from the `Socket_FD' - type. It gets initialized by calling *note Create_Multicast_Socket - (function)::. An uninitialized `Multicast_Socket_FD' can be - succesfully compared to `Null_Multicast_Socket_FD'. - + The 'Multicast_Socket_FD' tagged type derives from the 'Socket_FD' + type. It gets initialized by calling *note Create_Multicast_Socket + (function)::. An uninitialized 'Multicast_Socket_FD' can be + succesfully compared to 'Null_Multicast_Socket_FD'. * Menu: @@ -1117,23 +1073,23 @@ Create an IP multicast socket  -File: adasockets.info, Node: Create_Multicast_Socket (function) +File: adasockets.info, Node: Create_Multicast_Socket (function), Next: Create_Multicast_Socket (function), Prev: Create_Multicast_Socket (function), Up: Sockets.Multicast package Create_Multicast_Socket (function) ----------------------------------- +================================== PURPOSE Create an IP multicast socket - PROTOTYPE -- Sockets.Multicast.Create_Multicast_Socket: function - Create_Multicast_Socket (GROUP : String; PORT : Positive; + Create_Multicast_Socket (GROUP : String; PORT : Positive; TTL : Positive := 16; SELF_LOOP : Boolean := True; LOCAL_IF : String := 0.0.0.0) return Multicast_Socket_FD; - + PARAMETERS - GROUP in IP address of the multicast group to join + GROUP in IP address of the multicast group to + join PORT in Port of the multicast group to join TTL in Time-to-live of sent packets SELF_LOOP in Should the socket receive the packets @@ -1148,7 +1104,7 @@ group, identified by its class E IP address and port. Be careful when choosing the TTL parameter of your IP multicast - socket. Most IP multicast routers do implement threshold-based + socket. Most IP multicast routers do implement threshold-based filtering and will not let IP multicast packets leave your organization if the TTL on the last router is smaller than 16. @@ -1168,25 +1124,21 @@ *note Send (procedure)::, *note Shutdown (procedure)::. - - -File: adasockets.info, Node: Create_Multicast_Socket (function) - Create_Multicast_Socket (function) ---------------------------------- PURPOSE Create an IP multicast socket - PROTOTYPE -- Sockets.Multicast.Create_Multicast_Socket: function - Create_Multicast_Socket (GROUP : String; PORT : Positive; + Create_Multicast_Socket (GROUP : String; PORT : Positive; LOCAL_PORT : Natural; TTL : Positive := 16; LOCAL_IF : String := 0.0.0.0) return Multicast_Socket_FD; - + PARAMETERS - GROUP in IP address of the multicast group to join + GROUP in IP address of the multicast group to + join PORT in Port of the multicast group to join LOCAL_PORT in Local port number to use TTL in Time-to-live of sent packets @@ -1197,7 +1149,7 @@ DESCRIPTION This function creates an IP multicast socket attached to a given - group, identified by its class E IP address and port. If + group, identified by its class E IP address and port. If Local_Port is 0, a free port will automatically be chosen by your operating system. @@ -1220,54 +1172,47 @@ *note Send (procedure)::, *note Shutdown (procedure)::. -  File: adasockets.info, Node: Sockets.Naming package, Next: Contributors, Prev: Sockets.Multicast package, Up: Top 6 Sockets.Naming package ************************ -The `Sockets.Naming' package contains types and helper functions needed +The 'Sockets.Naming' package contains types and helper functions needed to manipulate Internet host names and addresses. -- Sockets.Naming.Address: type Address is record H1, H2, H3, H4 : Address_Component; end record; - This type represents an IPv4 address with `H1' being the first - octet and `H4' the last one. For example, 137.194.161.2 is - represented by `H1=137, H2=194, H3=161, H4=2'. - + This type represents an IPv4 address with 'H1' being the first + octet and 'H4' the last one. For example, 137.194.161.2 is + represented by 'H1=137, H2=194, H3=161, H4=2'. -- Sockets.Naming.Address_Array: type Address_Array is array (Positive range <>) of Address; Helper type - -- Sockets.Naming.Address_Component: type Address_Component is Natural range 0 .. 255; Helper type - - -- Sockets.Naming.Host_Entry: type Host_Entry (N_Aliases, N_Addresses - : Natural) is new Ada.Finalization.Controlled with record + -- Sockets.Naming.Host_Entry: type Host_Entry (N_Aliases, N_Addresses : + Natural) is new Ada.Finalization.Controlled with record Name : String_Access; Aliases : String_Array (1 .. N_Aliases); Addresses : Address_Array (1 .. N_Addresses); end record; - The `Host_Entry' type holds a set of names and IP addresses - associated with a host. Each host can have several IP address as + The 'Host_Entry' type holds a set of names and IP addresses + associated with a host. Each host can have several IP address as well as several aliases. - -- Sockets.Naming.String_Access: type String_Access is access String; Helper type - -- Sockets.Naming.String_Array: type String_Array is array (Positive range <>) of String_Access; Helper type - * Menu: * Address_Of (function):: @@ -1293,19 +1238,18 @@ * Value (function):: Transform a string into an address  -File: adasockets.info, Node: Address_Of (function) +File: adasockets.info, Node: Address_Of (function), Next: Any_Address (function), Up: Sockets.Naming package Address_Of (function) ---------------------- +===================== PURPOSE Get the IP address of a host - PROTOTYPE -- Sockets.Naming.Address_Of: function Address_Of (SOMETHING : String) return Address; - + PARAMETERS SOMETHING in Host name or IP address @@ -1313,43 +1257,39 @@ IPv4 address EXCEPTIONS - `Naming_Error' No information available for this name or + 'Naming_Error' No information available for this name or address SEE ALSO *note Name_Of (function)::. -  -File: adasockets.info, Node: Any_Address (function) +File: adasockets.info, Node: Any_Address (function), Next: Get_Peer_Addr (function), Prev: Address_Of (function), Up: Address_Of (function) Any_Address (function) ---------------------- PURPOSE Special address representing any address on the local host - PROTOTYPE -- Sockets.Naming.Any_Address: function Any_Address - -RETURN VALUE - Equivalent to `INADDR_ANY' in the C programming language +RETURN VALUE + Equivalent to 'INADDR_ANY' in the C programming language  -File: adasockets.info, Node: Get_Peer_Addr (function) +File: adasockets.info, Node: Get_Peer_Addr (function), Next: Get_Peer_Port (function), Prev: Any_Address (function), Up: Address_Of (function) Get_Peer_Addr (function) ------------------------ PURPOSE Retrieve IP address of remote host - PROTOTYPE -- Sockets.Naming.Get_Peer_Addr: function Get_Peer_Addr (SOCKET : Socket_FD) return Address; - + PARAMETERS SOCKET in Connected socket object @@ -1360,21 +1300,19 @@ *note Get_Peer_Port (function)::, *note Get_Sock_Addr (function)::. -  -File: adasockets.info, Node: Get_Peer_Port (function) +File: adasockets.info, Node: Get_Peer_Port (function), Next: Get_Sock_Addr (function), Prev: Get_Peer_Addr (function), Up: Address_Of (function) Get_Peer_Port (function) ------------------------ PURPOSE Retrieve port used by remote host - PROTOTYPE -- Sockets.Naming.Get_Peer_Port: function Get_Peer_Port (SOCKET : Socket_FD) return Positive; - + PARAMETERS SOCKET in Connected socket object @@ -1385,21 +1323,19 @@ *note Get_Sock_Port (function)::, *note Get_Peer_Addr (function)::. -  -File: adasockets.info, Node: Get_Sock_Addr (function) +File: adasockets.info, Node: Get_Sock_Addr (function), Next: Get_Sock_Port (function), Prev: Get_Peer_Port (function), Up: Address_Of (function) Get_Sock_Addr (function) ------------------------ PURPOSE Retrieve IP address of local host - PROTOTYPE -- Sockets.Naming.Get_Sock_Addr: function Get_Sock_Addr (SOCKET : Socket_FD) return Address; - + PARAMETERS SOCKET in Connected socket object @@ -1410,21 +1346,19 @@ *note Get_Sock_Port (function)::, *note Get_Peer_Addr (function)::. -  -File: adasockets.info, Node: Get_Sock_Port (function) +File: adasockets.info, Node: Get_Sock_Port (function), Next: Host_Name (function), Prev: Get_Sock_Addr (function), Up: Address_Of (function) Get_Sock_Port (function) ------------------------ PURPOSE Retrieve port used by local host - PROTOTYPE -- Sockets.Naming.Get_Sock_Port: function Get_Sock_Port (SOCKET : Socket_FD) return Positive; - + PARAMETERS SOCKET in Connected socket object @@ -1435,41 +1369,37 @@ *note Get_Peer_Port (function)::, *note Get_Sock_Addr (function)::. -  -File: adasockets.info, Node: Host_Name (function) +File: adasockets.info, Node: Host_Name (function), Next: Image (function), Prev: Get_Sock_Port (function), Up: Address_Of (function) Host_Name (function) -------------------- PURPOSE Get the name of the current host - PROTOTYPE -- Sockets.Naming.Host_Name: function Host_Name - + RETURN VALUE Name of the current host DESCRIPTION - This function returns the name of the current host. Depending on + This function returns the name of the current host. Depending on the local configuration, it may or may not be a fully qualified domain name (FQDN). -  -File: adasockets.info, Node: Image (function) +File: adasockets.info, Node: Image (function), Next: Info_Of_Name_Or_IP (function), Prev: Host_Name (function), Up: Address_Of (function) Image (function) ---------------- PURPOSE Make a string from an address - PROTOTYPE -- Sockets.Naming.Image: function Image (ADD : Address) return String; - + PARAMETERS ADD in IP address @@ -1479,21 +1409,19 @@ SEE ALSO *note Value (function)::. -  -File: adasockets.info, Node: Info_Of_Name_Or_IP (function) +File: adasockets.info, Node: Info_Of_Name_Or_IP (function), Next: Is_IP_Address (function), Prev: Image (function), Up: Address_Of (function) Info_Of_Name_Or_IP (function) ----------------------------- PURPOSE Get addresses and names of a host - PROTOTYPE -- Sockets.Naming.Info_Of_Name_Or_IP: function Info_Of_Name_Or_IP (SOMETHING : String) return Host_Entry; - + PARAMETERS SOMETHING in Host name or IP address @@ -1505,44 +1433,40 @@ service. EXCEPTIONS - `Naming_Error' No information available for this name or + 'Naming_Error' No information available for this name or address -  -File: adasockets.info, Node: Is_IP_Address (function) +File: adasockets.info, Node: Is_IP_Address (function), Next: Name_Of (function), Prev: Info_Of_Name_Or_IP (function), Up: Address_Of (function) Is_IP_Address (function) ------------------------ PURPOSE Check if given string is a valid IP address - PROTOTYPE -- Sockets.Naming.Is_IP_Address: function Is_IP_Address (SOMETHING : String) return Boolean; - + PARAMETERS SOMETHING in String to check RETURN VALUE - `True' if SOMETHING is an IP address - + 'True' if SOMETHING is an IP address  -File: adasockets.info, Node: Name_Of (function) +File: adasockets.info, Node: Name_Of (function), Next: Value (function), Prev: Is_IP_Address (function), Up: Address_Of (function) Name_Of (function) ------------------ PURPOSE Official name of the host - PROTOTYPE -- Sockets.Naming.Name_Of: function Name_Of (SOMETHING : String) return String; - + PARAMETERS SOMETHING in Host name or IP address @@ -1550,26 +1474,24 @@ Name of the host EXCEPTIONS - `Naming_Error' No information available for this name or + 'Naming_Error' No information available for this name or address SEE ALSO *note Address_Of (function)::. -  -File: adasockets.info, Node: Value (function) +File: adasockets.info, Node: Value (function), Prev: Name_Of (function), Up: Address_Of (function) Value (function) ---------------- PURPOSE Transform a string into an address - PROTOTYPE -- Sockets.Naming.Value: function Value (ADD : String) return Address; - + PARAMETERS ADD in Textual representation of an IP address @@ -1579,7 +1501,6 @@ SEE ALSO *note Image (function)::. -  File: adasockets.info, Node: Contributors, Next: Resources on the Internet, Prev: Sockets.Naming package, Up: Top @@ -1587,44 +1508,27 @@ *********************** AdaSockets has been originally developped by Samuel Tardieu who still -maintains it. However, the following people have made crucial +maintains it. However, the following people have made crucial contributions to AdaSockets, be they new code, bug fixes or porting to new operating systems: * Dmitriy Anisimkov () - * Alan Barnes () - * Juanma Barranquero () - * Bobby D. Bryant () - * Sander Cox () - * Sune Falk () - * Guillaume Foliard () - * Laurent Guerby () - * David J. Kristola () - * Dominik Madon () - * Pascal Obry () - * Nicolas Ollinger () - * Stéphane Patureau () - * Thomas Quinot () - * Preben Randhol () - * Maxim Reznik () - * Joel Sherrill () - * Samuel Tardieu () If you feel that you have been forgotten, please send me a mail so @@ -1640,12 +1544,12 @@ The latest version of AdaSockets can always be found at: - `http://www.rfc1149.net/devel/adasockets' + You can report issues or submit questions on GitHub's issue tracker at: - `https://github.com/samueltardieu/adasockets/issues' +  File: adasockets.info, Node: Index, Prev: Resources on the Internet, Up: Top @@ -1656,79 +1560,76 @@ [index] * Menu: -* Accept_Socket: Accept_Socket (procedure). - (line 12) * Accepting a new connection: Accept_Socket (procedure). (line 6) -* Ada.Streams.Stream_Element_Array <1>: Send (procedure). (line 18) -* Ada.Streams.Stream_Element_Array <2>: Receive_Some (procedure). - (line 22) -* Ada.Streams.Stream_Element_Array <3>: Receive (procedure). (line 19) -* Ada.Streams.Stream_Element_Array <4>: Receive (function). (line 23) +* Accept_Socket: Accept_Socket (procedure). + (line 9) * Ada.Streams.Stream_Element_Array: Raw data manipulation. (line 6) -* Ada.Streams.Stream_Element_Count <1>: Receive_Some (procedure). - (line 22) +* Ada.Streams.Stream_Element_Array <1>: Receive (function). (line 23) +* Ada.Streams.Stream_Element_Array <2>: Receive (procedure). (line 18) +* Ada.Streams.Stream_Element_Array <3>: Receive_Some (procedure). + (line 21) +* Ada.Streams.Stream_Element_Array <4>: Send (procedure). (line 17) * Ada.Streams.Stream_Element_Count: Receive (function). (line 23) +* Ada.Streams.Stream_Element_Count <1>: Receive_Some (procedure). + (line 21) * AdaSockets presentation: What is AdaSockets?. (line 6) * Address: Sockets.Naming package. - (line 12) + (line 9) * Address_Array: Sockets.Naming package. - (line 19) + (line 17) * Address_Component: Sockets.Naming package. - (line 24) + (line 21) * Address_Of: Address_Of (function). - (line 13) -* AF_INET: Socket (procedure). (line 20) + (line 9) +* AF_INET: Socket (procedure). (line 19) * Any_Address: Any_Address (function). - (line 11) + (line 9) * Assigning a local port: Bind (procedure). (line 6) -* Bind: Bind (procedure). (line 12) +* Bind: Bind (procedure). (line 9) * Binding a socket: Bind (procedure). (line 6) -* Both: Shutdown (procedure). (line 18) +* Both: Shutdown (procedure). (line 17) * Closing a socket: Shutdown (procedure). (line 6) -* Comparaison with GNAT.Sockets: What is AdaSockets?. (line 6) -* Connect: Connect (procedure). (line 12) +* Comparaison with 'GNAT.Sockets': What is AdaSockets?. (line 6) +* Connect: Connect (procedure). (line 9) * Connecting a socket: Connect (procedure). (line 6) -* Connection_Closed <1>: Send (procedure). (line 22) -* Connection_Closed <2>: Receive_Some (procedure). +* Connection_Closed: Get (function). (line 35) +* Connection_Closed <1>: Get_Char (function). (line 24) +* Connection_Closed <2>: Get_Line (function). (line 33) +* Connection_Closed <3>: Get_Line (procedure). (line 28) +* Connection_Closed <4>: New_Line (procedure). (line 21) +* Connection_Closed <5>: Put (procedure). (line 21) +* Connection_Closed <6>: Put_Line (procedure). (line 22) +* Connection_Closed <7>: Receive (function). (line 31) +* Connection_Closed <8>: Receive (procedure). (line 25) +* Connection_Closed <9>: Receive_Some (procedure). (line 27) -* Connection_Closed <3>: Receive (procedure). (line 24) -* Connection_Closed <4>: Receive (function). (line 30) -* Connection_Closed <5>: Put_Line (procedure). (line 22) -* Connection_Closed <6>: Put (procedure). (line 22) -* Connection_Closed <7>: New_Line (procedure). (line 21) -* Connection_Closed <8>: Get_Line (procedure). (line 28) -* Connection_Closed <9>: Get_Line (function). (line 32) -* Connection_Closed <10>: Get_Char (function). (line 23) -* Connection_Closed: Get (function). (line 34) +* Connection_Closed <10>: Send (procedure). (line 21) * Connection_Refused: Connect (procedure). (line 25) +* Contributing: Contributors. (line 6) * Contributing <1>: Resources on the Internet. (line 6) -* Contributing: Contributors. (line 6) -* CR <1>: New_Line (procedure). (line 18) -* CR <2>: Get_Line (procedure). (line 20) * CR: Get_Line (function). (line 22) -* Create_Multicast_Socket <1>: Create_Multicast_Socket (function). - (line 15) -* Create_Multicast_Socket <2>: Create_Multicast_Socket (function). - (line 15) +* CR <1>: Get_Line (procedure). (line 19) +* CR <2>: New_Line (procedure). (line 18) * Create_Multicast_Socket: Setting up multicast sockets. (line 16) -* Creating a multicast socket <1>: Create_Multicast_Socket (function). - (line 6) -* Creating a multicast socket <2>: Create_Multicast_Socket (function). - (line 6) +* Create_Multicast_Socket <1>: Create_Multicast_Socket (function). + (line 9) +* Create_Multicast_Socket <2>: . (line 60) * Creating a multicast socket: Setting up multicast sockets. (line 6) +* Creating a multicast socket <1>: Create_Multicast_Socket (function). + (line 6) +* Creating a multicast socket <2>: . (line 57) * Creating a server: Bind (procedure). (line 6) -* Creating a socket <1>: Create_Multicast_Socket (function). +* Creating a socket: Setting up unicast sockets. (line 6) +* Creating a socket <1>: Socket (procedure). (line 6) * Creating a socket <2>: Create_Multicast_Socket (function). (line 6) -* Creating a socket <3>: Socket (procedure). (line 6) -* Creating a socket: Setting up unicast sockets. - (line 6) +* Creating a socket <3>: . (line 57) * Creating a TCP socket: Setting up unicast sockets. (line 6) * Creating a UDP socket: Setting up unicast sockets. @@ -1738,205 +1639,181 @@ * Establishing a listen queue: Listen (procedure). (line 6) * Finding AdaSockets on the Internet: Resources on the Internet. (line 6) -* Get: Get (function). (line 12) -* Get_Char: Get_Char (function). (line 12) -* Get_Line <1>: Get_Line (procedure). (line 13) -* Get_Line: Get_Line (function). (line 13) +* Get: Get (function). (line 9) +* Getsockopt: Getsockopt (procedure). + (line 9) +* Get_Char: Get_Char (function). (line 9) +* Get_Line: Get_Line (function). (line 9) +* Get_Line <1>: Get_Line (procedure). (line 9) * Get_Peer_Addr: Get_Peer_Addr (function). - (line 13) + (line 9) * Get_Peer_Port: Get_Peer_Port (function). - (line 13) + (line 9) * Get_Receive_Queue_Size: Get_Receive_Queue_Size (function). - (line 13) + (line 9) * Get_Send_Queue_Size: Get_Send_Queue_Size (function). - (line 13) + (line 9) * Get_Sock_Addr: Get_Sock_Addr (function). - (line 13) + (line 9) * Get_Sock_Port: Get_Sock_Port (function). - (line 13) -* Getsockopt: Getsockopt (procedure). - (line 13) + (line 9) * Group communication: Setting up multicast sockets. (line 6) * Handling a new connection: Accept_Socket (procedure). (line 6) * Host_Entry: Sockets.Naming package. - (line 33) -* Host_Name: Host_Name (function). (line 11) -* Image: Image (function). (line 12) + (line 25) +* Host_Name: Host_Name (function). (line 9) +* Image: Image (function). (line 9) * Info_Of_Name_Or_IP: Info_Of_Name_Or_IP (function). - (line 13) + (line 9) * Installing AdaSockets: Installing AdaSockets. (line 6) -* IP_ADD_MEMBERSHIP <1>: Setsockopt (procedure). - (line 21) +* IPPROTO_IP: Getsockopt (procedure). + (line 20) +* IPPROTO_IP <1>: Setsockopt (procedure). + (line 20) * IP_ADD_MEMBERSHIP: Getsockopt (procedure). - (line 21) -* IP_DROP_MEMBERSHIP <1>: Setsockopt (procedure). - (line 21) + (line 20) +* IP_ADD_MEMBERSHIP <1>: Setsockopt (procedure). + (line 20) * IP_DROP_MEMBERSHIP: Getsockopt (procedure). - (line 21) -* IP_MULTICAST_LOOP <1>: Setsockopt (procedure). - (line 21) + (line 20) +* IP_DROP_MEMBERSHIP <1>: Setsockopt (procedure). + (line 20) * IP_MULTICAST_LOOP: Getsockopt (procedure). - (line 21) -* IP_MULTICAST_TTL <1>: Setsockopt (procedure). - (line 21) + (line 20) +* IP_MULTICAST_LOOP <1>: Setsockopt (procedure). + (line 20) * IP_MULTICAST_TTL: Getsockopt (procedure). - (line 21) -* IPPROTO_IP <1>: Setsockopt (procedure). - (line 21) -* IPPROTO_IP: Getsockopt (procedure). - (line 21) + (line 20) +* IP_MULTICAST_TTL <1>: Setsockopt (procedure). + (line 20) * Is_IP_Address: Is_IP_Address (function). - (line 13) -* LF <1>: New_Line (procedure). (line 18) -* LF <2>: Get_Line (procedure). (line 20) + (line 9) * LF: Get_Line (function). (line 22) -* Listen: Listen (procedure). (line 12) +* LF <1>: Get_Line (procedure). (line 19) +* LF <2>: New_Line (procedure). (line 18) +* Listen: Listen (procedure). (line 9) * Listen queue: Listen (procedure). (line 6) -* Manipulating socket options <1>: Setsockopt (procedure). - (line 6) * Manipulating socket options: Getsockopt (procedure). (line 6) +* Manipulating socket options <1>: Setsockopt (procedure). + (line 6) * Mbone: Setting up multicast sockets. (line 6) * Multicast sockets: Setting up multicast sockets. (line 6) -* Multicast_Socket_FD <1>: Sockets.Multicast package. - (line 10) * Multicast_Socket_FD: Setting up multicast sockets. (line 16) -* Name_Of: Name_Of (function). (line 12) -* Naming_Error <1>: Name_Of (function). (line 20) -* Naming_Error <2>: Info_Of_Name_Or_IP (function). - (line 25) +* Multicast_Socket_FD <1>: Sockets.Multicast package. + (line 8) +* Name_Of: Name_Of (function). (line 9) * Naming_Error: Address_Of (function). - (line 21) -* New_Line: New_Line (procedure). (line 12) -* PF_INET: Socket (procedure). (line 20) -* Put: Put (procedure). (line 12) -* Put_Line: Put_Line (procedure). (line 12) + (line 22) +* Naming_Error <1>: Info_Of_Name_Or_IP (function). + (line 27) +* Naming_Error <2>: Name_Of (function). (line 21) +* New_Line: New_Line (procedure). (line 9) +* PF_INET: Socket (procedure). (line 19) +* Put: Put (procedure). (line 9) +* Put_Line: Put_Line (procedure). (line 9) * Raw data manipulation: Raw data manipulation. (line 6) -* Receive <1>: Shutdown (procedure). (line 18) -* Receive <2>: Receive (procedure). (line 12) -* Receive: Receive (function). (line 13) +* Receive: Receive (function). (line 9) +* Receive <1>: Receive (procedure). (line 9) +* Receive <2>: Shutdown (procedure). (line 17) * Receive_Some: Receive_Some (procedure). - (line 14) -* Receiving data <1>: Unset_Buffer (procedure). - (line 6) -* Receiving data <2>: Set_Buffer (procedure). + (line 9) +* Receiving data: Sending and receiving data. (line 6) -* Receiving data <3>: Receive_Some (procedure). +* Receiving data <1>: Get (function). (line 6) +* Receiving data <2>: Get_Char (function). (line 6) +* Receiving data <3>: Get_Line (function). (line 6) +* Receiving data <4>: Get_Line (procedure). (line 6) +* Receiving data <5>: Get_Receive_Queue_Size (function). + (line 6) +* Receiving data <6>: Receive (function). (line 6) +* Receiving data <7>: Receive (procedure). (line 6) +* Receiving data <8>: Receive_Some (procedure). (line 6) -* Receiving data <4>: Receive (procedure). (line 6) -* Receiving data <5>: Receive (function). (line 6) -* Receiving data <6>: Get_Receive_Queue_Size (function). +* Receiving data <9>: Set_Buffer (procedure). (line 6) -* Receiving data <7>: Get_Line (procedure). (line 6) -* Receiving data <8>: Get_Line (function). (line 6) -* Receiving data <9>: Get_Char (function). (line 6) -* Receiving data <10>: Get (function). (line 6) -* Receiving data: Sending and receiving data. +* Receiving data <10>: Unset_Buffer (procedure). (line 6) * Reporting a bug: Resources on the Internet. (line 6) -* Representing IP addresses <1>: Value (function). (line 6) * Representing IP addresses: Image (function). (line 6) +* Representing IP addresses <1>: Value (function). (line 6) * Retrieving socket options: Getsockopt (procedure). (line 6) -* Send <1>: Shutdown (procedure). (line 18) -* Send: Send (procedure). (line 12) -* Sending data <1>: Send (procedure). (line 6) -* Sending data <2>: Put_Line (procedure). (line 6) -* Sending data <3>: Put (procedure). (line 6) -* Sending data <4>: New_Line (procedure). (line 6) -* Sending data <5>: Get_Send_Queue_Size (function). - (line 6) +* Send: Send (procedure). (line 9) +* Send <1>: Shutdown (procedure). (line 17) * Sending data: Sending and receiving data. (line 6) +* Sending data <1>: Get_Send_Queue_Size (function). + (line 6) +* Sending data <2>: New_Line (procedure). (line 6) +* Sending data <3>: Put (procedure). (line 6) +* Sending data <4>: Put_Line (procedure). (line 6) +* Sending data <5>: Send (procedure). (line 6) * Sending patches: Resources on the Internet. (line 6) -* Set_Buffer: Set_Buffer (procedure). - (line 12) * Setsockopt: Setsockopt (procedure). - (line 13) + (line 9) * Setting socket options: Setsockopt (procedure). (line 6) -* Shutdown: Shutdown (procedure). (line 12) -* SO_RCVBUF <1>: Setsockopt (procedure). - (line 21) -* SO_RCVBUF: Getsockopt (procedure). - (line 21) -* SO_REUSEADDR <1>: Setsockopt (procedure). - (line 21) -* SO_REUSEADDR: Getsockopt (procedure). - (line 21) -* SO_REUSEPORT <1>: Setsockopt (procedure). - (line 21) -* SO_REUSEPORT: Getsockopt (procedure). - (line 21) -* SO_SNDBUF <1>: Setsockopt (procedure). - (line 21) -* SO_SNDBUF: Getsockopt (procedure). - (line 21) -* SOCK_DGRAM: Socket (procedure). (line 20) -* SOCK_STREAM: Socket (procedure). (line 20) -* Socket <1>: Socket (procedure). (line 13) +* Set_Buffer: Set_Buffer (procedure). + (line 9) +* Shutdown: Shutdown (procedure). (line 9) * Socket: Setting up unicast sockets. (line 6) +* Socket <1>: Socket (procedure). (line 9) * Socket shutdown: Shutdown (procedure). (line 6) -* Socket_Error <1>: Connect (procedure). (line 26) -* Socket_Error: Bind (procedure). (line 31) -* Socket_FD <1>: Sockets package. (line 10) -* Socket_FD: Setting up unicast sockets. - (line 6) * Sockets.Accept_Socket: Accept_Socket (procedure). - (line 12) -* Sockets.Bind: Bind (procedure). (line 12) -* Sockets.Connect: Connect (procedure). (line 12) + (line 11) +* Sockets.Bind: Bind (procedure). (line 11) +* Sockets.Connect: Connect (procedure). (line 11) * Sockets.Get: Get (function). (line 12) +* Sockets.Getsockopt: Getsockopt (procedure). + (line 12) * Sockets.Get_Char: Get_Char (function). (line 12) -* Sockets.Get_Line <1>: Get_Line (procedure). (line 13) * Sockets.Get_Line: Get_Line (function). (line 13) +* Sockets.Get_Line <1>: Get_Line (procedure). (line 12) * Sockets.Get_Receive_Queue_Size: Get_Receive_Queue_Size (function). (line 13) * Sockets.Get_Send_Queue_Size: Get_Send_Queue_Size (function). (line 13) -* Sockets.Getsockopt: Getsockopt (procedure). - (line 13) -* Sockets.IP_ADD_MEMBERSHIP <1>: Setsockopt (procedure). - (line 21) +* Sockets.IPPROTO_IP: Getsockopt (procedure). + (line 20) +* Sockets.IPPROTO_IP <1>: Setsockopt (procedure). + (line 20) * Sockets.IP_ADD_MEMBERSHIP: Getsockopt (procedure). - (line 21) -* Sockets.IP_DROP_MEMBERSHIP <1>: Setsockopt (procedure). - (line 21) + (line 20) +* Sockets.IP_ADD_MEMBERSHIP <1>: Setsockopt (procedure). + (line 20) * Sockets.IP_DROP_MEMBERSHIP: Getsockopt (procedure). - (line 21) -* Sockets.IP_MULTICAST_LOOP <1>: Setsockopt (procedure). - (line 21) + (line 20) +* Sockets.IP_DROP_MEMBERSHIP <1>: Setsockopt (procedure). + (line 20) * Sockets.IP_MULTICAST_LOOP: Getsockopt (procedure). - (line 21) -* Sockets.IP_MULTICAST_TTL <1>: Setsockopt (procedure). - (line 21) + (line 20) +* Sockets.IP_MULTICAST_LOOP <1>: Setsockopt (procedure). + (line 20) * Sockets.IP_MULTICAST_TTL: Getsockopt (procedure). - (line 21) -* Sockets.IPPROTO_IP <1>: Setsockopt (procedure). - (line 21) -* Sockets.IPPROTO_IP: Getsockopt (procedure). - (line 21) -* Sockets.Listen: Listen (procedure). (line 12) -* Sockets.Multicast.Create_Multicast_Socket <1>: Create_Multicast_Socket (function). - (line 15) -* Sockets.Multicast.Create_Multicast_Socket <2>: Create_Multicast_Socket (function). - (line 15) + (line 20) +* Sockets.IP_MULTICAST_TTL <1>: Setsockopt (procedure). + (line 20) +* Sockets.Listen: Listen (procedure). (line 11) * Sockets.Multicast.Create_Multicast_Socket: Setting up multicast sockets. (line 16) +* Sockets.Multicast.Create_Multicast_Socket <1>: Create_Multicast_Socket (function). + (line 16) +* Sockets.Multicast.Create_Multicast_Socket <2>: . (line 67) * Sockets.Naming.Address_Of: Address_Of (function). (line 13) * Sockets.Naming.Any_Address: Any_Address (function). - (line 11) + (line 10) * Sockets.Naming.Get_Peer_Addr: Get_Peer_Addr (function). (line 13) * Sockets.Naming.Get_Peer_Port: Get_Peer_Port (function). @@ -1945,70 +1822,93 @@ (line 13) * Sockets.Naming.Get_Sock_Port: Get_Sock_Port (function). (line 13) -* Sockets.Naming.Host_Name: Host_Name (function). (line 11) +* Sockets.Naming.Host_Name: Host_Name (function). (line 10) * Sockets.Naming.Image: Image (function). (line 12) * Sockets.Naming.Info_Of_Name_Or_IP: Info_Of_Name_Or_IP (function). - (line 13) + (line 14) * Sockets.Naming.Is_IP_Address: Is_IP_Address (function). (line 13) * Sockets.Naming.Name_Of: Name_Of (function). (line 12) * Sockets.Naming.Value: Value (function). (line 12) * Sockets.New_Line: New_Line (procedure). (line 12) -* Sockets.Put: Put (procedure). (line 12) +* Sockets.Put: Put (procedure). (line 11) * Sockets.Put_Line: Put_Line (procedure). (line 12) -* Sockets.Receive <1>: Receive (procedure). (line 12) * Sockets.Receive: Receive (function). (line 13) +* Sockets.Receive <1>: Receive (procedure). (line 11) * Sockets.Receive_Some: Receive_Some (procedure). - (line 14) -* Sockets.Send: Send (procedure). (line 12) -* Sockets.Set_Buffer: Set_Buffer (procedure). - (line 12) -* Sockets.Setsockopt: Setsockopt (procedure). (line 13) -* Sockets.Shutdown: Shutdown (procedure). (line 12) -* Sockets.SO_RCVBUF <1>: Setsockopt (procedure). - (line 21) +* Sockets.Send: Send (procedure). (line 11) +* Sockets.Setsockopt: Setsockopt (procedure). + (line 12) +* Sockets.Set_Buffer: Set_Buffer (procedure). + (line 11) +* Sockets.Shutdown: Shutdown (procedure). (line 11) +* Sockets.Socket: Setting up unicast sockets. + (line 6) +* Sockets.Socket <1>: Socket (procedure). (line 12) +* Sockets.SOL_SOCKET: Getsockopt (procedure). + (line 20) +* Sockets.SOL_SOCKET <1>: Setsockopt (procedure). + (line 20) * Sockets.SO_RCVBUF: Getsockopt (procedure). - (line 21) -* Sockets.SO_REUSEADDR <1>: Setsockopt (procedure). - (line 21) + (line 20) +* Sockets.SO_RCVBUF <1>: Setsockopt (procedure). + (line 20) * Sockets.SO_REUSEADDR: Getsockopt (procedure). - (line 21) -* Sockets.SO_REUSEPORT <1>: Setsockopt (procedure). - (line 21) + (line 20) +* Sockets.SO_REUSEADDR <1>: Setsockopt (procedure). + (line 20) * Sockets.SO_REUSEPORT: Getsockopt (procedure). - (line 21) -* Sockets.SO_SNDBUF <1>: Setsockopt (procedure). - (line 21) + (line 20) +* Sockets.SO_REUSEPORT <1>: Setsockopt (procedure). + (line 20) * Sockets.SO_SNDBUF: Getsockopt (procedure). - (line 21) -* Sockets.Socket <1>: Socket (procedure). (line 13) -* Sockets.Socket: Setting up unicast sockets. - (line 6) -* Sockets.SOL_SOCKET <1>: Setsockopt (procedure). - (line 21) -* Sockets.SOL_SOCKET: Getsockopt (procedure). - (line 21) + (line 20) +* Sockets.SO_SNDBUF <1>: Setsockopt (procedure). + (line 20) * Sockets.Unset_Buffer: Unset_Buffer (procedure). - (line 12) -* SOL_SOCKET <1>: Setsockopt (procedure). - (line 21) + (line 11) +* Socket_Error: Bind (procedure). (line 30) +* Socket_Error <1>: Connect (procedure). (line 27) +* Socket_FD: Setting up unicast sockets. + (line 6) +* Socket_FD <1>: Sockets package. (line 9) +* SOCK_DGRAM: Socket (procedure). (line 19) +* SOCK_STREAM: Socket (procedure). (line 19) * SOL_SOCKET: Getsockopt (procedure). - (line 21) -* Stream_Element_Array <1>: Send (procedure). (line 18) -* Stream_Element_Array <2>: Receive_Some (procedure). - (line 22) -* Stream_Element_Array <3>: Receive (procedure). (line 19) -* Stream_Element_Array <4>: Receive (function). (line 23) + (line 20) +* SOL_SOCKET <1>: Setsockopt (procedure). + (line 20) +* SO_RCVBUF: Getsockopt (procedure). + (line 20) +* SO_RCVBUF <1>: Setsockopt (procedure). + (line 20) +* SO_REUSEADDR: Getsockopt (procedure). + (line 20) +* SO_REUSEADDR <1>: Setsockopt (procedure). + (line 20) +* SO_REUSEPORT: Getsockopt (procedure). + (line 20) +* SO_REUSEPORT <1>: Setsockopt (procedure). + (line 20) +* SO_SNDBUF: Getsockopt (procedure). + (line 20) +* SO_SNDBUF <1>: Setsockopt (procedure). + (line 20) * Stream_Element_Array: Raw data manipulation. (line 6) -* Stream_Element_Count <1>: Receive_Some (procedure). - (line 22) +* Stream_Element_Array <1>: Receive (function). (line 23) +* Stream_Element_Array <2>: Receive (procedure). (line 18) +* Stream_Element_Array <3>: Receive_Some (procedure). + (line 21) +* Stream_Element_Array <4>: Send (procedure). (line 17) * Stream_Element_Count: Receive (function). (line 23) +* Stream_Element_Count <1>: Receive_Some (procedure). + (line 21) * String_Access: Sockets.Naming package. - (line 39) + (line 38) * String_Array: Sockets.Naming package. - (line 44) + (line 41) * Suggesting a feature: Resources on the Internet. (line 6) * TCP socket: Setting up unicast sockets. @@ -2018,64 +1918,63 @@ * Unicast sockets: Setting up unicast sockets. (line 6) * Unset_Buffer: Unset_Buffer (procedure). - (line 12) -* Value: Value (function). (line 12) + (line 9) +* Value: Value (function). (line 9)  Tag Table: -Node: Top796 -Node: What is AdaSockets?1370 -Node: Installing AdaSockets2259 -Node: Using AdaSockets3243 -Node: Compiling an Ada application3534 -Node: Setting up unicast sockets4160 -Node: Setting up multicast sockets5459 -Node: Sending and receiving data6784 -Node: Raw data manipulation7146 -Node: String-oriented exchanges7545 -Node: Sockets package8636 -Node: Accept_Socket (procedure)10903 -Node: Bind (procedure)12693 -Node: Connect (procedure)13877 -Node: Get (function)15139 -Node: Get_Char (function)16254 -Node: Get_Line (function)17039 -Node: Get_Line (procedure)18262 -Node: Get_Receive_Queue_Size (function)19346 -Node: Get_Send_Queue_Size (function)20120 -Node: Getsockopt (procedure)20878 -Node: Listen (procedure)22102 -Node: New_Line (procedure)22891 -Node: Put (procedure)23537 -Node: Put_Line (procedure)24185 -Node: Receive (function)24895 -Node: Receive (procedure)26021 -Node: Receive_Some (procedure)26958 -Node: Send (procedure)28066 -Node: Set_Buffer (procedure)28716 -Node: Setsockopt (procedure)29845 -Node: Shutdown (procedure)31055 -Node: Socket (procedure)31609 -Node: Unset_Buffer (procedure)32894 -Node: Sockets.Multicast package33539 -Node: Create_Multicast_Socket (function)34363 -Node: Create_Multicast_Socket (function)36164 -Node: Sockets.Naming package37849 -Node: Address_Of (function)40364 -Node: Any_Address (function)40895 -Node: Get_Peer_Addr (function)41222 -Node: Get_Peer_Port (function)41709 -Node: Get_Sock_Addr (function)42212 -Node: Get_Sock_Port (function)42717 -Node: Host_Name (function)43218 -Node: Image (function)43654 -Node: Info_Of_Name_Or_IP (function)44042 -Node: Is_IP_Address (function)44689 -Node: Name_Of (function)45113 -Node: Value (function)45617 -Node: Contributors46021 -Node: Resources on the Internet47423 -Node: Index47856 +Node: Top817 +Node: What is AdaSockets?1500 +Node: Installing AdaSockets2393 +Node: Using AdaSockets3380 +Node: Compiling an Ada application3679 +Node: Setting up unicast sockets4306 +Node: Setting up multicast sockets5612 +Node: Sending and receiving data6941 +Node: Raw data manipulation7313 +Node: String-oriented exchanges7713 +Node: Sockets package8810 +Node: Accept_Socket (procedure)11077 +Node: Bind (procedure)12908 +Node: Connect (procedure)14181 +Node: Get (function)15566 +Node: Get_Char (function)16763 +Node: Get_Line (function)17624 +Node: Get_Line (procedure)18931 +Node: Get_Receive_Queue_Size (function)20096 +Node: Get_Send_Queue_Size (function)20964 +Node: Getsockopt (procedure)21821 +Node: Listen (procedure)23139 +Node: New_Line (procedure)24015 +Node: Put (procedure)24737 +Node: Put_Line (procedure)25468 +Node: Receive (function)26254 +Node: Receive (procedure)27463 +Node: Receive_Some (procedure)28486 +Node: Send (procedure)29673 +Node: Set_Buffer (procedure)30412 +Node: Setsockopt (procedure)31625 +Node: Shutdown (procedure)32923 +Node: Socket (procedure)33561 +Node: Unset_Buffer (procedure)34935 +Node: Sockets.Multicast package35634 +Node: Create_Multicast_Socket (function)36459 +Node: Sockets.Naming package40057 +Node: Address_Of (function)42568 +Node: Any_Address (function)43152 +Node: Get_Peer_Addr (function)43563 +Node: Get_Peer_Port (function)44135 +Node: Get_Sock_Addr (function)44725 +Node: Get_Sock_Port (function)45317 +Node: Host_Name (function)45901 +Node: Image (function)46417 +Node: Info_Of_Name_Or_IP (function)46893 +Node: Is_IP_Address (function)47619 +Node: Name_Of (function)48129 +Node: Value (function)48712 +Node: Contributors49164 +Node: Resources on the Internet50550 +Node: Index50984  End Tag Table --- adasockets-1.9.orig/doc/adasockets.log +++ adasockets-1.9/doc/adasockets.log @@ -0,0 +1,249 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdfetex 2014.10.18) 18 OCT 2014 16:11 +entering extended mode + restricted \write18 enabled. + file:line:error style messages enabled. + %&-line parsing enabled. +**\catcode126=12 \def\normaltilde{~}\catcode126=13 \let~\normaltilde \input ./ +./adasockets.texi +(././adasockets.texi (/usr/share/texmf/tex/texinfo/texinfo.tex +Loading texinfo [version 2013-09-11.11]: +\bindingoffset=\dimen16 +\normaloffset=\dimen17 +\pagewidth=\dimen18 +\pageheight=\dimen19 +\outerhsize=\dimen20 +\outervsize=\dimen21 +\cornerlong=\dimen22 +\cornerthick=\dimen23 +\topandbottommargin=\dimen24 +\headlinebox=\box16 +\footlinebox=\box17 +\margin=\insert252 +\EMsimple=\toks13 +\groupbox=\box18 +\groupinvalidhelp=\toks14 +\mil=\dimen25 +\exdentamount=\skip18 +\inmarginspacing=\skip19 +\centerpenalty=\count27 + pdf, +\tempnum=\count28 +\lnkcount=\count29 +\filename=\toks15 +\filenamelength=\count30 +\pgn=\count31 +\toksA=\toks16 +\toksB=\toks17 +\toksC=\toks18 +\toksD=\toks19 +\boxA=\box19 +\countA=\count32 +\nopdfimagehelp=\toks20 + fonts, +\sffam=\fam8 +\textleading=\dimen26 + markup, +\fontdepth=\count33 + glyphs, +\errorbox=\box20 + +page headings, +\titlepagetopglue=\skip20 +\titlepagebottomglue=\skip21 +\evenheadline=\toks21 +\oddheadline=\toks22 +\evenfootline=\toks23 +\oddfootline=\toks24 + tables, +\tableindent=\dimen27 +\itemindent=\dimen28 +\itemmargin=\dimen29 +\itemmax=\dimen30 +\itemno=\count34 +\multitableparskip=\skip22 +\multitableparindent=\skip23 +\multitablecolspace=\dimen31 +\multitablelinespace=\skip24 +\colcount=\count35 +\everytab=\toks25 + conditionals, +\doignorecount=\count36 + indexing, +\whatsitskip=\skip25 +\whatsitpenalty=\count37 +\secondaryindent=\skip26 +\partialpage=\box21 +\doublecolumnhsize=\dimen32 + sectioning, +\unnumberedno=\count38 +\chapno=\count39 +\secno=\count40 +\subsecno=\count41 +\subsubsecno=\count42 +\appendixno=\count43 +\absseclevel=\count44 +\secbase=\count45 +\chapheadingskip=\skip27 +\secheadingskip=\skip28 +\subsecheadingskip=\skip29 + toc, +\tocfile=\write0 +\contentsrightmargin=\skip30 +\savepageno=\count46 +\lastnegativepageno=\count47 +\tocindent=\dimen33 + environments, +\lispnarrowing=\skip31 +\envskipamount=\skip32 +\circthick=\dimen34 +\cartouter=\dimen35 +\cartinner=\dimen36 +\normbskip=\skip33 +\normpskip=\skip34 +\normlskip=\skip35 +\lskip=\skip36 +\rskip=\skip37 +\nonfillparindent=\dimen37 +\tabw=\dimen38 +\verbbox=\box22 + +defuns, +\defbodyindent=\skip38 +\defargsindent=\skip39 +\deflastargmargin=\skip40 +\defunpenalty=\count48 +\parencount=\count49 +\brackcount=\count50 + macros, +\paramno=\count51 +\macname=\toks26 + cross references, +\auxfile=\write1 +\savesfregister=\count52 +\toprefbox=\box23 +\printedrefnamebox=\box24 +\infofilenamebox=\box25 +\printedmanualbox=\box26 + insertions, +\footnoteno=\count53 +\SAVEfootins=\box27 +\SAVEmargin=\box28 + +(/usr/share/texlive/texmf-dist/tex/generic/epsf/epsf.tex +This is `epsf.tex' v2.7.4 <14 February 2011> +\epsffilein=\read1 +\epsfframemargin=\dimen39 +\epsfframethickness=\dimen40 +\epsfrsize=\dimen41 +\epsftmp=\dimen42 +\epsftsize=\dimen43 +\epsfxsize=\dimen44 +\epsfysize=\dimen45 +\pspoints=\dimen46 +) +\noepsfhelp=\toks27 + localization, +\nolanghelp=\toks28 +\countUTFx=\count54 +\countUTFy=\count55 +\countUTFz=\count56 + formatting, +\defaultparindent=\dimen47 + and turning on texinfo input format.) +(./adasockets.aux) +\openout1 = `adasockets.aux'. + +@cpindfile=@write2 +@fnindfile=@write3 +@vrindfile=@write4 +@tpindfile=@write5 +@kyindfile=@write6 +@pgindfile=@write7 +texinfo.tex: doing @include of version.texi + + (./version.texi) [1 +\openout2 = `adasockets.cp'. + +\openout3 = `adasockets.fn'. + +\openout4 = `adasockets.vr'. + +\openout5 = `adasockets.tp'. + +\openout6 = `adasockets.ky'. + +\openout7 = `adasockets.pg'. + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] +@ctindfile=@write8 +@exindfile=@write9 + (./adasockets.toc [-1 +\openout8 = `adasockets.ct'. + +\openout9 = `adasockets.ex'. + +]) [-2] (./adasockets.toc) +(./adasockets.toc) Chapter 1 +\openout0 = `adasockets.toc'. + + Chapter 2 [1] [2] Chapter 3 [3] [4] [5] Chapter 4 +[6] +texinfo.tex: doing @include of sockets.texi + + (./sockets.texi [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]) +Chapter 5 [18] +texinfo.tex: doing @include of sockets-multicast.texi + + (./sockets-multicast.texi [19]pdfTeX warning (ext4): destination with the same + identifier (name{Create_Multicast_Socket\040\(function\)}) has been already us +ed, duplicate ignored + + } +@setref #1#2->@pdfmkdest {#1} + @iflinks {@atdummies @edef @writexrdef ##1##2{@... + +@donoderef ...empty @else @setref {@lastnode }{#1} + @global @let @lastnode =@e... + +@sectionheading ...nlevel }{#1}{#4}@donoderef {#3} + @nobreak @vbox {@hyphenpen... + +@genhead ...czzz {#3}@or @unnumberedsubseczzz {#3} + @or @unnumberedsubsubseczz... +l.80 ...dsubsec Create_Multicast_Socket (function) + ) Chapter 6 [20] +texinfo.tex: doing @include of sockets-naming.texi + + +(./sockets-naming.texi [21] [22] [23] [24]) Appendix A [25] [26] +Missing character: There is no é in font cmr10! + Appendix B +[27] [28] (Index) [29] [30] (./adasockets.cps [31]) [32] ) +Here is how much of TeX's memory you used: + 2194 strings out of 497107 + 29417 string characters out of 6206791 + 112880 words of memory out of 5000000 + 3200 multiletter control sequences out of 15000+600000 + 32127 words of font info for 112 fonts, out of 8000000 for 9000 + 51 hyphenation exceptions out of 8191 + 14i,6n,16p,436b,625s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on adasockets.pdf (36 pages, 256664 bytes). +PDF statistics: + 822 PDF objects out of 1000 (max. 8388607) + 760 compressed objects within 8 object streams + 85 named destinations out of 1000 (max. 500000) + 429 words of extra memory for PDF output out of 10000 (max. 10000000) + --- adasockets-1.9.orig/doc/adasockets.texi +++ adasockets-1.9/doc/adasockets.texi @@ -3,16 +3,12 @@ @settitle AdaSockets reference manual @setchapternewpage odd - @include version.texi -@ifinfo -@format -START-INFO-DIR-ENTRY +@dircategory Libraries +@direntry * adasockets: (adasockets). AdaSockets reference manual -END-INFO-DIR-ENTRY -@end format -@end ifinfo +@end direntry @ifinfo Copyright @copyright{} 2002-2013 Samuel Tardieu --- adasockets-1.9.orig/doc/adasockets.toc +++ adasockets-1.9/doc/adasockets.toc @@ -0,0 +1,52 @@ +@numchapentry{What is AdaSockets?}{1}{What is AdaSockets?}{1} +@numchapentry{Installing AdaSockets}{2}{Installing AdaSockets}{3} +@numchapentry{Using AdaSockets}{3}{Using AdaSockets}{5} +@numsecentry{Compiling an Ada application}{3.1}{Compiling an Ada application}{5} +@numsecentry{Setting up unicast sockets}{3.2}{Setting up unicast sockets}{5} +@numsecentry{Setting up multicast sockets}{3.3}{Setting up multicast sockets}{5} +@numsecentry{Sending and receiving data}{3.4}{Sending and receiving data}{6} +@numsubsecentry{Raw data manipulation}{3.4.1}{Raw data manipulation}{6} +@numsubsecentry{String-oriented exchanges}{3.4.2}{String-oriented exchanges}{6} +@numchapentry{Sockets package}{4}{Sockets package}{7} +@unnsubsecentry{Accept_Socket (procedure)}{10000.0.1}{Accept_Socket (procedure)}{7} +@unnsubsecentry{Bind (procedure)}{10000.0.2}{Bind (procedure)}{8} +@unnsubsecentry{Connect (procedure)}{10000.0.3}{Connect (procedure)}{8} +@unnsubsecentry{Get (function)}{10000.0.4}{Get (function)}{9} +@unnsubsecentry{Get_Char (function)}{10000.0.5}{Get_Char (function)}{9} +@unnsubsecentry{Get_Line (function)}{10000.0.6}{Get_Line (function)}{10} +@unnsubsecentry{Get_Line (procedure)}{10000.0.7}{Get_Line (procedure)}{10} +@unnsubsecentry{Get_Receive_Queue_Size (function)}{10000.0.8}{Get_Receive_Queue_Size (function)}{11} +@unnsubsecentry{Get_Send_Queue_Size (function)}{10000.0.9}{Get_Send_Queue_Size (function)}{11} +@unnsubsecentry{Getsockopt (procedure)}{10000.0.10}{Getsockopt (procedure)}{12} +@unnsubsecentry{Listen (procedure)}{10000.0.11}{Listen (procedure)}{12} +@unnsubsecentry{New_Line (procedure)}{10000.0.12}{New_Line (procedure)}{13} +@unnsubsecentry{Put (procedure)}{10000.0.13}{Put (procedure)}{13} +@unnsubsecentry{Put_Line (procedure)}{10000.0.14}{Put_Line (procedure)}{14} +@unnsubsecentry{Receive (function)}{10000.0.15}{Receive (function)}{14} +@unnsubsecentry{Receive (procedure)}{10000.0.16}{Receive (procedure)}{15} +@unnsubsecentry{Receive_Some (procedure)}{10000.0.17}{Receive_Some (procedure)}{15} +@unnsubsecentry{Send (procedure)}{10000.0.18}{Send (procedure)}{16} +@unnsubsecentry{Set_Buffer (procedure)}{10000.0.19}{Set_Buffer (procedure)}{16} +@unnsubsecentry{Setsockopt (procedure)}{10000.0.20}{Setsockopt (procedure)}{16} +@unnsubsecentry{Shutdown (procedure)}{10000.0.21}{Shutdown (procedure)}{17} +@unnsubsecentry{Socket (procedure)}{10000.0.22}{Socket (procedure)}{17} +@unnsubsecentry{Unset_Buffer (procedure)}{10000.0.23}{Unset_Buffer (procedure)}{18} +@numchapentry{Sockets.Multicast package}{5}{Sockets.Multicast package}{19} +@unnsubsecentry{Create_Multicast_Socket (function)}{10000.0.1}{Create_Multicast_Socket (function)}{19} +@unnsubsecentry{Create_Multicast_Socket (function)}{10000.0.2}{Create_Multicast_Socket (function)}{20} +@numchapentry{Sockets.Naming package}{6}{Sockets.Naming package}{21} +@unnsubsecentry{Address_Of (function)}{10000.0.1}{Address_Of (function)}{21} +@unnsubsecentry{Any_Address (function)}{10000.0.2}{Any_Address (function)}{22} +@unnsubsecentry{Get_Peer_Addr (function)}{10000.0.3}{Get_Peer_Addr (function)}{22} +@unnsubsecentry{Get_Peer_Port (function)}{10000.0.4}{Get_Peer_Port (function)}{22} +@unnsubsecentry{Get_Sock_Addr (function)}{10000.0.5}{Get_Sock_Addr (function)}{22} +@unnsubsecentry{Get_Sock_Port (function)}{10000.0.6}{Get_Sock_Port (function)}{23} +@unnsubsecentry{Host_Name (function)}{10000.0.7}{Host_Name (function)}{23} +@unnsubsecentry{Image (function)}{10000.0.8}{Image (function)}{23} +@unnsubsecentry{Info_Of_Name_Or_IP (function)}{10000.0.9}{Info_Of_Name_Or_IP (function)}{24} +@unnsubsecentry{Is_IP_Address (function)}{10000.0.10}{Is_IP_Address (function)}{24} +@unnsubsecentry{Name_Of (function)}{10000.0.11}{Name_Of (function)}{24} +@unnsubsecentry{Value (function)}{10000.0.12}{Value (function)}{25} +@appentry{Contributors}{A}{Contributors}{27} +@appentry{Resources on the Internet}{B}{Resources on the Internet}{29} +@unnchapentry{Index}{10001}{Index}{31} --- adasockets-1.9.orig/doc/stamp-vti +++ adasockets-1.9/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 2 August 2014 -@set UPDATED-MONTH August 2014 +@set UPDATED 18 October 2014 +@set UPDATED-MONTH October 2014 @set EDITION 1.9 @set VERSION 1.9 --- adasockets-1.9.orig/doc/version.texi +++ adasockets-1.9/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 2 August 2014 -@set UPDATED-MONTH August 2014 +@set UPDATED 18 October 2014 +@set UPDATED-MONTH October 2014 @set EDITION 1.9 @set VERSION 1.9 --- adasockets-1.9.orig/examples/Makefile.in +++ adasockets-1.9/examples/Makefile.in @@ -257,9 +257,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign examples/Makefile + $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ --- adasockets-1.9.orig/man/Makefile.in +++ adasockets-1.9/man/Makefile.in @@ -284,9 +284,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign man/Makefile + $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ --- adasockets-1.9.orig/src/Makefile.am +++ adasockets-1.9/src/Makefile.am @@ -21,7 +21,7 @@ sockets-types.ads libadasockets_la_LDFLAGS = -version-info $(LIBVERSIONINFO) libadasockets_la_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) \ - -o libadasockets.la + -o libadasockets.la -version-info $(LIBVERSIONINFO) EXTRA_DIST = Makefile.RTEMS Makefile.VMS sockets-vms_link.ads \ sockets-windows_link.ads sockets-windows_link.adb \ --- adasockets-1.9.orig/src/Makefile.in +++ adasockets-1.9/src/Makefile.in @@ -330,7 +330,7 @@ $(am__append_1) libadasockets_la_LDFLAGS = -version-info $(LIBVERSIONINFO) libadasockets_la_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) \ - -o libadasockets.la + -o libadasockets.la -version-info $(LIBVERSIONINFO) EXTRA_DIST = Makefile.RTEMS Makefile.VMS sockets-vms_link.ads \ sockets-windows_link.ads sockets-windows_link.adb \ @@ -367,9 +367,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile + $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ --- adasockets-1.9.orig/support/libtool.m4 +++ adasockets-1.9/support/libtool.m4 @@ -1312,7 +1312,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1324,9 +1324,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1345,7 +1355,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1688,7 +1701,8 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -2512,17 +2526,6 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -2639,7 +2642,7 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -2684,6 +2687,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -3243,10 +3258,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3285,11 +3296,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4037,7 +4048,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4101,7 +4112,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4336,7 +4347,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4578,6 +4589,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -4640,6 +4654,9 @@ openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4861,7 +4878,7 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5038,6 +5055,7 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then @@ -5342,7 +5360,7 @@ _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -6222,9 +6240,6 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -6386,7 +6401,7 @@ _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler --- adasockets-1.9.orig/support/ltmain.sh +++ adasockets-1.9/support/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 +VERSION="2.4.2 Debian-2.4.2-1.11" TIMESTAMP="" package_revision=1.3337 @@ -6124,7 +6124,10 @@ case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then @@ -6444,19 +6447,19 @@ # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -7349,6 +7352,9 @@ revision="$number_minor" lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; esac ;; no)