diff -Nru ion-3.2.0~dfsg1/aclocal.m4 ion-3.2.1+dfsg/aclocal.m4 --- ion-3.2.0~dfsg1/aclocal.m4 2013-12-30 23:31:14.000000000 +0000 +++ ion-3.2.1+dfsg/aclocal.m4 2014-07-08 02:18:07.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.13.3 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -32,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.3], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,7 +51,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.3])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -76,7 +76,8 @@ : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [am_cv_ar_interface=ar + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) @@ -93,7 +94,7 @@ fi rm -f conftest.lib libconftest.a ]) - ]) + AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) @@ -168,6 +169,43 @@ am_aux_dir=`cd $ac_aux_dir && pwd` ]) +# AM_COND_IF -*- Autoconf -*- + +# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_COND_IF +# _AM_COND_ELSE +# _AM_COND_ENDIF +# -------------- +# These macros are only used for tracing. +m4_define([_AM_COND_IF]) +m4_define([_AM_COND_ELSE]) +m4_define([_AM_COND_ENDIF]) + +# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) +# --------------------------------------- +# If the shell condition COND is true, execute IF-TRUE, otherwise execute +# IF-FALSE. Allow automake to learn about conditional instantiating macros +# (the AC_CONFIG_FOOS). +AC_DEFUN([AM_COND_IF], +[m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) + # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. @@ -477,6 +515,12 @@ # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -585,7 +629,48 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + 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 @@ -593,7 +678,6 @@ m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -705,38 +789,6 @@ rm -f confinc confmf ]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. @@ -807,6 +859,70 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. diff -Nru ion-3.2.0~dfsg1/ams/doc/Makefile ion-3.2.1+dfsg/ams/doc/Makefile --- ion-3.2.0~dfsg1/ams/doc/Makefile 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/doc/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -17,6 +17,7 @@ ./man/man1/amssub.1 \ ./man/man1/ramsgate.1 \ ./man/man3/ams.3 \ + ./man/man5/petition_log.5 \ ./man/man5/amsrc.5 \ ./man/man5/amsxml.5 @@ -34,6 +35,7 @@ ./html/man1/amssub.html \ ./html/man1/ramsgate.html \ ./html/man3/ams.html \ + ./html/man5/petition_log.html \ ./html/man5/amsrc.html \ ./html/man5/amsxml.html diff -Nru ion-3.2.0~dfsg1/ams/doc/pod1/ramsgate.pod ion-3.2.1+dfsg/ams/doc/pod1/ramsgate.pod --- ion-3.2.0~dfsg1/ams/doc/pod1/ramsgate.pod 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/doc/pod1/ramsgate.pod 2014-07-08 02:17:38.000000000 +0000 @@ -98,4 +98,4 @@ =head1 SEE ALSO -amsrc(5) +amsrc(5), petition_log(5) diff -Nru ion-3.2.0~dfsg1/ams/doc/pod5/petition_log.pod ion-3.2.1+dfsg/ams/doc/pod5/petition_log.pod --- ion-3.2.0~dfsg1/ams/doc/pod5/petition_log.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/ams/doc/pod5/petition_log.pod 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,60 @@ +=head1 NAME + +petition.log - Remote AMS petition log + +=head1 DESCRIPTION + +The Remote AMS daemon B records all "petitions" (requests for data +on behalf of AMS modules in other continua) in a file named B. +At startup, the B daemon automatically reads and processes all +petitions in the B file just as if they were received in real +time, to re-establish the petition state that was in effect at the time the +B daemon shut down. Note that this means that you can cause +petitions to be, in effect, "pre-received" by simply editing this file +prior to startup. This can be an especially effective way to configure a +RAMS network in which long signal propagation times would otherwise retard +real-time petitioning and thus delay the onset of fully functional message +exchange. + +Entries in B are simple ASCII text lines, with parameters +separated by spaces. Each line of B has the following parameters: + +=over 4 + +=item protocolId + +This is a number that identifies the RAMS network protocol characterizing +the network on which the petition was received: 1 == DTN Bundle Protocol, 2 = UDP. + +=item gatewayID + +This is a string that identifies the remote RAMS gateway node that issued +this petition. + +=item controlCode + +This is a number that indicates whether the petition described by this line +is one that is being asserted (2) or canceled (3). + +=item subject + +A number that identifies the subject of the traffic to which the petition +pertains. + +=item continuumNumber + +Identifies the continuum for the domain of the petition. + +=item unitNumber + +Identifies the unit for the domain of the petition. + +=item roleNumber + +Identifies the role for the domain of the petition. + +=back + +=head1 SEE ALSO + +ramsgate(1), ams(3) diff -Nru ion-3.2.0~dfsg1/ams/i86-redhat/Makefile ion-3.2.1+dfsg/ams/i86-redhat/Makefile --- ion-3.2.0~dfsg1/ams/i86-redhat/Makefile 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/i86-redhat/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -5,7 +5,7 @@ RAMS = ../rams # OPT = -O -Dlinux -OPT = -g -Wall -Werror -Dlinux -DUDPTS -DTCPTS -DDGRTS +OPT = -g -Wall -Werror -Dlinux -DUDPTS -DTCPTS -DDGRTS -DNOEXPAT CC = gcc $(OPT) -I$(API) -I$(INCL) -I$(RAMS) -I$(ROOT)/include LDFLAGS = -fPIC -shared -rdynamic LD = gcc $(LDFLAGS) diff -Nru ion-3.2.0~dfsg1/ams/library/amscommon.c ion-3.2.1+dfsg/ams/library/amscommon.c --- ion-3.2.0~dfsg1/ams/library/amscommon.c 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/library/amscommon.c 2014-07-08 02:17:38.000000000 +0000 @@ -1505,7 +1505,7 @@ for (i = 1; i <= MAX_MODULE_NBR; i++) { - if (createModule(cell, i) < 0) + if (createModule(cell, i) == NULL) { eraseUnit(venture, unit); return NULL; diff -Nru ion-3.2.0~dfsg1/ams/library/amsd.c ion-3.2.1+dfsg/ams/library/amsd.c --- ion-3.2.0~dfsg1/ams/library/amsd.c 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/library/amsd.c 2014-07-08 02:17:38.000000000 +0000 @@ -1096,7 +1096,7 @@ (*cursor)++; (*bytesRemaining)--; - if (parseString(cursor, bytesRemaining, &len) < 0) + if (parseString(cursor, bytesRemaining, &len) == NULL) { return -1; } diff -Nru ion-3.2.0~dfsg1/ams/library/tcpts.c ion-3.2.1+dfsg/ams/library/tcpts.c --- ion-3.2.0~dfsg1/ams/library/tcpts.c 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/library/tcpts.c 2014-07-08 02:17:38.000000000 +0000 @@ -707,20 +707,32 @@ pthread_mutex_lock(&tcpSap->sendPoolMutex); if (tcpSap->firstInSendPool != tsep) { - tsep->prev->next = tsep->next; - if (tsep->next) + if (tsep->prev == NULL) { - tsep->next->prev = tsep->prev; + /* Apparently this can happen; don't + * know how. A race condition, somewhere, + * that is not yet tracked down. */ + + putErrmsg("tcpts sender pool corrupted; continuing.", + NULL); } else { - tcpSap->lastInSendPool = tsep->prev; - } + tsep->prev->next = tsep->next; + if (tsep->next) + { + tsep->next->prev = tsep->prev; + } + else + { + tcpSap->lastInSendPool = tsep->prev; + } - tsep->next = tcpSap->firstInSendPool; - tsep->prev = NULL; - tcpSap->firstInSendPool->prev = tsep; - tcpSap->firstInSendPool = tsep; + tsep->next = tcpSap->firstInSendPool; + tsep->prev = NULL; + tcpSap->firstInSendPool->prev = tsep; + tcpSap->firstInSendPool = tsep; + } } pthread_mutex_unlock(&tcpSap->sendPoolMutex); diff -Nru ion-3.2.0~dfsg1/ams/library/udpts.c ion-3.2.1+dfsg/ams/library/udpts.c --- ion-3.2.0~dfsg1/ams/library/udpts.c 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/library/udpts.c 2014-07-08 02:17:38.000000000 +0000 @@ -102,6 +102,7 @@ || getsockname(fd, &socketName, &nameLength) < 0) { putSysErrmsg("udpts can't initialize AMS SAP", NULL); + closesocket(fd); return -1; } @@ -241,6 +242,7 @@ || getsockname(fd, &socketName, &nameLength) < 0) { putSysErrmsg("udpts can't initialize AMS SAP", NULL); + closesocket(fd); return -1; } diff -Nru ion-3.2.0~dfsg1/ams/rams/librams.c ion-3.2.1+dfsg/ams/rams/librams.c --- ion-3.2.0~dfsg1/ams/rams/librams.c 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/rams/librams.c 2014-07-08 02:17:38.000000000 +0000 @@ -2014,7 +2014,7 @@ * is unaffected by this cancellation, so * there's no need to cancel anything else. */ - if (!PetitionIsAssertable(gWay, pet) < 0) + if (!PetitionIsAssertable(gWay, pet)) { if (CancelPetition(gWay, pet) < 0) { @@ -2102,7 +2102,7 @@ #endif /* May now be able to cancel petition altogether. */ - if (!PetitionIsAssertable(gWay, aPet) < 0) + if (!PetitionIsAssertable(gWay, aPet)) { if (CancelPetition(gWay, aPet) < 0) { diff -Nru ion-3.2.0~dfsg1/ams/test/amslogprt.c ion-3.2.1+dfsg/ams/test/amslogprt.c --- ion-3.2.0~dfsg1/ams/test/amslogprt.c 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/ams/test/amslogprt.c 2014-07-08 02:17:38.000000000 +0000 @@ -77,7 +77,7 @@ break; } - if (strlen((char *) buffer) == (contentLength - 1)) + if (buffer[contentLength - 1] == 0) { printf("%32s %10d '%s'\n", subjectName, contentLength, buffer); diff -Nru ion-3.2.0~dfsg1/arch-android/iondtn/jni/Android.mk ion-3.2.1+dfsg/arch-android/iondtn/jni/Android.mk --- ion-3.2.0~dfsg1/arch-android/iondtn/jni/Android.mk 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/arch-android/iondtn/jni/Android.mk 2014-07-08 02:17:38.000000000 +0000 @@ -30,8 +30,10 @@ $(MY_ICI)/library/smlist.c \ $(MY_ICI)/library/smrbt.c \ $(MY_ICI)/library/ion.c \ + $(MY_ICI)/library/ionsec.c \ $(MY_ICI)/library/rfx.c \ $(MY_ICI)/library/zco.c \ + $(MY_ICI)/crypto/NULL_SUITES/crypto.c \ $(MY_ICI)/sdr/sdrtable.c \ $(MY_ICI)/sdr/sdrhash.c \ $(MY_ICI)/sdr/sdrxn.c \ @@ -42,9 +44,8 @@ $(MY_ICI)/daemon/rfxclock.c \ $(MY_ICI)/utils/ionadmin.c \ $(MY_ICI)/utils/sdrmend.c \ - $(MY_ICI)/library/ionsec.c \ $(MY_ICI)/utils/ionsecadmin.c \ - $(MY_ICI)/utils/ionwarn.c + $(MY_ICI)/utils/ionwarn.c # $(MY_ICI)/utils/ionexit.c \ @@ -69,6 +70,24 @@ # $(MY_LTP)/udp/udplso.c \ # $(MY_LTP)/utils/ltpadmin.c +# NOTE: can't include BSSP in bionic build until duplication +# of function and variable names between bp/tcp/libtcpcla.c +# and bssp/tcp/libtcpbsa.c is resolve. Best approach is to +# abstract this common TCP stuff out of BP and move it to ici. + +# MY_BSSP := ../../../bssp + +# MY_BSSPSOURCES := \ +# $(MY_BSSP)/library/libbssp.c \ +# $(MY_BSSP)/library/libbsspP.c \ +# $(MY_BSSP)/daemon/bsspclock.c \ +# $(MY_BSSP)/udp/udpbsi.c \ +# $(MY_BSSP)/udp/udpbso.c \ +# $(MY_BSSP)/tcp/tcpbsi.c \ +# $(MY_BSSP)/tcp/tcpbso.c \ +# $(MY_BSSP)/tcp/libtcpbsa.c \ +# $(MY_BSSP)/utils/bsspadmin.c + MY_BP := ../../../bp MY_BPSOURCES := \ @@ -96,11 +115,12 @@ $(MY_BP)/tcp/libtcpcla.c \ $(MY_BP)/dgr/dgrcla.c \ $(MY_BP)/library/bei.c \ + $(MY_BP)/library/ext/phn/phn.c \ $(MY_BP)/library/ext/ecos/ecos.c \ $(MY_BP)/library/ext/bae/bae.c -# $(MY_BP)/ltp/ltpcli.c \ -# $(MY_BP)/ltp/ltpclo.c \ +# $(MY_BP)/ltp/ltpcli.c \ +# $(MY_BP)/ltp/ltpclo.c \ MY_BSP := $(MY_BP)/library/ext/bsp @@ -108,17 +128,22 @@ $(MY_BSP)/extbsputil.c \ $(MY_BSP)/extbspbab.c \ $(MY_BSP)/extbsppib.c \ - $(MY_BSP)/extbsppcb.c \ - $(MY_BP)/library/crypto/NULL_SUITES/crypto.c + $(MY_BSP)/extbsppcb.c MY_DTN2 := $(MY_BP)/dtn2 MY_DTN2SOURCES := \ - $(MY_DTN2)/dtn2admin.c \ - $(MY_DTN2)/dtn2fw.c \ - $(MY_DTN2)/dtn2adminep.c \ + $(MY_DTN2)/dtn2admin.c \ + $(MY_DTN2)/dtn2fw.c \ + $(MY_DTN2)/dtn2adminep.c \ $(MY_DTN2)/libdtn2fw.c +MY_BSS := ../../../bss + +MY_BSSSOURCES := \ + $(MY_BSS)/library/libbss.c \ + $(MY_BSS)/library/libbssP.c + # MY_TEST := $(MY_BP)/test # MY_TESTSOURCES = \ @@ -135,15 +160,16 @@ # $(MY_CFDP)/daemon/cfdpclock.c \ # $(MY_CFDP)/utils/cfdpadmin.c \ -LOCAL_C_INCLUDES := $(MY_ICI)/include $(MY_ICI)/library $(MY_DGR)/include $(MY_BP)/include $(MY_BP)/library $(MY_BP)/ipn $(MY_BP)/imc $(MY_BP)/dtn2 $(MY_BP)/library/crypto $(MY_BP)/library/ext $(MY_BP)/library/ext/bsp $(MY_BP)/library/ext/ecos $(MY_BP)/library/ext/bae +LOCAL_C_INCLUDES := $(MY_ICI)/include $(MY_ICI)/library $(MY_DGR)/include $(MY_BP)/include $(MY_BP)/library $(MY_BP)/ipn $(MY_BP)/imc $(MY_BP)/dtn2 $(MY_BP)/library/ext $(MY_BP)/library/ext/bsp $(MY_BP)/library/ext/ecos $(MY_BP)/library/ext/bae $(MY_BP)/library/ext/phn $(MY_BSS)/include $(MY_BSS)/library +# $(MY_BSSP)/include $(MY_BSSP)/library $(MY_BSSP)/udp $(MY_BSSP)/tcp # $(MY_LTP)/include $(MY_LTP)/library $(MY_LTP)/udp # $(MY_CFDP)/include $(MY_CFDP)/library LOCAL_CFLAGS = -g -Wall -Werror -Dbionic -DBP_EXTENDED -DGDSSYMTAB -DGDSLOGGER -DUSING_SDR_POINTERS -DNO_SDR_TRACE -DNO_PSM_TRACE -DENABLE_IMC # -DENABLE_ACS -DNO_PROXY -DNO_DIRLIST -LOCAL_SRC_FILES := iondtn.c $(MY_ICISOURCES) $(MY_DGRSOURCES) $(MY_BPSOURCES) $(MY_BSPSOURCES) $(MY_DTN2SOURCES) +LOCAL_SRC_FILES := iondtn.c $(MY_ICISOURCES) $(MY_DGRSOURCES) $(MY_BPSOURCES) $(MY_BSPSOURCES) $(MY_DTN2SOURCES) $(MY_BSSSOURCES) # $(MY_RESTARTSOURCE) $(MY_LTPSOURCES) $(MY_TESTSOURCES) $(MY_CFDPSOURCES) diff -Nru ion-3.2.0~dfsg1/arch-rtems/Makefile ion-3.2.1+dfsg/arch-rtems/Makefile --- ion-3.2.0~dfsg1/arch-rtems/Makefile 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/arch-rtems/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -34,6 +34,7 @@ sdrmend.c \ ionsec.c \ ionsecadmin.c \ + crypto.c \ ionwarn.c \ ionrestart.c \ ionexit.c @@ -41,6 +42,8 @@ LTPSOURCES = \ libltp.c \ libltpP.c \ + libltpnm.c \ + ltpei.c \ ltpclock.c \ ltpmeter.c \ pmqlsi.c \ @@ -64,6 +67,7 @@ ltpcli.c \ ltpclo.c \ bei.c \ + phn.c \ ecos.c \ bae.c @@ -78,18 +82,20 @@ # acsserialize.c \ # acsadmin.c \ # acslist.c \ -# phn.c \ BSPSOURCES = \ extbsputil.c \ extbspbab.c \ extbsppib.c \ - extbsppcb.c \ - crypto.c + extbsppcb.c DTN2SOURCES = \ libdtn2fw.c +BSSSOURCES = \ + libbss.c \ + libbssP.c \ + CFDPSOURCES = \ bputa.c \ cfdpclock.c \ @@ -130,7 +136,7 @@ OBJS = $(COBJS) $(CXXOBJS) $(ASOBJS) -INCLUDES_T= -I. -I../ici/include -I../dgr/include -I../ltp/include -I../bp/include +INCLUDES_T= -I. -I../ici/include -I../dgr/include -I../ltp/include -I../bp/include -I../bss/include -I../bssp/include ifeq "$(ION_OPEN_SOURCE)" "1" INCLUDES = $(INCLUDES_T) -I../cfdp/include -I../ams/include diff -Nru ion-3.2.0~dfsg1/arch-rtems/srclinks ion-3.2.1+dfsg/arch-rtems/srclinks --- ion-3.2.0~dfsg1/arch-rtems/srclinks 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/arch-rtems/srclinks 2014-07-08 02:17:38.000000000 +0000 @@ -13,6 +13,8 @@ ln -s ../ici/library/smrbt.c ln -s ../ici/library/ion.c ln -s ../ici/library/ionsec.c +ln -s ../ici/crypto/sample_crypto.h +ln -s ../ici/crypto/$CRYPTO/crypto.c ln -s ../ici/library/rfx.c ln -s ../ici/library/zco.c ln -s ../ici/sdr/sdrtable.c @@ -40,6 +42,8 @@ ln -s ../bp/library/ext/ecos/ecos.h ln -s ../bp/library/ext/bae/bae.c ln -s ../bp/library/ext/bae/bae.h +ln -s ../bp/library/ext/phn/phn.c +ln -s ../bp/library/ext/phn/phn.h ln -s ../bp/library/ext/bsp/extbspbab.c ln -s ../bp/library/ext/bsp/extbspbab.h ln -s ../bp/library/ext/bsp/extbsppib.c @@ -48,9 +52,6 @@ ln -s ../bp/library/ext/bsp/extbsppcb.h ln -s ../bp/library/ext/bsp/extbsputil.c ln -s ../bp/library/ext/bsp/extbsputil.h -ln -s ../bp/library/crypto/crypto.h -ln -s ../bp/library/crypto/sample_crypto.h -ln -s ../bp/library/crypto/$CRYPTO/crypto.c ln -s ../bp/daemon/bpclock.c ln -s ../bp/utils/bpadmin.c ln -s ../bp/utils/bpstats.c @@ -72,10 +73,22 @@ ln -s ../bp/ltp/ltpcla.h ln -s ../ltp/library/libltp.c ln -s ../ltp/library/libltpP.c +ln -s ../ltp/library/libltpnm.c +ln -s ../ltp/library/ltpei.c +ln -s ../ltp/library/ext/ltpextensions.c ln -s ../ltp/library/ltpP.h +ln -s ../ltp/library/ltpnm.h +ln -s ../ltp/library/ltpei.h ln -s ../ltp/daemon/ltpclock.c -ln -s ../ltp/daemon/ltpmeter.c ln -s ../ltp/utils/ltpadmin.c +ln -s ../bssp/library/libbssp.c +ln -s ../bssp/library/libbsspP.c +ln -s ../bssp/library/bsspP.h +ln -s ../bssp/daemon/bsspclock.c +ln -s ../bssp/utils/bsspadmin.c +ln -s ../bss/library/libbss.c +ln -s ../bss/library/libbssP.c +ln -s ../bss/library/bssP.h ln -s ../restart/utils/ionrestart.c if [ "$ION_OPEN_SOURCE" == "1" ];then ln -s ../cfdp/library/libcfdp.c @@ -107,8 +120,8 @@ # ln -s ../bp/library/ext/cteb/cteb.c # ln -s ../bp/library/ext/cteb/cteb.h # -# ln -s ../bp/library/ext/phn/phn.c -# ln -s ../bp/library/ext/phn/phn.h +# ln -s ../bp/library/ext/snid/snid.c +# ln -s ../bp/library/ext/snid/snid.h # Optional extra stuff for testing. # diff -Nru ion-3.2.0~dfsg1/arch-uClibc/ion.package/ion.mk ion-3.2.1+dfsg/arch-uClibc/ion.package/ion.mk --- ion-3.2.0~dfsg1/arch-uClibc/ion.package/ion.mk 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/arch-uClibc/ion.package/ion.mk 2014-07-08 02:17:38.000000000 +0000 @@ -5,7 +5,7 @@ ############################################################# #ION_VERSION_MAJOR=3 -#ION_VERSION_MINOR=0.1 +#ION_VERSION_MINOR=2.1 #ION_VERSION:=$(ION_VERSION_MAJOR).$(ION_VERSION_MINOR) ION_VERSION:=open-source ION_SOURCE:=ion-$(ION_VERSION).tar.gz @@ -27,6 +27,8 @@ $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/dgr/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ltp/arm-uClibc all $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ltp/arm-uClibc install + $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bssp/arm-uClibc all + $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bssp/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bp/arm-uClibc all $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bp/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/cfdp/arm-uClibc all @@ -41,6 +43,7 @@ $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ici/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/dgr/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ltp/arm-uClibc install + $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bssp/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bp/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/cfdp/arm-uClibc install $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ams/arm-uClibc install @@ -51,6 +54,7 @@ $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ici/arm-uClibc clean $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/dgr/arm-uClibc clean $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ltp/arm-uClibc clean + $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bssp/arm-uClibc clean $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/bp/arm-uClibc clean $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/cfdp/arm-uClibc clean $(MAKE) TCC="$(TARGET_CC)" TLD="$(TARGET_CC)" ROOT="$(TARGET_DIR)/opt" -C $(@D)/ams/arm-uClibc clean diff -Nru ion-3.2.0~dfsg1/autom4te.cache/output.0 ion-3.2.1+dfsg/autom4te.cache/output.0 --- ion-3.2.0~dfsg1/autom4te.cache/output.0 2013-12-30 23:31:10.000000000 +0000 +++ ion-3.2.1+dfsg/autom4te.cache/output.0 2014-07-08 02:18:05.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for ion open source 3.2.0. +@%:@ Generated by GNU Autoconf 2.69 for ion open source 3.2.1. @%:@ @%:@ Report bugs to . @%:@ @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='ion' PACKAGE_TARNAME='ion' -PACKAGE_VERSION='open source 3.2.0' -PACKAGE_STRING='ion open source 3.2.0' +PACKAGE_VERSION='open source 3.2.1' +PACKAGE_STRING='ion open source 3.2.1' PACKAGE_BUGREPORT='http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs' PACKAGE_URL='' @@ -655,6 +655,8 @@ POD_DOCUMENTATION EXPAT_LIBS VALGRIND_COMPAT_CFLAGS +ENABLE_EXPAT_FALSE +ENABLE_EXPAT_TRUE ENABLE_GCOV_FALSE ENABLE_GCOV_TRUE CRYPTO_LIBS @@ -797,6 +799,7 @@ enable_crypto enable_ams_debug with_gcov +with_expat enable_valgrind ' ac_precious_vars='build_alias @@ -1348,7 +1351,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ion open source 3.2.0 to adapt to many kinds of systems. +\`configure' configures ion open source 3.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1418,7 +1421,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ion open source 3.2.0:";; + short | recursive ) echo "Configuration of ion open source 3.2.1:";; esac cat <<\_ACEOF @@ -1454,6 +1457,7 @@ --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov Turn on code coverage instrumentation + --with-expat Turn on libexpat requirements Some influential environment variables: CC C compiler command @@ -1531,7 +1535,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ion configure open source 3.2.0 +ion configure open source 3.2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1954,7 +1958,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ion $as_me open source 3.2.0, which was +It was created by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2308,7 +2312,7 @@ # all of the portability warnings introduced by autoconf v2.69 and # automake v1.12. #AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign]) -am__api_version='1.13' +am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2823,7 +2827,7 @@ # Define the identity of the package. PACKAGE='ion' - VERSION='open source 3.2.0' + VERSION='open source 3.2.1' cat >>confdefs.h <<_ACEOF @@ -2874,6 +2878,47 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi # some source file that will ensure that you are in the right directory. @@ -3671,6 +3716,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3863,131 +3967,6 @@ fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - #Automake v1.12 wants AM_PROG_AR, but it doesn't exist &6 else - am_cv_ar_interface=ar + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; @@ -4129,7 +4114,12 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } @@ -6557,7 +6547,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 @@ -6582,7 +6572,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6601,7 +6594,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*) @@ -12155,6 +12151,33 @@ # +# Dynamically choose whether or not to build against expat libraries. +# Expat is needed by AMS if XML configuration files are used. +# Default is not to build against libexpat. +# + +@%:@ Check whether --with-expat was given. +if test "${with_expat+set}" = set; then : + withval=$with_expat; expat=yes; +fi + +if test "x$expat" = "xyes" ; then + echo "Build against libexpat... yes" +else + echo "Build against libexpat... no" + CFLAGS="$CFLAGS -DNOEXPAT" +fi + if test "x$expat" = "xyes"; then + ENABLE_EXPAT_TRUE= + ENABLE_EXPAT_FALSE='#' +else + ENABLE_EXPAT_TRUE='#' + ENABLE_EXPAT_FALSE= +fi + + + +# # If valgrind is present, allow special MTAKE/MRELEASE valgrind tutors. # @%:@ Check whether --enable-valgrind was given. @@ -12269,7 +12292,12 @@ EXPAT_LIBS="-lexpat" else - as_fn_error $? "You need to have the Expat XML development library, libexpat1-dev" "$LINENO" 5 + if test -z "$ENABLE_EXPAT_TRUE"; then : + as_fn_error $? "You need to install the libexpat1-dev library to build with expat." "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&5 +$as_echo "$as_me: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&2;} +fi fi @@ -13661,6 +13689,10 @@ as_fn_error $? "conditional \"ENABLE_GCOV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_EXPAT_TRUE}" && test -z "${ENABLE_EXPAT_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_EXPAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_AUTODOC_TRUE}" && test -z "${ENABLE_AUTODOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_AUTODOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14070,7 +14102,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ion $as_me open source 3.2.0, which was +This file was extended by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14136,7 +14168,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ion config.status open source 3.2.0 +ion config.status open source 3.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru ion-3.2.0~dfsg1/autom4te.cache/output.1 ion-3.2.1+dfsg/autom4te.cache/output.1 --- ion-3.2.0~dfsg1/autom4te.cache/output.1 2013-12-30 23:31:17.000000000 +0000 +++ ion-3.2.1+dfsg/autom4te.cache/output.1 2014-07-08 02:18:10.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for ion open source 3.2.0. +@%:@ Generated by GNU Autoconf 2.69 for ion open source 3.2.1. @%:@ @%:@ Report bugs to . @%:@ @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='ion' PACKAGE_TARNAME='ion' -PACKAGE_VERSION='open source 3.2.0' -PACKAGE_STRING='ion open source 3.2.0' +PACKAGE_VERSION='open source 3.2.1' +PACKAGE_STRING='ion open source 3.2.1' PACKAGE_BUGREPORT='http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs' PACKAGE_URL='' @@ -655,6 +655,8 @@ POD_DOCUMENTATION EXPAT_LIBS VALGRIND_COMPAT_CFLAGS +ENABLE_EXPAT_FALSE +ENABLE_EXPAT_TRUE ENABLE_GCOV_FALSE ENABLE_GCOV_TRUE CRYPTO_LIBS @@ -797,6 +799,7 @@ enable_crypto enable_ams_debug with_gcov +with_expat enable_valgrind ' ac_precious_vars='build_alias @@ -1348,7 +1351,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ion open source 3.2.0 to adapt to many kinds of systems. +\`configure' configures ion open source 3.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1418,7 +1421,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ion open source 3.2.0:";; + short | recursive ) echo "Configuration of ion open source 3.2.1:";; esac cat <<\_ACEOF @@ -1454,6 +1457,7 @@ --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov Turn on code coverage instrumentation + --with-expat Turn on libexpat requirements Some influential environment variables: CC C compiler command @@ -1531,7 +1535,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ion configure open source 3.2.0 +ion configure open source 3.2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1954,7 +1958,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ion $as_me open source 3.2.0, which was +It was created by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2308,7 +2312,7 @@ # all of the portability warnings introduced by autoconf v2.69 and # automake v1.12. #AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign]) -am__api_version='1.13' +am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2823,7 +2827,7 @@ # Define the identity of the package. PACKAGE='ion' - VERSION='open source 3.2.0' + VERSION='open source 3.2.1' cat >>confdefs.h <<_ACEOF @@ -2874,6 +2878,47 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi # some source file that will ensure that you are in the right directory. @@ -3671,6 +3716,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3863,131 +3967,6 @@ fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - #Automake v1.12 wants AM_PROG_AR, but it doesn't exist &6 else - am_cv_ar_interface=ar + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; @@ -4129,7 +4114,12 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } @@ -6557,7 +6547,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 @@ -6582,7 +6572,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6601,7 +6594,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*) @@ -12155,6 +12151,33 @@ # +# Dynamically choose whether or not to build against expat libraries. +# Expat is needed by AMS if XML configuration files are used. +# Default is not to build against libexpat. +# + +@%:@ Check whether --with-expat was given. +if test "${with_expat+set}" = set; then : + withval=$with_expat; expat=yes; +fi + +if test "x$expat" = "xyes" ; then + echo "Build against libexpat... yes" +else + echo "Build against libexpat... no" + CFLAGS="$CFLAGS -DNOEXPAT" +fi + if test "x$expat" = "xyes"; then + ENABLE_EXPAT_TRUE= + ENABLE_EXPAT_FALSE='#' +else + ENABLE_EXPAT_TRUE='#' + ENABLE_EXPAT_FALSE= +fi + + + +# # If valgrind is present, allow special MTAKE/MRELEASE valgrind tutors. # @%:@ Check whether --enable-valgrind was given. @@ -12269,7 +12292,12 @@ EXPAT_LIBS="-lexpat" else - as_fn_error $? "You need to have the Expat XML development library, libexpat1-dev" "$LINENO" 5 + if test -z "$ENABLE_EXPAT_TRUE"; then : + as_fn_error $? "You need to install the libexpat1-dev library to build with expat." "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&5 +$as_echo "$as_me: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&2;} +fi fi @@ -13661,6 +13689,10 @@ as_fn_error $? "conditional \"ENABLE_GCOV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_EXPAT_TRUE}" && test -z "${ENABLE_EXPAT_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_EXPAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_AUTODOC_TRUE}" && test -z "${ENABLE_AUTODOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_AUTODOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14070,7 +14102,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ion $as_me open source 3.2.0, which was +This file was extended by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14136,7 +14168,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ion config.status open source 3.2.0 +ion config.status open source 3.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru ion-3.2.0~dfsg1/autom4te.cache/output.2 ion-3.2.1+dfsg/autom4te.cache/output.2 --- ion-3.2.0~dfsg1/autom4te.cache/output.2 2013-12-30 23:31:13.000000000 +0000 +++ ion-3.2.1+dfsg/autom4te.cache/output.2 2014-07-08 02:18:07.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for ion open source 3.2.0. +@%:@ Generated by GNU Autoconf 2.69 for ion open source 3.2.1. @%:@ @%:@ Report bugs to . @%:@ @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='ion' PACKAGE_TARNAME='ion' -PACKAGE_VERSION='open source 3.2.0' -PACKAGE_STRING='ion open source 3.2.0' +PACKAGE_VERSION='open source 3.2.1' +PACKAGE_STRING='ion open source 3.2.1' PACKAGE_BUGREPORT='http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs' PACKAGE_URL='' @@ -655,6 +655,8 @@ POD_DOCUMENTATION EXPAT_LIBS VALGRIND_COMPAT_CFLAGS +ENABLE_EXPAT_FALSE +ENABLE_EXPAT_TRUE ENABLE_GCOV_FALSE ENABLE_GCOV_TRUE CRYPTO_LIBS @@ -797,6 +799,7 @@ enable_crypto enable_ams_debug with_gcov +with_expat enable_valgrind ' ac_precious_vars='build_alias @@ -1348,7 +1351,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ion open source 3.2.0 to adapt to many kinds of systems. +\`configure' configures ion open source 3.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1418,7 +1421,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ion open source 3.2.0:";; + short | recursive ) echo "Configuration of ion open source 3.2.1:";; esac cat <<\_ACEOF @@ -1454,6 +1457,7 @@ --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov Turn on code coverage instrumentation + --with-expat Turn on libexpat requirements Some influential environment variables: CC C compiler command @@ -1531,7 +1535,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ion configure open source 3.2.0 +ion configure open source 3.2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1954,7 +1958,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ion $as_me open source 3.2.0, which was +It was created by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2308,7 +2312,7 @@ # all of the portability warnings introduced by autoconf v2.69 and # automake v1.12. #AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign]) -am__api_version='1.13' +am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2823,7 +2827,7 @@ # Define the identity of the package. PACKAGE='ion' - VERSION='open source 3.2.0' + VERSION='open source 3.2.1' cat >>confdefs.h <<_ACEOF @@ -2874,6 +2878,47 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi # some source file that will ensure that you are in the right directory. @@ -3671,6 +3716,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3863,131 +3967,6 @@ fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - #Automake v1.12 wants AM_PROG_AR, but it doesn't exist &6 else - am_cv_ar_interface=ar + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; @@ -4129,7 +4114,12 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } @@ -6557,7 +6547,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 @@ -6582,7 +6572,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6601,7 +6594,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*) @@ -12155,6 +12151,33 @@ # +# Dynamically choose whether or not to build against expat libraries. +# Expat is needed by AMS if XML configuration files are used. +# Default is not to build against libexpat. +# + +@%:@ Check whether --with-expat was given. +if test "${with_expat+set}" = set; then : + withval=$with_expat; expat=yes; +fi + +if test "x$expat" = "xyes" ; then + echo "Build against libexpat... yes" +else + echo "Build against libexpat... no" + CFLAGS="$CFLAGS -DNOEXPAT" +fi + if test "x$expat" = "xyes"; then + ENABLE_EXPAT_TRUE= + ENABLE_EXPAT_FALSE='#' +else + ENABLE_EXPAT_TRUE='#' + ENABLE_EXPAT_FALSE= +fi + + + +# # If valgrind is present, allow special MTAKE/MRELEASE valgrind tutors. # @%:@ Check whether --enable-valgrind was given. @@ -12269,7 +12292,12 @@ EXPAT_LIBS="-lexpat" else - as_fn_error $? "You need to have the Expat XML development library, libexpat1-dev" "$LINENO" 5 + if test -z "$ENABLE_EXPAT_TRUE"; then : + as_fn_error $? "You need to install the libexpat1-dev library to build with expat." "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&5 +$as_echo "$as_me: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&2;} +fi fi @@ -13661,6 +13689,10 @@ as_fn_error $? "conditional \"ENABLE_GCOV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_EXPAT_TRUE}" && test -z "${ENABLE_EXPAT_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_EXPAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_AUTODOC_TRUE}" && test -z "${ENABLE_AUTODOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_AUTODOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14070,7 +14102,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ion $as_me open source 3.2.0, which was +This file was extended by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14136,7 +14168,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ion config.status open source 3.2.0 +ion config.status open source 3.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru ion-3.2.0~dfsg1/autom4te.cache/requests ion-3.2.1+dfsg/autom4te.cache/requests --- ion-3.2.0~dfsg1/autom4te.cache/requests 2013-12-30 23:31:17.000000000 +0000 +++ ion-3.2.1+dfsg/autom4te.cache/requests 2014-07-08 02:18:11.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was generated by Autom4te Wed Aug 21 09:31:00 UTC 2013. +# This file was generated by Autom4te Thu Apr 10 10:06:43 UTC 2014. # It contains the lists of macros which have been traced. # It can be safely removed. @@ -12,7 +12,7 @@ [ '/usr/share/autoconf/autoconf/autoconf.m4f', '-', - '/usr/share/aclocal-1.13/internal/ac-config-macro-dirs.m4', + '/usr/share/aclocal-1.14/internal/ac-config-macro-dirs.m4', '/usr/share/aclocal/argz.m4', '/usr/share/aclocal/libtool.m4', '/usr/share/aclocal/ltdl.m4', @@ -20,208 +20,211 @@ '/usr/share/aclocal/ltsugar.m4', '/usr/share/aclocal/ltversion.m4', '/usr/share/aclocal/lt~obsolete.m4', - '/usr/share/aclocal-1.13/amversion.m4', - '/usr/share/aclocal-1.13/ar-lib.m4', - '/usr/share/aclocal-1.13/auxdir.m4', - '/usr/share/aclocal-1.13/cond.m4', - '/usr/share/aclocal-1.13/depend.m4', - '/usr/share/aclocal-1.13/depout.m4', - '/usr/share/aclocal-1.13/init.m4', - '/usr/share/aclocal-1.13/install-sh.m4', - '/usr/share/aclocal-1.13/lead-dot.m4', - '/usr/share/aclocal-1.13/make.m4', - '/usr/share/aclocal-1.13/minuso.m4', - '/usr/share/aclocal-1.13/missing.m4', - '/usr/share/aclocal-1.13/options.m4', - '/usr/share/aclocal-1.13/runlog.m4', - '/usr/share/aclocal-1.13/sanity.m4', - '/usr/share/aclocal-1.13/silent.m4', - '/usr/share/aclocal-1.13/strip.m4', - '/usr/share/aclocal-1.13/substnot.m4', - '/usr/share/aclocal-1.13/tar.m4', + '/usr/share/aclocal-1.14/amversion.m4', + '/usr/share/aclocal-1.14/ar-lib.m4', + '/usr/share/aclocal-1.14/auxdir.m4', + '/usr/share/aclocal-1.14/cond-if.m4', + '/usr/share/aclocal-1.14/cond.m4', + '/usr/share/aclocal-1.14/depend.m4', + '/usr/share/aclocal-1.14/depout.m4', + '/usr/share/aclocal-1.14/init.m4', + '/usr/share/aclocal-1.14/install-sh.m4', + '/usr/share/aclocal-1.14/lead-dot.m4', + '/usr/share/aclocal-1.14/make.m4', + '/usr/share/aclocal-1.14/missing.m4', + '/usr/share/aclocal-1.14/options.m4', + '/usr/share/aclocal-1.14/prog-cc-c-o.m4', + '/usr/share/aclocal-1.14/runlog.m4', + '/usr/share/aclocal-1.14/sanity.m4', + '/usr/share/aclocal-1.14/silent.m4', + '/usr/share/aclocal-1.14/strip.m4', + '/usr/share/aclocal-1.14/substnot.m4', + '/usr/share/aclocal-1.14/tar.m4', 'configure.ac' ], { - 'AM_ENABLE_STATIC' => 1, - 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, - '_LT_AC_SHELL_INIT' => 1, - 'AC_DEFUN' => 1, - '_LT_AC_LANG_CXX_CONFIG' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AM_SUBST_NOTMAKE' => 1, + 'AC_LTDL_SYSSEARCHPATH' => 1, + 'gl_PREREQ_ARGZ' => 1, + 'LT_AC_PROG_RC' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + '_LT_AC_PROG_CXXCPP' => 1, + 'LT_SYS_DLSEARCH_PATH' => 1, 'AM_MISSING_PROG' => 1, - 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, - '_LT_AC_LANG_C_CONFIG' => 1, - 'AM_PROG_INSTALL_STRIP' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + '_LT_AC_SYS_COMPILER' => 1, + 'AC_LIBTOOL_FC' => 1, + '_LT_WITH_SYSROOT' => 1, + 'LTVERSION_VERSION' => 1, + 'AM_SILENT_RULES' => 1, + 'AC_LTDL_SHLIBEXT' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + 'AM_ENABLE_STATIC' => 1, + 'LTSUGAR_VERSION' => 1, + '_LT_LINKER_OPTION' => 1, + 'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, '_m4_warn' => 1, - 'AC_LIBTOOL_OBJDIR' => 1, - 'gl_FUNC_ARGZ' => 1, 'LTOBSOLETE_VERSION' => 1, - 'AM_SANITY_CHECK' => 1, - 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, - 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, - 'LT_LIB_M' => 1, - '_LT_AC_CHECK_DLFCN' => 1, - 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - 'LTSUGAR_VERSION' => 1, - '_LT_PROG_LTMAIN' => 1, - 'LT_SYS_SYMBOL_USCORE' => 1, - '_AM_PROG_TAR' => 1, - 'AC_LIBTOOL_GCJ' => 1, - '_LT_WITH_SYSROOT' => 1, - 'LT_FUNC_DLSYM_USCORE' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + 'AC_DEFUN_ONCE' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AC_PROG_LD' => 1, + 'AC_ENABLE_STATIC' => 1, + 'AC_ENABLE_SHARED' => 1, + '_AM_AUTOCONF_VERSION' => 1, + 'AM_PROG_NM' => 1, 'LT_SYS_DLOPEN_DEPLIBS' => 1, - '_LT_AC_LANG_F77' => 1, - 'AC_LIBTOOL_CONFIG' => 1, + 'LT_WITH_LTDL' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, 'AC_CONFIG_MACRO_DIR' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_LTDL_DLLIB' => 1, - '_AM_AUTOCONF_VERSION' => 1, - 'AM_DISABLE_SHARED' => 1, - '_LT_PROG_ECHO_BACKSLASH' => 1, - '_LTDL_SETUP' => 1, - '_LT_AC_LANG_CXX' => 1, - 'AM_PROG_LIBTOOL' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + 'AM_RUN_LOG' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + '_LT_AC_CHECK_DLFCN' => 1, + 'LT_PROG_GCJ' => 1, + 'include' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + 'm4_include' => 1, + '_LT_LIBOBJ' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + '_AM_SET_OPTION' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'AC_DISABLE_STATIC' => 1, + 'AC_LIBLTDL_CONVENIENCE' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, + 'LT_AC_PROG_EGREP' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'LTOPTIONS_VERSION' => 1, + '_LT_PROG_LTMAIN' => 1, + 'LT_LIB_DLLOAD' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, 'AC_LIB_LTDL' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, - 'AM_PROG_LD' => 1, - 'AU_DEFUN' => 1, - 'AC_PROG_NM' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + 'LT_INIT' => 1, + 'LT_OUTPUT' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'LT_LIB_M' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, + 'LTDL_INIT' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'LT_SUPPORTED_TAG' => 1, + '_LT_AC_LANG_C_CONFIG' => 1, + 'AC_DEFUN' => 1, + 'LTDL_INSTALLABLE' => 1, + 'CHECK_DCCP' => 1, 'AC_LIBTOOL_DLOPEN' => 1, - 'AC_PROG_LD' => 1, - 'AC_PROG_LD_GNU' => 1, - 'AC_ENABLE_FAST_INSTALL' => 1, - 'AC_LIBTOOL_FC' => 1, - 'LTDL_CONVENIENCE' => 1, - '_AM_SET_OPTION' => 1, - 'AC_LTDL_PREOPEN' => 1, - '_LT_LINKER_BOILERPLATE' => 1, + 'AC_CHECK_LIBM' => 1, + 'AC_LTDL_DLLIB' => 1, + 'LT_AC_PROG_SED' => 1, + 'AC_PROG_NM' => 1, + 'AM_INIT_AUTOMAKE' => 1, '_LT_PREPARE_SED_QUOTE_VARS' => 1, - 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - 'AC_LIBTOOL_PROG_CC_C_O' => 1, - 'gl_PREREQ_ARGZ' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'LT_SYS_MODULE_EXT' => 1, - 'LT_PROG_RC' => 1, - 'AC_DEFUN_ONCE' => 1, - '_LT_AC_LANG_GCJ' => 1, - 'AC_LTDL_OBJDIR' => 1, - '_LT_PATH_TOOL_PREFIX' => 1, - 'AC_LIBTOOL_RC' => 1, - 'AM_SILENT_RULES' => 1, + 'AC_DISABLE_SHARED' => 1, + 'AC_WITH_LTDL' => 1, 'AC_DISABLE_FAST_INSTALL' => 1, - '_LT_AC_PROG_ECHO_BACKSLASH' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - '_LT_AC_TRY_DLOPEN_SELF' => 1, - 'include' => 1, - 'LT_AC_PROG_SED' => 1, - 'AM_ENABLE_SHARED' => 1, - 'LTDL_INSTALLABLE' => 1, + 'AM_DISABLE_STATIC' => 1, + 'AC_LIBTOOL_F77' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + '_LTDL_SETUP' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + '_AM_PROG_CC_C_O' => 1, + 'AM_SUBST_NOTMAKE' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + '_AM_PROG_TAR' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, + '_LT_AC_LANG_F77' => 1, + 'LT_PROG_GO' => 1, 'AM_PROG_AR' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'LT_PATH_NM' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'LT_SYS_MODULE_PATH' => 1, + 'AM_MAKE_INCLUDE' => 1, + 'AC_LTDL_SHLIBPATH' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + '_AM_SET_OPTIONS' => 1, + '_LT_CC_BASENAME' => 1, '_LT_AC_LANG_GCJ_CONFIG' => 1, - 'AC_ENABLE_SHARED' => 1, - 'AC_ENABLE_STATIC' => 1, - 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, - '_LT_REQUIRED_DARWIN_CHECKS' => 1, - 'AM_PROG_CC_C_O' => 1, + 'AM_ENABLE_SHARED' => 1, + 'LT_SYS_SYMBOL_USCORE' => 1, + 'AC_LTDL_ENABLE_INSTALL' => 1, + '_LT_AC_SHELL_INIT' => 1, '_LT_AC_TAGVAR' => 1, - 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, - 'AM_CONDITIONAL' => 1, - 'LT_LIB_DLLOAD' => 1, - 'LTDL_INIT' => 1, - '_LT_PROG_F77' => 1, - '_LT_PROG_CXX' => 1, - 'LTVERSION_VERSION' => 1, - 'AM_PROG_INSTALL_SH' => 1, - 'm4_include' => 1, 'AC_PROG_EGREP' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'LTDL_CONVENIENCE' => 1, 'AC_PATH_MAGIC' => 1, - 'AC_LTDL_SYSSEARCHPATH' => 1, - 'AM_MAKE_INCLUDE' => 1, - 'LT_CMD_MAX_LEN' => 1, - '_LT_AC_TAGCONFIG' => 1, + 'LT_PATH_LD' => 1, + '_LT_COMPILER_OPTION' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, + '_AM_SUBST_NOTMAKE' => 1, 'm4_pattern_forbid' => 1, - '_LT_LINKER_OPTION' => 1, - 'AC_LIBTOOL_COMPILER_OPTION' => 1, - 'CHECK_DCCP' => 1, - 'AC_DISABLE_SHARED' => 1, - '_LT_COMPILER_BOILERPLATE' => 1, + 'AC_LTDL_PREOPEN' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + 'AC_LTDL_SYMBOL_USCORE' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'm4_pattern_allow' => 1, + '_LT_PROG_F77' => 1, + 'LT_PROG_RC' => 1, + 'AM_DISABLE_SHARED' => 1, + 'AC_PROG_LD_GNU' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, 'AC_LIBTOOL_WIN32_DLL' => 1, - 'AC_LIBTOOL_SETUP' => 1, - 'AC_PROG_LD_RELOAD_FLAG' => 1, - 'AC_LTDL_DLSYM_USCORE' => 1, + 'AM_PROG_CC_C_O' => 1, 'AM_MISSING_HAS_RUN' => 1, - 'LT_LANG' => 1, - 'LT_SYS_DLSEARCH_PATH' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, - 'LT_OUTPUT' => 1, - 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, - 'AC_WITH_LTDL' => 1, - 'AC_LIBTOOL_LINKER_OPTION' => 1, - 'LT_AC_PROG_RC' => 1, - 'AC_LIBTOOL_CXX' => 1, - 'LT_INIT' => 1, - 'LT_AC_PROG_GCJ' => 1, - 'LT_SYS_DLOPEN_SELF' => 1, - '_LT_AC_PROG_CXXCPP' => 1, - 'AM_DEP_TRACK' => 1, - 'AM_DISABLE_STATIC' => 1, - '_AC_PROG_LIBTOOL' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + '_LT_AC_LANG_CXX' => 1, '_AM_IF_OPTION' => 1, - 'AC_PATH_TOOL_PREFIX' => 1, - 'AC_LIBTOOL_F77' => 1, - 'm4_pattern_allow' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'LT_AC_PROG_EGREP' => 1, - '_LT_PROG_FC' => 1, - '_AM_DEPENDENCIES' => 1, + 'AM_SANITY_CHECK' => 1, 'AC_LIBTOOL_LANG_C_CONFIG' => 1, - 'LTOPTIONS_VERSION' => 1, - '_LT_AC_SYS_COMPILER' => 1, - 'AM_PROG_NM' => 1, - 'AC_LIBLTDL_CONVENIENCE' => 1, - 'AC_DEPLIBS_CHECK_METHOD' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'AM_COND_IF' => 1, + '_AM_MANGLE_OPTION' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + '_AM_DEPENDENCIES' => 1, + '_LT_PROG_FC' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + 'LT_LANG' => 1, 'AC_LIBLTDL_INSTALLABLE' => 1, - 'AC_LTDL_ENABLE_INSTALL' => 1, - 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, - 'LT_PROG_GCJ' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_DISABLE_STATIC' => 1, - 'LT_PATH_NM' => 1, - 'AC_LTDL_SHLIBEXT' => 1, - '_LT_AC_LOCK' => 1, - '_LT_AC_LANG_RC_CONFIG' => 1, - 'LT_PROG_GO' => 1, - 'LT_SYS_MODULE_PATH' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, - 'LT_WITH_LTDL' => 1, - 'AC_LTDL_SHLIBPATH' => 1, - 'AM_AUX_DIR_EXPAND' => 1, - '_LT_AC_LANG_F77_CONFIG' => 1, - 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, - '_AM_SET_OPTIONS' => 1, - '_LT_COMPILER_OPTION' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AM_RUN_LOG' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + 'AC_LIBTOOL_CXX' => 1, 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, - 'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1, - 'AC_LIBTOOL_PICMODE' => 1, - 'LT_PATH_LD' => 1, - 'AC_CHECK_LIBM' => 1, - 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, - '_AM_MANGLE_OPTION' => 1, - 'AC_LTDL_SYMBOL_USCORE' => 1, + 'AM_PROG_LD' => 1, + 'LT_FUNC_DLSYM_USCORE' => 1, + '_LT_AC_LOCK' => 1, + 'AC_LIBTOOL_SETUP' => 1, + 'AM_PROG_INSTALL_SH' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, + 'AC_LIBTOOL_GCJ' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + 'LT_CMD_MAX_LEN' => 1, + '_LT_AC_TAGCONFIG' => 1, + '_AC_PROG_LIBTOOL' => 1, + 'AC_LIBTOOL_RC' => 1, + 'AM_CONDITIONAL' => 1, 'AM_SET_DEPDIR' => 1, - '_LT_CC_BASENAME' => 1, - '_LT_LIBOBJ' => 1 + 'AU_DEFUN' => 1, + 'AM_DEP_TRACK' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + '_LT_PROG_CXX' => 1, + 'gl_FUNC_ARGZ' => 1, + 'AC_LTDL_OBJDIR' => 1, + 'AC_LTDL_DLSYM_USCORE' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -236,65 +239,65 @@ 'configure.ac' ], { - 'AM_PROG_F77_C_O' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AC_INIT' => 1, + 'AC_FC_FREEFORM' => 1, 'm4_pattern_forbid' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AH_OUTPUT' => 1, + 'm4_pattern_allow' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + 'AM_PROG_FC_C_O' => 1, + 'AM_MAKEFILE_INCLUDE' => 1, 'AC_CANONICAL_TARGET' => 1, - '_AM_COND_IF' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AC_SUBST' => 1, - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AC_FC_SRCEXT' => 1, - 'AC_PROG_LIBTOOL' => 1, + 'include' => 1, + '_LT_AC_TAGCONFIG' => 1, + 'AC_CONFIG_LINKS' => 1, 'AM_PROG_MKDIR_P' => 1, + 'AM_CONDITIONAL' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'sinclude' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'AC_CANONICAL_HOST' => 1, + 'AC_FC_PP_SRCEXT' => 1, + 'AC_SUBST_TRACE' => 1, 'AM_INIT_AUTOMAKE' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AM_PATH_GUILE' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_CONFIG_LINKS' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, + 'AM_POT_TOOLS' => 1, + '_m4_warn' => 1, + 'AC_FC_SRCEXT' => 1, + 'AC_FC_PP_DEFINE' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, 'LT_SUPPORTED_TAG' => 1, - 'm4_sinclude' => 1, - 'AM_MAINTAINER_MODE' => 1, + '_AM_COND_IF' => 1, + 'AC_LIBSOURCE' => 1, + 'AM_SILENT_RULES' => 1, 'AM_NLS' => 1, - 'AC_FC_PP_DEFINE' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - '_m4_warn' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, + 'AC_INIT' => 1, + '_AM_COND_ELSE' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AM_GNU_GETTEXT' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AC_PROG_LIBTOOL' => 1, 'AM_PROG_CXX_C_O' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1, + 'LT_INIT' => 1, + 'AC_SUBST' => 1, + 'AM_EXTRA_RECURSIVE_TARGETS' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, '_AM_COND_ENDIF' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'AM_SILENT_RULES' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'AC_CANONICAL_BUILD' => 1, 'AM_PROG_MOC' => 1, - 'AC_CONFIG_FILES' => 1, - 'include' => 1, - 'LT_INIT' => 1, - 'AM_GNU_GETTEXT' => 1, 'AM_PROG_AR' => 1, - 'AC_LIBSOURCE' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AC_FC_FREEFORM' => 1, - 'AC_FC_PP_SRCEXT' => 1, - 'AH_OUTPUT' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'm4_pattern_allow' => 1, - 'AM_PROG_CC_C_O' => 1, - 'sinclude' => 1, - 'AM_CONDITIONAL' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AM_POT_TOOLS' => 1, 'm4_include' => 1, - '_AM_COND_ELSE' => 1, - 'AC_SUBST_TRACE' => 1 + 'AM_PROG_F77_C_O' => 1, + 'AM_PATH_GUILE' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AC_CONFIG_FILES' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'm4_sinclude' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -306,28 +309,29 @@ [ '/usr/share/autoconf/autoconf/autoconf.m4f', '-', - '/usr/share/aclocal-1.13/internal/ac-config-macro-dirs.m4', + '/usr/share/aclocal-1.14/internal/ac-config-macro-dirs.m4', '/usr/share/aclocal/argz.m4', '/usr/share/aclocal/ltdl.m4', - '/usr/share/aclocal-1.13/amversion.m4', - '/usr/share/aclocal-1.13/ar-lib.m4', - '/usr/share/aclocal-1.13/auxdir.m4', - '/usr/share/aclocal-1.13/cond.m4', - '/usr/share/aclocal-1.13/depend.m4', - '/usr/share/aclocal-1.13/depout.m4', - '/usr/share/aclocal-1.13/init.m4', - '/usr/share/aclocal-1.13/install-sh.m4', - '/usr/share/aclocal-1.13/lead-dot.m4', - '/usr/share/aclocal-1.13/make.m4', - '/usr/share/aclocal-1.13/minuso.m4', - '/usr/share/aclocal-1.13/missing.m4', - '/usr/share/aclocal-1.13/options.m4', - '/usr/share/aclocal-1.13/runlog.m4', - '/usr/share/aclocal-1.13/sanity.m4', - '/usr/share/aclocal-1.13/silent.m4', - '/usr/share/aclocal-1.13/strip.m4', - '/usr/share/aclocal-1.13/substnot.m4', - '/usr/share/aclocal-1.13/tar.m4', + '/usr/share/aclocal-1.14/amversion.m4', + '/usr/share/aclocal-1.14/ar-lib.m4', + '/usr/share/aclocal-1.14/auxdir.m4', + '/usr/share/aclocal-1.14/cond-if.m4', + '/usr/share/aclocal-1.14/cond.m4', + '/usr/share/aclocal-1.14/depend.m4', + '/usr/share/aclocal-1.14/depout.m4', + '/usr/share/aclocal-1.14/init.m4', + '/usr/share/aclocal-1.14/install-sh.m4', + '/usr/share/aclocal-1.14/lead-dot.m4', + '/usr/share/aclocal-1.14/make.m4', + '/usr/share/aclocal-1.14/missing.m4', + '/usr/share/aclocal-1.14/options.m4', + '/usr/share/aclocal-1.14/prog-cc-c-o.m4', + '/usr/share/aclocal-1.14/runlog.m4', + '/usr/share/aclocal-1.14/sanity.m4', + '/usr/share/aclocal-1.14/silent.m4', + '/usr/share/aclocal-1.14/strip.m4', + '/usr/share/aclocal-1.14/substnot.m4', + '/usr/share/aclocal-1.14/tar.m4', 'm4/libtool.m4', 'm4/ltoptions.m4', 'm4/ltsugar.m4', @@ -336,186 +340,188 @@ 'configure.ac' ], { - 'AM_ENABLE_STATIC' => 1, - 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, - '_LT_AC_SHELL_INIT' => 1, - 'AC_DEFUN' => 1, - '_LT_AC_LANG_CXX_CONFIG' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AM_SUBST_NOTMAKE' => 1, - 'AM_MISSING_PROG' => 1, - 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, + 'LT_SUPPORTED_TAG' => 1, '_LT_AC_LANG_C_CONFIG' => 1, + 'AC_DEFUN' => 1, + 'CHECK_DCCP' => 1, + 'LTDL_INSTALLABLE' => 1, + 'LTDL_INIT' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'AM_INIT_AUTOMAKE' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, + 'LT_AC_PROG_SED' => 1, + 'AC_LTDL_DLLIB' => 1, + 'AC_CHECK_LIBM' => 1, + 'AC_PROG_NM' => 1, + 'AC_DISABLE_SHARED' => 1, + 'AC_WITH_LTDL' => 1, + 'LT_SYS_MODULE_EXT' => 1, + 'AM_DISABLE_STATIC' => 1, + 'AC_LIBTOOL_F77' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'm4_include' => 1, + '_LT_LIBOBJ' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + '_AM_SET_OPTION' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'AC_DISABLE_STATIC' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, + 'AC_LIBLTDL_CONVENIENCE' => 1, + 'LT_AC_PROG_EGREP' => 1, + 'LT_INIT' => 1, + 'LT_OUTPUT' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'LTOPTIONS_VERSION' => 1, + '_LT_PROG_LTMAIN' => 1, + 'LT_LIB_DLLOAD' => 1, + 'AC_LIB_LTDL' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'LT_LIB_M' => 1, 'AM_PROG_INSTALL_STRIP' => 1, + 'AC_DEFUN_ONCE' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + 'AC_PROG_LD' => 1, + 'AC_ENABLE_STATIC' => 1, '_m4_warn' => 1, - 'AC_LIBTOOL_OBJDIR' => 1, - 'gl_FUNC_ARGZ' => 1, 'LTOBSOLETE_VERSION' => 1, - 'AM_SANITY_CHECK' => 1, - 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, - 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, - 'LT_LIB_M' => 1, + 'AM_PROG_NM' => 1, + 'LT_SYS_DLOPEN_DEPLIBS' => 1, + 'LT_WITH_LTDL' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, + 'AC_ENABLE_SHARED' => 1, + '_AM_AUTOCONF_VERSION' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, + 'AM_RUN_LOG' => 1, + 'LT_PROG_GCJ' => 1, + 'include' => 1, '_LT_AC_CHECK_DLFCN' => 1, - 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - 'LTSUGAR_VERSION' => 1, - '_LT_PROG_LTMAIN' => 1, - 'LT_SYS_SYMBOL_USCORE' => 1, - '_AM_PROG_TAR' => 1, - 'AC_LIBTOOL_GCJ' => 1, + 'gl_PREREQ_ARGZ' => 1, + 'AC_LTDL_SYSSEARCHPATH' => 1, + 'LT_SYS_DLSEARCH_PATH' => 1, + 'AM_MISSING_PROG' => 1, + 'LT_AC_PROG_RC' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + '_LT_AC_PROG_CXXCPP' => 1, + 'AC_LIBTOOL_FC' => 1, + 'LTVERSION_VERSION' => 1, '_LT_WITH_SYSROOT' => 1, - 'LT_FUNC_DLSYM_USCORE' => 1, - 'LT_SYS_DLOPEN_DEPLIBS' => 1, - '_LT_AC_LANG_F77' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_LIBTOOL_CONFIG' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_LTDL_DLLIB' => 1, - '_AM_AUTOCONF_VERSION' => 1, - 'AM_DISABLE_SHARED' => 1, + '_LT_AC_SYS_COMPILER' => 1, + 'LTSUGAR_VERSION' => 1, + '_LT_LINKER_OPTION' => 1, + 'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'AC_LTDL_SHLIBEXT' => 1, + 'AM_SILENT_RULES' => 1, + 'AM_ENABLE_STATIC' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + 'AC_LIBTOOL_CXX' => 1, + 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, + 'LT_LANG' => 1, + 'AC_LIBLTDL_INSTALLABLE' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + '_LT_AC_LOCK' => 1, + 'AC_LIBTOOL_SETUP' => 1, '_LT_PROG_ECHO_BACKSLASH' => 1, - '_LTDL_SETUP' => 1, - '_LT_AC_LANG_CXX' => 1, - 'AM_PROG_LIBTOOL' => 1, - 'AC_LIB_LTDL' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, + 'AM_PROG_INSTALL_SH' => 1, 'AM_PROG_LD' => 1, - 'AU_DEFUN' => 1, - 'AC_PROG_NM' => 1, - 'AC_LIBTOOL_DLOPEN' => 1, - 'AC_PROG_LD' => 1, - 'AC_PROG_LD_GNU' => 1, - 'AC_ENABLE_FAST_INSTALL' => 1, - 'AC_LIBTOOL_FC' => 1, - 'LTDL_CONVENIENCE' => 1, - '_AM_SET_OPTION' => 1, - 'AC_LTDL_PREOPEN' => 1, - '_LT_LINKER_BOILERPLATE' => 1, - '_LT_PREPARE_SED_QUOTE_VARS' => 1, - 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - 'AC_LIBTOOL_PROG_CC_C_O' => 1, - 'gl_PREREQ_ARGZ' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'LT_SYS_MODULE_EXT' => 1, - 'LT_PROG_RC' => 1, - 'AC_DEFUN_ONCE' => 1, - '_LT_AC_LANG_GCJ' => 1, - 'AC_LTDL_OBJDIR' => 1, - '_LT_PATH_TOOL_PREFIX' => 1, + 'LT_FUNC_DLSYM_USCORE' => 1, + '_AC_PROG_LIBTOOL' => 1, 'AC_LIBTOOL_RC' => 1, - 'AM_SILENT_RULES' => 1, - 'AC_DISABLE_FAST_INSTALL' => 1, - '_LT_AC_PROG_ECHO_BACKSLASH' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - '_LT_AC_TRY_DLOPEN_SELF' => 1, - 'include' => 1, - 'LT_AC_PROG_SED' => 1, - 'AM_ENABLE_SHARED' => 1, - 'AM_PROG_AR' => 1, - 'LTDL_INSTALLABLE' => 1, - '_LT_AC_LANG_GCJ_CONFIG' => 1, - 'AC_ENABLE_SHARED' => 1, - 'AC_ENABLE_STATIC' => 1, - 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, - '_LT_REQUIRED_DARWIN_CHECKS' => 1, - 'AM_PROG_CC_C_O' => 1, - '_LT_AC_TAGVAR' => 1, - 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, 'AM_CONDITIONAL' => 1, - 'LT_LIB_DLLOAD' => 1, - 'LTDL_INIT' => 1, - '_LT_PROG_F77' => 1, - '_LT_PROG_CXX' => 1, - 'LTVERSION_VERSION' => 1, - 'AM_PROG_INSTALL_SH' => 1, - 'm4_include' => 1, - 'AC_PROG_EGREP' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, - 'AC_PATH_MAGIC' => 1, - 'AC_LTDL_SYSSEARCHPATH' => 1, - 'AM_MAKE_INCLUDE' => 1, + 'AM_SET_DEPDIR' => 1, + 'AC_LIBTOOL_GCJ' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, 'LT_CMD_MAX_LEN' => 1, '_LT_AC_TAGCONFIG' => 1, - 'm4_pattern_forbid' => 1, - '_LT_LINKER_OPTION' => 1, - 'AC_LIBTOOL_COMPILER_OPTION' => 1, - 'CHECK_DCCP' => 1, - 'AC_DISABLE_SHARED' => 1, - '_LT_COMPILER_BOILERPLATE' => 1, - 'AC_LIBTOOL_SETUP' => 1, - 'AC_LIBTOOL_WIN32_DLL' => 1, - 'AC_PROG_LD_RELOAD_FLAG' => 1, + '_LT_PROG_CXX' => 1, + 'gl_FUNC_ARGZ' => 1, 'AC_LTDL_DLSYM_USCORE' => 1, - 'LT_LANG' => 1, - 'AM_MISSING_HAS_RUN' => 1, - 'LT_SYS_DLSEARCH_PATH' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, - 'LT_OUTPUT' => 1, - 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, - 'AC_LIBTOOL_LINKER_OPTION' => 1, - 'AC_WITH_LTDL' => 1, - 'LT_AC_PROG_RC' => 1, - 'AC_LIBTOOL_CXX' => 1, - 'LT_INIT' => 1, - 'LT_AC_PROG_GCJ' => 1, - 'LT_SYS_DLOPEN_SELF' => 1, - '_LT_AC_PROG_CXXCPP' => 1, - 'AM_DISABLE_STATIC' => 1, + 'AC_LTDL_OBJDIR' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, + 'AU_DEFUN' => 1, 'AM_DEP_TRACK' => 1, - '_AC_PROG_LIBTOOL' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + 'LT_PROG_RC' => 1, + '_LT_PROG_F77' => 1, + 'AM_DISABLE_SHARED' => 1, + 'AC_PROG_LD_GNU' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AC_LIBTOOL_WIN32_DLL' => 1, + 'AM_MISSING_HAS_RUN' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + 'AC_LIBTOOL_LANG_C_CONFIG' => 1, '_AM_IF_OPTION' => 1, - 'AC_PATH_TOOL_PREFIX' => 1, - 'AC_LIBTOOL_F77' => 1, - 'm4_pattern_allow' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'LT_AC_PROG_EGREP' => 1, + '_LT_AC_LANG_CXX' => 1, + 'AM_SANITY_CHECK' => 1, '_LT_PROG_FC' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + 'AM_COND_IF' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + '_AM_MANGLE_OPTION' => 1, '_AM_DEPENDENCIES' => 1, - 'AC_LIBTOOL_LANG_C_CONFIG' => 1, - 'LTOPTIONS_VERSION' => 1, - '_LT_AC_SYS_COMPILER' => 1, - 'AM_PROG_NM' => 1, - 'AC_LIBLTDL_CONVENIENCE' => 1, - 'AC_DEPLIBS_CHECK_METHOD' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, - 'AC_LIBLTDL_INSTALLABLE' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + 'AC_PROG_EGREP' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'LTDL_CONVENIENCE' => 1, + '_LT_AC_SHELL_INIT' => 1, 'AC_LTDL_ENABLE_INSTALL' => 1, + '_LT_AC_TAGVAR' => 1, + 'LT_PATH_LD' => 1, + '_LT_AC_LANG_GCJ' => 1, + '_LT_COMPILER_OPTION' => 1, + 'AC_PATH_MAGIC' => 1, 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, - 'LT_PROG_GCJ' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_DISABLE_STATIC' => 1, - 'LT_PATH_NM' => 1, - 'AC_LTDL_SHLIBEXT' => 1, - '_LT_AC_LOCK' => 1, - '_LT_AC_LANG_RC_CONFIG' => 1, - 'LT_PROG_GO' => 1, - 'LT_SYS_MODULE_PATH' => 1, - 'LT_WITH_LTDL' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, - 'AC_LTDL_SHLIBPATH' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'm4_pattern_allow' => 1, + 'm4_pattern_forbid' => 1, + 'AC_LTDL_PREOPEN' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, 'AM_AUX_DIR_EXPAND' => 1, + 'AC_LTDL_SYMBOL_USCORE' => 1, + '_LTDL_SETUP' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, - '_LT_AC_LANG_F77_CONFIG' => 1, - '_AM_SET_OPTIONS' => 1, - '_LT_COMPILER_OPTION' => 1, - 'AM_RUN_LOG' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1, - 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, - 'AC_LIBTOOL_PICMODE' => 1, - 'LT_PATH_LD' => 1, - 'AC_CHECK_LIBM' => 1, + '_AM_PROG_CC_C_O' => 1, + 'AM_SUBST_NOTMAKE' => 1, 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, - '_AM_MANGLE_OPTION' => 1, - 'AC_LTDL_SYMBOL_USCORE' => 1, - 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, - 'AM_SET_DEPDIR' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + '_LT_AC_LANG_F77' => 1, + 'LT_PROG_GO' => 1, + 'AM_PROG_AR' => 1, + '_AM_PROG_TAR' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, + 'AC_LTDL_SHLIBPATH' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'LT_PATH_NM' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'LT_SYS_MODULE_PATH' => 1, + 'AM_MAKE_INCLUDE' => 1, '_LT_CC_BASENAME' => 1, - '_LT_LIBOBJ' => 1 + '_LT_AC_LANG_GCJ_CONFIG' => 1, + 'AM_ENABLE_SHARED' => 1, + 'LT_SYS_SYMBOL_USCORE' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + '_AM_SET_OPTIONS' => 1 } ], 'Autom4te::Request' ) ); diff -Nru ion-3.2.0~dfsg1/autom4te.cache/traces.0 ion-3.2.1+dfsg/autom4te.cache/traces.0 --- ion-3.2.0~dfsg1/autom4te.cache/traces.0 2013-12-30 23:31:10.000000000 +0000 +++ ion-3.2.1+dfsg/autom4te.cache/traces.0 2014-07-08 02:18:05.000000000 +0000 @@ -254,7 +254,7 @@ AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) -m4trace:/usr/share/aclocal/libtool.m4:1509: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4trace:/usr/share/aclocal/libtool.m4:1515: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no @@ -293,11 +293,11 @@ m4_if([$6], , :, [$6]) fi ]) -m4trace:/usr/share/aclocal/libtool.m4:1551: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1551: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1557: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1557: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1560: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4trace:/usr/share/aclocal/libtool.m4:1566: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no @@ -329,11 +329,11 @@ m4_if([$5], , :, [$5]) fi ]) -m4trace:/usr/share/aclocal/libtool.m4:1595: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1595: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1601: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1601: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1602: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:/usr/share/aclocal/libtool.m4:1608: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl @@ -469,11 +469,11 @@ _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ]) -m4trace:/usr/share/aclocal/libtool.m4:1741: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1741: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1747: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1747: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1852: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl +m4trace:/usr/share/aclocal/libtool.m4:1858: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -587,11 +587,11 @@ _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ]) -m4trace:/usr/share/aclocal/libtool.m4:1969: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1969: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1975: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1975: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2939: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl +m4trace:/usr/share/aclocal/libtool.m4:2945: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in @@ -650,11 +650,11 @@ _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ]) -m4trace:/usr/share/aclocal/libtool.m4:3001: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3001: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3007: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3007: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3024: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl +m4trace:/usr/share/aclocal/libtool.m4:3030: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl @@ -740,15 +740,15 @@ _LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) ]) -m4trace:/usr/share/aclocal/libtool.m4:3113: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3113: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3119: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3119: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3114: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3114: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3120: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3120: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3404: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl +m4trace:/usr/share/aclocal/libtool.m4:3410: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. @@ -835,15 +835,15 @@ fi rm -f conftest*]) ]) -m4trace:/usr/share/aclocal/libtool.m4:3494: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3494: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3500: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3500: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3495: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3495: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3501: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3501: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3565: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:/usr/share/aclocal/libtool.m4:3571: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) @@ -859,30 +859,30 @@ esac AC_SUBST([LIBM]) ]) -m4trace:/usr/share/aclocal/libtool.m4:3584: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3584: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3590: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3590: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7631: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], +m4trace:/usr/share/aclocal/libtool.m4:7637: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) -m4trace:/usr/share/aclocal/libtool.m4:7640: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7640: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:7646: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:7646: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7647: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) +m4trace:/usr/share/aclocal/libtool.m4:7653: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) -m4trace:/usr/share/aclocal/libtool.m4:7654: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) +m4trace:/usr/share/aclocal/libtool.m4:7660: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) -m4trace:/usr/share/aclocal/libtool.m4:7659: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7659: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:7665: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:7665: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7779: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7779: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:7785: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:7785: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) m4trace:/usr/share/aclocal/ltdl.m4:16: -1- AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT]) @@ -1572,17 +1572,17 @@ m4trace:/usr/share/aclocal/lt~obsolete.m4:96: -1- AC_DEFUN([_LT_PROG_F77]) m4trace:/usr/share/aclocal/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_FC]) m4trace:/usr/share/aclocal/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_CXX]) -m4trace:/usr/share/aclocal-1.13/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' +m4trace:/usr/share/aclocal-1.14/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.3], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) -m4trace:/usr/share/aclocal-1.13/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.3])dnl +m4trace:/usr/share/aclocal-1.14/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -m4trace:/usr/share/aclocal-1.13/ar-lib.m4:13: -1- AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl +m4trace:/usr/share/aclocal-1.14/ar-lib.m4:13: -1- AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl @@ -1590,7 +1590,8 @@ : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [am_cv_ar_interface=ar + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) @@ -1607,7 +1608,7 @@ fi rm -f conftest.lib libconftest.a ]) - ]) + AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) @@ -1628,12 +1629,25 @@ esac AC_SUBST([AR])dnl ]) -m4trace:/usr/share/aclocal-1.13/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. +m4trace:/usr/share/aclocal-1.14/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) -m4trace:/usr/share/aclocal-1.13/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl +m4trace:/usr/share/aclocal-1.14/cond-if.m4:23: -1- AC_DEFUN([AM_COND_IF], [m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) +m4trace:/usr/share/aclocal-1.14/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl @@ -1653,7 +1667,7 @@ AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) -m4trace:/usr/share/aclocal-1.13/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl +m4trace:/usr/share/aclocal-1.14/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl @@ -1783,10 +1797,10 @@ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) -m4trace:/usr/share/aclocal-1.13/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl +m4trace:/usr/share/aclocal-1.14/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) -m4trace:/usr/share/aclocal-1.13/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl +m4trace:/usr/share/aclocal-1.14/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) @@ -1804,7 +1818,7 @@ AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) -m4trace:/usr/share/aclocal-1.13/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ +m4trace:/usr/share/aclocal-1.14/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. @@ -1853,11 +1867,11 @@ done } ]) -m4trace:/usr/share/aclocal-1.13/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], +m4trace:/usr/share/aclocal-1.14/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -m4trace:/usr/share/aclocal-1.13/init.m4:23: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4trace:/usr/share/aclocal-1.14/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -1953,8 +1967,49 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) -m4trace:/usr/share/aclocal-1.13/init.m4:136: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) +m4trace:/usr/share/aclocal-1.14/init.m4:182: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do @@ -1966,7 +2021,7 @@ esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -m4trace:/usr/share/aclocal-1.13/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +m4trace:/usr/share/aclocal-1.14/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) @@ -1976,7 +2031,7 @@ esac fi AC_SUBST([install_sh])]) -m4trace:/usr/share/aclocal-1.13/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null +m4trace:/usr/share/aclocal-1.14/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. @@ -1985,7 +2040,7 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -m4trace:/usr/share/aclocal-1.13/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} +m4trace:/usr/share/aclocal-1.14/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target @@ -2022,31 +2077,10 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -m4trace:/usr/share/aclocal-1.13/minuso.m4:11: -1- AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) -m4trace:/usr/share/aclocal-1.13/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) +m4trace:/usr/share/aclocal-1.14/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) -m4trace:/usr/share/aclocal-1.13/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +m4trace:/usr/share/aclocal-1.14/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2064,16 +2098,49 @@ AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -m4trace:/usr/share/aclocal-1.13/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) -m4trace:/usr/share/aclocal-1.13/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) -m4trace:/usr/share/aclocal-1.13/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) -m4trace:/usr/share/aclocal-1.13/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -m4trace:/usr/share/aclocal-1.13/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD +m4trace:/usr/share/aclocal-1.14/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +m4trace:/usr/share/aclocal-1.14/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) +m4trace:/usr/share/aclocal-1.14/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +m4trace:/usr/share/aclocal-1.14/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) +m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) +m4trace:/usr/share/aclocal-1.14/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) -m4trace:/usr/share/aclocal-1.13/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) +m4trace:/usr/share/aclocal-1.14/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2144,7 +2211,7 @@ AC_MSG_RESULT([done])]) rm -f conftest.file ]) -m4trace:/usr/share/aclocal-1.13/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl +m4trace:/usr/share/aclocal-1.14/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) @@ -2192,7 +2259,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -m4trace:/usr/share/aclocal-1.13/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +m4trace:/usr/share/aclocal-1.14/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake @@ -2203,9 +2270,9 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -m4trace:/usr/share/aclocal-1.13/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) -m4trace:/usr/share/aclocal-1.13/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) -m4trace:/usr/share/aclocal-1.13/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used +m4trace:/usr/share/aclocal-1.14/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) +m4trace:/usr/share/aclocal-1.14/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4trace:/usr/share/aclocal-1.14/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) @@ -2368,7 +2435,7 @@ m4trace:configure.ac:14: -1- AM_INIT_AUTOMAKE([subdir-objects -Wall foreign]) m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:14: -1- AM_SET_CURRENT_AUTOMAKE_VERSION -m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.13.3]) +m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.14.1]) m4trace:configure.ac:14: -1- _AM_AUTOCONF_VERSION([2.69]) m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) @@ -2464,6 +2531,8 @@ m4trace:configure.ac:23: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:23: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:23: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:23: -1- _AM_PROG_CC_C_O +m4trace:configure.ac:23: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) m4trace:configure.ac:23: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.ac:23: -1- AM_SET_DEPDIR m4trace:configure.ac:23: -1- m4_pattern_allow([^DEPDIR$]) @@ -2490,7 +2559,6 @@ m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:24: -1- AM_PROG_CC_C_O -m4trace:configure.ac:24: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$]) m4trace:configure.ac:26: -1- AM_PROG_AR m4trace:configure.ac:26: -1- m4_pattern_allow([^AR$]) m4trace:configure.ac:26: -1- m4_pattern_allow([^ac_ct_AR$]) @@ -2725,62 +2793,69 @@ m4trace:configure.ac:220: -1- m4_pattern_allow([^ENABLE_GCOV_FALSE$]) m4trace:configure.ac:220: -1- _AM_SUBST_NOTMAKE([ENABLE_GCOV_TRUE]) m4trace:configure.ac:220: -1- _AM_SUBST_NOTMAKE([ENABLE_GCOV_FALSE]) -m4trace:configure.ac:225: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +m4trace:configure.ac:237: -1- AM_CONDITIONAL([ENABLE_EXPAT], [test "x$expat" = "xyes"]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^ENABLE_EXPAT_TRUE$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^ENABLE_EXPAT_FALSE$]) +m4trace:configure.ac:237: -1- _AM_SUBST_NOTMAKE([ENABLE_EXPAT_TRUE]) +m4trace:configure.ac:237: -1- _AM_SUBST_NOTMAKE([ENABLE_EXPAT_FALSE]) +m4trace:configure.ac:243: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:225: the top level]) -m4trace:configure.ac:229: -1- m4_pattern_allow([^HAVE_VALGRIND_VALGRIND_H$]) -m4trace:configure.ac:257: -1- m4_pattern_allow([^VALGRIND_COMPAT_CFLAGS$]) -m4trace:configure.ac:268: -1- m4_pattern_allow([^EXPAT_LIBS$]) -m4trace:configure.ac:285: -1- m4_pattern_allow([^POD_DOCUMENTATION$]) -m4trace:configure.ac:294: -1- m4_pattern_allow([^PS2PDF$]) -m4trace:configure.ac:295: -1- m4_pattern_allow([^PDF2PS$]) -m4trace:configure.ac:296: -1- m4_pattern_allow([^PSJOIN$]) -m4trace:configure.ac:304: -1- m4_pattern_allow([^GROFF$]) -m4trace:configure.ac:313: -1- m4_pattern_allow([^GROFFMS$]) -m4trace:configure.ac:315: -1- m4_pattern_allow([^MANOPTS$]) -m4trace:configure.ac:324: -1- m4_pattern_allow([^MANOPTS$]) -m4trace:configure.ac:334: -1- AM_CONDITIONAL([ENABLE_AUTODOC], [ test "$buildautodoc" ]) -m4trace:configure.ac:334: -1- m4_pattern_allow([^ENABLE_AUTODOC_TRUE$]) -m4trace:configure.ac:334: -1- m4_pattern_allow([^ENABLE_AUTODOC_FALSE$]) -m4trace:configure.ac:334: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_TRUE]) -m4trace:configure.ac:334: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_FALSE]) -m4trace:configure.ac:340: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:341: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) -m4trace:configure.ac:344: -1- m4_pattern_allow([^const$]) -m4trace:configure.ac:345: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:346: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.ac:347: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) -m4trace:configure.ac:348: -1- m4_pattern_allow([^uid_t$]) -m4trace:configure.ac:348: -1- m4_pattern_allow([^gid_t$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^pid_t$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_VFORK_H$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^vfork$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) -m4trace:configure.ac:359: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. +configure.ac:243: the top level]) +m4trace:configure.ac:247: -1- m4_pattern_allow([^HAVE_VALGRIND_VALGRIND_H$]) +m4trace:configure.ac:275: -1- m4_pattern_allow([^VALGRIND_COMPAT_CFLAGS$]) +m4trace:configure.ac:286: -1- m4_pattern_allow([^EXPAT_LIBS$]) +m4trace:configure.ac:286: -1- AM_COND_IF([ENABLE_EXPAT], [as_fn_error $? "You need to install the libexpat1-dev library to build with expat." "$LINENO" 5], [{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&5 +$as_echo "$as_me: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&2;} ]) +m4trace:configure.ac:303: -1- m4_pattern_allow([^POD_DOCUMENTATION$]) +m4trace:configure.ac:312: -1- m4_pattern_allow([^PS2PDF$]) +m4trace:configure.ac:313: -1- m4_pattern_allow([^PDF2PS$]) +m4trace:configure.ac:314: -1- m4_pattern_allow([^PSJOIN$]) +m4trace:configure.ac:322: -1- m4_pattern_allow([^GROFF$]) +m4trace:configure.ac:331: -1- m4_pattern_allow([^GROFFMS$]) +m4trace:configure.ac:333: -1- m4_pattern_allow([^MANOPTS$]) +m4trace:configure.ac:342: -1- m4_pattern_allow([^MANOPTS$]) +m4trace:configure.ac:352: -1- AM_CONDITIONAL([ENABLE_AUTODOC], [ test "$buildautodoc" ]) +m4trace:configure.ac:352: -1- m4_pattern_allow([^ENABLE_AUTODOC_TRUE$]) +m4trace:configure.ac:352: -1- m4_pattern_allow([^ENABLE_AUTODOC_FALSE$]) +m4trace:configure.ac:352: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_TRUE]) +m4trace:configure.ac:352: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_FALSE]) +m4trace:configure.ac:358: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:359: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) +m4trace:configure.ac:362: -1- m4_pattern_allow([^const$]) +m4trace:configure.ac:363: -1- m4_pattern_allow([^size_t$]) +m4trace:configure.ac:364: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) +m4trace:configure.ac:365: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^uid_t$]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^gid_t$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^pid_t$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_VFORK_H$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^vfork$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) +m4trace:configure.ac:377: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... -configure.ac:359: the top level]) -m4trace:configure.ac:359: -1- m4_pattern_allow([^RETSIGTYPE$]) -m4trace:configure.ac:365: -1- m4_pattern_allow([^AM_LDFLAGS$]) -m4trace:configure.ac:366: -1- m4_pattern_allow([^AM_CFLAGS$]) -m4trace:configure.ac:367: -1- m4_pattern_allow([^AM_LIBTOOLFLAGS$]) -m4trace:configure.ac:368: -1- AM_CONDITIONAL([ION_NASA_B], [test "$IS_NASA_B" = "1"]) -m4trace:configure.ac:368: -1- m4_pattern_allow([^ION_NASA_B_TRUE$]) -m4trace:configure.ac:368: -1- m4_pattern_allow([^ION_NASA_B_FALSE$]) -m4trace:configure.ac:368: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_TRUE]) -m4trace:configure.ac:368: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_FALSE]) -m4trace:configure.ac:369: -1- AM_CONDITIONAL([LINUX_BUILD], [test "x$PLATFORM" = "xlinux"]) -m4trace:configure.ac:369: -1- m4_pattern_allow([^LINUX_BUILD_TRUE$]) -m4trace:configure.ac:369: -1- m4_pattern_allow([^LINUX_BUILD_FALSE$]) -m4trace:configure.ac:369: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_TRUE]) -m4trace:configure.ac:369: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_FALSE]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:374: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:374: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:374: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:374: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) -m4trace:configure.ac:374: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS -m4trace:configure.ac:374: -1- _LT_PROG_LTMAIN +configure.ac:377: the top level]) +m4trace:configure.ac:377: -1- m4_pattern_allow([^RETSIGTYPE$]) +m4trace:configure.ac:383: -1- m4_pattern_allow([^AM_LDFLAGS$]) +m4trace:configure.ac:384: -1- m4_pattern_allow([^AM_CFLAGS$]) +m4trace:configure.ac:385: -1- m4_pattern_allow([^AM_LIBTOOLFLAGS$]) +m4trace:configure.ac:386: -1- AM_CONDITIONAL([ION_NASA_B], [test "$IS_NASA_B" = "1"]) +m4trace:configure.ac:386: -1- m4_pattern_allow([^ION_NASA_B_TRUE$]) +m4trace:configure.ac:386: -1- m4_pattern_allow([^ION_NASA_B_FALSE$]) +m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_TRUE]) +m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_FALSE]) +m4trace:configure.ac:387: -1- AM_CONDITIONAL([LINUX_BUILD], [test "x$PLATFORM" = "xlinux"]) +m4trace:configure.ac:387: -1- m4_pattern_allow([^LINUX_BUILD_TRUE$]) +m4trace:configure.ac:387: -1- m4_pattern_allow([^LINUX_BUILD_FALSE$]) +m4trace:configure.ac:387: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_TRUE]) +m4trace:configure.ac:387: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_FALSE]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:392: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:392: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:392: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:392: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) +m4trace:configure.ac:392: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:392: -1- _LT_PROG_LTMAIN diff -Nru ion-3.2.0~dfsg1/autom4te.cache/traces.1 ion-3.2.1+dfsg/autom4te.cache/traces.1 --- ion-3.2.0~dfsg1/autom4te.cache/traces.1 2013-12-30 23:31:17.000000000 +0000 +++ ion-3.2.1+dfsg/autom4te.cache/traces.1 2014-07-08 02:18:10.000000000 +0000 @@ -1,9 +1,9 @@ -m4trace:aclocal.m4:1131: -1- m4_include([m4/libtool.m4]) -m4trace:aclocal.m4:1132: -1- m4_include([m4/ltoptions.m4]) -m4trace:aclocal.m4:1133: -1- m4_include([m4/ltsugar.m4]) -m4trace:aclocal.m4:1134: -1- m4_include([m4/ltversion.m4]) -m4trace:aclocal.m4:1135: -1- m4_include([m4/lt~obsolete.m4]) -m4trace:configure.ac:7: -1- AC_INIT([ion], [open source 3.2.0], [http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs]) +m4trace:aclocal.m4:1247: -1- m4_include([m4/libtool.m4]) +m4trace:aclocal.m4:1248: -1- m4_include([m4/ltoptions.m4]) +m4trace:aclocal.m4:1249: -1- m4_include([m4/ltsugar.m4]) +m4trace:aclocal.m4:1250: -1- m4_include([m4/ltversion.m4]) +m4trace:aclocal.m4:1251: -1- m4_include([m4/lt~obsolete.m4]) +m4trace:configure.ac:7: -1- AC_INIT([ion], [open source 3.2.1], [http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs]) m4trace:configure.ac:7: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:7: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:7: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) @@ -153,7 +153,7 @@ m4trace:configure.ac:7: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:14: -1- AM_INIT_AUTOMAKE([subdir-objects -Wall foreign]) m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) -m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.13.3]) +m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.14.1]) m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) @@ -288,6 +288,7 @@ m4trace:configure.ac:23: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.ac:23: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:23: -1- AC_REQUIRE_AUX_FILE([compile]) m4trace:configure.ac:23: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.ac:23: -1- AC_SUBST_TRACE([DEPDIR]) m4trace:configure.ac:23: -1- m4_pattern_allow([^DEPDIR$]) @@ -329,11 +330,6 @@ m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:24: -1- AM_PROG_CC_C_O -m4trace:configure.ac:24: -1- AC_DEFINE_TRACE_LITERAL([NO_MINUS_C_MINUS_O]) -m4trace:configure.ac:24: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$]) -m4trace:configure.ac:24: -1- AH_OUTPUT([NO_MINUS_C_MINUS_O], [/* Define to 1 if your C compiler doesn\'t accept -c and -o together. */ -@%:@undef NO_MINUS_C_MINUS_O]) -m4trace:configure.ac:24: -1- AC_REQUIRE_AUX_FILE([compile]) m4trace:configure.ac:26: -1- AM_PROG_AR m4trace:configure.ac:26: -1- AC_REQUIRE_AUX_FILE([ar-lib]) m4trace:configure.ac:26: -1- AC_SUBST([AR]) @@ -642,243 +638,255 @@ m4trace:configure.ac:220: -1- m4_pattern_allow([^ENABLE_GCOV_FALSE$]) m4trace:configure.ac:220: -1- _AM_SUBST_NOTMAKE([ENABLE_GCOV_TRUE]) m4trace:configure.ac:220: -1- _AM_SUBST_NOTMAKE([ENABLE_GCOV_FALSE]) -m4trace:configure.ac:225: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +m4trace:configure.ac:237: -1- AM_CONDITIONAL([ENABLE_EXPAT], [test "x$expat" = "xyes"]) +m4trace:configure.ac:237: -1- AC_SUBST([ENABLE_EXPAT_TRUE]) +m4trace:configure.ac:237: -1- AC_SUBST_TRACE([ENABLE_EXPAT_TRUE]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^ENABLE_EXPAT_TRUE$]) +m4trace:configure.ac:237: -1- AC_SUBST([ENABLE_EXPAT_FALSE]) +m4trace:configure.ac:237: -1- AC_SUBST_TRACE([ENABLE_EXPAT_FALSE]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^ENABLE_EXPAT_FALSE$]) +m4trace:configure.ac:237: -1- _AM_SUBST_NOTMAKE([ENABLE_EXPAT_TRUE]) +m4trace:configure.ac:237: -1- _AM_SUBST_NOTMAKE([ENABLE_EXPAT_FALSE]) +m4trace:configure.ac:243: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:225: the top level]) -m4trace:configure.ac:229: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VALGRIND_VALGRIND_H]) -m4trace:configure.ac:229: -1- m4_pattern_allow([^HAVE_VALGRIND_VALGRIND_H$]) -m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_VALGRIND_VALGRIND_H], [/* enable valgrind macros */ +configure.ac:243: the top level]) +m4trace:configure.ac:247: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VALGRIND_VALGRIND_H]) +m4trace:configure.ac:247: -1- m4_pattern_allow([^HAVE_VALGRIND_VALGRIND_H$]) +m4trace:configure.ac:247: -1- AH_OUTPUT([HAVE_VALGRIND_VALGRIND_H], [/* enable valgrind macros */ @%:@undef HAVE_VALGRIND_VALGRIND_H]) -m4trace:configure.ac:257: -1- AC_SUBST([VALGRIND_COMPAT_CFLAGS], [-Wno-unused-but-set-variable]) -m4trace:configure.ac:257: -1- AC_SUBST_TRACE([VALGRIND_COMPAT_CFLAGS]) -m4trace:configure.ac:257: -1- m4_pattern_allow([^VALGRIND_COMPAT_CFLAGS$]) -m4trace:configure.ac:268: -1- AC_SUBST([EXPAT_LIBS], ["-lexpat" ]) -m4trace:configure.ac:268: -1- AC_SUBST_TRACE([EXPAT_LIBS]) -m4trace:configure.ac:268: -1- m4_pattern_allow([^EXPAT_LIBS$]) -m4trace:configure.ac:285: -1- AC_SUBST([POD_DOCUMENTATION]) -m4trace:configure.ac:285: -1- AC_SUBST_TRACE([POD_DOCUMENTATION]) -m4trace:configure.ac:285: -1- m4_pattern_allow([^POD_DOCUMENTATION$]) -m4trace:configure.ac:294: -1- AC_SUBST([PS2PDF]) -m4trace:configure.ac:294: -1- AC_SUBST_TRACE([PS2PDF]) -m4trace:configure.ac:294: -1- m4_pattern_allow([^PS2PDF$]) -m4trace:configure.ac:295: -1- AC_SUBST([PDF2PS]) -m4trace:configure.ac:295: -1- AC_SUBST_TRACE([PDF2PS]) -m4trace:configure.ac:295: -1- m4_pattern_allow([^PDF2PS$]) -m4trace:configure.ac:296: -1- AC_SUBST([PSJOIN]) -m4trace:configure.ac:296: -1- AC_SUBST_TRACE([PSJOIN]) -m4trace:configure.ac:296: -1- m4_pattern_allow([^PSJOIN$]) -m4trace:configure.ac:304: -1- AC_SUBST([GROFF]) -m4trace:configure.ac:304: -1- AC_SUBST_TRACE([GROFF]) -m4trace:configure.ac:304: -1- m4_pattern_allow([^GROFF$]) -m4trace:configure.ac:313: -1- AC_SUBST([GROFFMS], [$GROFFMS]) -m4trace:configure.ac:313: -1- AC_SUBST_TRACE([GROFFMS]) -m4trace:configure.ac:313: -1- m4_pattern_allow([^GROFFMS$]) -m4trace:configure.ac:315: -1- AC_SUBST([MANOPTS]) -m4trace:configure.ac:315: -1- AC_SUBST_TRACE([MANOPTS]) -m4trace:configure.ac:315: -1- m4_pattern_allow([^MANOPTS$]) -m4trace:configure.ac:324: -1- AC_SUBST([MANOPTS], [$MANOPTS]) -m4trace:configure.ac:324: -1- AC_SUBST_TRACE([MANOPTS]) -m4trace:configure.ac:324: -1- m4_pattern_allow([^MANOPTS$]) -m4trace:configure.ac:334: -1- AM_CONDITIONAL([ENABLE_AUTODOC], [ test "$buildautodoc" ]) -m4trace:configure.ac:334: -1- AC_SUBST([ENABLE_AUTODOC_TRUE]) -m4trace:configure.ac:334: -1- AC_SUBST_TRACE([ENABLE_AUTODOC_TRUE]) -m4trace:configure.ac:334: -1- m4_pattern_allow([^ENABLE_AUTODOC_TRUE$]) -m4trace:configure.ac:334: -1- AC_SUBST([ENABLE_AUTODOC_FALSE]) -m4trace:configure.ac:334: -1- AC_SUBST_TRACE([ENABLE_AUTODOC_FALSE]) -m4trace:configure.ac:334: -1- m4_pattern_allow([^ENABLE_AUTODOC_FALSE$]) -m4trace:configure.ac:334: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_TRUE]) -m4trace:configure.ac:334: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_FALSE]) -m4trace:configure.ac:339: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. +m4trace:configure.ac:275: -1- AC_SUBST([VALGRIND_COMPAT_CFLAGS], [-Wno-unused-but-set-variable]) +m4trace:configure.ac:275: -1- AC_SUBST_TRACE([VALGRIND_COMPAT_CFLAGS]) +m4trace:configure.ac:275: -1- m4_pattern_allow([^VALGRIND_COMPAT_CFLAGS$]) +m4trace:configure.ac:286: -1- AC_SUBST([EXPAT_LIBS], ["-lexpat" ]) +m4trace:configure.ac:286: -1- AC_SUBST_TRACE([EXPAT_LIBS]) +m4trace:configure.ac:286: -1- m4_pattern_allow([^EXPAT_LIBS$]) +m4trace:configure.ac:286: -1- _AM_COND_IF([ENABLE_EXPAT]) +m4trace:configure.ac:286: -1- _AM_COND_ELSE([ENABLE_EXPAT]) +m4trace:configure.ac:286: -1- _AM_COND_ENDIF([ENABLE_EXPAT]) +m4trace:configure.ac:303: -1- AC_SUBST([POD_DOCUMENTATION]) +m4trace:configure.ac:303: -1- AC_SUBST_TRACE([POD_DOCUMENTATION]) +m4trace:configure.ac:303: -1- m4_pattern_allow([^POD_DOCUMENTATION$]) +m4trace:configure.ac:312: -1- AC_SUBST([PS2PDF]) +m4trace:configure.ac:312: -1- AC_SUBST_TRACE([PS2PDF]) +m4trace:configure.ac:312: -1- m4_pattern_allow([^PS2PDF$]) +m4trace:configure.ac:313: -1- AC_SUBST([PDF2PS]) +m4trace:configure.ac:313: -1- AC_SUBST_TRACE([PDF2PS]) +m4trace:configure.ac:313: -1- m4_pattern_allow([^PDF2PS$]) +m4trace:configure.ac:314: -1- AC_SUBST([PSJOIN]) +m4trace:configure.ac:314: -1- AC_SUBST_TRACE([PSJOIN]) +m4trace:configure.ac:314: -1- m4_pattern_allow([^PSJOIN$]) +m4trace:configure.ac:322: -1- AC_SUBST([GROFF]) +m4trace:configure.ac:322: -1- AC_SUBST_TRACE([GROFF]) +m4trace:configure.ac:322: -1- m4_pattern_allow([^GROFF$]) +m4trace:configure.ac:331: -1- AC_SUBST([GROFFMS], [$GROFFMS]) +m4trace:configure.ac:331: -1- AC_SUBST_TRACE([GROFFMS]) +m4trace:configure.ac:331: -1- m4_pattern_allow([^GROFFMS$]) +m4trace:configure.ac:333: -1- AC_SUBST([MANOPTS]) +m4trace:configure.ac:333: -1- AC_SUBST_TRACE([MANOPTS]) +m4trace:configure.ac:333: -1- m4_pattern_allow([^MANOPTS$]) +m4trace:configure.ac:342: -1- AC_SUBST([MANOPTS], [$MANOPTS]) +m4trace:configure.ac:342: -1- AC_SUBST_TRACE([MANOPTS]) +m4trace:configure.ac:342: -1- m4_pattern_allow([^MANOPTS$]) +m4trace:configure.ac:352: -1- AM_CONDITIONAL([ENABLE_AUTODOC], [ test "$buildautodoc" ]) +m4trace:configure.ac:352: -1- AC_SUBST([ENABLE_AUTODOC_TRUE]) +m4trace:configure.ac:352: -1- AC_SUBST_TRACE([ENABLE_AUTODOC_TRUE]) +m4trace:configure.ac:352: -1- m4_pattern_allow([^ENABLE_AUTODOC_TRUE$]) +m4trace:configure.ac:352: -1- AC_SUBST([ENABLE_AUTODOC_FALSE]) +m4trace:configure.ac:352: -1- AC_SUBST_TRACE([ENABLE_AUTODOC_FALSE]) +m4trace:configure.ac:352: -1- m4_pattern_allow([^ENABLE_AUTODOC_FALSE$]) +m4trace:configure.ac:352: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_TRUE]) +m4trace:configure.ac:352: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_FALSE]) +m4trace:configure.ac:357: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_DIRENT_H]) -m4trace:configure.ac:339: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. +m4trace:configure.ac:357: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_SYS_NDIR_H]) -m4trace:configure.ac:339: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. +m4trace:configure.ac:357: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_SYS_DIR_H]) -m4trace:configure.ac:339: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ +m4trace:configure.ac:357: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_NDIR_H]) -m4trace:configure.ac:340: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.ac:340: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:340: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ +m4trace:configure.ac:358: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) +m4trace:configure.ac:358: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:358: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) -m4trace:configure.ac:341: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_WAIT_H]) -m4trace:configure.ac:341: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) -m4trace:configure.ac:341: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have that is POSIX.1 compatible. */ +m4trace:configure.ac:359: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_WAIT_H]) +m4trace:configure.ac:359: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) +m4trace:configure.ac:359: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have that is POSIX.1 compatible. */ @%:@undef HAVE_SYS_WAIT_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_FCNTL_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_MALLOC_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_MALLOC_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MALLOC_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NETDB_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NETINET_IN_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDDEF_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_IOCTL_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_PARAM_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SOCKET_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TIME_H]) -m4trace:configure.ac:342: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:360: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) -m4trace:configure.ac:344: -1- AC_DEFINE_TRACE_LITERAL([const]) -m4trace:configure.ac:344: -1- m4_pattern_allow([^const$]) -m4trace:configure.ac:344: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ +m4trace:configure.ac:362: -1- AC_DEFINE_TRACE_LITERAL([const]) +m4trace:configure.ac:362: -1- m4_pattern_allow([^const$]) +m4trace:configure.ac:362: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ @%:@undef const]) -m4trace:configure.ac:345: -1- AC_DEFINE_TRACE_LITERAL([size_t]) -m4trace:configure.ac:345: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:345: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ +m4trace:configure.ac:363: -1- AC_DEFINE_TRACE_LITERAL([size_t]) +m4trace:configure.ac:363: -1- m4_pattern_allow([^size_t$]) +m4trace:configure.ac:363: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ @%:@undef size_t]) -m4trace:configure.ac:346: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) -m4trace:configure.ac:346: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.ac:346: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ +m4trace:configure.ac:364: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) +m4trace:configure.ac:364: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) +m4trace:configure.ac:364: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ @%:@undef TIME_WITH_SYS_TIME]) -m4trace:configure.ac:347: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME]) -m4trace:configure.ac:347: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) -m4trace:configure.ac:347: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your declares `struct tm\'. */ +m4trace:configure.ac:365: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME]) +m4trace:configure.ac:365: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) +m4trace:configure.ac:365: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your declares `struct tm\'. */ @%:@undef TM_IN_SYS_TIME]) -m4trace:configure.ac:348: -1- AC_DEFINE_TRACE_LITERAL([uid_t]) -m4trace:configure.ac:348: -1- m4_pattern_allow([^uid_t$]) -m4trace:configure.ac:348: -1- AH_OUTPUT([uid_t], [/* Define to `int\' if doesn\'t define. */ +m4trace:configure.ac:366: -1- AC_DEFINE_TRACE_LITERAL([uid_t]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^uid_t$]) +m4trace:configure.ac:366: -1- AH_OUTPUT([uid_t], [/* Define to `int\' if doesn\'t define. */ @%:@undef uid_t]) -m4trace:configure.ac:348: -1- AC_DEFINE_TRACE_LITERAL([gid_t]) -m4trace:configure.ac:348: -1- m4_pattern_allow([^gid_t$]) -m4trace:configure.ac:348: -1- AH_OUTPUT([gid_t], [/* Define to `int\' if doesn\'t define. */ +m4trace:configure.ac:366: -1- AC_DEFINE_TRACE_LITERAL([gid_t]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^gid_t$]) +m4trace:configure.ac:366: -1- AH_OUTPUT([gid_t], [/* Define to `int\' if doesn\'t define. */ @%:@undef gid_t]) -m4trace:configure.ac:353: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^pid_t$]) -m4trace:configure.ac:353: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ +m4trace:configure.ac:371: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^pid_t$]) +m4trace:configure.ac:371: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ @%:@undef pid_t]) -m4trace:configure.ac:353: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:371: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_VFORK_H]) -m4trace:configure.ac:353: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VFORK_H]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_VFORK_H$]) -m4trace:configure.ac:353: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ +m4trace:configure.ac:371: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VFORK_H]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_VFORK_H$]) +m4trace:configure.ac:371: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ @%:@undef HAVE_FORK]) -m4trace:configure.ac:353: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ +m4trace:configure.ac:371: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ @%:@undef HAVE_VFORK]) -m4trace:configure.ac:353: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) -m4trace:configure.ac:353: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ +m4trace:configure.ac:371: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) +m4trace:configure.ac:371: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ @%:@undef HAVE_WORKING_VFORK]) -m4trace:configure.ac:353: -1- AC_DEFINE_TRACE_LITERAL([vfork]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^vfork$]) -m4trace:configure.ac:353: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ +m4trace:configure.ac:371: -1- AC_DEFINE_TRACE_LITERAL([vfork]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^vfork$]) +m4trace:configure.ac:371: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ @%:@undef vfork]) -m4trace:configure.ac:353: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) -m4trace:configure.ac:353: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ +m4trace:configure.ac:371: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) +m4trace:configure.ac:371: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ @%:@undef HAVE_WORKING_FORK]) -m4trace:configure.ac:359: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. +m4trace:configure.ac:377: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... -configure.ac:359: the top level]) -m4trace:configure.ac:359: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) -m4trace:configure.ac:359: -1- m4_pattern_allow([^RETSIGTYPE$]) -m4trace:configure.ac:359: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ +configure.ac:377: the top level]) +m4trace:configure.ac:377: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) +m4trace:configure.ac:377: -1- m4_pattern_allow([^RETSIGTYPE$]) +m4trace:configure.ac:377: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ @%:@undef RETSIGTYPE]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ @%:@undef HAVE_ALARM]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */ @%:@undef HAVE_FTRUNCATE]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_GETCWD], [/* Define to 1 if you have the `getcwd\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_GETCWD], [/* Define to 1 if you have the `getcwd\' function. */ @%:@undef HAVE_GETCWD]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR], [/* Define to 1 if you have the `gethostbyaddr\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR], [/* Define to 1 if you have the `gethostbyaddr\' function. */ @%:@undef HAVE_GETHOSTBYADDR]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ @%:@undef HAVE_GETHOSTBYNAME]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */ @%:@undef HAVE_GETHOSTNAME]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ @%:@undef HAVE_GETTIMEOFDAY]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ @%:@undef HAVE_MEMSET]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_MKDIR], [/* Define to 1 if you have the `mkdir\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_MKDIR], [/* Define to 1 if you have the `mkdir\' function. */ @%:@undef HAVE_MKDIR]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_MKFIFO], [/* Define to 1 if you have the `mkfifo\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_MKFIFO], [/* Define to 1 if you have the `mkfifo\' function. */ @%:@undef HAVE_MKFIFO]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_RMDIR], [/* Define to 1 if you have the `rmdir\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_RMDIR], [/* Define to 1 if you have the `rmdir\' function. */ @%:@undef HAVE_RMDIR]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_SELECT], [/* Define to 1 if you have the `select\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_SELECT], [/* Define to 1 if you have the `select\' function. */ @%:@undef HAVE_SELECT]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */ @%:@undef HAVE_SOCKET]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ @%:@undef HAVE_STRCASECMP]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ @%:@undef HAVE_STRCHR]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ @%:@undef HAVE_STRERROR]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_STRNCASECMP], [/* Define to 1 if you have the `strncasecmp\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_STRNCASECMP], [/* Define to 1 if you have the `strncasecmp\' function. */ @%:@undef HAVE_STRNCASECMP]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ @%:@undef HAVE_STRSTR]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ @%:@undef HAVE_STRTOUL]) -m4trace:configure.ac:362: -1- AH_OUTPUT([HAVE_UNAME], [/* Define to 1 if you have the `uname\' function. */ +m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_UNAME], [/* Define to 1 if you have the `uname\' function. */ @%:@undef HAVE_UNAME]) -m4trace:configure.ac:365: -1- AC_SUBST([AM_LDFLAGS], ["$AM_LDFLAGS"]) -m4trace:configure.ac:365: -1- AC_SUBST_TRACE([AM_LDFLAGS]) -m4trace:configure.ac:365: -1- m4_pattern_allow([^AM_LDFLAGS$]) -m4trace:configure.ac:366: -1- AC_SUBST([AM_CFLAGS], ["$AM_CFLAGS"]) -m4trace:configure.ac:366: -1- AC_SUBST_TRACE([AM_CFLAGS]) -m4trace:configure.ac:366: -1- m4_pattern_allow([^AM_CFLAGS$]) -m4trace:configure.ac:367: -1- AC_SUBST([AM_LIBTOOLFLAGS], ["$AM_LIBTOOLFLAGS"]) -m4trace:configure.ac:367: -1- AC_SUBST_TRACE([AM_LIBTOOLFLAGS]) -m4trace:configure.ac:367: -1- m4_pattern_allow([^AM_LIBTOOLFLAGS$]) -m4trace:configure.ac:368: -1- AM_CONDITIONAL([ION_NASA_B], [test "$IS_NASA_B" = "1"]) -m4trace:configure.ac:368: -1- AC_SUBST([ION_NASA_B_TRUE]) -m4trace:configure.ac:368: -1- AC_SUBST_TRACE([ION_NASA_B_TRUE]) -m4trace:configure.ac:368: -1- m4_pattern_allow([^ION_NASA_B_TRUE$]) -m4trace:configure.ac:368: -1- AC_SUBST([ION_NASA_B_FALSE]) -m4trace:configure.ac:368: -1- AC_SUBST_TRACE([ION_NASA_B_FALSE]) -m4trace:configure.ac:368: -1- m4_pattern_allow([^ION_NASA_B_FALSE$]) -m4trace:configure.ac:368: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_TRUE]) -m4trace:configure.ac:368: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_FALSE]) -m4trace:configure.ac:369: -1- AM_CONDITIONAL([LINUX_BUILD], [test "x$PLATFORM" = "xlinux"]) -m4trace:configure.ac:369: -1- AC_SUBST([LINUX_BUILD_TRUE]) -m4trace:configure.ac:369: -1- AC_SUBST_TRACE([LINUX_BUILD_TRUE]) -m4trace:configure.ac:369: -1- m4_pattern_allow([^LINUX_BUILD_TRUE$]) -m4trace:configure.ac:369: -1- AC_SUBST([LINUX_BUILD_FALSE]) -m4trace:configure.ac:369: -1- AC_SUBST_TRACE([LINUX_BUILD_FALSE]) -m4trace:configure.ac:369: -1- m4_pattern_allow([^LINUX_BUILD_FALSE$]) -m4trace:configure.ac:369: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_TRUE]) -m4trace:configure.ac:369: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_FALSE]) -m4trace:configure.ac:372: -1- AC_CONFIG_FILES([Makefile]) -m4trace:configure.ac:373: -1- AC_CONFIG_FILES([contrib/Makefile]) -m4trace:configure.ac:374: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:374: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:374: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:374: -1- AC_SUBST([am__EXEEXT_TRUE]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:374: -1- AC_SUBST([am__EXEEXT_FALSE]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:374: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:374: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([abs_top_builddir]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([INSTALL]) -m4trace:configure.ac:374: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.ac:374: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) +m4trace:configure.ac:383: -1- AC_SUBST([AM_LDFLAGS], ["$AM_LDFLAGS"]) +m4trace:configure.ac:383: -1- AC_SUBST_TRACE([AM_LDFLAGS]) +m4trace:configure.ac:383: -1- m4_pattern_allow([^AM_LDFLAGS$]) +m4trace:configure.ac:384: -1- AC_SUBST([AM_CFLAGS], ["$AM_CFLAGS"]) +m4trace:configure.ac:384: -1- AC_SUBST_TRACE([AM_CFLAGS]) +m4trace:configure.ac:384: -1- m4_pattern_allow([^AM_CFLAGS$]) +m4trace:configure.ac:385: -1- AC_SUBST([AM_LIBTOOLFLAGS], ["$AM_LIBTOOLFLAGS"]) +m4trace:configure.ac:385: -1- AC_SUBST_TRACE([AM_LIBTOOLFLAGS]) +m4trace:configure.ac:385: -1- m4_pattern_allow([^AM_LIBTOOLFLAGS$]) +m4trace:configure.ac:386: -1- AM_CONDITIONAL([ION_NASA_B], [test "$IS_NASA_B" = "1"]) +m4trace:configure.ac:386: -1- AC_SUBST([ION_NASA_B_TRUE]) +m4trace:configure.ac:386: -1- AC_SUBST_TRACE([ION_NASA_B_TRUE]) +m4trace:configure.ac:386: -1- m4_pattern_allow([^ION_NASA_B_TRUE$]) +m4trace:configure.ac:386: -1- AC_SUBST([ION_NASA_B_FALSE]) +m4trace:configure.ac:386: -1- AC_SUBST_TRACE([ION_NASA_B_FALSE]) +m4trace:configure.ac:386: -1- m4_pattern_allow([^ION_NASA_B_FALSE$]) +m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_TRUE]) +m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_FALSE]) +m4trace:configure.ac:387: -1- AM_CONDITIONAL([LINUX_BUILD], [test "x$PLATFORM" = "xlinux"]) +m4trace:configure.ac:387: -1- AC_SUBST([LINUX_BUILD_TRUE]) +m4trace:configure.ac:387: -1- AC_SUBST_TRACE([LINUX_BUILD_TRUE]) +m4trace:configure.ac:387: -1- m4_pattern_allow([^LINUX_BUILD_TRUE$]) +m4trace:configure.ac:387: -1- AC_SUBST([LINUX_BUILD_FALSE]) +m4trace:configure.ac:387: -1- AC_SUBST_TRACE([LINUX_BUILD_FALSE]) +m4trace:configure.ac:387: -1- m4_pattern_allow([^LINUX_BUILD_FALSE$]) +m4trace:configure.ac:387: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_TRUE]) +m4trace:configure.ac:387: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_FALSE]) +m4trace:configure.ac:390: -1- AC_CONFIG_FILES([Makefile]) +m4trace:configure.ac:391: -1- AC_CONFIG_FILES([contrib/Makefile]) +m4trace:configure.ac:392: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:392: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:392: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:392: -1- AC_SUBST([am__EXEEXT_TRUE]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:392: -1- AC_SUBST([am__EXEEXT_FALSE]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:392: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:392: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([top_build_prefix]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.ac:392: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:392: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) diff -Nru ion-3.2.0~dfsg1/autom4te.cache/traces.2 ion-3.2.1+dfsg/autom4te.cache/traces.2 --- ion-3.2.0~dfsg1/autom4te.cache/traces.2 2013-12-30 23:31:13.000000000 +0000 +++ ion-3.2.1+dfsg/autom4te.cache/traces.2 2014-07-08 02:18:07.000000000 +0000 @@ -606,17 +606,17 @@ m4trace:/usr/share/aclocal/ltdl.m4:815: -1- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLSYM_USCORE' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])]) -m4trace:/usr/share/aclocal-1.13/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' +m4trace:/usr/share/aclocal-1.14/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.3], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) -m4trace:/usr/share/aclocal-1.13/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.3])dnl +m4trace:/usr/share/aclocal-1.14/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -m4trace:/usr/share/aclocal-1.13/ar-lib.m4:13: -1- AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl +m4trace:/usr/share/aclocal-1.14/ar-lib.m4:13: -1- AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl @@ -624,7 +624,8 @@ : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [am_cv_ar_interface=ar + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) @@ -641,7 +642,7 @@ fi rm -f conftest.lib libconftest.a ]) - ]) + AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) @@ -662,12 +663,25 @@ esac AC_SUBST([AR])dnl ]) -m4trace:/usr/share/aclocal-1.13/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. +m4trace:/usr/share/aclocal-1.14/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) -m4trace:/usr/share/aclocal-1.13/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl +m4trace:/usr/share/aclocal-1.14/cond-if.m4:23: -1- AC_DEFUN([AM_COND_IF], [m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) +m4trace:/usr/share/aclocal-1.14/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl @@ -687,7 +701,7 @@ AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) -m4trace:/usr/share/aclocal-1.13/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl +m4trace:/usr/share/aclocal-1.14/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl @@ -817,10 +831,10 @@ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) -m4trace:/usr/share/aclocal-1.13/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl +m4trace:/usr/share/aclocal-1.14/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) -m4trace:/usr/share/aclocal-1.13/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl +m4trace:/usr/share/aclocal-1.14/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) @@ -838,7 +852,7 @@ AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) -m4trace:/usr/share/aclocal-1.13/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ +m4trace:/usr/share/aclocal-1.14/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. @@ -887,11 +901,11 @@ done } ]) -m4trace:/usr/share/aclocal-1.13/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], +m4trace:/usr/share/aclocal-1.14/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -m4trace:/usr/share/aclocal-1.13/init.m4:23: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4trace:/usr/share/aclocal-1.14/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -987,8 +1001,49 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) -m4trace:/usr/share/aclocal-1.13/init.m4:136: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) +m4trace:/usr/share/aclocal-1.14/init.m4:182: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do @@ -1000,7 +1055,7 @@ esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -m4trace:/usr/share/aclocal-1.13/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +m4trace:/usr/share/aclocal-1.14/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) @@ -1010,7 +1065,7 @@ esac fi AC_SUBST([install_sh])]) -m4trace:/usr/share/aclocal-1.13/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null +m4trace:/usr/share/aclocal-1.14/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. @@ -1019,7 +1074,7 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -m4trace:/usr/share/aclocal-1.13/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} +m4trace:/usr/share/aclocal-1.14/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target @@ -1056,31 +1111,10 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -m4trace:/usr/share/aclocal-1.13/minuso.m4:11: -1- AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) -m4trace:/usr/share/aclocal-1.13/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) +m4trace:/usr/share/aclocal-1.14/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) -m4trace:/usr/share/aclocal-1.13/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +m4trace:/usr/share/aclocal-1.14/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -1098,16 +1132,49 @@ AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -m4trace:/usr/share/aclocal-1.13/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) -m4trace:/usr/share/aclocal-1.13/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) -m4trace:/usr/share/aclocal-1.13/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) -m4trace:/usr/share/aclocal-1.13/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -m4trace:/usr/share/aclocal-1.13/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD +m4trace:/usr/share/aclocal-1.14/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +m4trace:/usr/share/aclocal-1.14/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) +m4trace:/usr/share/aclocal-1.14/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +m4trace:/usr/share/aclocal-1.14/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) +m4trace:/usr/share/aclocal-1.14/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) +m4trace:/usr/share/aclocal-1.14/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) -m4trace:/usr/share/aclocal-1.13/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) +m4trace:/usr/share/aclocal-1.14/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1178,7 +1245,7 @@ AC_MSG_RESULT([done])]) rm -f conftest.file ]) -m4trace:/usr/share/aclocal-1.13/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl +m4trace:/usr/share/aclocal-1.14/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) @@ -1226,7 +1293,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -m4trace:/usr/share/aclocal-1.13/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +m4trace:/usr/share/aclocal-1.14/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake @@ -1237,9 +1304,9 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -m4trace:/usr/share/aclocal-1.13/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) -m4trace:/usr/share/aclocal-1.13/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) -m4trace:/usr/share/aclocal-1.13/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used +m4trace:/usr/share/aclocal-1.14/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) +m4trace:/usr/share/aclocal-1.14/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4trace:/usr/share/aclocal-1.14/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) @@ -1539,7 +1606,7 @@ AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) -m4trace:m4/libtool.m4:1509: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4trace:m4/libtool.m4:1515: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no @@ -1578,11 +1645,11 @@ m4_if([$6], , :, [$6]) fi ]) -m4trace:m4/libtool.m4:1551: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:m4/libtool.m4:1551: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. +m4trace:m4/libtool.m4:1557: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) +m4trace:m4/libtool.m4:1557: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:m4/libtool.m4:1560: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4trace:m4/libtool.m4:1566: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no @@ -1614,11 +1681,11 @@ m4_if([$5], , :, [$5]) fi ]) -m4trace:m4/libtool.m4:1595: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:m4/libtool.m4:1595: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. +m4trace:m4/libtool.m4:1601: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) +m4trace:m4/libtool.m4:1601: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:m4/libtool.m4:1602: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:m4/libtool.m4:1608: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl @@ -1754,11 +1821,11 @@ _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ]) -m4trace:m4/libtool.m4:1741: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:m4/libtool.m4:1741: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. +m4trace:m4/libtool.m4:1747: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) +m4trace:m4/libtool.m4:1747: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:m4/libtool.m4:1852: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl +m4trace:m4/libtool.m4:1858: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -1872,11 +1939,11 @@ _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ]) -m4trace:m4/libtool.m4:1969: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:m4/libtool.m4:1969: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. +m4trace:m4/libtool.m4:1975: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) +m4trace:m4/libtool.m4:1975: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:m4/libtool.m4:2939: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl +m4trace:m4/libtool.m4:2945: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in @@ -1935,11 +2002,11 @@ _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ]) -m4trace:m4/libtool.m4:3001: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:m4/libtool.m4:3001: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. +m4trace:m4/libtool.m4:3007: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) +m4trace:m4/libtool.m4:3007: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:m4/libtool.m4:3024: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl +m4trace:m4/libtool.m4:3030: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl @@ -2025,15 +2092,15 @@ _LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) ]) -m4trace:m4/libtool.m4:3113: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:m4/libtool.m4:3113: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete. +m4trace:m4/libtool.m4:3119: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) +m4trace:m4/libtool.m4:3119: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:m4/libtool.m4:3114: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:m4/libtool.m4:3114: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete. +m4trace:m4/libtool.m4:3120: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) +m4trace:m4/libtool.m4:3120: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:m4/libtool.m4:3404: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl +m4trace:m4/libtool.m4:3410: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. @@ -2120,15 +2187,15 @@ fi rm -f conftest*]) ]) -m4trace:m4/libtool.m4:3494: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:m4/libtool.m4:3494: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. +m4trace:m4/libtool.m4:3500: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:m4/libtool.m4:3500: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:m4/libtool.m4:3495: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:m4/libtool.m4:3495: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. +m4trace:m4/libtool.m4:3501: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:m4/libtool.m4:3501: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:m4/libtool.m4:3565: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:m4/libtool.m4:3571: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) @@ -2144,30 +2211,30 @@ esac AC_SUBST([LIBM]) ]) -m4trace:m4/libtool.m4:3584: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:m4/libtool.m4:3584: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. +m4trace:m4/libtool.m4:3590: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) +m4trace:m4/libtool.m4:3590: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:m4/libtool.m4:7631: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], +m4trace:m4/libtool.m4:7637: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) -m4trace:m4/libtool.m4:7640: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:m4/libtool.m4:7640: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. +m4trace:m4/libtool.m4:7646: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) +m4trace:m4/libtool.m4:7646: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:m4/libtool.m4:7647: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) +m4trace:m4/libtool.m4:7653: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) -m4trace:m4/libtool.m4:7654: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) +m4trace:m4/libtool.m4:7660: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) -m4trace:m4/libtool.m4:7659: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:m4/libtool.m4:7659: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. +m4trace:m4/libtool.m4:7665: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) +m4trace:m4/libtool.m4:7665: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:m4/libtool.m4:7779: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) -m4trace:m4/libtool.m4:7779: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. +m4trace:m4/libtool.m4:7785: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) +m4trace:m4/libtool.m4:7785: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) m4trace:m4/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -2368,7 +2435,7 @@ m4trace:configure.ac:14: -1- AM_INIT_AUTOMAKE([subdir-objects -Wall foreign]) m4trace:configure.ac:14: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:14: -1- AM_SET_CURRENT_AUTOMAKE_VERSION -m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.13.3]) +m4trace:configure.ac:14: -1- AM_AUTOMAKE_VERSION([1.14.1]) m4trace:configure.ac:14: -1- _AM_AUTOCONF_VERSION([2.69]) m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) @@ -2464,6 +2531,8 @@ m4trace:configure.ac:23: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:23: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:23: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.ac:23: -1- _AM_PROG_CC_C_O +m4trace:configure.ac:23: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) m4trace:configure.ac:23: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.ac:23: -1- AM_SET_DEPDIR m4trace:configure.ac:23: -1- m4_pattern_allow([^DEPDIR$]) @@ -2490,7 +2559,6 @@ m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:23: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:24: -1- AM_PROG_CC_C_O -m4trace:configure.ac:24: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$]) m4trace:configure.ac:26: -1- AM_PROG_AR m4trace:configure.ac:26: -1- m4_pattern_allow([^AR$]) m4trace:configure.ac:26: -1- m4_pattern_allow([^ac_ct_AR$]) @@ -2725,62 +2793,69 @@ m4trace:configure.ac:220: -1- m4_pattern_allow([^ENABLE_GCOV_FALSE$]) m4trace:configure.ac:220: -1- _AM_SUBST_NOTMAKE([ENABLE_GCOV_TRUE]) m4trace:configure.ac:220: -1- _AM_SUBST_NOTMAKE([ENABLE_GCOV_FALSE]) -m4trace:configure.ac:225: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +m4trace:configure.ac:237: -1- AM_CONDITIONAL([ENABLE_EXPAT], [test "x$expat" = "xyes"]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^ENABLE_EXPAT_TRUE$]) +m4trace:configure.ac:237: -1- m4_pattern_allow([^ENABLE_EXPAT_FALSE$]) +m4trace:configure.ac:237: -1- _AM_SUBST_NOTMAKE([ENABLE_EXPAT_TRUE]) +m4trace:configure.ac:237: -1- _AM_SUBST_NOTMAKE([ENABLE_EXPAT_FALSE]) +m4trace:configure.ac:243: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... -configure.ac:225: the top level]) -m4trace:configure.ac:229: -1- m4_pattern_allow([^HAVE_VALGRIND_VALGRIND_H$]) -m4trace:configure.ac:257: -1- m4_pattern_allow([^VALGRIND_COMPAT_CFLAGS$]) -m4trace:configure.ac:268: -1- m4_pattern_allow([^EXPAT_LIBS$]) -m4trace:configure.ac:285: -1- m4_pattern_allow([^POD_DOCUMENTATION$]) -m4trace:configure.ac:294: -1- m4_pattern_allow([^PS2PDF$]) -m4trace:configure.ac:295: -1- m4_pattern_allow([^PDF2PS$]) -m4trace:configure.ac:296: -1- m4_pattern_allow([^PSJOIN$]) -m4trace:configure.ac:304: -1- m4_pattern_allow([^GROFF$]) -m4trace:configure.ac:313: -1- m4_pattern_allow([^GROFFMS$]) -m4trace:configure.ac:315: -1- m4_pattern_allow([^MANOPTS$]) -m4trace:configure.ac:324: -1- m4_pattern_allow([^MANOPTS$]) -m4trace:configure.ac:334: -1- AM_CONDITIONAL([ENABLE_AUTODOC], [ test "$buildautodoc" ]) -m4trace:configure.ac:334: -1- m4_pattern_allow([^ENABLE_AUTODOC_TRUE$]) -m4trace:configure.ac:334: -1- m4_pattern_allow([^ENABLE_AUTODOC_FALSE$]) -m4trace:configure.ac:334: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_TRUE]) -m4trace:configure.ac:334: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_FALSE]) -m4trace:configure.ac:340: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.ac:341: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) -m4trace:configure.ac:344: -1- m4_pattern_allow([^const$]) -m4trace:configure.ac:345: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:346: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.ac:347: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) -m4trace:configure.ac:348: -1- m4_pattern_allow([^uid_t$]) -m4trace:configure.ac:348: -1- m4_pattern_allow([^gid_t$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^pid_t$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_VFORK_H$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^vfork$]) -m4trace:configure.ac:353: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) -m4trace:configure.ac:359: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. +configure.ac:243: the top level]) +m4trace:configure.ac:247: -1- m4_pattern_allow([^HAVE_VALGRIND_VALGRIND_H$]) +m4trace:configure.ac:275: -1- m4_pattern_allow([^VALGRIND_COMPAT_CFLAGS$]) +m4trace:configure.ac:286: -1- m4_pattern_allow([^EXPAT_LIBS$]) +m4trace:configure.ac:286: -1- AM_COND_IF([ENABLE_EXPAT], [as_fn_error $? "You need to install the libexpat1-dev library to build with expat." "$LINENO" 5], [{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&5 +$as_echo "$as_me: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&2;} ]) +m4trace:configure.ac:303: -1- m4_pattern_allow([^POD_DOCUMENTATION$]) +m4trace:configure.ac:312: -1- m4_pattern_allow([^PS2PDF$]) +m4trace:configure.ac:313: -1- m4_pattern_allow([^PDF2PS$]) +m4trace:configure.ac:314: -1- m4_pattern_allow([^PSJOIN$]) +m4trace:configure.ac:322: -1- m4_pattern_allow([^GROFF$]) +m4trace:configure.ac:331: -1- m4_pattern_allow([^GROFFMS$]) +m4trace:configure.ac:333: -1- m4_pattern_allow([^MANOPTS$]) +m4trace:configure.ac:342: -1- m4_pattern_allow([^MANOPTS$]) +m4trace:configure.ac:352: -1- AM_CONDITIONAL([ENABLE_AUTODOC], [ test "$buildautodoc" ]) +m4trace:configure.ac:352: -1- m4_pattern_allow([^ENABLE_AUTODOC_TRUE$]) +m4trace:configure.ac:352: -1- m4_pattern_allow([^ENABLE_AUTODOC_FALSE$]) +m4trace:configure.ac:352: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_TRUE]) +m4trace:configure.ac:352: -1- _AM_SUBST_NOTMAKE([ENABLE_AUTODOC_FALSE]) +m4trace:configure.ac:358: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.ac:359: -1- m4_pattern_allow([^HAVE_SYS_WAIT_H$]) +m4trace:configure.ac:362: -1- m4_pattern_allow([^const$]) +m4trace:configure.ac:363: -1- m4_pattern_allow([^size_t$]) +m4trace:configure.ac:364: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) +m4trace:configure.ac:365: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^uid_t$]) +m4trace:configure.ac:366: -1- m4_pattern_allow([^gid_t$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^pid_t$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_VFORK_H$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^vfork$]) +m4trace:configure.ac:371: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) +m4trace:configure.ac:377: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:746: AC_TYPE_SIGNAL is expanded from... -configure.ac:359: the top level]) -m4trace:configure.ac:359: -1- m4_pattern_allow([^RETSIGTYPE$]) -m4trace:configure.ac:365: -1- m4_pattern_allow([^AM_LDFLAGS$]) -m4trace:configure.ac:366: -1- m4_pattern_allow([^AM_CFLAGS$]) -m4trace:configure.ac:367: -1- m4_pattern_allow([^AM_LIBTOOLFLAGS$]) -m4trace:configure.ac:368: -1- AM_CONDITIONAL([ION_NASA_B], [test "$IS_NASA_B" = "1"]) -m4trace:configure.ac:368: -1- m4_pattern_allow([^ION_NASA_B_TRUE$]) -m4trace:configure.ac:368: -1- m4_pattern_allow([^ION_NASA_B_FALSE$]) -m4trace:configure.ac:368: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_TRUE]) -m4trace:configure.ac:368: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_FALSE]) -m4trace:configure.ac:369: -1- AM_CONDITIONAL([LINUX_BUILD], [test "x$PLATFORM" = "xlinux"]) -m4trace:configure.ac:369: -1- m4_pattern_allow([^LINUX_BUILD_TRUE$]) -m4trace:configure.ac:369: -1- m4_pattern_allow([^LINUX_BUILD_FALSE$]) -m4trace:configure.ac:369: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_TRUE]) -m4trace:configure.ac:369: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_FALSE]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:374: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:374: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:374: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:374: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:374: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) -m4trace:configure.ac:374: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS -m4trace:configure.ac:374: -1- _LT_PROG_LTMAIN +configure.ac:377: the top level]) +m4trace:configure.ac:377: -1- m4_pattern_allow([^RETSIGTYPE$]) +m4trace:configure.ac:383: -1- m4_pattern_allow([^AM_LDFLAGS$]) +m4trace:configure.ac:384: -1- m4_pattern_allow([^AM_CFLAGS$]) +m4trace:configure.ac:385: -1- m4_pattern_allow([^AM_LIBTOOLFLAGS$]) +m4trace:configure.ac:386: -1- AM_CONDITIONAL([ION_NASA_B], [test "$IS_NASA_B" = "1"]) +m4trace:configure.ac:386: -1- m4_pattern_allow([^ION_NASA_B_TRUE$]) +m4trace:configure.ac:386: -1- m4_pattern_allow([^ION_NASA_B_FALSE$]) +m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_TRUE]) +m4trace:configure.ac:386: -1- _AM_SUBST_NOTMAKE([ION_NASA_B_FALSE]) +m4trace:configure.ac:387: -1- AM_CONDITIONAL([LINUX_BUILD], [test "x$PLATFORM" = "xlinux"]) +m4trace:configure.ac:387: -1- m4_pattern_allow([^LINUX_BUILD_TRUE$]) +m4trace:configure.ac:387: -1- m4_pattern_allow([^LINUX_BUILD_FALSE$]) +m4trace:configure.ac:387: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_TRUE]) +m4trace:configure.ac:387: -1- _AM_SUBST_NOTMAKE([LINUX_BUILD_FALSE]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:392: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:392: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:392: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:392: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:392: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) +m4trace:configure.ac:392: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:392: -1- _LT_PROG_LTMAIN diff -Nru ion-3.2.0~dfsg1/bp/arm-uClibc/Makefile ion-3.2.1+dfsg/bp/arm-uClibc/Makefile --- ion-3.2.0~dfsg1/bp/arm-uClibc/Makefile 2013-12-30 23:22:21.000000000 +0000 +++ ion-3.2.1+dfsg/bp/arm-uClibc/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -6,7 +6,7 @@ CGR = ../cgr IPN = ../ipn IMC = ../imc -BSS = ../bss +BSSP = ../bssp DTN2 = ../dtn2 LTP = ../ltp TCP = ../tcp @@ -14,11 +14,10 @@ BRS = ../brs UDP = ../udp DCCP = ../dccp -CRYPTO = $(API)/crypto/NULL_SUITES # OPT = -O -DuClibc OPT = -g -fPIC -Wall -Werror -DuClibc -DENABLE_BPACS -DENABLE_IMC -CC = $(TCC) $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/crypto -I$(API)/acs -I$(API)/ext -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(API)/ext/cteb -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED +CC = $(TCC) $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/acs -I$(API)/ext -I$(API)/ext/phn -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(API)/ext/cteb -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED LDFLAGS = -fPIC -shared LD = $(TLD) $(LDFLAGS) @@ -30,7 +29,7 @@ $(IPN)/ipnfw.h \ $(IMC)/imcfw.h \ $(IMC)/imcP.h \ - $(BSS)/bssfw.h \ + $(BSSP)/bsspcla.h \ $(DTN2)/dtn2fw.h \ $(BRS)/brscla.h \ $(UDP)/udpcla.h \ @@ -42,18 +41,15 @@ BPLIBS = \ libbp.so -BPPOBJS = libbpP.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o crypto.o acstx.o acsrx.o acsserialize.o acsappend.o acsid.o cteb.o libimcfw.o -# phn.o - -LFW = -lbssfw -ldtn2fw -# -lipnfw +BPPOBJS = libbpP.o phn.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o acstx.o acsrx.o acsserialize.o acsappend.o acsid.o cteb.o libimcfw.o +# snid.o LBP = -lbp -RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep bssadmin bssfw dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys bping bpstats2 bpchat acsadmin acslist imcadmin imcfw +RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep bsspcli bsspclo dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys bping bpstats2 bpchat acsadmin acslist imcadmin imcfw bpnmtest # dccpcli dccpclo -ALL = check $(BPLIBS) libcgr.so libipnfw.so libimcfw.so libdtn2fw.so libbssfw.so libtcpcla.so libudpcla.so $(RUNTIMES) +ALL = check $(BPLIBS) libcgr.so libipnfw.so libimcfw.so libdtn2fw.so libtcpcla.so libudpcla.so $(RUNTIMES) all: $(ALL) @@ -94,10 +90,6 @@ $(CC) -o imcadmin imcadmin.o -L./lib -L$(ROOT)/lib -limcfw $(LBP) -lici -lpthread cp imcadmin ./bin -bssadmin: bssadmin.o $(BPLIBS) libbssfw.so - $(CC) -o bssadmin bssadmin.o -L./lib -L$(ROOT)/lib -lbssfw $(LBP) -lici -lpthread - cp bssadmin ./bin - dtn2admin: dtn2admin.o $(BPLIBS) libdtn2fw.so $(CC) -o dtn2admin dtn2admin.o -L./lib -L$(ROOT)/lib -ldtn2fw $(LBP) -lici -lpthread cp dtn2admin ./bin @@ -166,12 +158,6 @@ $(CC) -o imcfw imcfw.o -L./lib -L$(ROOT)/lib -limcfw -lipnfw $(LBP) -lici -lpthread cp imcfw ./bin -# - - BSS executables - - - - - - -bssfw: bssfw.o $(BPLIBS) libbssfw.so libcgr.so - $(CC) -o bssfw bssfw.o -L./lib -L$(ROOT)/lib -lbssfw -lcgr $(LBP) -lici -lpthread - cp bssfw ./bin - # - - DTN2 executables - - - - dtn2fw: dtn2fw.o $(BPLIBS) libdtn2fw.so @@ -185,7 +171,7 @@ # - - LTP executables - - - - - ltpcli: ltpcli.o $(BPLIBS) - $(CC) -o ltpcli ltpcli.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -lltp -lltpP -lici -lpthread + $(CC) -o ltpcli ltpcli.o -L./lib -L$(ROOT)/lib $(LBP) -lltp -lltpP -lici -lpthread cp ltpcli ./bin ltpclo: ltpclo.o $(BPLIBS) @@ -195,7 +181,7 @@ # - - TCP executables - - - - - tcpcli: tcpcli.o $(BPLIBS) libtcpcla.so - $(CC) -o tcpcli tcpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o tcpcli tcpcli.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp tcpcli ./bin tcpclo: tcpclo.o $(BPLIBS) libtcpcla.so @@ -205,7 +191,7 @@ # - - STCP executables - - - - stcpcli: stcpcli.o $(BPLIBS) libtcpcla.so - $(CC) -o stcpcli stcpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o stcpcli stcpcli.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp stcpcli ./bin stcpclo: stcpclo.o $(BPLIBS) libtcpcla.so @@ -215,17 +201,27 @@ # - - UDP executables - - - - - udpcli: udpcli.o $(BPLIBS) libudpcla.so - $(CC) -o udpcli udpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ludpcla $(LBP) -lici -lpthread + $(CC) -o udpcli udpcli.o -L./lib -L$(ROOT)/lib -ludpcla $(LBP) -lici -lpthread cp udpcli ./bin udpclo: udpclo.o $(BPLIBS) libudpcla.so $(CC) -o udpclo udpclo.o -L./lib -L$(ROOT)/lib -ludpcla $(LBP) -lici -lpthread cp udpclo ./bin +# - - BSSP executables - - - - + +bsspcli: bsspcli.o $(BPLIBS) + $(CC) -o bsspcli bsspcli.o -L./lib -L$(ROOT)/lib $(LBP) -lbssp -lbsspP -lici -lpthread + cp bsspcli ./bin + +bsspclo: bsspclo.o $(BPLIBS) + $(CC) -o bsspclo bsspclo.o -L./lib -L$(ROOT)/lib $(LBP) -lbssp -lbsspP -lici -lpthread + cp bsspclo ./bin + # - - DCCP executables - - - - dccpcli: dccpcli.o $(BPLIBS) - $(CC) -o dccpcli dccpcli.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -lici -lpthread + $(CC) -o dccpcli dccpcli.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread cp dccpcli ./bin dccpclo: dccpclo.o $(BPLIBS) @@ -235,17 +231,17 @@ # - - DGR executable - - - - - dgrcla: dgrcla.o $(BPLIBS) - $(CC) -o dgrcla dgrcla.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -ldgr -lici -lpthread + $(CC) -o dgrcla dgrcla.o -L./lib -L$(ROOT)/lib $(LBP) -ldgr -lici -lpthread cp dgrcla ./bin # - - BRS executables - - - - brsscla: brsscla.o $(BPLIBS) libtcpcla.so - $(CC) -o brsscla brsscla.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o brsscla brsscla.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp brsscla ./bin brsccla: brsccla.o $(BPLIBS) libtcpcla.so - $(CC) -o brsccla brsccla.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o brsccla brsccla.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp brsccla ./bin # - - Test executables - - - - @@ -278,6 +274,10 @@ $(CC) -o bprecvfile bprecvfile.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread cp bprecvfile ./bin +bpnmtest: bpnmtest.o libbp.so $(BPLIBS) + $(CC) -o bpnmtest bpnmtest.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread + cp bpnmtest ./bin + # - - Libraries - - - - - libbp.so: libbp.o $(BPPOBJS) libbpnm.o @@ -296,10 +296,6 @@ $(LD) -o libimcfw.so libimcfw.o cp libimcfw.so ./lib -libbssfw.so: libbssfw.o - $(LD) -o libbssfw.so libbssfw.o - cp libbssfw.so ./lib - libdtn2fw.so: libdtn2fw.o $(LD) -o libdtn2fw.so libdtn2fw.o cp libdtn2fw.so ./lib @@ -317,8 +313,8 @@ %.o: $(API)/%.c $(CC) -c $< -%.o: $(CRYPTO)/%.c - $(CC) -c $< +#%.o: $(API)/ext/snid/%.c +# $(CC) -c $< %.o: $(API)/ext/ecos/%.c $(CC) -c $< @@ -329,8 +325,8 @@ %.o: $(API)/ext/bsp/%.c $(CC) -c $< -#%.o: $(API)/ext/phn/%.c -# $(CC) -c $< +%.o: $(API)/ext/phn/%.c + $(CC) -c $< %.o: $(TEST)/%.c $(CC) -c $< @@ -350,7 +346,7 @@ %.o: $(IMC)/%.c $(CC) -c $< -%.o: $(BSS)/%.c +%.o: $(BSSP)/%.c $(CC) -c $< %.o: $(DTN2)/%.c diff -Nru ion-3.2.0~dfsg1/bp/brs/brsccla.c ion-3.2.1+dfsg/bp/brs/brsccla.c --- ion-3.2.0~dfsg1/bp/brs/brsccla.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/brs/brsccla.c 2014-07-08 02:17:38.000000000 +0000 @@ -103,8 +103,6 @@ typedef struct { - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; VInduct *vduct; int *ductSocket; int *running; @@ -137,7 +135,7 @@ while (*(parms->running)) { - if (bpBeginAcq(work, 0, parms->senderEid) < 0) + if (bpBeginAcq(work, 0, NULL) < 0) { putErrmsg("can't begin acquisition of bundle.", NULL); killMainThread(); @@ -423,11 +421,7 @@ } /* Server is now known to be authentic; proceed with - * thread instantiation. First initialize the sender - * endpoint ID lookup. */ - - ipnInit(); - dtn2Init(); + * thread instantiation. */ /* Set up signal handling. SIGTERM is shutdown signal. */ @@ -442,8 +436,6 @@ receiverParms.vduct = vinduct; receiverParms.ductSocket = &ductSocket; receiverParms.running = &running; - receiverParms.senderEid = receiverParms.senderEidBuffer; - getSenderEid(&(receiverParms.senderEid), hostName); if (pthread_begin(&receiverThread, NULL, receiveBundles, &receiverParms)) { diff -Nru ion-3.2.0~dfsg1/bp/brs/brscla.h ion-3.2.1+dfsg/bp/brs/brscla.h --- ion-3.2.0~dfsg1/bp/brs/brscla.h 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/brs/brscla.h 2014-07-08 02:17:38.000000000 +0000 @@ -18,7 +18,7 @@ #include "ipnfw.h" #include "dtn2fw.h" #include "ionsec.h" -#include "../library/crypto/crypto.h" +#include "crypto.h" #ifdef __cplusplus extern "C" { diff -Nru ion-3.2.0~dfsg1/bp/brs/brsscla.c ion-3.2.1+dfsg/bp/brs/brsscla.c --- ion-3.2.0~dfsg1/bp/brs/brsscla.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/brs/brsscla.c 2014-07-08 02:17:38.000000000 +0000 @@ -222,8 +222,6 @@ typedef struct { - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; VInduct *vduct; LystElt elt; pthread_mutex_t *mutex; @@ -455,15 +453,11 @@ return NULL; } - parms->senderEid = parms->senderEidBuffer; - isprintf(parms->senderEidBuffer, sizeof parms->senderEidBuffer, - "ipn:%u.0", ductNbr); - /* Now start receiving bundles. */ while (*(parms->running)) { - if (bpBeginAcq(work, 0, parms->senderEid) < 0) + if (bpBeginAcq(work, 0, NULL) < 0) { putErrmsg("can't begin acquisition of bundle.", NULL); ionKillMainThread(procName); @@ -762,11 +756,6 @@ return 1; } - /* Initialize sender endpoint ID lookup. */ - - ipnInit(); - dtn2Init(); - /* Set up signal handling. SIGTERM is shutdown signal. */ ionNoteMainThread("brsscla"); diff -Nru ion-3.2.0~dfsg1/bp/bss/bssadmin.c ion-3.2.1+dfsg/bp/bss/bssadmin.c --- ion-3.2.0~dfsg1/bp/bss/bssadmin.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/bss/bssadmin.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1428 +0,0 @@ -/* - * bssadmin.c: BP routing adminstration interface for - * the IPN endpoint ID scheme, extended to - * support bundle streaming service. - * - * - * Copyright (c) 2006, California Institute of Technology. - * Copyright (c) 2011, Space Internetworking Center, - * Democritus University of Thrace. - * - * All rights reserved. - * - * Authors: Scott Burleigh, Jet Propulsion Laboratory - * Sotirios-Angelos Lenas, Space Internetworking Center (SPICE) - * - * Modification History: - * Date Who What - * 08-08-11 SAL Bundle Streaming Service extension. - */ - -#include "bssfw.h" - -static int _echo(int *newValue) -{ - static int state = 0; - - if (newValue) - { - if (*newValue == 1) - { - state = 1; - } - else - { - state = 0; - } - } - - return state; -} - -static void printText(char *text) -{ - if (_echo(NULL)) - { - writeMemo(text); - } - - PUTS(text); -} - -static void handleQuit() -{ - printText("Please enter command 'q' to stop the program."); -} - -static void printSyntaxError(int lineNbr) -{ - char buffer[80]; - - isprintf(buffer, sizeof buffer, "Syntax error at line %d of bssadmin.c", - lineNbr); - printText(buffer); -} - -#define SYNTAX_ERROR printSyntaxError(__LINE__) - -static void printUsage() -{ - PUTS("Syntax of 'duct expression' is:"); - PUTS("\t/[,]"); - PUTS("Syntax of 'qualifier' is:"); - PUTS("\t{ | * } { | * }"); - PUTS("Valid commands are:"); - PUTS("\tq\tQuit"); - PUTS("\th\tHelp"); - PUTS("\t?\tHelp"); - PUTS("\tv\tPrint version of ION."); - PUTS("\ta\tAdd"); - PUTS("\t a plan \ - \ -"); - PUTS("\t a planrule \ - "); - PUTS("\t a group "); - PUTS("\t a grouprule \ -"); - PUTS("\t a entry "); - PUTS("\tc\tChange"); - PUTS("\t c plan \ - \ -"); - PUTS("\t c planrule \ - "); - PUTS("\t c group "); - PUTS("\t c grouprule \ -"); - PUTS("\td\tDelete"); - PUTS("\ti\tInfo"); - PUTS("\t {d|i} plan "); - PUTS("\t {d|i} planrule "); - PUTS("\t {d|i} group "); - PUTS("\t {d|i} grouprule \ -"); - PUTS("\t {d} entry "); - PUTS("\tl\tList"); - PUTS("\t l group"); - PUTS("\t l plan"); - PUTS("\t l planrule "); - PUTS("\t l grouprule "); - PUTS("\t l entry"); - PUTS("\te\tEnable or disable echo of printed output to log file"); - PUTS("\t e { 0 | 1 }"); - PUTS("\t#\tComment"); - PUTS("\t # "); -} - -static int parseDuctExpression(char *token, DuctExpression *expression) -{ - char *cursor = NULL; - char *protocolName; - char *outductName; - VOutduct *vduct; - PsmAddress vductElt; - - memset((char *) expression, 0, sizeof(DuctExpression)); - protocolName = token; - cursor = strchr(token, '/'); - if (cursor == NULL ) - { - return 0; /* - * either default, RT or PB mode directive is - * not configured properly - */ - } - - *cursor = '\0'; /* Delimit protocol name. */ - cursor++; - outductName = cursor; - - /* - * If there's a destination duct name, note end of - * outduct name and start of destination duct name. - */ - - cursor = strchr(cursor, ','); - if (cursor == NULL) - { - /* End of token delimits outduct name. */ - - expression->destDuctName = NULL; - } - else - { - *cursor = '\0'; /* Delimit outduct name. */ - cursor++; - expression->destDuctName = cursor; - } - - findOutduct(protocolName, outductName, &vduct, &vductElt); - if (vductElt == 0) - { - /* - * Flag the expression's outductElt as invalid, so - * that it will be discarded later. - * - * The parseDuctExpressions function checks - * expression->outductElt value in order to determine - * why parseDuctExpression returned 0. A value other - * than zero must be given in order to differentiate - * the "unknown outduct" reason for returning zero - * from the "cursor == NULL" reason. Setting - * expression->outductElt to 1 won't cause any other - * problems since bssadmin will discard later the whole - * expression structure. - */ - - expression->outductElt = 1; - writeMemoNote("[?] Unknown outduct", outductName); - return 0; - } - - expression->outductElt = vduct->outductElt; - return 1; -} - -static int parseDuctExpressions(char *defaultToken, - char *rtToken, char *pbToken, - DuctExpression *defaultExpression, - DuctExpression *rtExpression, - DuctExpression *pbExpression) -{ - int rtResult; - int pbResult; - - /* - * The values of defaultProtocolName, rtProtocolName and - * pbProtocolName are checked in parseDuctExpression - * function - */ - - if (parseDuctExpression(defaultToken, defaultExpression) == 0 ) - { - writeMemoNote("[?] Malformed duct expression: /", defaultToken); - return 0; - } - - rtResult = parseDuctExpression(rtToken, rtExpression); - pbResult = parseDuctExpression(pbToken, pbExpression); - - /* - * If both rtExpression and pbExpression are null, the - * configuration is valid; this is normal non-BSS IPN - * forwarding. - */ - - if (rtResult == 0 && pbResult == 0 - && rtExpression->outductElt == 0 && pbExpression->outductElt == 0) - { - writeMemo("[i] No BSS directives are declared"); - return 1; - } - - if (rtResult == 0 || pbResult == 0) - { - writeMemoNote("[?] Either RT or PB mode directive is not \ -configured properly.", NULL); - return 0; - } - - return 1; -} - -static void executeAdd(int tokenCount, char **tokens) -{ - DuctExpression defaultExpression; - DuctExpression rtExpression; - DuctExpression pbExpression; - int sourceServiceNbr; - vast sourceNodeNbr; - int dstServiceNbr; - vast dstNodeNbr; - int rtt; /* BSS - Custody expiration interval */ - - if (tokenCount < 2) - { - printText("Add what?"); - return; - } - - if (strcmp(tokens[1], "plan") == 0) - { - if (tokenCount != 7) - { - SYNTAX_ERROR; - return; - } - - if (parseDuctExpressions(tokens[3], tokens[4], tokens[5], - &defaultExpression, &rtExpression, &pbExpression) == 0) - { - return; - } - - - rtt = strtol(tokens[6], NULL, 0); - if (rtt==0 || rtt<0) - { - rtt = 63072000; /* 2 years */ - } - - bss_addPlan(strtouvast(tokens[2]), &defaultExpression, - &rtExpression, &pbExpression, rtt); - return; - } - - if (strcmp(tokens[1], "planrule") == 0) - { - if (tokenCount != 8) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[3], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[3], NULL, 0); - } - - if (strcmp(tokens[4], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtovast(tokens[4]); - } - - if (parseDuctExpressions(tokens[5], tokens[6], tokens[7], - &defaultExpression, &rtExpression, &pbExpression) == 0) - { - return; - } - - bss_addPlanRule(strtouvast(tokens[2]), sourceServiceNbr, - sourceNodeNbr, &defaultExpression, &rtExpression, - &pbExpression); - return; - } - - if (strcmp(tokens[1], "group") == 0) - { - if (tokenCount != 5) - { - SYNTAX_ERROR; - return; - } - - bss_addGroup(strtouvast(tokens[2]), strtouvast(tokens[3]), - tokens[4]); - return; - } - - if (strcmp(tokens[1], "grouprule") == 0) - { - if (tokenCount != 7) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[4], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[4], NULL, 0); - } - - if (strcmp(tokens[5], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtovast(tokens[5]); - } - - bss_addGroupRule(strtouvast(tokens[2]), strtouvast(tokens[3]), - sourceServiceNbr, sourceNodeNbr, tokens[6]); - return; - } - - if (strcmp(tokens[1], "entry") == 0) - { - if (tokenCount != 4) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[2], "*") == 0) - { - dstServiceNbr = -1; - } - else - { - dstServiceNbr = strtol(tokens[2], NULL, 0); - } - - if (strcmp(tokens[3], "*") == 0) - { - dstNodeNbr = -1; - } - else - { - dstNodeNbr = strtovast(tokens[3]); - } - - bss_addBssEntry(dstServiceNbr,dstNodeNbr); - return; - } - - SYNTAX_ERROR; -} - -static void executeChange(int tokenCount, char **tokens) -{ - DuctExpression defaultExpression; - DuctExpression rtExpression; - DuctExpression pbExpression; - int sourceServiceNbr; - vast sourceNodeNbr; - int rtt; /* BSS - Custody expiration interval */ - - if (tokenCount < 2) - { - printText("Change what?"); - return; - } - - if (strcmp(tokens[1], "plan") == 0) - { - if (tokenCount != 7) - { - SYNTAX_ERROR; - return; - } - - if (parseDuctExpressions(tokens[3], tokens[4], tokens[5], - &defaultExpression, &rtExpression, &pbExpression) == 0) - { - return; - } - - rtt = strtol(tokens[6], NULL, 0); - if (rtt < 0 || rtt == 0) - { - rtt = 63072000; /* 2 years */ - } - - bss_updatePlan(strtouvast(tokens[2]), &defaultExpression, - &rtExpression, &pbExpression, rtt); - return; - } - - if (strcmp(tokens[1], "planrule") == 0) - { - if (tokenCount != 8) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[3], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[3], NULL, 0); - } - - if (strcmp(tokens[4], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtovast(tokens[4]); - } - - if (parseDuctExpressions(tokens[5], tokens[6], tokens[7], - &defaultExpression, &rtExpression, &pbExpression) == 0) - { - return; - } - - bss_updatePlanRule(strtouvast(tokens[2]), sourceServiceNbr, - sourceNodeNbr, &defaultExpression, - &rtExpression, &pbExpression); - return; - } - - if (strcmp(tokens[1], "group") == 0) - { - if (tokenCount != 5) - { - SYNTAX_ERROR; - return; - } - - bss_updateGroup(strtouvast(tokens[2]), strtouvast(tokens[3]), - tokens[4]); - return; - } - - if (strcmp(tokens[1], "grouprule") == 0) - { - if (tokenCount != 7) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[4], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[4], NULL, 0); - } - - if (strcmp(tokens[5], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtovast(tokens[5]); - } - - bss_updateGroupRule(strtouvast(tokens[2]), - strtouvast(tokens[3]), sourceServiceNbr, - sourceNodeNbr, tokens[6]); - return; - } - - SYNTAX_ERROR; -} - -static void executeDelete(int tokenCount, char **tokens) -{ - int sourceServiceNbr; - vast sourceNodeNbr; - int dstServiceNbr; - vast dstNodeNbr; - - if (tokenCount < 2) - { - printText("Delete what?"); - return; - } - - if (strcmp(tokens[1], "plan") == 0) - { - if (tokenCount != 3) - { - SYNTAX_ERROR; - return; - } - - bss_removePlan(strtouvast(tokens[2])); - return; - } - - if (strcmp(tokens[1], "planrule") == 0) - { - if (tokenCount != 5) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[3], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[3], NULL, 0); - } - - if (strcmp(tokens[4], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtovast(tokens[4]); - } - - bss_removePlanRule(strtouvast(tokens[2]), sourceServiceNbr, - sourceNodeNbr); - return; - } - - if (strcmp(tokens[1], "group") == 0) - { - if (tokenCount != 4) - { - SYNTAX_ERROR; - return; - } - - bss_removeGroup(strtouvast(tokens[2]), strtouvast(tokens[3])); - return; - } - - if (strcmp(tokens[1], "grouprule") == 0) - { - if (tokenCount != 6) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[4], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[4], NULL, 0); - } - - if (strcmp(tokens[5], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtouvast(tokens[5]); - } - - bss_removeGroupRule(strtouvast(tokens[2]), - strtouvast(tokens[3]), sourceServiceNbr, - sourceNodeNbr); - return; - } - - if (strcmp(tokens[1], "entry") == 0) - { - if (tokenCount != 4) - { - SYNTAX_ERROR; - return; - } - - if (strcmp(tokens[2], "*") == 0) - { - dstServiceNbr = -1; - } - else - { - dstServiceNbr = strtol(tokens[2], NULL, 0); - } - - if (strcmp(tokens[3], "*") == 0) - { - dstNodeNbr = -1; - } - else - { - dstNodeNbr = strtovast(tokens[3]); - } - - bss_removeBssEntry(dstServiceNbr, dstNodeNbr); - return; - } - - SYNTAX_ERROR; -} - -static void printDirectives(char *context, FwdDirective *dir1, - FwdDirective *dir2, FwdDirective *dir3, - unsigned int rtt) -{ - Sdr sdr = getIonsdr(); - Object ductObj; - OBJ_POINTER(Outduct, duct); - OBJ_POINTER(ClProtocol, clp); - char string[SDRSTRING_BUFSZ + 1]; - char buffer[1024]; - char totalBuffer[1024]; - FwdDirective *dir; - int i; - - totalBuffer[0] = '\0'; - for (i = 0; i < 3; i++) - { - if (i==0) dir=dir1; - else if (i==1) dir=dir2; - else dir=dir3; - if (dir->outductElt != 0) - { - memset(buffer, '\0', 1024); - switch (dir->action) - { - case xmit: - ductObj = sdr_list_data(sdr, dir->outductElt); - GET_OBJ_POINTER(sdr, Outduct, duct, ductObj); - GET_OBJ_POINTER(sdr, ClProtocol, clp, - duct->protocol); - if (dir->destDuctName == 0) - { - string[0] = '\0'; - } - else - { - string[0] = ','; - if (sdr_string_read(sdr, string + 1, - dir->destDuctName) < 0) - { - istrcpy(string + 1, "?", - sizeof string - 1); - } - } - - isprintf(buffer, sizeof buffer, "%.700s x %.8s/\ - %.128s%.128s", totalBuffer, clp->name, - duct->name, string); - istrcpy(totalBuffer, buffer, - sizeof totalBuffer); - break; - - case fwd: - if (sdr_string_read(sdr, string, dir->eid) < 0) - { - istrcpy(string, "?", sizeof string); - } - - isprintf(buffer, sizeof buffer, - "%.700s f %.255s", totalBuffer, string); - istrcpy(totalBuffer, buffer, - sizeof totalBuffer); - break; - - default: - isprintf(buffer, sizeof buffer, "%.700s ?", - totalBuffer); - istrcpy(totalBuffer, buffer, - sizeof totalBuffer); - } - - } - } - - if (rtt != 0) - { - isprintf(buffer, sizeof buffer, "%.80s %.900s %u", - context, totalBuffer, rtt); - } - else - { - isprintf(buffer, sizeof buffer, "%.80s %.900s", - context, totalBuffer); - } - - printText(buffer); -} - -static void printPlan(BssPlan *plan) -{ - char context[32]; - - isprintf(context, sizeof context, UVAST_FIELDSPEC, plan->nodeNbr); - printDirectives(context, &plan->defaultDirective, &plan->rtDirective, - &plan->pbDirective, plan->expectedRTT); -} - -static void infoPlan(int tokenCount, char **tokens) -{ - Sdr sdr=getIonsdr(); - int nodeNbr; - Object planAddr; - Object elt; - OBJ_POINTER(BssPlan, plan); - - if (tokenCount != 3) - { - SYNTAX_ERROR; - return; - } - - CHKVOID(sdr_begin_xn(sdr)); - nodeNbr = strtol(tokens[2], NULL, 0); - bss_findPlan(nodeNbr, &planAddr, &elt); - if (elt == 0) - { - printText("Unknown node."); - } - else - { - GET_OBJ_POINTER(getIonsdr(), BssPlan, plan, planAddr); - printPlan(plan); - } - - sdr_exit_xn(sdr); -} - -static void printRule(BssRule *rule) -{ - char sourceServiceString[21]; - char sourceNodeString[21]; - char context[80]; - - if (rule->srcServiceNbr == 0) - { - istrcpy(sourceServiceString, "*", sizeof sourceServiceString); - } - else - { - isprintf(sourceServiceString, sizeof sourceServiceString, - "%ld", rule->srcServiceNbr); - } - - if (rule->srcNodeNbr == 0) - { - istrcpy(sourceNodeString, "*", sizeof sourceNodeString); - } - else - { - isprintf(sourceNodeString, sizeof sourceNodeString, "%ld", - rule->srcNodeNbr); - } - - isprintf(context, sizeof context, "rule for service %s from node %s =", - sourceServiceString, sourceNodeString); - printDirectives(context, &rule->directive, &rule->rtDirective, - &rule->pbDirective, 0); -} - -static void infoPlanRule(int tokenCount, char **tokens) -{ - Sdr sdr = getIonsdr(); - uvast nodeNbr; - Object planAddr; - Object elt; - OBJ_POINTER(BssPlan, plan); - int sourceServiceNbr; - vast sourceNodeNbr; - Object ruleAddr; - OBJ_POINTER(BssRule, rule); - - if (tokenCount != 5) - { - SYNTAX_ERROR; - return; - } - - nodeNbr = strtouvast(tokens[2]); - CHKVOID(sdr_begin_xn(sdr)); - bss_findPlan(nodeNbr, &planAddr, &elt); - if (elt == 0) - { - printText("Unknown node."); - } - else - { - GET_OBJ_POINTER(sdr, BssPlan, plan, planAddr); - printPlan(plan); - if (strcmp(tokens[3], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[3], NULL, 0); - } - - if (strcmp(tokens[4], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtovast(tokens[4]); - } - - bss_findPlanRule(nodeNbr, sourceServiceNbr, sourceNodeNbr, plan, - &ruleAddr, &elt); - if (elt == 0) - { - printText("Unknown rule."); - } - else - { - GET_OBJ_POINTER(sdr, BssRule, rule, ruleAddr); - printRule(rule); - } - } - - sdr_exit_xn(sdr); -} - -static void printGroup(IpnGroup *group) -{ - char eidString[SDRSTRING_BUFSZ]; - char buffer[384]; - - sdr_string_read(getIonsdr(), eidString, group->defaultDirective.eid); - isprintf(buffer, sizeof buffer, "From " UVAST_FIELDSPEC " \ -through " UVAST_FIELDSPEC ", forward via %.256s.", - group->firstNodeNbr, group->lastNodeNbr, eidString); - printText(buffer); -} - -static void infoGroup(int tokenCount, char **tokens) -{ - Sdr sdr = getIonsdr(); - uvast firstNodeNbr; - uvast lastNodeNbr; - Object elt; - OBJ_POINTER(IpnGroup, group); - - if (tokenCount != 4) - { - SYNTAX_ERROR; - return; - } - - firstNodeNbr = strtouvast(tokens[2]); - lastNodeNbr = strtouvast(tokens[3]); - if (lastNodeNbr < firstNodeNbr) - { - printText("Unknown group."); - return; - } - - CHKVOID(sdr_begin_xn(sdr)); - for (elt = sdr_list_first(sdr, (getBssConstants())->groups); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, IpnGroup, group, sdr_list_data(sdr, elt)); - if (group->firstNodeNbr == firstNodeNbr - && group->lastNodeNbr == lastNodeNbr) - { - printGroup(group); - break; - } - } - - if (elt == 0) - { - printText("Unknown group."); - } - - sdr_exit_xn(sdr); -} - -static void infoGroupRule(int tokenCount, char **tokens) -{ - Sdr sdr = getIonsdr(); - uvast firstNodeNbr; - uvast lastNodeNbr; - Object groupAddr; - Object elt; - OBJ_POINTER(IpnGroup, group); - int sourceServiceNbr; - vast sourceNodeNbr; - Object ruleAddr; - OBJ_POINTER(BssRule, rule); - - if (tokenCount != 6) - { - SYNTAX_ERROR; - return; - } - - firstNodeNbr = strtouvast(tokens[2]); - lastNodeNbr = strtouvast(tokens[3]); - CHKVOID(sdr_begin_xn(sdr)); - bss_findGroup(firstNodeNbr, lastNodeNbr, &groupAddr, &elt); - if (elt == 0) - { - printText("Unknown node."); - } - else - { - GET_OBJ_POINTER(sdr, IpnGroup, group, groupAddr); - printGroup(group); - if (strcmp(tokens[4], "*") == 0) - { - sourceServiceNbr = -1; - } - else - { - sourceServiceNbr = strtol(tokens[4], NULL, 0); - } - - if (strcmp(tokens[5], "*") == 0) - { - sourceNodeNbr = -1; - } - else - { - sourceNodeNbr = strtovast(tokens[5]); - } - - bss_findGroupRule(firstNodeNbr, lastNodeNbr, sourceServiceNbr, - sourceNodeNbr, group, &ruleAddr, &elt); - if (elt == 0) - { - printText("Unknown rule."); - } - else - { - GET_OBJ_POINTER(sdr, BssRule, rule, ruleAddr); - printRule(rule); - } - } - - sdr_exit_xn(sdr); -} - -static void executeInfo(int tokenCount, char **tokens) -{ - if (tokenCount < 2) - { - printText("Information on what?"); - return; - } - - if (strcmp(tokens[1], "plan") == 0) - { - infoPlan(tokenCount, tokens); - return; - } - - if (strcmp(tokens[1], "planrule") == 0) - { - infoPlanRule(tokenCount, tokens); - return; - } - - if (strcmp(tokens[1], "group") == 0) - { - infoGroup(tokenCount, tokens); - return; - } - - if (strcmp(tokens[1], "grouprule") == 0) - { - infoGroupRule(tokenCount, tokens); - return; - } - - SYNTAX_ERROR; -} - -static void listPlans() -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(BssPlan, plan); - - CHKVOID(sdr_begin_xn(sdr)); - for (elt = sdr_list_first(sdr, (getBssConstants())->plans); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, BssPlan, plan, sdr_list_data(sdr, elt)); - printPlan(plan); - } - - sdr_exit_xn(sdr); -} - -static void listRules(Object rules) -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(BssRule, rule); - - for (elt = sdr_list_first(sdr, rules); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, BssRule, rule, sdr_list_data(sdr, elt)); - printRule(rule); - } -} - -static void listGroups() -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(IpnGroup, group); - - CHKVOID(sdr_begin_xn(sdr)); - for (elt = sdr_list_first(sdr, (getBssConstants())->groups); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, IpnGroup, group, sdr_list_data(sdr, elt)); - printGroup(group); - } - - sdr_exit_xn(sdr); -} - -static void printEntry(int count, bssEntry *entry) -{ - char context[64]; - - isprintf(context, sizeof context, - " %d: %u - " UVAST_FIELDSPEC, - count, entry->dstServiceNbr, entry->dstNodeNbr); - printText(context); -} - -void listBssEntries() -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(bssEntry, entry); - int i = 1; - - printText("Entry: - "); - CHKVOID(sdr_begin_xn(sdr)); - for (elt = sdr_list_first(sdr, (getBssConstants())->bssList); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, bssEntry, entry, sdr_list_data(sdr, elt)); - printEntry(i, entry); - i++; - } - - sdr_exit_xn(sdr); -} - -static void executeList(int tokenCount, char **tokens) -{ - Sdr sdr = getIonsdr(); - uvast nodeNbr; - Object planAddr; - Object elt; - OBJ_POINTER(BssPlan, plan); - uvast firstNodeNbr; - uvast lastNodeNbr; - Object groupAddr; - OBJ_POINTER(IpnGroup, group); - - if (tokenCount < 2) - { - printText("List what?"); - return; - } - - if (strcmp(tokens[1], "plan") == 0) - { - listPlans(); - return; - } - - if (strcmp(tokens[1], "planrule") == 0) - { - if (tokenCount < 3) - { - printText("Must specify plan node nbr."); - return; - } - - nodeNbr = strtouvast(tokens[2]); - CHKVOID(sdr_begin_xn(sdr)); - bss_findPlan(nodeNbr, &planAddr, &elt); - if (elt == 0) - { - printText("Unknown plan."); - } - else - { - GET_OBJ_POINTER(sdr, BssPlan, plan, planAddr); - printPlan(plan); - listRules(plan->rules); - } - - sdr_exit_xn(sdr); - return; - } - - if (strcmp(tokens[1], "group") == 0) - { - listGroups(); - return; - } - - if (strcmp(tokens[1], "grouprule") == 0) - { - if (tokenCount < 4) - { - printText("Must specify group first & last node nbrs."); - return; - } - - firstNodeNbr = strtouvast(tokens[2]); - lastNodeNbr = strtouvast(tokens[3]); - CHKVOID(sdr_begin_xn(sdr)); - bss_findGroup(firstNodeNbr, lastNodeNbr, &groupAddr, &elt); - if (elt == 0) - { - printText("Unknown group."); - } - else - { - GET_OBJ_POINTER(sdr, BssPlan, group, groupAddr); - printGroup(group); - listRules(group->rules); - } - - sdr_exit_xn(sdr); - return; - } - - if (strcmp(tokens[1], "entry") == 0) - { - listBssEntries(); - return; - } - - SYNTAX_ERROR; -} - -static void switchEcho(int tokenCount, char **tokens) -{ - int state; - - if (tokenCount < 2) - { - printText("Echo on or off?"); - return; - } - - switch (*(tokens[1])) - { - case '0': - state = 0; - oK(_echo(&state)); - break; - - case '1': - state = 1; - oK(_echo(&state)); - break; - - default: - printText("Echo on or off?"); - } -} - -static int processLine(char *line, int lineLength) -{ - int tokenCount; - char *cursor; - int i; - char *tokens[9]; - char buffer[80]; - - tokenCount = 0; - for (cursor = line, i = 0; i < 9; i++) - { - if (*cursor == '\0') - { - tokens[i] = NULL; - } - else - { - findToken(&cursor, &(tokens[i])); - tokenCount++; - } - } - - if (tokenCount == 0) - { - return 0; - } - - /* Skip over any trailing whitespace. */ - - while (isspace((int) *cursor)) - { - cursor++; - } - - /* Make sure we've parsed everything. */ - - if (*cursor != '\0') - { - printText("Too many tokens."); - return 0; - } - - /* Have parsed the command. Now execute it. */ - - switch (*(tokens[0])) /* Command code. */ - { - case 0: /* Empty line. */ - case '#': /* Comment. */ - return 0; - - case '?': - case 'h': - printUsage(); - return 0; - - case 'v': - isprintf(buffer, sizeof buffer, "%s", - IONVERSIONNUMBER); - printText(buffer); - return 0; - - case 'a': - executeAdd(tokenCount, tokens); - return 0; - - case 'c': - executeChange(tokenCount, tokens); - return 0; - - case 'd': - executeDelete(tokenCount, tokens); - return 0; - - case 'i': - executeInfo(tokenCount, tokens); - return 0; - - case 'l': - executeList(tokenCount, tokens); - return 0; - - case 'e': - switchEcho(tokenCount, tokens); - return 0; - - case 'q': - return -1; /* End program. */ - - default: - printText("Invalid command. Enter '?' for help."); - return 0; - } -} - -static int run_bssadmin(char *cmdFileName) -{ - int cmdFile; - char line[256]; - int len; - - if (bpAttach() < 0) - { - putErrmsg("bssadmin can't attach to BP", NULL); - return -1; - } - - if (ipnInit() < 0) - { - putErrmsg("bssadmin can't initialize routing database", NULL); - return -1; - } - - if (cmdFileName == NULL) /* Interactive. */ - { -#ifdef FSWLOGGER - return 0; -#else - cmdFile = fileno(stdin); - isignal(SIGINT, handleQuit); - while (1) - { - printf(": "); - fflush(stdout); - if (igets(cmdFile, line, sizeof line, &len) == NULL) - { - if (len == 0) - { - break; - } - - putErrmsg("igets failed.", NULL); - break; /* Out of loop. */ - } - - if (len == 0) - { - continue; - } - - if (processLine(line, len)) - { - break; /* Out of loop. */ - } - } -#endif - } - else /* Scripted. */ - { - cmdFile = open(cmdFileName, O_RDONLY, 0777); - if (cmdFile < 0) - { - PERROR("Can't open command file"); - } - else - { - while (1) - { - if (igets(cmdFile, line, sizeof line, &len) - == NULL) - { - if (len == 0) - { - break; /* Loop. */ - } - - putErrmsg("igets failed.", NULL); - break; /* Loop. */ - } - - if (len == 0 - || line[0] == '#') /* Comment.*/ - { - continue; - } - - if (processLine(line, len)) - { - break; /* Out of loop. */ - } - } - - close(cmdFile); - } - } - - writeErrmsgMemos(); - printText("Stopping bssadmin."); - ionDetach(); - return 0; -} - -#if defined (VXWORKS) || defined (RTEMS) -int bssadmin(int a1, int a2, int a3, int a4, int a5, - int a6, int a7, int a8, int a9, int a10) -{ - char *cmdFileName = (char *) a1; -#else -int main(int argc, char **argv) -{ - char *cmdFileName = argc > 1 ? argv[1] : NULL; -#endif - return run_bssadmin(cmdFileName); -} diff -Nru ion-3.2.0~dfsg1/bp/bss/bssfw.c ion-3.2.1+dfsg/bp/bss/bssfw.c --- ion-3.2.0~dfsg1/bp/bss/bssfw.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/bss/bssfw.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,452 +0,0 @@ -/* - * bssfw.c: scheme-specific forwarder for the "ipn" - * scheme, used for Interplanetary Internet. - * - * Copyright (c) 2006, California Institute of Technology. - * Copyright (c) 2011, Space Internetworking Center, - * Democritus University of Thrace. - * - * All rights reserved. - * - * Authors: Scott Burleigh, Jet Propulsion Laboratory - * Sotirios-Angelos Lenas, Space Internetworking Center (SPICE) - * - * Modification History: - * Date Who What - * 08-08-11 SAL Bundle Streaming Service extension. - */ - -#include "bssfw.h" - -static Lyst _loggedStreamsList(int control) -{ - static Lyst loggedStreams=NULL; - int ionMemIdx = getIonMemoryMgr(); - - switch (control) - { - case 1: - loggedStreams=lyst_create_using(ionMemIdx); - break; - - case -1: - lyst_destroy(loggedStreams); - loggedStreams=NULL; - break; - default: - break; - } - - return loggedStreams; -} - -static sm_SemId _bssfwSemaphore(sm_SemId *newValue) -{ - long temp; - void *value; - sm_SemId sem; - - if (newValue) /* Add task variable. */ - { - temp = *newValue; - value = (void *) temp; - value = sm_TaskVar(&value); - } - else /* Retrieve task variable. */ - { - value = sm_TaskVar(NULL); - } - - temp = (long) value; - sem = temp; - return sem; -} - -static void shutDown() /* Commands forwarder termination. */ -{ - isignal(SIGTERM, shutDown); - sm_SemEnd(_bssfwSemaphore(NULL)); -} - -static int getDirective(uvast nodeNbr, Object plans, Bundle *bundle, - FwdDirective *directive) -{ - Sdr sdr = getIonsdr(); - Object elt; - Object planAddr; - BssPlan plan; - Lyst loggedStreams = _loggedStreamsList(0); - - for (elt = sdr_list_first(sdr, plans); elt; - elt = sdr_list_next(sdr, elt)) - { - planAddr = sdr_list_data(sdr, elt); - sdr_read(sdr, (char *) &plan, planAddr, sizeof(BssPlan)); - if (plan.nodeNbr < nodeNbr) - { - continue; - } - - if (plan.nodeNbr > nodeNbr) - { - return 0; /* Same as end of list. */ - } - - /* - * A plan for this neighboor was found at this point. Now, - * determine whether the bundle belongs to BSS traffic and - * return the proper directive. - */ - bss_copyDirective(bundle, directive, &plan.defaultDirective, - &plan.rtDirective, &plan.pbDirective, - loggedStreams); - return 1; - } - - return 0; -} - -static int enqueueToNeighbor(Bundle *bundle, Object bundleObj, - uvast nodeNbr, unsigned long serviceNbr, - Lyst loggedStreams) -{ - FwdDirective directive; - char stationEid[64]; - IonNode *stationNode; - PsmAddress nextElt; - PsmPartition ionwm; - PsmAddress snubElt; - IonSnub *snub; - - if (bss_lookupPlanDirective(nodeNbr, bundle->id.source.c.serviceNbr, - bundle->id.source.c.nodeNbr, bundle, &directive, - loggedStreams) == 0) - { - return 0; - } - - /* The station node is a neighbor. */ - isprintf(stationEid, sizeof stationEid, "ipn:" UVAST_FIELDSPEC ".%u", - nodeNbr, serviceNbr); - - /* Is neighbor refusing to be a station for bundles? */ - - stationNode = findNode(getIonVdb(), nodeNbr, &nextElt); - if (stationNode) - { - ionwm = getIonwm(); - for (snubElt = sm_list_first(ionwm, stationNode->snubs); - snubElt; snubElt = sm_list_next(ionwm, snubElt)) - { - snub = (IonSnub *) psp(ionwm, sm_list_data(ionwm, - snubElt)); - if (snub->nodeNbr < nodeNbr) - { - continue; - } - - if (snub->nodeNbr > nodeNbr) - { - break; /* Not refusing bundles. */ - } - - /* Neighbor is refusing bundles. A - * neighbor, but not a good neighbor; - * give up. */ - return 0; - } - } - - if (bpEnqueue(&directive, bundle, bundleObj, stationEid) < 0) - { - putErrmsg("Can't enqueue bundle.", NULL); - return -1; - } - - return 0; -} - -static int blockedOutductsCount() -{ - Sdr sdr = getIonsdr(); - BpDB *db = getBpConstants(); - int count = 0; - Object elt; - OBJ_POINTER(ClProtocol, protocol); - Object elt2; - OBJ_POINTER(Outduct, duct); - - for (elt = sdr_list_first(sdr, db->protocols); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, ClProtocol, protocol, - sdr_list_data(sdr, elt)); - for (elt2 = sdr_list_first(sdr, protocol->outducts); elt2; - elt2 = sdr_list_next(sdr, elt2)) - { - GET_OBJ_POINTER(sdr, Outduct, duct, - sdr_list_data(sdr, elt2)); - if (duct->blocked) - { - count++; - } - } - } - - return count; -} - -static int enqueueBundle(Bundle *bundle, Object bundleObj, - Lyst loggedStreams) -{ - Sdr sdr = getIonsdr(); - Object elt; - char eidString[SDRSTRING_BUFSZ]; - MetaEid metaEid; - VScheme *vscheme; - PsmAddress vschemeElt; - FwdDirective directive; - - elt = sdr_list_first(sdr, bundle->stations); - if (elt == 0) - { - putErrmsg("Forwarding error; stations stack is empty.", NULL); - return -1; - } - - sdr_string_read(sdr, eidString, sdr_list_data(sdr, elt)); - if (parseEidString(eidString, &metaEid, &vscheme, &vschemeElt) == 0) - { - putErrmsg("Can't parse node EID string.", eidString); - return bpAbandon(bundleObj, bundle); - } - - if (strcmp(vscheme->name, "ipn") != 0) - { - putErrmsg("Forwarding error; EID scheme is not 'ipn'.", - vscheme->name); - return -1; - } - - if (cgr_forward(bundle, bundleObj, metaEid.nodeNbr, - (getBssConstants())->plans, getDirective, NULL) < 0) - { - putErrmsg("CGR failed.", NULL); - return -1; - } - - /* If dynamic routing succeeded in enqueuing the bundle - * to a neighbor, accept the bundle and return. */ - - if (bundle->ductXmitElt) - { - /* Enqueued.*/ - - return bpAccept(bundleObj, bundle); - } - - /* No luck using the contact graph to compute a route - * to the destination node. So see if destination node - * is a neighbor; if so, enqueue for direct transmission. */ - - if (enqueueToNeighbor(bundle, bundleObj, metaEid.nodeNbr, - metaEid.serviceNbr, loggedStreams) < 0) - { - putErrmsg("Can't send bundle to neighbor.", NULL); - return -1; - } - - if (bundle->ductXmitElt) - { - /* Enqueued. */ - return bpAccept(bundleObj, bundle); - } - - /* Destination isn't a neighbor that accepts bundles. - * So look for the narrowest applicable static route - * (node range, i.e., "group") and forward to the - * prescribed "via" endpoint for that group. */ - - if (bss_lookupGroupDirective(metaEid.nodeNbr, - bundle->id.source.c.serviceNbr, - bundle->id.source.c.nodeNbr, bundle, &directive, - loggedStreams) == 1) - { - /* Found directive; forward via the indicated - * endpoint. */ - - sdr_write(sdr, bundleObj, (char *) &bundle, sizeof(Bundle)); - sdr_string_read(sdr, eidString, directive.eid); - return forwardBundle(bundleObj, bundle, eidString); - } - - /* No applicable group. If there's at least one blocked - * outduct, future outduct unblocking might enable CGR - * to compute a route that's not currently plausible. - * So place bundle in limbo. */ - - if (blockedOutductsCount() > 0) - { - if (enqueueToLimbo(bundle, bundleObj) < 0) - { - putErrmsg("Can't put bundle in limbo.", NULL); - return -1; - } - } - - if (bundle->ductXmitElt) - { - /* Enqueued to limbo. */ - - return bpAccept(bundleObj, bundle); - } - else - { - return bpAbandon(bundleObj, bundle); - } -} - -#if defined (VXWORKS) || defined (RTEMS) -int bssfw(int a1, int a2, int a3, int a4, int a5, - int a6, int a7, int a8, int a9, int a10) -{ -#else -int main(int argc, char *argv[]) -{ -#endif - int running = 1; - Sdr sdr; - VScheme *vscheme; - PsmAddress vschemeElt; - Scheme scheme; - Object elt; - Object bundleAddr; - Bundle bundle; - - if (bpAttach() < 0) - { - putErrmsg("bssfw can't attach to BP.", NULL); - return 1; - } - - if (ipnInit() < 0) - { - putErrmsg("bssfw can't load routing database.", NULL); - return 1; - } - - cgr_start(); - sdr = getIonsdr(); - findScheme("ipn", &vscheme, &vschemeElt); - if (vschemeElt == 0) - { - putErrmsg("'ipn' scheme is unknown.", NULL); - return 1; - } - - CHKZERO(sdr_begin_xn(sdr)); - sdr_read(sdr, (char *) &scheme, sdr_list_data(sdr, - vscheme->schemeElt), sizeof(Scheme)); - sdr_exit_xn(sdr); - oK(_bssfwSemaphore(&vscheme->semaphore)); - if (_loggedStreamsList(1) == NULL) - { - putErrmsg("Can't create a list for logging BSS sreams.", NULL); - return 1; - } - - isignal(SIGTERM, shutDown); - - /* Main loop: wait until forwarding queue is non-empty, - * then drain it. */ - - writeMemo("[i] bssfw is running."); - while (running && !(sm_SemEnded(vscheme->semaphore))) - { - /* Wrapping forwarding in an SDR transaction - * prevents race condition with bpclock (which - * is destroying bundles as their TTLs expire). */ - - CHKZERO(sdr_begin_xn(sdr)); - elt = sdr_list_first(sdr, scheme.forwardQueue); - if (elt == 0) /* Wait for forwarding notice. */ - { - sdr_exit_xn(sdr); - if (sm_SemTake(vscheme->semaphore) < 0) - { - putErrmsg("Can't take forwarder semaphore.", - NULL); - running = 0; - } - - continue; - } - - bundleAddr = (Object) sdr_list_data(sdr, elt); - sdr_stage(sdr, (char *) &bundle, bundleAddr, sizeof(Bundle)); - sdr_list_delete(sdr, elt, NULL, NULL); - bundle.fwdQueueElt = 0; - - /* Must rewrite bundle to note removal of - * fwdQueueElt, in case the bundle is abandoned - * and bpDestroyBundle re-reads it from the - * database. */ - - sdr_write(sdr, bundleAddr, (char *) &bundle, sizeof(Bundle)); - if (enqueueBundle(&bundle, bundleAddr, - _loggedStreamsList(0)) < 0) - { - sdr_cancel_xn(sdr); - putErrmsg("Can't enqueue bundle.", NULL); - running = 0; /* Terminate loop. */ - continue; - } - - /* Checking whether the last forwarded bundle belongs to BSS * - * traffic. In that case, monitor bundle and set the custody * - * expiration timer according to proximate node's plan RTT */ - - if (locateBssEntry(bundle.destination.c, NULL) != 0) - { - sdr_read(sdr, (char *) &bundle, bundleAddr, - sizeof(Bundle)); - bss_monitorStream(_loggedStreamsList(0), bundle); - if (bss_setCtDueTimer(bundle, bundleAddr) < 0) - { - putErrmsg("Failed to set custody expiration \ -event", NULL); - } - - /* Note: in the event that the bundle's - * destination is a multicast endpoint, - * multiple copies of the bundle may be - * forwarded; in that case, the custody - * signals returned from downstream nodes - * will not be resolvable to specific - * bundles and will be discarded. This - * means that the custodial retransmission - * timeout for a BSS bundle forwarded at - * a fork of a multicast tree may ALWAYS - * expire, triggering retransmission of - * the bundle. This will result in some - * additional consumption of transmission - * resources but will tend to increase the - * likelihood of delivery of the data to - * all final destination nodes. */ - } - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't enqueue bundle.", NULL); - running = 0; /* Terminate loop. */ - } - - sm_TaskYield(); - } - - writeErrmsgMemos(); - writeMemo("[i] bssfw forwarder has ended."); - oK(_loggedStreamsList(-1)); - ionDetach(); - return 0; -} diff -Nru ion-3.2.0~dfsg1/bp/bss/bssfw.h ion-3.2.1+dfsg/bp/bss/bssfw.h --- ion-3.2.0~dfsg1/bp/bss/bssfw.h 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/bss/bssfw.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,253 +0,0 @@ -/* - * bssfw.h: definitions supporting the implementation - * of the forwarding infrastructure for endpoint - * ID schemes conforming to the Compressed Bundle - * Header Encoding conventions. - * - * Copyright (c) 2005, California Institute of Technology. - * Copyright (c) 2011, Space Internetworking Center, - * Democritus University of Thrace. - * - * All rights reserved. - * - * Authors: Scott Burleigh, Jet Propulsion Laboratory - * Sotirios-Angelos Lenas, Space Internetworking Center (SPICE) - * - * Modification History: - * Date Who What - * 08-08-11 SAL Bundle Streaming Service extension. - */ - -#ifndef _BSSFW_H_ -#define _BSSFW_H_ - -#include "bpP.h" -#include "cgr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define BSS_ALL_OTHER_NODES ((uvast) -1) -#define BSS_ALL_OTHER_SERVICES ((unsigned int) -1) - -/* - * Each BSS stream is recorded in loggedStreams lyst. Stream structure - * provides monitoring assistance by storing several crucial information for - * each stream. Each entry in loggedStreams list has the following format: - * +--------------------+-----------------------+-------------------------+ - * | source node number | source service number | destination node number | - * +--------------------+-----------------------+-------------------------+ - * | destination service number | higher logged time | - * +------------------------------------+---------------------------------+ - */ - -typedef struct -{ - uvast srcNodeNbr; - unsigned int srcServiceNbr; - uvast dstNodeNbr; - unsigned int dstServiceNbr; - BpTimestamp latestTimeLogged; -} stream; - - -/* - * Each entry in the bssList has the following format: - * +----------------------------+-------------------------+ - * | destination service number | destination node number | - * +----------------------------+-------------------------+ - */ - -typedef struct -{ - unsigned int dstServiceNbr; - uvast dstNodeNbr; -} bssEntry; - -typedef struct -{ - unsigned int srcServiceNbr; - uvast srcNodeNbr; - FwdDirective directive; /* default directive */ - FwdDirective rtDirective; /* real-time mode directive*/ - FwdDirective pbDirective; /* playback mode directive */ -} BssRule; - -/* Cbhe-style egress rules are managed in the database's lists - * of IpnPlan and IpnGroup objects that associate egress - * directives with, respectively, the node numbers of neighboring - * nodes and ranges of node numbers of non-neighboring nodes. - * - * Each IpnPlan and each IpnGroup may have an associated list - * of IpnRules indicating the egress directives for bundles - * that are characterized by a specific source service number - * and/or source node. Each plan and each group also has a - * default directive, which applies to all bundles for which - * no source service/node-specific FwdRules apply. - * - * All directives established for IpnPlans must be Transmission - * directives. - * - * Nodes for which no plans or contact schedules are known by - * the local forwarder may be forwarded to another forwarder - * that is expected to have the requisite knowledge; this - * mechanism enables IPN to scale up to relatively large numbers - * of nodes. For this purpose, one or more "groups" of nodes - * -- each group identified by the range of node numbers for - * which the designated "via" node takes forwarding responsibility - * -- may be defined. Groups may nest, but otherwise the - * memberships of groups may never overlap. Any bundle that is - * to be sent to a node for which no local forwarding knowledge - * is available will be forwarded to the designated "via" node - * cited by the smallest group between whose first and last node - * numbers (inclusive) the destination node's number lies, if any. - * - * All directives established for IpnGroups must be Forwarding - * directives. Note that the First and Last node numbers - * specified for a group may be the same number, identifying - * a static route to a specified node. */ - -typedef struct -{ - uvast nodeNbr; - FwdDirective defaultDirective; - FwdDirective rtDirective; - FwdDirective pbDirective; - unsigned int expectedRTT; - Object rules; /* SDR list */ -} BssPlan; - -typedef struct -{ - uvast firstNodeNbr; /* in range */ - uvast lastNodeNbr; /* in range */ - FwdDirective defaultDirective; - Object rules; /* SDR list */ -} IpnGroup; - -typedef struct -{ - Object plans; /* SDR list */ - Object groups; /* SDR list */ - Object bssList; /* SDR list - A catalogue that contains * - the service numbers (or optionally pairs * - of node-service numbers) that BSS runs * - on. This list is mainly used for the * - identification of bundles that belong * - to BSS traffic. */ -} BssDB; - -typedef struct -{ - Object outductElt; - char *destDuctName; -} DuctExpression; - -extern int ipnInit(); -extern Object getBssDbObject(); -extern BssDB *getBssConstants(); - -extern Object locateBssEntry(CbheEid dst, Object *nextEntry); - -extern int bss_addBssEntry(int serviceNbr, vast nodeNbr); -extern int bss_removeBssEntry(int serviceNbr, vast nodeNbr); - -extern void bss_monitorStream(Lyst loggedStreams, - Bundle bundle); - -extern void bss_findPlan(uvast nodeNbr, - Object *planAddr, - Object *elt); - -extern int bss_addPlan(uvast nodeNbr, - DuctExpression *ductExpression, - DuctExpression *udpExpression, - DuctExpression *tcpExpression, - unsigned int estimatedRTT); -extern int bss_updatePlan(uvast nodeNbr, - DuctExpression *ductExpression, - DuctExpression *udpExpression, - DuctExpression *tcpExpression, - int estimatedRTT); -extern int bss_removePlan(uvast nodeNbr); - -extern void bss_findPlanRule(uvast nodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr, BssPlan *plan, - Object *ruleAddr, Object *elt); - -extern int bss_addPlanRule(uvast nodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr, - DuctExpression *ductExpression, - DuctExpression *udpExpression, - DuctExpression *tcpExpression); -extern int bss_updatePlanRule(uvast nodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr, - DuctExpression *ductExpression, - DuctExpression *udpExpression, - DuctExpression *tcpExpression); -extern int bss_removePlanRule(uvast nodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr); - -extern int bss_copyDirective(Bundle *bundle, - FwdDirective *directive, - FwdDirective *defaultDirective, - FwdDirective *rtDirective, - FwdDirective *pbDirective, - Lyst loggedStreams); - -extern int bss_lookupPlanDirective(uvast nodeNbr, - unsigned int sourceServiceNbr, - uvast sourceNodeNbr, - Bundle *bundle, FwdDirective *directive, - Lyst loggedStreams); - -extern int bss_setCtDueTimer(Bundle bundle, - Object bundleAddr); - -extern void bss_findGroup(uvast firstNodeNbr, - uvast lastNodeNbr, - Object *groupAddr, Object *elt); - -extern int bss_addGroup(uvast firstNodeNbr, - uvast lastNodeNbr, char *viaEid); -extern int bss_updateGroup(uvast firstNodeNbr, - uvast lastNodeNbr, char *viaEid); -extern int bss_removeGroup(uvast firstNodeNbr, - uvast lastNodeNbr); - -extern void bss_findGroupRule(uvast firstNodeNbr, - uvast lastNodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr, IpnGroup *group, - Object *ruleAddr, Object *elt); - -extern int bss_addGroupRule(uvast firstNodeNbr, - uvast lastNodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr, char *viaEid); -extern int bss_updateGroupRule(uvast firstNodeNbr, - uvast lastNodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr, char *viaEid); -extern int bss_removeGroupRule(uvast firstNodeNbr, - uvast lastNodeNbr, - int sourceServiceNbr, - vast sourceNodeNbr); - -extern int bss_lookupGroupDirective(uvast nodeNbr, - unsigned int sourceServiceNbr, - uvast sourceNodeNbr, - Bundle *bundle, - FwdDirective *directive, - Lyst loggedStreams); - -#ifdef __cplusplus -} -#endif - -#endif /* _BSSFW_H_ */ diff -Nru ion-3.2.0~dfsg1/bp/bss/libbssfw.c ion-3.2.1+dfsg/bp/bss/libbssfw.c --- ion-3.2.0~dfsg1/bp/bss/libbssfw.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/bss/libbssfw.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1700 +0,0 @@ -/* - * libbssfw.c: functions enabling the implementation of - * a regional forwarder for the BSS endpoint - * ID scheme. - * - * Copyright (c) 2006, California Institute of Technology. - * Copyright (c) 2011, Space Internetworking Center, - * Democritus University of Thrace. - * - * All rights reserved. - * - * Authors: Scott Burleigh, Jet Propulsion Laboratory - * Sotirios-Angelos Lenas, Space Internetworking Center (SPICE) - * - * - * Modification History: - * Date Who What - * 02-06-06 SCB Original development. - * 08-08-11 SAL Bundle Streaming Service extension. - */ - -#include "bssfw.h" - -#define BSS_DBNAME "ipnRoute" - -#ifndef LIBBSSFWDEBUG -#define LIBBSSFWDEBUG 0 -#endif - -/* * * Globals used for BSS scheme service. * */ - -static Object _bssdbObject(Object *newDbObj) -{ - static Object obj = 0; - - if (newDbObj) - { - obj = *newDbObj; - } - - return obj; -} - -static BssDB *_bssConstants() -{ - static BssDB buf; - static BssDB *db = NULL; - Sdr sdr; - Object dbObject; - - if (db == NULL) - { - sdr = getIonsdr(); - CHKNULL(sdr); - dbObject = _bssdbObject(NULL); - if (dbObject) - { - if (sdr_heap_is_halted(sdr)) - { - sdr_read(sdr, (char *) &buf, dbObject, - sizeof(BssDB)); - } - else - { - CHKNULL(sdr_begin_xn(sdr)); - sdr_read(sdr, (char *) &buf, dbObject, - sizeof(BssDB)); - sdr_exit_xn(sdr); - } - - db = &buf; - } - } - - return db; -} - -/* * * Routing information mgt functions * */ - -static int lookupBssEid(char *uriBuffer, char *neighborClId) -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(BssPlan, plan); - - for (elt = sdr_list_first(sdr, (_bssConstants())->plans); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, BssPlan, plan, sdr_list_data(sdr, elt)); - switch (clIdMatches(neighborClId, &plan->defaultDirective)) - { - case -1: - putErrmsg("Failed looking up BSS EID.", NULL); - return -1; - - case 0: - continue; /* No match. */ - - default: - - /* Found the plan for transmission to - * this neighbor, so now we know the - * neighbor's EID. */ - - isprintf(uriBuffer, SDRSTRING_BUFSZ, - "ipn:" UVAST_FIELDSPEC ".0", plan->nodeNbr); - return 1; - } - } - - return 0; -} - -int ipnInit() -{ - /* BSS is a plug-compatible replacement for IPN, which - * subsumes all of the IPN forwarding logic and extends - * it. So it would never be linked into the same - * deployment of ION as the original IPN, so we can - * simplify software configuration somewhat by providing - * an alternative implementation of the ipnInit() function - * rather than an equivalen bssInit(), which would - * require that other software be explicitly bss-aware. */ - - Sdr sdr = getIonsdr(); - Object bssdbObject; - BssDB bssdbBuf; - - /* Recover the BSS database, creating it if necessary. */ - - CHKERR(sdr_begin_xn(sdr)); - oK(senderEidLookupFunctions(lookupBssEid)); - bssdbObject = sdr_find(sdr, BSS_DBNAME, NULL); - switch (bssdbObject) - { - case -1: /* SDR error. */ - sdr_cancel_xn(sdr); - putErrmsg("Failed seeking BSS database in SDR.", NULL); - return -1; - - case 0: /* Not found; must create new DB. */ - bssdbObject = sdr_malloc(sdr, sizeof(BssDB)); - if (bssdbObject == 0) - { - sdr_cancel_xn(sdr); - putErrmsg("No space for BSS database.", NULL); - return -1; - } - - memset((char *) &bssdbBuf, 0, sizeof(BssDB)); - bssdbBuf.plans = sdr_list_create(sdr); - bssdbBuf.groups = sdr_list_create(sdr); - bssdbBuf.bssList = sdr_list_create(sdr); - sdr_write(sdr, bssdbObject, (char *) &bssdbBuf, sizeof(BssDB)); - sdr_catlg(sdr, BSS_DBNAME, 0, bssdbObject); - if (sdr_end_xn(sdr)) - { - putErrmsg("Can't create BSS database.", NULL); - return -1; - } - - break; - - default: /* Found DB in the SDR. */ - sdr_exit_xn(sdr); - } - - oK(_bssdbObject(&bssdbObject)); - oK(_bssConstants()); - return 0; -} - -Object getBssDbObject() -{ - return _bssdbObject(NULL); -} - -BssDB *getBssConstants() -{ - return _bssConstants(); -} - -Object locateBssEntry (CbheEid dst, Object *nextEntry) -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(bssEntry, entry); - - unsigned int serviceNbr = dst.serviceNbr; - uvast nodeNbr = dst.nodeNbr; - - /* - * This function locates the bssEntry identified by the - * specified service number (or pair of node-service number), - * if any. If none, notes the location within the bssList at - * which such an entry should be inserted. - */ - - if (nextEntry) *nextEntry = 0; /* Default. */ - - for (elt = sdr_list_first(sdr, (_bssConstants())->bssList); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, bssEntry, entry, sdr_list_data(sdr, elt)); - - /* Matched bssEntry's service number. */ - if (entry->dstServiceNbr < serviceNbr) - { - continue; - } - - if (entry->dstServiceNbr > serviceNbr) - { - if (entry->dstServiceNbr != BSS_ALL_OTHER_SERVICES) - { - if (nextEntry) *nextEntry = elt; - break; /* Same as end of list. */ - } - } - - /* Matched bssEntry's node number. */ - - if (entry->dstNodeNbr < nodeNbr) - { - continue; - } - - if (entry->dstNodeNbr > nodeNbr) - { - if (entry->dstNodeNbr != BSS_ALL_OTHER_NODES) - { - if (nextEntry) *nextEntry = elt; - break; /* Same as end of list. */ - } - } - - /* Exact match. */ - return elt; - } - - return 0; -} - -int bss_addBssEntry(int argServiceNbr, vast argNodeNbr) - -{ - Sdr sdr = getIonsdr(); - unsigned int dstServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast dstNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - - bssEntry entry; - Object entryObj; - Object nextEntry; - CbheEid eid; - char memo[256]; - - CHKERR(argServiceNbr && argNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - eid.serviceNbr = dstServiceNbr; - eid.nodeNbr = dstNodeNbr; - - if (locateBssEntry(eid, &nextEntry) !=0) - { - sdr_exit_xn(sdr); - isprintf(memo, sizeof memo, - "[?] BSS duplicate entry: %u-" UVAST_FIELDSPEC, - dstServiceNbr,dstNodeNbr); - writeMemo(memo); - return 0; - } - - entry.dstServiceNbr = dstServiceNbr; - entry.dstNodeNbr = dstNodeNbr; - entryObj = sdr_malloc(sdr, sizeof(bssEntry)); - - if (entryObj) - { - if (nextEntry) - { - oK(sdr_list_insert_before(sdr, nextEntry, entryObj)); - } - else - { - oK(sdr_list_insert_last(sdr, - (_bssConstants())->bssList, entryObj)); - } - - sdr_write(sdr, entryObj, (char *) &entry, sizeof(bssEntry)); - } - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't add entry.", NULL); - return -1; - } - - return 1; -} - -int bss_removeBssEntry(int argServiceNbr, vast argNodeNbr) -{ - Sdr sdr = getIonsdr(); - unsigned int dstServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast dstNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - Object entryObj; - CbheEid eid; - eid.serviceNbr = dstServiceNbr; - eid.nodeNbr = dstNodeNbr; - - CHKERR(argServiceNbr && argNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locateBssEntry(eid, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] BSS entry not found", utoa(argServiceNbr)); - return 0; - } - - entryObj = sdr_list_data(sdr, elt); - - /* Okay to remove this entry from the database. */ - - sdr_list_delete(sdr, elt, NULL, NULL); - sdr_free(sdr, entryObj); - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't remove BSS entry.", utoa(dstServiceNbr)); - return -1; - } - - return 1; -} - -static LystElt locateStream (Lyst loggedStreams, Bundle *bundle, - LystElt *nextElt) -{ - LystElt elt; - stream *strm = NULL; - uvast srcNodeNbr = bundle->id.source.c.nodeNbr; - unsigned int srcServiceNbr = bundle->id.source.c.serviceNbr; - uvast dstNodeNbr = bundle->destination.c.nodeNbr; - unsigned int dstServiceNbr = bundle->destination.c.serviceNbr; - - /* - * This function locates the BSS stream identified by the - * specified bundle arguments (pair of node-service numbers - * both for source and destination), if any. If none, notes the - * location within the loggedStreams list at which such an entry - * should be inserted. - */ - - if (nextElt) *nextElt = 0; /* Default */ - for (elt = lyst_first(loggedStreams); elt; elt = lyst_next(elt)) - { - strm = (stream *) lyst_data(elt); - /* Matched entry's src node number. */ - if (strm->srcNodeNbr < srcNodeNbr) - { - continue; - } - - if (strm->srcNodeNbr > srcNodeNbr) - { - if (nextElt) *nextElt = elt; - break; /* Same as end of list. */ - } - - /* Matched entry's src service number. */ - if (strm->srcServiceNbr < srcServiceNbr) - { - continue; - } - - if (strm->srcServiceNbr > srcServiceNbr) - { - if (nextElt) *nextElt = elt; - break; /* Same as end of list. */ - } - - /* Matched entry's dst node number. */ - if (strm->dstNodeNbr < dstNodeNbr) - { - continue; - } - - if (strm->dstNodeNbr > dstNodeNbr) - { - if (nextElt) *nextElt = elt; - break; /* Same as end of list. */ - } - - /* Matched entry's dst service number. */ - if (strm->dstServiceNbr < dstServiceNbr) - { - continue; - } - - if (strm->dstServiceNbr > dstServiceNbr) - { - if (nextElt) *nextElt = elt; - break; /* Same as end of list. */ - } - - /* Exact match. */ - return elt; - } - - return NULL; -} - -static int bss_addNewStream (Lyst loggedStreams, Bundle bundle, LystElt nextElt) -{ - stream *strm; - strm = (stream *) MTAKE(sizeof(stream)); - memset((char *) strm, 0, sizeof(stream)); - - strm->srcNodeNbr = bundle.id.source.c.nodeNbr; - strm->srcServiceNbr = bundle.id.source.c.serviceNbr; - strm->dstNodeNbr = bundle.destination.c.nodeNbr; - strm->dstServiceNbr = bundle.destination.c.serviceNbr; - strm->latestTimeLogged = bundle.id.creationTime; - - if (nextElt) - { - if (lyst_insert_before(nextElt, strm)==NULL) - { - return -1; - } - } - else - { - if (lyst_insert_last(loggedStreams, strm)==NULL) - { - return -1; - } - } - - return 0; -} - -void bss_monitorStream(Lyst loggedStreams, Bundle bundle) -{ - LystElt streamElt; - LystElt nextElt; - stream *strm = NULL; - BpTimestamp loggedTime = bundle.id.creationTime; - - streamElt = locateStream(loggedStreams, &bundle, &nextElt); - - /* - * This function locates the BSS stream identified by the - * specified bundle arguments, if any, and updates its content. - * If none, it adds a new entry at the loggedStreams list. - */ - - if (streamElt == NULL) - { - if (bss_addNewStream(loggedStreams, bundle, nextElt) != 0) - { - putErrmsg("Failed to add new stream", NULL); - } - } - else - { - /* Update current stream */ - strm = (stream *) lyst_data(streamElt); - - if(loggedTime.seconds > strm->latestTimeLogged.seconds || - (loggedTime.seconds == strm->latestTimeLogged.seconds && - loggedTime.count > strm->latestTimeLogged.count)) - { - strm->latestTimeLogged = loggedTime; - } - } -} - -static Object locatePlan(uvast nodeNbr, Object *nextPlan) -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(BssPlan, plan); - - /* This function locates the BssPlan identified by the - * specified node number, if any. If none, notes the - * location within the plans list at which such a plan - * should be inserted. */ - - if (nextPlan) *nextPlan = 0; /* Default. */ - for (elt = sdr_list_first(sdr, (_bssConstants())->plans); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, BssPlan, plan, sdr_list_data(sdr, elt)); - if (plan->nodeNbr < nodeNbr) - { - continue; - } - - if (plan->nodeNbr > nodeNbr) - { - if (nextPlan) *nextPlan = elt; - break; /* Same as end of list. */ - } - return elt; - } - return 0; -} - -void bss_findPlan(uvast nodeNbr, Object *planAddr, Object *eltp) -{ - Sdr sdr = getIonsdr(); - Object elt; - - /* This function finds the BssPlan for the specified - * node, if any. */ - - CHKVOID(ionLocked()); - CHKVOID(nodeNbr && planAddr && eltp); - *eltp = 0; - elt = locatePlan(nodeNbr, NULL); - if (elt == 0) - { - return; - } - - *planAddr = sdr_list_data(sdr, elt); - *eltp = elt; -} - -static void createXmitDirective(FwdDirective *directive, - DuctExpression *parms) -{ - directive->action = xmit; - directive->outductElt = parms->outductElt; - if (parms->destDuctName == NULL) - { - directive->destDuctName = 0; - } - else - { - directive->destDuctName = sdr_string_create(getIonsdr(), - parms->destDuctName); - } -} - -int bss_addPlan(uvast nodeNbr, DuctExpression *defaultDuct, - DuctExpression *rtDuct, DuctExpression *pbDuct, - unsigned int expectedRTT) -{ - Sdr sdr = getIonsdr(); - Object nextPlan; - BssPlan plan; - Object planObj; - - CHKERR(nodeNbr && defaultDuct); - CHKERR(sdr_begin_xn(sdr)); - if (locatePlan(nodeNbr, &nextPlan) != 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Duplicate plan", utoa(nodeNbr)); - return 0; - } - - /* Okay to add this plan to the database. */ - - plan.nodeNbr = nodeNbr; - createXmitDirective(&(plan.defaultDirective), defaultDuct); - createXmitDirective(&(plan.rtDirective), rtDuct); - createXmitDirective(&(plan.pbDirective), pbDuct); - plan.rules = sdr_list_create(sdr); - plan.expectedRTT = expectedRTT; - planObj = sdr_malloc(sdr, sizeof(BssPlan)); - if (planObj) - { - if (nextPlan) - { - oK(sdr_list_insert_before(sdr, nextPlan, planObj)); - } - else - { - oK(sdr_list_insert_last(sdr, - (_bssConstants())->plans, planObj)); - } - - sdr_write(sdr, planObj, (char *) &plan, sizeof(BssPlan)); - } - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't add plan.", NULL); - return -1; - } - - return 1; -} - -static void destroyXmitDirective(FwdDirective *directive) -{ - if (directive->destDuctName) - { - sdr_free(getIonsdr(), directive->destDuctName); - } -} - -int bss_updatePlan(uvast nodeNbr, DuctExpression *defaultDuct, - DuctExpression *rtDuct, DuctExpression *pbDuct, - int expectedRTT) -{ - Sdr sdr = getIonsdr(); - Object elt; - Object planObj; - BssPlan plan; - - CHKERR(nodeNbr && defaultDuct); - CHKERR(sdr_begin_xn(sdr)); - elt = locatePlan(nodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] This plan is not defined.", utoa(nodeNbr)); - return 0; - } - - /* Okay to update this plan. */ - - planObj = sdr_list_data(sdr, elt); - sdr_stage(sdr, (char *) &plan, planObj, sizeof(BssPlan)); - destroyXmitDirective(&(plan.defaultDirective)); - createXmitDirective(&(plan.defaultDirective), defaultDuct); - destroyXmitDirective(&(plan.rtDirective)); - createXmitDirective(&(plan.rtDirective), rtDuct); - destroyXmitDirective(&(plan.pbDirective)); - createXmitDirective(&(plan.pbDirective), pbDuct); - plan.expectedRTT = expectedRTT; - sdr_write(sdr, planObj, (char *) &plan, sizeof(BssPlan)); - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't update plan.", utoa(nodeNbr)); - return -1; - } - - return 1; -} - -int bss_removePlan(uvast nodeNbr) -{ - Sdr sdr = getIonsdr(); - Object elt; - Object planObj; - OBJ_POINTER(BssPlan, plan); - - CHKERR(nodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locatePlan(nodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Unknown plan", utoa(nodeNbr)); - return 0; - } - - planObj = sdr_list_data(sdr, elt); - GET_OBJ_POINTER(sdr, BssPlan, plan, planObj); - if (sdr_list_length(sdr, plan->rules) > 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Can't remove plan; still has rules", - utoa(nodeNbr)); - return 0; - } - - /* Okay to remove this plan from the database. */ - - sdr_list_delete(sdr, elt, NULL, NULL); - destroyXmitDirective(&(plan->defaultDirective)); - destroyXmitDirective(&(plan->rtDirective)); - destroyXmitDirective(&(plan->pbDirective)); - sdr_list_destroy(sdr, plan->rules, NULL, NULL); - sdr_free(sdr, planObj); - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't remove plan.", utoa(nodeNbr)); - return -1; - } - - return 1; -} - -static Object locateRule(Object rules, unsigned int srcServiceNbr, - uvast srcNodeNbr, Object *nextRule) -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(BssRule, rule); - - /* This function locates the BssRule for the specified - * service number and source node number, for the - * specified destination node number, if any; if - * none, notes the location within the rules list at - * which such a rule should be inserted. */ - - if (nextRule) *nextRule = 0; /* Default. */ - for (elt = sdr_list_first(sdr, rules); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, BssRule, rule, sdr_list_data(sdr, elt)); - if (rule->srcServiceNbr < srcServiceNbr) - { - continue; - } - - if (rule->srcServiceNbr > srcServiceNbr) - { - if (nextRule) *nextRule = elt; - break; /* Same as end of list. */ - } - - /* Matched rule's service number. */ - - if (rule->srcNodeNbr < srcNodeNbr) - { - continue; - } - - if (rule->srcNodeNbr > srcNodeNbr) - { - if (nextRule) *nextRule = elt; - break; /* Same as end of list. */ - } - - /* Exact match. */ - - return elt; - } - - return 0; -} - -void bss_findPlanRule(uvast nodeNbr, int argServiceNbr, vast argNodeNbr, - BssPlan *plan, Object *ruleAddr, Object *eltp) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(BssPlan, planPtr); - - /* This function finds the BssRule for the specified - * service number and source node number, for the - * specified destination node number, if any. */ - - CHKVOID(ionLocked()); - CHKVOID(ruleAddr); - CHKVOID(eltp); - *eltp = 0; - if (plan == NULL) - { - if (nodeNbr == 0) - { - return; - } - - elt = locatePlan(nodeNbr, NULL); - if (elt == 0) - { - return; - } - - GET_OBJ_POINTER(sdr, BssPlan, planPtr, sdr_list_data(sdr, elt)); - plan = planPtr; - } - - elt = locateRule(plan->rules, srcServiceNbr, srcNodeNbr, NULL); - if (elt == 0) - { - return; - } - - *ruleAddr = sdr_list_data(sdr, elt); - *eltp = elt; -} - -int bss_addPlanRule(uvast nodeNbr, int argServiceNbr, vast argNodeNbr, - DuctExpression *directive, DuctExpression *rtDuct, - DuctExpression *pbDuct) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(BssPlan, plan); - Object nextRule; - BssRule ruleBuf; - Object addr; - - CHKERR(nodeNbr && srcNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locatePlan(nodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] No plan defined for this node", - utoa(nodeNbr)); - return 0; - } - - GET_OBJ_POINTER(sdr, BssPlan, plan, sdr_list_data(sdr, elt)); - - if (locateRule(plan->rules, srcServiceNbr, srcNodeNbr, &nextRule) != 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Duplicate rule", utoa(srcNodeNbr)); - return 0; - } - - /* All parameters validated, okay to add the rule. */ - - - memset((char *) &ruleBuf, 0, sizeof(BssRule)); - ruleBuf.srcServiceNbr = srcServiceNbr; - ruleBuf.srcNodeNbr = srcNodeNbr; - createXmitDirective(&ruleBuf.directive, directive); - createXmitDirective(&ruleBuf.rtDirective, rtDuct); - createXmitDirective(&ruleBuf.pbDirective, pbDuct); - - addr = sdr_malloc(sdr, sizeof(BssRule)); - if (addr) - { - if (nextRule) - { - elt = sdr_list_insert_before(sdr, nextRule, addr); - } - else - { - elt = sdr_list_insert_last(sdr, plan->rules, addr); - } - - sdr_write(sdr, addr, (char *) &ruleBuf, sizeof(BssRule)); - } - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't add rule.", NULL); - return -1; - } - - return 1; -} - -int bss_updatePlanRule(uvast nodeNbr, int argServiceNbr, vast argNodeNbr, - DuctExpression *directive, DuctExpression *rtDuct, - DuctExpression *pbDuct) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(BssPlan, plan); - Object ruleAddr; - BssRule ruleBuf; - - CHKERR(nodeNbr && srcNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locatePlan(nodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] No plan defined for this node", - utoa(nodeNbr)); - return 0; - } - - GET_OBJ_POINTER(sdr, BssPlan, plan, sdr_list_data(sdr, elt)); - bss_findPlanRule(nodeNbr, srcServiceNbr, srcNodeNbr, plan, &ruleAddr, - &elt); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Unknown rule", utoa(srcNodeNbr)); - return 0; - } - - /* All parameters validated, okay to update the rule. */ - - sdr_stage(sdr, (char *) &ruleBuf, ruleAddr, sizeof(BssRule)); - destroyXmitDirective(&ruleBuf.directive); - createXmitDirective(&ruleBuf.directive, directive); - destroyXmitDirective(&ruleBuf.rtDirective); - createXmitDirective(&ruleBuf.rtDirective, rtDuct); - destroyXmitDirective(&ruleBuf.pbDirective); - createXmitDirective(&ruleBuf.pbDirective, pbDuct); - sdr_write(sdr, ruleAddr, (char *) &ruleBuf, sizeof(BssRule)); - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't update rule.", NULL); - return -1; - } - - return 1; -} - -int bss_removePlanRule(uvast nodeNbr, int argServiceNbr, vast argNodeNbr) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(BssPlan, plan); - Object ruleAddr; - OBJ_POINTER(BssRule, rule); - - CHKERR(nodeNbr && srcNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locatePlan(nodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] No plan defined for this node", - utoa(nodeNbr)); - return 0; - } - - GET_OBJ_POINTER(sdr, BssPlan, plan, sdr_list_data(sdr, elt)); - bss_findPlanRule(nodeNbr, srcServiceNbr, srcNodeNbr, plan, &ruleAddr, - &elt); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Unknown rule", utoa(srcNodeNbr)); - return 0; - } - - /* All parameters validated, okay to remove the rule. */ - - GET_OBJ_POINTER(sdr, BssRule, rule, ruleAddr); - destroyXmitDirective(&rule->directive); - destroyXmitDirective(&(rule->rtDirective)); - destroyXmitDirective(&(rule->pbDirective)); - sdr_free(sdr, ruleAddr); - sdr_list_delete(sdr, elt, NULL, NULL); - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't remove rule.", NULL); - return -1; - } - - return 1; -} - -int bss_copyDirective(Bundle *bundle, FwdDirective *directive, - FwdDirective *defaultDirective, - FwdDirective *rtDirective, - FwdDirective *pbDirective, - Lyst loggedStreams) -{ - LystElt streamElt; - stream *strm = NULL; - - if(locateBssEntry(bundle->destination.c, NULL)!=0) - { - streamElt = locateStream(loggedStreams, bundle, NULL); - if (streamElt == NULL) - { - #if LIBBSSFWDEBUG - writeMemo("No entry detected in loggedStreams"); - #endif - if(rtDirective->outductElt!=0) - { - memcpy((char *) directive, (char *) rtDirective, - sizeof(FwdDirective)); - #if LIBBSSFWDEBUG - writeMemo("Real-time directive used."); - #endif - } - else - { - memcpy((char *) directive, - (char *) defaultDirective, - sizeof(FwdDirective)); - #if LIBBSSFWDEBUG - writeMemo("Default directive used."); - #endif - } - } - else - { - #if LIBBSSFWDEBUG - writeMemo("Found entry in loggedStreams"); - #endif - strm = (stream *) lyst_data(streamElt); - if (bundle->id.creationTime.seconds > - strm->latestTimeLogged.seconds || - (bundle->id.creationTime.seconds == - strm->latestTimeLogged.seconds && - bundle->id.creationTime.count > - strm->latestTimeLogged.count)) - { - #if LIBBSSFWDEBUG - writeMemo("Record is in sequence."); - #endif - if(rtDirective->outductElt!=0) - { - memcpy((char *) directive, - (char *) rtDirective, - sizeof(FwdDirective)); - #if LIBBSSFWDEBUG - writeMemo("Real-time directive used."); - #endif - } - else - { - memcpy((char *) directive, - (char *) defaultDirective, - sizeof(FwdDirective)); - #if LIBBSSFWDEBUG - writeMemo("Default directive used."); - #endif - } - } - else - { - #if LIBBSSFWDEBUG - writeMemo("Record out of sequence."); - #endif - if(pbDirective->outductElt!=0) - { - memcpy((char *) directive, - (char *) pbDirective, - sizeof(FwdDirective)); - #if LIBBSSFWDEBUG - writeMemo("Playback directive used."); - #endif - } - else - { - memcpy((char *) directive, - (char *) defaultDirective, - sizeof(FwdDirective)); - #if LIBBSSFWDEBUG - writeMemo("Default directive used."); - #endif - } - } - } - } - else - { - memcpy((char *) directive, (char *) defaultDirective, - sizeof(FwdDirective)); - #if LIBBSSFWDEBUG - writeMemo("Not a BSS traffic bundle."); - writeMemo("Default directive used."); - #endif - } - - return 1; -} - -static int lookupRule(Object rules, unsigned int sourceServiceNbr, - uvast sourceNodeNbr, Bundle *bundle, - FwdDirective *dirbuf, Lyst loggedStreams) -{ - Sdr sdr = getIonsdr(); - Object addr; - Object elt; - OBJ_POINTER(BssRule, rule); - - /* Universal wild-card match (BSS_ALL_OTHER_xxx), if any, - * is at the end of the list, so there's no way to - * terminate the search early. */ - - for (elt = sdr_list_first(sdr, rules); elt; - elt = sdr_list_next(sdr, elt)) - { - addr = sdr_list_data(sdr, elt); - GET_OBJ_POINTER(sdr, BssRule, rule, addr); - if (rule->srcServiceNbr < sourceServiceNbr) - { - continue; - } - - if (rule->srcServiceNbr > sourceServiceNbr - && rule->srcServiceNbr != BSS_ALL_OTHER_SERVICES) - { - continue; - } - - /* Found a rule with matching service number. */ - - if (rule->srcNodeNbr < sourceNodeNbr) - { - continue; - } - - if (rule->srcNodeNbr > sourceNodeNbr - && rule->srcNodeNbr != BSS_ALL_OTHER_NODES) - { - continue; - } - - break; /* Stop searching. */ - } - - if (elt) /* Found a matching rule. */ - { - bss_copyDirective(bundle, dirbuf, &rule->directive, - &rule->rtDirective, &rule->pbDirective, - loggedStreams); - return 1; - } - return 0; -} - -int bss_lookupPlanDirective(uvast nodeNbr, unsigned int sourceServiceNbr, - uvast sourceNodeNbr, Bundle *bundle, FwdDirective *dirbuf, - Lyst loggedStreams) -{ - Sdr sdr = getIonsdr(); - Object addr; - Object elt; - OBJ_POINTER(BssPlan, plan); - - /* This function determines the relevant FwdDirective for - * the specified eid, if any. Wild card match is okay. */ - - CHKERR(ionLocked()); - CHKERR(nodeNbr && dirbuf); - - /* Find the matching plan. */ - - bss_findPlan(nodeNbr, &addr, &elt); - if (elt == 0) - { - return 0; /* No plan found. */ - } - - GET_OBJ_POINTER(sdr, BssPlan, plan, addr); - - /* Find best matching rule. */ - - if (lookupRule(plan->rules, sourceServiceNbr, sourceNodeNbr, bundle, - dirbuf, loggedStreams) == 0) /* No rule found. */ - { - bss_copyDirective(bundle, dirbuf, &plan->defaultDirective, - &plan->rtDirective, &plan->pbDirective, - loggedStreams); - } - return 1; -} - -static int getRTT(uvast pxNodeNbr) -{ - Sdr sdr = getIonsdr(); - Object addr; - Object planElt; - OBJ_POINTER(BssPlan, plan); - - CHKERR(ionLocked()); - - /* This function retrieves the expected RTT from the - * specified proximate node's plan */ - - bss_findPlan(pxNodeNbr, &addr, &planElt); - if (planElt == 0) - { - return 0; /* No plan found. */ - } - - GET_OBJ_POINTER(sdr, BssPlan, plan, addr); - - return plan->expectedRTT; -} - -int bss_setCtDueTimer(Bundle bundle, Object bundleAddr) -{ - Sdr sdr = getIonsdr(); - char proxNodeEid[SDRSTRING_BUFSZ]; - MetaEid metaEid; - VScheme *vscheme; - PsmAddress vschemeElt; - int RTT; - - CHKERR(ionLocked()); - - if (bundle.ductXmitElt) /* Queued by forwarder. */ - { - /* - * Checking whether bundle is enqueued to limbo queue. - * In that case do nothing. Otherwise, set the custody - * expiration event for this particular bundle according - * to BSS configuration. */ - - if (sdr_list_list(sdr, bundle.ductXmitElt) == - (getBpConstants())->limboQueue) - { - return 0; /* Bundle is in limbo. */ - } - - sdr_string_read(sdr, proxNodeEid, bundle.proxNodeEid); - if (parseEidString(proxNodeEid, &metaEid, &vscheme, - &vschemeElt) == 0) - { - putErrmsg("Can't parse node EID string.", proxNodeEid); - return -1; - } - - RTT = getRTT(metaEid.nodeNbr); - if (RTT > 0) - { - if (bpMemo(bundleAddr, RTT) < 0) - { - return -1; /* bpMemo failed */ - } - - return 1; - } - } - - /* Bundle not queued for transmission or an invalid RTT - * value was returned. */ - - return -1; -} - -static Object locateGroup(uvast firstNodeNbr, uvast lastNodeNbr, - Object *nextGroup) -{ - Sdr sdr = getIonsdr(); - int targetSize; - int groupSize; - Object elt; - OBJ_POINTER(IpnGroup, group); - - /* This function locates the IpnGroup for the specified - * first node number, if any; if none, notes the - * location within the rules list at which such a rule - * should be inserted. */ - - if (nextGroup) *nextGroup = 0; /* Default. */ - targetSize = lastNodeNbr - firstNodeNbr; - for (elt = sdr_list_first(sdr, (_bssConstants())->groups); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, IpnGroup, group, sdr_list_data(sdr, elt)); - groupSize = group->lastNodeNbr - group->firstNodeNbr; - if (groupSize < targetSize) - { - continue; - } - - if (groupSize > targetSize) - { - if (nextGroup) *nextGroup = elt; - break; /* Same as end of list. */ - } - - if (group->firstNodeNbr < firstNodeNbr) - { - continue; - } - - if (group->firstNodeNbr > firstNodeNbr) - { - if (nextGroup) *nextGroup = elt; - break; /* Same as end of list. */ - } - - /* Matched group's first node number. */ - - return elt; - } - - return 0; -} - -void bss_findGroup(uvast firstNodeNbr, uvast lastNodeNbr, Object *groupAddr, - Object *eltp) -{ - Sdr sdr = getIonsdr(); - Object elt; - - /* This function finds the IpnGroup for the specified - * node range, if any. */ - - CHKVOID(ionLocked()); - CHKVOID(firstNodeNbr && groupAddr && eltp); - CHKVOID(firstNodeNbr <= lastNodeNbr); - *eltp = 0; - elt = locateGroup(firstNodeNbr, lastNodeNbr, NULL); - if (elt == 0) - { - return; - } - - *groupAddr = sdr_list_data(sdr, elt); - *eltp = elt; -} - -int bss_addGroup(uvast firstNodeNbr, uvast lastNodeNbr, char *viaEid) -{ - Sdr sdr = getIonsdr(); - Object nextGroup; - IpnGroup group; - Object addr; - - CHKERR(firstNodeNbr && lastNodeNbr && viaEid); - CHKERR(firstNodeNbr <= lastNodeNbr); - CHKERR(strlen(viaEid) <= MAX_SDRSTRING); - CHKERR(sdr_begin_xn(sdr)); - if (locateGroup(firstNodeNbr, lastNodeNbr, &nextGroup) != 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Duplicate group", utoa(firstNodeNbr)); - return 0; - } - - /* All parameters validated, okay to add the group. */ - - memset((char *) &group, 0, sizeof(IpnGroup)); - group.firstNodeNbr = firstNodeNbr; - group.lastNodeNbr = lastNodeNbr; - group.rules = sdr_list_create(sdr); - group.defaultDirective.action = fwd; - group.defaultDirective.eid = sdr_string_create(sdr, viaEid); - addr = sdr_malloc(sdr, sizeof(IpnGroup)); - if (addr) - { - if (nextGroup) - { - sdr_list_insert_before(sdr, nextGroup, addr); - } - else - { - sdr_list_insert_last(sdr, (_bssConstants())->groups, - addr); - } - - sdr_write(sdr, addr, (char *) &group, sizeof(IpnGroup)); - } - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't add group.", NULL); - return -1; - } - - return 1; -} - -int bss_updateGroup(uvast firstNodeNbr, uvast lastNodeNbr, char *viaEid) -{ - Sdr sdr = getIonsdr(); - Object elt; - Object addr; - IpnGroup group; - - CHKERR(firstNodeNbr && lastNodeNbr && viaEid); - CHKERR(firstNodeNbr <= lastNodeNbr); - CHKERR(strlen(viaEid) <= MAX_SDRSTRING); - CHKERR(sdr_begin_xn(sdr)); - elt = locateGroup(firstNodeNbr, lastNodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Unknown group", utoa(firstNodeNbr)); - return 0; - } - - /* All parameters validated, okay to update the group. */ - - addr = (Object) sdr_list_data(sdr, elt); - sdr_stage(sdr, (char *) &group, addr, sizeof(IpnGroup)); - sdr_free(sdr, group.defaultDirective.eid); - group.defaultDirective.eid = sdr_string_create(sdr, viaEid); - sdr_write(sdr, addr, (char *) &group, sizeof(IpnGroup)); - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't update group.", NULL); - return -1; - } - - return 1; -} - -int bss_removeGroup(uvast firstNodeNbr, uvast lastNodeNbr) -{ - Sdr sdr = getIonsdr(); - Object elt; - Object addr; - OBJ_POINTER(IpnGroup, group); - - CHKERR(firstNodeNbr && lastNodeNbr); - CHKERR(firstNodeNbr <= lastNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locateGroup(firstNodeNbr, lastNodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Unknown group", utoa(firstNodeNbr)); - return 0; - } - - addr = (Object) sdr_list_data(sdr, elt); - GET_OBJ_POINTER(sdr, IpnGroup, group, addr); - if (sdr_list_length(sdr, group->rules) > 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Can't remove group; still has rules", - utoa(firstNodeNbr)); - return 0; - } - - /* All parameters validated, okay to remove the group. */ - - sdr_list_delete(sdr, elt, NULL, NULL); - sdr_free(sdr, group->defaultDirective.eid); - sdr_free(sdr, addr); - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't remove group.", NULL); - return -1; - } - - return 1; -} - -void bss_findGroupRule(uvast firstNodeNbr, uvast lastNodeNbr, - int argServiceNbr, vast argNodeNbr, IpnGroup *group, - Object *ruleAddr, Object *eltp) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(IpnGroup, groupPtr); - - /* This function finds the BssRule for the specified - * service number and source node number, for the - * specified destination node number, if any. */ - - CHKVOID(ionLocked()); - CHKVOID(ruleAddr); - CHKVOID(eltp); - *eltp = 0; - if (group == NULL) - { - if (firstNodeNbr == 0 || lastNodeNbr < firstNodeNbr) - { - return; - } - - elt = locateGroup(firstNodeNbr, lastNodeNbr, NULL); - if (elt == 0) - { - return; - } - - GET_OBJ_POINTER(sdr, IpnGroup, groupPtr, - sdr_list_data(sdr, elt)); - group = groupPtr; - } - - elt = locateRule(group->rules, srcServiceNbr, srcNodeNbr, NULL); - if (elt == 0) - { - return; - } - - *ruleAddr = sdr_list_data(sdr, elt); - *eltp = elt; -} - -int bss_addGroupRule(uvast firstNodeNbr, uvast lastNodeNbr, - int argServiceNbr, vast argNodeNbr, char *viaEid) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(IpnGroup, group); - Object nextRule; - BssRule ruleBuf; - Object addr; - - CHKERR(firstNodeNbr && lastNodeNbr && srcNodeNbr); - CHKERR(firstNodeNbr <= lastNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locateGroup(firstNodeNbr, lastNodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Group is unknown", utoa(firstNodeNbr)); - return 0; - } - - GET_OBJ_POINTER(sdr, IpnGroup, group, sdr_list_data(sdr, elt)); - if (locateRule(group->rules, srcServiceNbr, srcNodeNbr, &nextRule) != 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Duplicate rule", utoa(srcNodeNbr)); - return 0; - } - - /* All parameters validated, okay to add the rule. */ - - memset((char *) &ruleBuf, 0, sizeof(BssRule)); - ruleBuf.srcServiceNbr = srcServiceNbr; - ruleBuf.srcNodeNbr = srcNodeNbr; - ruleBuf.directive.eid = sdr_string_create(sdr, viaEid); - addr = sdr_malloc(sdr, sizeof(BssRule)); - if (addr) - { - if (nextRule) - { - elt = sdr_list_insert_before(sdr, nextRule, addr); - } - else - { - elt = sdr_list_insert_last(sdr, group->rules, addr); - } - - sdr_write(sdr, addr, (char *) &ruleBuf, sizeof(BssRule)); - } - - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't add rule.", NULL); - return -1; - } - - return 1; -} - -int bss_updateGroupRule(uvast firstNodeNbr, uvast lastNodeNbr, - int argServiceNbr, vast argNodeNbr, char *viaEid) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(IpnGroup, group); - Object ruleAddr; - BssRule ruleBuf; - - CHKERR(firstNodeNbr && lastNodeNbr && srcNodeNbr); - CHKERR(firstNodeNbr <= lastNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locateGroup(firstNodeNbr, lastNodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Group is unknown", utoa(firstNodeNbr)); - return 0; - } - - GET_OBJ_POINTER(sdr, IpnGroup, group, sdr_list_data(sdr, elt)); - bss_findGroupRule(firstNodeNbr, lastNodeNbr, srcServiceNbr, srcNodeNbr, - group, &ruleAddr, &elt); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Unknown rule", utoa(srcNodeNbr)); - return 0; - } - - /* All parameters validated, okay to update the rule. */ - - sdr_stage(sdr, (char *) &ruleBuf, ruleAddr, sizeof(BssRule)); - sdr_free(sdr, ruleBuf.directive.eid); - ruleBuf.directive.eid = sdr_string_create(sdr, viaEid); - sdr_write(sdr, ruleAddr, (char *) &ruleBuf, sizeof(BssRule)); - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't update rule.", NULL); - return -1; - } - - return 1; -} - -int bss_removeGroupRule(uvast firstNodeNbr, uvast lastNodeNbr, - int argServiceNbr, vast argNodeNbr) -{ - Sdr sdr = getIonsdr(); - unsigned int srcServiceNbr = (argServiceNbr == -1 ? - BSS_ALL_OTHER_SERVICES : argServiceNbr); - uvast srcNodeNbr = (argNodeNbr == -1 ? BSS_ALL_OTHER_NODES - : argNodeNbr); - Object elt; - OBJ_POINTER(IpnGroup, group); - Object ruleAddr; - OBJ_POINTER(BssRule, rule); - - CHKERR(firstNodeNbr && lastNodeNbr && srcNodeNbr); - CHKERR(firstNodeNbr <= lastNodeNbr); - CHKERR(sdr_begin_xn(sdr)); - elt = locateGroup(firstNodeNbr, lastNodeNbr, NULL); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Group is unknown", utoa(firstNodeNbr)); - return 0; - } - - GET_OBJ_POINTER(sdr, IpnGroup, group, sdr_list_data(sdr, elt)); - bss_findGroupRule(firstNodeNbr, lastNodeNbr, srcServiceNbr, srcNodeNbr, - group, &ruleAddr, &elt); - if (elt == 0) - { - sdr_exit_xn(sdr); - writeMemoNote("[?] Unknown rule", utoa(srcNodeNbr)); - return 0; - } - - /* All parameters validated, okay to remove the rule. */ - - GET_OBJ_POINTER(sdr, BssRule, rule, ruleAddr); - sdr_free(sdr, rule->directive.eid); - sdr_free(sdr, ruleAddr); - sdr_list_delete(sdr, elt, NULL, NULL); - if (sdr_end_xn(sdr) < 0) - { - putErrmsg("Can't remove rule.", NULL); - return -1; - } - - return 1; -} - -int bss_lookupGroupDirective(uvast nodeNbr, unsigned int sourceServiceNbr, - uvast sourceNodeNbr, Bundle *bundle, FwdDirective *dirbuf, - Lyst loggedStreams) -{ - Sdr sdr = getIonsdr(); - Object elt; - Object addr; - IpnGroup group; - - /* This function determines the relevant FwdDirective for - * the specified eid, if any. Wild card match is okay. */ - - CHKERR(ionLocked()); - CHKERR(nodeNbr && dirbuf); - - /* Find best matching group. Groups are sorted by first - * node number within group size, both ascending. So - * the first group whose range encompasses the node number - * is the best fit (narrowest applicable range), but - * there's no way to terminate the search early. */ - - for (elt = sdr_list_first(sdr, (_bssConstants())->groups); elt; - elt = sdr_list_next(sdr, elt)) - { - addr = sdr_list_data(sdr, elt); - sdr_read(sdr, (char *) &group, addr, sizeof(IpnGroup)); - if (group.lastNodeNbr < nodeNbr || group.firstNodeNbr > nodeNbr) - { - continue; - } - - break; - } - - if (elt == 0) - { - return 0; /* No group found. */ - } - - /* Find best matching rule. */ - - if (lookupRule(group.rules, sourceServiceNbr, sourceNodeNbr, bundle, - dirbuf, loggedStreams) == 0) /* None. */ - { - memcpy((char *) dirbuf, (char *) &group.defaultDirective, - sizeof(FwdDirective)); - } - - return 1; -} diff -Nru ion-3.2.0~dfsg1/bp/bssp/bsspcla.h ion-3.2.1+dfsg/bp/bssp/bsspcla.h --- ion-3.2.0~dfsg1/bp/bssp/bsspcla.h 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bp/bssp/bsspcla.h 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * bsspcla.h: common definitions for BSSP convergence layer + * adapter modules. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ +#ifndef _BSSPCLA_H_ +#define _BSSPCLA_H_ + +#include "bpP.h" +#include "bssp.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define BpBsspClientId (1) +#define DEFAULT_BSSP_RATE -1 //125000000 + +#ifdef __cplusplus +} +#endif + +#endif /* _BSSPCLA_H */ diff -Nru ion-3.2.0~dfsg1/bp/bssp/bsspcli.c ion-3.2.1+dfsg/bp/bssp/bsspcli.c --- ion-3.2.0~dfsg1/bp/bssp/bsspcli.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bp/bssp/bsspcli.c 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,357 @@ +/* + * bsspcli.c: BP BSSP-based convergence-layer input + * daemon, designed to serve as an input + * duct. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ +#include "bsspcla.h" + +static void interruptThread() +{ + isignal(SIGTERM, interruptThread); + ionKillMainThread("bsspcli"); +} + +/* * * Receiver thread functions * * */ + +typedef struct +{ + VInduct *vduct; + int running; +} ReceiverThreadParms; + +int acquireBundle(AcqWorkArea *work, BsspSessionId *sessionId, + unsigned int length, Object zco, + unsigned int *buflen, char **buffer) +{ + Sdr sdr = getIonsdr(); + ZcoReader reader; + int result; + + if (zco == 0) /* Session canceled. */ + { + bpCancelAcq(work); + return 0; + } + + if (zco_source_data_length(sdr, zco) != length) + { + return 0; /* Just discard the block. */ + } + + /* Start new bundle acquisition. */ + + if (bpBeginAcq(work, 0, NULL) < 0) + { + putErrmsg("Can't begin acquisition of bundle.", NULL); + return -1; + } + + if (length > *buflen) + { + /* Make buffer big enough. */ + + if (*buffer) + { + MRELEASE(*buffer); + *buflen = 0; + } + + *buffer = MTAKE(length); + if (*buffer == NULL) + { + + bpCancelAcq(work); + return 0; + } + + *buflen = length; + } + + + /* Extract data from block ZCO so that it can be + * appended to the bundle acquisition ZCO. */ + + zco_start_receiving(zco, &reader); + CHKERR(sdr_begin_xn(sdr)); + result = zco_receive_source(sdr, &reader, length, *buffer); + + if (sdr_end_xn(sdr) < 0 || result < 0) + { + putErrmsg("Failed reading bssp block data.", NULL); + return -1; + } + + if (bpContinueAcq(work, *buffer, (int) length) < 0) + { + putErrmsg("Can't continue bundle acquisition.", NULL); + return -1; + } + + if (bpEndAcq(work) < 0) + { + putErrmsg("Can't end acquisition of bundle.", NULL); + return -1; + } + return 0; +} + +static void *handleNotices(void *parm) +{ + /* Main loop for BSSP notice reception and handling. */ + + Sdr sdr = getIonsdr(); + ReceiverThreadParms *rtp = (ReceiverThreadParms *) parm; + char *procName = "bsspcli"; + AcqWorkArea *work; + BsspNoticeType type; + BsspSessionId sessionId; + unsigned char reasonCode; + unsigned int dataLength; + Object data; /* ZCO reference. */ + unsigned int buflen = 0; + char *buffer = NULL; + + snooze(1); /* Let main thread become interruptable. */ + if (bssp_open(BpBsspClientId) < 0) + { + putErrmsg("bsspcli can't open client access.", + itoa(BpBsspClientId)); + ionKillMainThread(procName); + return NULL; + } + + work = bpGetAcqArea(rtp->vduct); + if (work == NULL) + { + bssp_close(BpBsspClientId); + putErrmsg("bsspcli can't get acquisition work areas", NULL); + ionKillMainThread(procName); + return NULL; + } + + /* Can now start receiving notices. On failure, take + * down the CLI. */ + + while (rtp->running) + { + if (bssp_get_notice(BpBsspClientId, &type, &sessionId, + &reasonCode, &dataLength, &data) < 0) + { + putErrmsg("Can't get BSSP notice.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + continue; + } + + switch (type) + { + case BsspXmitSuccess: /* Xmit success. */ + if (data == 0) /* Ignore it. */ + { + break; /* Out of switch. */ + } + + if (bpHandleXmitSuccess(data, 0) < 0) + { + putErrmsg("Crashed on xmit success.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + break; /* Out of switch. */ + } + + CHKNULL(sdr_begin_xn(sdr)); + zco_destroy(sdr, data); + if (sdr_end_xn(sdr) < 0) + { + putErrmsg("Crashed on data cleanup.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + } + + break; /* Out of switch. */ + + case BsspXmitFailure: /* Xmit failure. */ + if (data == 0) /* Ignore it. */ + { + break; /* Out of switch. */ + } + + if (bpHandleXmitFailure(data) < 0) + { + putErrmsg("Crashed on xmit failure.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + break; /* Out of switch. */ + } + + CHKNULL(sdr_begin_xn(sdr)); + zco_destroy(sdr, data); + if (sdr_end_xn(sdr) < 0) + { + putErrmsg("Crashed on data cleanup.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + } + + break; /* Out of switch. */ + + case BsspRecvSuccess: + if (acquireBundle(work, &sessionId, dataLength, + data, &buflen, &buffer) < 0) + { + putErrmsg("Can't handle bssp block.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + } + + /* Discard the ZCO in any case. */ + + CHKNULL(sdr_begin_xn(sdr)); + zco_destroy(sdr, data); + if (sdr_end_xn(sdr) < 0) + { + putErrmsg("Crashed: acquireBundle.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + } + + break; /* Out of switch. */ + + + default: + break; /* Out of switch. */ + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + } + + writeErrmsgMemos(); + writeMemo("[i] bsspcli receiver thread has ended."); + + /* Free resources. */ + + if (buffer) + { + MRELEASE(buffer); + } + + bpReleaseAcqArea(work); + bssp_close(BpBsspClientId); + return NULL; +} + +/* * * Main thread functions * * * */ + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int bsspcli(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ + char *ductName = (char *) a1; +#else +int main(int argc, char *argv[]) +{ + char *ductName = (argc > 1 ? argv[1] : NULL); +#endif + VInduct *vduct; + PsmAddress vductElt; + Sdr sdr; + Induct duct; + ClProtocol protocol; + ReceiverThreadParms rtp; + pthread_t receiverThread; + + if (ductName == NULL) + { + PUTS("Usage: bsspcli ]"); + return 0; + } + + if (bpAttach() < 0) + { + putErrmsg("bsspcli can't attach to BP.", NULL); + return -1; + } + + findInduct("bssp", ductName, &vduct, &vductElt); + if (vductElt == 0) + { + putErrmsg("No such bssp duct.", ductName); + return -1; + } + + if (vduct->cliPid != ERROR && vduct->cliPid != sm_TaskIdSelf()) + { + putErrmsg("BSSPCLI task is already started for this duct.", + itoa(vduct->cliPid)); + return -1; + } + + sdr = getIonsdr(); + CHKZERO(sdr_begin_xn(sdr)); + sdr_read(sdr, (char *) &duct, sdr_list_data(sdr, vduct->inductElt), + sizeof(Induct)); + sdr_read(sdr, (char *) &protocol, duct.protocol, sizeof(ClProtocol)); + sdr_exit_xn(sdr); + if (protocol.nominalRate == 0) + { + vduct->acqThrottle.nominalRate = DEFAULT_BSSP_RATE; + } + else + { + vduct->acqThrottle.nominalRate = protocol.nominalRate; + } + + /* All command-line arguments are now validated. */ + + if (bssp_attach() < 0) + { + putErrmsg("bsspcli can't initialize BSSP.", NULL); + return -1; + } + + /* Set up signal handling; SIGTERM is shutdown signal. */ + + ionNoteMainThread("bsspcli"); + isignal(SIGTERM, interruptThread); + + /* Start the receiver thread. */ + + rtp.vduct = vduct; + rtp.running = 1; + if (pthread_begin(&receiverThread, NULL, handleNotices, &rtp)) + { + putSysErrmsg("bsspcli can't create receiver thread", NULL); + return 1; + } + + /* Now sleep until interrupted by SIGTERM, at which point + * it's time to stop the induct. */ + + writeMemo("[i] bsspcli is running."); + ionPauseMainThread(-1); + + /* Time to shut down. */ + + rtp.running = 0; + + /* Stop the receiver thread by interrupting client access. */ + + bssp_interrupt(BpBsspClientId); + pthread_join(receiverThread, NULL); + writeErrmsgMemos(); + writeMemo("[i] bsspcli duct has ended."); + ionDetach(); + return 0; +} diff -Nru ion-3.2.0~dfsg1/bp/bssp/bsspclo.c ion-3.2.1+dfsg/bp/bssp/bsspclo.c --- ion-3.2.0~dfsg1/bp/bssp/bsspclo.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bp/bssp/bsspclo.c 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,330 @@ +/* + * bsspclo.c: BP BSSP-based convergence-layer output + * daemon, designed to serve as an output duct. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ +#include "bsspcla.h" +#include "zco.h" + +static sm_SemId bsspcloSemaphore(sm_SemId *semid) +{ + long temp; + void *value; + sm_SemId semaphore; + + if (semid) /* Add task variable. */ + { + temp = *semid; + value = (void *) temp; + value = sm_TaskVar(&value); + } + else /* Retrieve task variable. */ + { + value = sm_TaskVar(NULL); + } + + temp = (long) value; + semaphore = temp; + return semaphore; +} + +static void shutDownClo() /* Commands CLO termination. */ +{ + isignal(SIGTERM, shutDownClo); + sm_SemEnd(bsspcloSemaphore(NULL)); +} + +/* * * Main thread functions * * * */ + +typedef struct +{ + CbheEid source; + CbheEid dest; + BpTimestamp lastBundle; +} BundleStream; + +static int isInOrder(Lyst streams, Bundle *bundle) +{ + LystElt elt; + BundleStream *stream; + + for (elt = lyst_first(streams); elt; elt = lyst_next(elt)) + { + stream = lyst_data(elt); + if (stream->source.nodeNbr < bundle->id.source.c.nodeNbr) + { + continue; + } + + if (stream->source.nodeNbr > bundle->id.source.c.nodeNbr) + { + break; + } + + if (stream->source.serviceNbr < bundle->id.source.c.serviceNbr) + { + continue; + } + + if (stream->source.serviceNbr > bundle->id.source.c.serviceNbr) + { + break; + } + + if (stream->dest.nodeNbr < bundle->destination.c.nodeNbr) + { + continue; + } + + if (stream->dest.nodeNbr > bundle->destination.c.nodeNbr) + { + break; + } + + if (stream->dest.serviceNbr < bundle->destination.c.serviceNbr) + { + continue; + } + + if (stream->dest.serviceNbr > bundle->destination.c.serviceNbr) + { + break; + } + + /* Found matching stream. */ + + if (bundle->id.creationTime.seconds + > stream->lastBundle.seconds + || (bundle->id.creationTime.seconds + == stream->lastBundle.seconds + && bundle->id.creationTime.count + > stream->lastBundle.count)) + { + stream->lastBundle.seconds = + bundle->id.creationTime.seconds; + stream->lastBundle.count = + bundle->id.creationTime.count; + return 1; + } + + return 0; + } + + stream = (BundleStream *) MTAKE(sizeof(BundleStream)); + if (stream == NULL) + { + return 0; + } + + if (elt) + { + elt = lyst_insert_before(elt, stream); + } + else + { + elt = lyst_insert_last(streams, stream); + } + + if (elt == NULL) + { + MRELEASE(stream); + return 0; + } + + stream->source.nodeNbr = bundle->id.source.c.nodeNbr; + stream->source.serviceNbr = bundle->id.source.c.serviceNbr; + stream->dest.nodeNbr = bundle->destination.c.nodeNbr; + stream->dest.serviceNbr = bundle->destination.c.serviceNbr; + stream->lastBundle.seconds = bundle->id.creationTime.seconds; + stream->lastBundle.count = bundle->id.creationTime.count; + return 1; +} + +static void eraseStream(LystElt elt, void *userData) +{ + BundleStream *stream = lyst_data(elt); + + MRELEASE(stream); +} + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int bsspclo(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ + char *ductName = (char *) a1; +#else +int main(int argc, char *argv[]) +{ + char *ductName = (argc > 1 ? argv[1] : NULL); +#endif + Sdr sdr; + VOutduct *vduct; + PsmAddress vductElt; + vast destEngineNbr; + Outduct outduct; + ClProtocol protocol; + Outflow outflows[3]; + int i; + int running = 1; + Object bundleZco; + BpExtendedCOS extendedCOS; + char destDuctName[MAX_CL_DUCT_NAME_LEN + 1]; + BsspSessionId sessionId; + unsigned char *buffer; + Lyst streams; + Bundle bundleImage; + char *dictionary = 0; + unsigned int bundleLength; + + if (ductName == NULL) + { + PUTS("Usage: bsspclo [-]"); + return 0; + } + + if (bpAttach() < 0) + { + putErrmsg("bsspclo can't attach to BP.", NULL); + return -1; + } + + sdr = getIonsdr(); + findOutduct("bssp", ductName, &vduct, &vductElt); + if (vductElt == 0) + { + putErrmsg("No such bssp duct.", ductName); + return -1; + } + + if (vduct->cloPid != ERROR && vduct->cloPid != sm_TaskIdSelf()) + { + putErrmsg("BSSPCLO task is already started for this duct.", + itoa(vduct->cloPid)); + return -1; + } + + /* All command-line arguments are now validated. */ + + buffer = (unsigned char *) MTAKE(BP_MAX_BLOCK_SIZE); + if (buffer == NULL) + { + putErrmsg("Can't get buffer for decoding bundle ZCOs.", NULL); + return -1; + } + + streams = lyst_create_using(getIonMemoryMgr()); + if (streams == NULL) + { + putErrmsg("Can't create lyst of streams.", NULL); + MRELEASE(buffer); + return -1; + } + + lyst_delete_set(streams, eraseStream, NULL); + CHKERR(sdr_begin_xn(sdr)); + sdr_read(sdr, (char *) &outduct, sdr_list_data(sdr, vduct->outductElt), + sizeof(Outduct)); + sdr_read(sdr, (char *) &protocol, outduct.protocol, sizeof(ClProtocol)); + sdr_exit_xn(sdr); + destEngineNbr = strtovast(ductName); + + if (protocol.nominalRate == 0) + { + vduct->xmitThrottle.nominalRate = DEFAULT_BSSP_RATE; + } + else + { + vduct->xmitThrottle.nominalRate = protocol.nominalRate; + } + + memset((char *) outflows, 0, sizeof outflows); + outflows[0].outboundBundles = outduct.bulkQueue; + outflows[1].outboundBundles = outduct.stdQueue; + outflows[2].outboundBundles = outduct.urgentQueue; + for (i = 0; i < 3; i++) + { + outflows[i].svcFactor = 1 << i; + } + + if (bssp_attach() < 0) + { + putErrmsg("bsspclo can't initialize BSSP.", NULL); + lyst_destroy(streams); + MRELEASE(buffer); + return -1; + } + + /* Set up signal handling. SIGTERM is shutdown signal. */ + + oK(bsspcloSemaphore(&(vduct->semaphore))); + isignal(SIGTERM, shutDownClo); + + /* Can now begin transmitting to remote duct. */ + + writeMemo("[i] bsspclo is running."); + while (running && !(sm_SemEnded(bsspcloSemaphore(NULL)))) + { + if (bpDequeue(vduct, outflows, &bundleZco, &extendedCOS, + destDuctName, 0, -1) < 0) + { + running = 0; /* Terminate CLO. */ + continue; + } + + if (bundleZco == 0) /* Interrupted. */ + { + continue; + } + + if (decodeBundle(sdr, bundleZco, buffer, &bundleImage, + &dictionary, &bundleLength) < 0) + { + putErrmsg("Can't decode bundle ZCO.", NULL); + CHKERR(sdr_begin_xn(sdr)); + zco_destroy(sdr, bundleZco); + if (sdr_end_xn(sdr) < 0) + { + putErrmsg("Failed destroying ZCO.", NULL); + break; + } + + continue; + } + + switch (bssp_send(destEngineNbr, BpBsspClientId, bundleZco, + isInOrder(streams, &bundleImage), &sessionId)) + { + case 0: + putErrmsg("Unable to send this bundle via BSSP.", NULL); + break; + + case -1: + putErrmsg("BsspSend failed.", NULL); + running = 0; /* Terminate CLO. */ + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + + /* Note: bundleZco is destroyed later, when BSSP's + * ExportSession is closed following transmission + * of bundle ZCOs as aggregated into a block. */ + } + + writeErrmsgMemos(); + writeMemo("[i] bsspclo duct has ended."); + lyst_destroy(streams); + MRELEASE(buffer); + ionDetach(); + return 0; +} diff -Nru ion-3.2.0~dfsg1/bp/cgr/libcgr.c ion-3.2.1+dfsg/bp/cgr/libcgr.c --- ion-3.2.0~dfsg1/bp/cgr/libcgr.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/cgr/libcgr.c 2014-07-08 02:17:38.000000000 +0000 @@ -796,14 +796,23 @@ work->arrivalTime = MAX_TIME; } - /* Now suppress from consideration as lead contact - * every contact that is already the leading contact of + /* Now suppress from consideration as lead contact every + * other contact that is already the leading contact of * any remaining route in stationNode's list of routes. */ for (elt = sm_list_first(ionwm, routes); elt; elt = sm_list_next(ionwm, elt)) { route = (CgrRoute *) psp(ionwm, sm_list_data(ionwm, elt)); + if (route->toNodeNbr == contactToNodeNbr + && route->fromTime == contactFromTime) + { + /* Don't suppress the contact we are + * trying to compute a new route through. */ + + continue; + } + arg.fromNode = getOwnNodeNbr(); arg.toNode = route->toNodeNbr; arg.fromTime = route->fromTime; diff -Nru ion-3.2.0~dfsg1/bp/daemon/bpclock.c ion-3.2.1+dfsg/bp/daemon/bpclock.c --- ion-3.2.0~dfsg1/bp/daemon/bpclock.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/daemon/bpclock.c 2014-07-08 02:17:38.000000000 +0000 @@ -296,9 +296,10 @@ continue; /* Not rate-controlled. */ } - if (throttle->capacity <= throttle->nominalRate) + throttle->capacity += throttle->nominalRate; + if (throttle->capacity > throttle->nominalRate) { - throttle->capacity += throttle->nominalRate; + throttle->capacity = throttle->nominalRate; } if (throttle->capacity > 0) @@ -319,9 +320,10 @@ continue; /* Not rate-controlled. */ } - if (throttle->capacity <= throttle->nominalRate) + throttle->capacity += throttle->nominalRate; + if (throttle->capacity > throttle->nominalRate) { - throttle->capacity += throttle->nominalRate; + throttle->capacity = throttle->nominalRate; } if (throttle->capacity > 0) diff -Nru ion-3.2.0~dfsg1/bp/dccp/dccpcli.c ion-3.2.1+dfsg/bp/dccp/dccpcli.c --- ion-3.2.0~dfsg1/bp/dccp/dccpcli.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/dccp/dccpcli.c 2014-07-08 02:17:38.000000000 +0000 @@ -42,14 +42,14 @@ typedef struct { - int sock; - pthread_t mainThread; - pthread_t me; - int running; + int sock; + pthread_t mainThread; + pthread_t me; + int running; struct sockaddr_in fromAddr; - VInduct *vduct; + VInduct *vduct; pthread_mutex_t *elk; - Lyst *list; + Lyst *list; } ReceiverThreadParms; ReceiverThreadParms* create_new_thread_data(Lyst *list) @@ -142,13 +142,9 @@ /* Main loop for bundle reception thread on one * connection, terminating when connection is lost. */ ReceiverThreadParms *rtp = (ReceiverThreadParms*)param; - unsigned int hostNbr; - char hostName[MAXHOSTNAMELEN + 1]; - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; - char *buffer; - AcqWorkArea *work; - int bundleLength; + char *buffer; + AcqWorkArea *work; + int bundleLength; iblock(SIGTERM); isignal(SIGUSR1, siguser_thread); @@ -156,19 +152,6 @@ isignal(SIGPIPE, handleConnectionLoss); #endif - /* Determine what the sender's EID is given it's IP */ - memcpy((char *) &hostNbr, (char *) &(rtp->fromAddr.sin_addr.s_addr), 4); - hostNbr = ntohl(hostNbr); - if (getInternetHostName(hostNbr, hostName)) - { - senderEid = senderEidBuffer; - getSenderEid(&senderEid, hostName); - } - else - { - senderEid = NULL; - } - /* Get buffers */ writeErrmsgMemos(); work = bpGetAcqArea(rtp->vduct); @@ -225,7 +208,7 @@ } pthread_mutex_lock(rtp->elk); - if (bpBeginAcq(work, 0, senderEid) < 0 + if (bpBeginAcq(work, 0, NULL) < 0 || bpContinueAcq(work, buffer, bundleLength) < 0 || bpEndAcq(work) < 0) { @@ -249,29 +232,29 @@ writeErrmsgMemos(); MRELEASE(buffer); bpReleaseAcqArea(work); -return NULL; + return NULL; } /* * * Listener thread functions * * */ typedef struct { - int linkSocket; + int linkSocket; VInduct *vduct; pthread_t mainThread; - int running; + int running; } ListenerThreadParms; static void *Listen_for_connections(void *parm) { /* Main loop for DCCP connection handling */ - ListenerThreadParms *rtp = (ListenerThreadParms *) parm; - Lyst list; - pthread_mutex_t elk; - struct sockaddr fromAddr; - int consock; - socklen_t solen; - ReceiverThreadParms *rp; + ListenerThreadParms *rtp = (ListenerThreadParms *) parm; + Lyst list; + pthread_mutex_t elk; + struct sockaddr fromAddr; + int consock; + socklen_t solen; + ReceiverThreadParms *rp; list = lyst_create_using(getIonMemoryMgr()); lyst_clear(list); @@ -369,20 +352,18 @@ { char *ductName = (argc > 1 ? argv[1] : NULL); #endif - Sdr sdr; - VInduct *vduct; - PsmAddress vductElt; - Induct duct; - ClProtocol protocol; - char *hostName; + Sdr sdr; + VInduct *vduct; + PsmAddress vductElt; + Induct duct; + ClProtocol protocol; + char *hostName; unsigned short portNbr = 0; unsigned int ipAddress = 0; struct sockaddr socketName; struct sockaddr_in *inetName; ListenerThreadParms rtp; - pthread_t listenerThread; - - + pthread_t listenerThread; if (ductName == NULL) { @@ -454,10 +435,6 @@ return 1; } - /* Initialize sender endpoint ID lookup. */ - ipnInit(); - dtn2Init(); - /* Set up signal handling; SIGTERM is shutdown signal. */ isignal(SIGTERM, interruptThread); #ifndef mingw @@ -494,7 +471,6 @@ #else /*build_dccp*/ - #include "bpP.h" #if defined (VXWORKS) || defined (RTEMS) int dccpcli(int a1, int a2, int a3, int a4, int a5, @@ -509,5 +485,4 @@ return 0; } - #endif /*build_dccp*/ diff -Nru ion-3.2.0~dfsg1/bp/dgr/dgrcla.c ion-3.2.1+dfsg/bp/dgr/dgrcla.c --- ion-3.2.0~dfsg1/bp/dgr/dgrcla.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/dgr/dgrcla.c 2014-07-08 02:17:38.000000000 +0000 @@ -208,8 +208,6 @@ int errnbr; Object bundleZco; char hostName[MAXHOSTNAMELEN + 1]; - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; snooze(1); /* Let main thread become interruptable. */ work = bpGetAcqArea(parms->vduct); @@ -375,9 +373,7 @@ /* Must have received a datagram. */ printDottedString(fromHostNbr, hostName); - senderEid = senderEidBuffer; - getSenderEid(&senderEid, hostName); - if (bpBeginAcq(work, 0, senderEid) < 0 + if (bpBeginAcq(work, 0, NULL) < 0 || bpContinueAcq(work, buffer, length) < 0 || bpEndAcq(work) < 0) { @@ -502,11 +498,6 @@ return 1; } - /* Initialize sender endpoint ID lookup. */ - - ipnInit(); - dtn2Init(); - /* Set up signal handling. SIGTERM is shutdown signal. */ ionNoteMainThread("dgrcla"); diff -Nru ion-3.2.0~dfsg1/bp/dtn2/libdtn2fw.c ion-3.2.1+dfsg/bp/dtn2/libdtn2fw.c --- ion-3.2.0~dfsg1/bp/dtn2/libdtn2fw.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/dtn2/libdtn2fw.c 2014-07-08 02:17:38.000000000 +0000 @@ -68,51 +68,6 @@ /* * * Routing information mgt functions * */ -static int lookupDtn2Eid(char *uriBuffer, char *neighborClId) -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(Dtn2Plan, plan); - char nodeName[SDRSTRING_BUFSZ]; - int nodeNameLen; - char *lastChar; - - for (elt = sdr_list_first(sdr, (_dtn2Constants())->plans); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, Dtn2Plan, plan, sdr_list_data(sdr, elt)); - switch (clIdMatches(neighborClId, &plan->defaultDirective)) - { - case -1: - putErrmsg("Failed looking up DTN2 EID.", NULL); - return -1; - - case 0: - continue; /* No match. */ - - default: - - /* Found the plan for transmission to - * this neighbor, so now we know the - * neighbor's EID. */ - - nodeNameLen = sdr_string_read(sdr, nodeName, - plan->nodeName); - lastChar = nodeName + (nodeNameLen - 1); - if (*lastChar == '~') - { - *lastChar = '\0'; - } - - isprintf(uriBuffer, SDRSTRING_BUFSZ, "dtn:%.62s", - nodeName); - return 1; - } - } - - return 0; -} - int dtn2Init() { Sdr sdr = getIonsdr(); @@ -122,7 +77,6 @@ /* Recover the DTN database, creating it if necessary. */ CHKERR(sdr_begin_xn(sdr)); - oK(senderEidLookupFunctions(lookupDtn2Eid)); dtn2dbObject = sdr_find(sdr, DTN_DBNAME, NULL); switch (dtn2dbObject) { diff -Nru ion-3.2.0~dfsg1/bp/i86_64-fedora/Makefile ion-3.2.1+dfsg/bp/i86_64-fedora/Makefile --- ion-3.2.0~dfsg1/bp/i86_64-fedora/Makefile 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/i86_64-fedora/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -6,7 +6,7 @@ CGR = ../cgr IPN = ../ipn IMC = ../imc -BSS = ../bss +BSSP = ../bssp DTN2 = ../dtn2 LTP = ../ltp TCP = ../tcp @@ -18,7 +18,8 @@ # OPT = -O -Dlinux OPT = -g -Wall -Werror -Dlinux -fPIC -DSPACE_ORDER=3 -DENABLE_BPACS -DENABLE_IMC -CC = gcc $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/crypto -I$(API)/acs -I$(API)/ext -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(API)/ext/cteb -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED +CC = gcc $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/acs -I$(API)/ext -I$(API)/ext/phn -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(API)/ext/cteb -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED +# -I$(API)/ext/snid LDFLAGS = -fPIC -shared LD = gcc $(LDFLAGS) @@ -30,7 +31,7 @@ $(IPN)/ipnfw.h \ $(IMC)/imcfw.h \ $(IMC)/imcP.h \ - $(BSS)/bssfw.h \ + $(BSSP)/bsspcla.h \ $(DTN2)/dtn2fw.h \ $(BRS)/brscla.h \ $(UDP)/udpcla.h \ @@ -42,18 +43,17 @@ BPLIBS = \ libbp.so -BPPOBJS = libbpP.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o crypto.o acstx.o acsrx.o acsserialize.o acsappend.o acsid.o cteb.o libimcfw.o -# phn.o +BPPOBJS = libbpP.o phn.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o acstx.o acsrx.o acsserialize.o acsappend.o acsid.o cteb.o libimcfw.o +# snid.o -LFW = -lbssfw -ldtn2fw -# -lipnfw +LFW = -lipnfw -ldtn2fw LBP = -lbp -RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep bssadmin bssfw dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys bping bpstats2 bpchat acsadmin acslist imcadmin imcfw +RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys bping bpstats2 bpchat acsadmin acslist imcadmin imcfw bsspcli bsspclo bpnmtest #dccpcli dccpclo -ALL = check $(BPLIBS) libcgr.so libipnfw.so libimcfw.so libdtn2fw.so libbssfw.so libtcpcla.so libudpcla.so $(RUNTIMES) +ALL = check $(BPLIBS) libcgr.so libipnfw.so libimcfw.so libdtn2fw.so libtcpcla.so libudpcla.so $(RUNTIMES) all: $(ALL) @@ -92,10 +92,6 @@ $(CC) -o imcadmin imcadmin.o -L./lib -L$(ROOT)/lib -limcfw $(LBP) -lici -lpthread cp imcadmin ./bin -bssadmin: bssadmin.o $(BPLIBS) libbssfw.so - $(CC) -o bssadmin bssadmin.o -L./lib -L$(ROOT)/lib -lbssfw $(LBP) -lici -lpthread - cp bssadmin ./bin - dtn2admin: dtn2admin.o $(BPLIBS) libdtn2fw.so $(CC) -o dtn2admin dtn2admin.o -L./lib -L$(ROOT)/lib -ldtn2fw $(LBP) -lici -lpthread cp dtn2admin ./bin @@ -164,12 +160,6 @@ $(CC) -o imcfw imcfw.o -L./lib -L$(ROOT)/lib -limcfw -lipnfw $(LBP) -lici -lpthread cp imcfw ./bin -# - - BSS executables - - - - - - -bssfw: bssfw.o $(BPLIBS) libbssfw.so libcgr.so - $(CC) -o bssfw bssfw.o -L./lib -L$(ROOT)/lib -lbssfw -lcgr $(LBP) -lici -lpthread - cp bssfw ./bin - # - - DTN2 executables - - - - dtn2fw: dtn2fw.o $(BPLIBS) libdtn2fw.so @@ -220,6 +210,16 @@ $(CC) -o udpclo udpclo.o -L./lib -L$(ROOT)/lib -ludpcla $(LBP) -lici -lpthread cp udpclo ./bin +# - - BSSP executables - - - - + +bsspcli: bsspcli.o $(BPLIBS) + $(CC) -o bsspcli bsspcli.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -lbssp -lbsspP -lici -lpthread + cp bsspcli ./bin + +bsspclo: bsspclo.o $(BPLIBS) + $(CC) -o bsspclo bsspclo.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -lbssp -lbsspP -lici -lpthread + cp bsspclo ./bin + # - - DCCP executables - - - - dccpcli: dccpcli.o $(BPLIBS) @@ -276,6 +276,10 @@ $(CC) -o bprecvfile bprecvfile.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread cp bprecvfile ./bin +bpnmtest: bpnmtest.o libbp.so $(BPLIBS) + $(CC) -o bpnmtest bpnmtest.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread + cp bpnmtest ./bin + # - - Libraries - - - - - libbp.so: libbp.o $(BPPOBJS) libbpnm.o @@ -294,10 +298,6 @@ $(LD) -o libimcfw.so libimcfw.o cp libimcfw.so ./lib -libbssfw.so: libbssfw.o - $(LD) -o libbssfw.so libbssfw.o - cp libbssfw.so ./lib - libdtn2fw.so: libdtn2fw.o $(LD) -o libdtn2fw.so libdtn2fw.o cp libdtn2fw.so ./lib @@ -315,8 +315,8 @@ %.o: $(API)/%.c $(CC) -c $< -%.o: $(CRYPTO)/%.c - $(CC) -c $< +#%.o: $(API)/ext/snid/%.c +# $(CC) -c $< %.o: $(API)/ext/ecos/%.c $(CC) -c $< @@ -327,8 +327,8 @@ %.o: $(API)/ext/bsp/%.c $(CC) -c $< -#%.o: $(API)/ext/phn/%.c -# $(CC) -c $< +%.o: $(API)/ext/phn/%.c + $(CC) -c $< %.o: $(TEST)/%.c $(CC) -c $< @@ -348,7 +348,7 @@ %.o: $(IMC)/%.c $(CC) -c $< -%.o: $(BSS)/%.c +%.o: $(BSSP)/%.c $(CC) -c $< %.o: $(DTN2)/%.c diff -Nru ion-3.2.0~dfsg1/bp/i86-mingw/Makefile ion-3.2.1+dfsg/bp/i86-mingw/Makefile --- ion-3.2.0~dfsg1/bp/i86-mingw/Makefile 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/i86-mingw/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -6,19 +6,19 @@ CGR = ../cgr IPN = ../ipn IMC = ../imc -BSS = ../bss +BSSP = ../bssp DTN2 = ../dtn2 LTP = ../ltp TCP = ../tcp DGR = ../dgr BRS = ../brs UDP = ../udp -CRYPTO = $(API)/crypto/NULL_SUITES OPT = -g -Wall -Dmingw -DENABLE_IMC # -Werror # -DENABLE_BPACS -CC = gcc $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/crypto -I$(API)/ext -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED +CC = gcc $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/ext -I$(API)/ext/phn -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED +# -I$(API)/ext/snid LDFLAGS = -fPIC -shared LD = gcc $(LDFLAGS) @@ -30,7 +30,7 @@ $(IPN)/ipnfw.h \ $(IMC)/imcfw.h \ $(IMC)/imcP.h \ - $(BSS)/bssfw.h \ + $(BSSP)/bsspcla.h \ $(DTN2)/dtn2fw.h \ $(BRS)/brscla.h \ $(UDP)/udpcla.h \ @@ -41,20 +41,17 @@ BPLIBS = \ libbp.dll -BPPOBJS = libbpP.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o crypto.o libimcfw.o +BPPOBJS = libbpP.o phn.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o libimcfw.o +# snid.o # acstx.o acsrx.o acsserialize.o acsappend.o acsid.o cteb.o -# phn.o - -LFW = -lbssfw -ldtn2fw -# -lipnfw LBP = -lbp -RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys imcadmin imcfw +RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys imcadmin imcfw bsspcli bsspclo bpnmtest # acsadmin acslist # bping bpstats2 bpchat -ALL = check $(BPLIBS) libcgr.dll libipnfw.dll libimcfw.dll libdtn2fw.dll libbssfw.dll libtcpcla.dll libudpcla.dll $(RUNTIMES) +ALL = check $(BPLIBS) libcgr.dll libipnfw.dll libimcfw.dll libdtn2fw.dll libtcpcla.dll libudpcla.dll $(RUNTIMES) all: $(ALL) @@ -91,13 +88,9 @@ cp ipnadmin ./bin imcadmin: imcadmin.o $(BPLIBS) libimcfw.dll - $(CC) -o imcadmin imcadmin.o -L./lib -L$(ROOT)/lib -lbssfw $(LBP) -lici -lpthread + $(CC) -o imcadmin imcadmin.o -L./lib -L$(ROOT)/lib -lipnfw $(LBP) -lici -lpthread cp imcadmin ./bin -bssadmin: bssadmin.o $(BPLIBS) libbssfw.dll - $(CC) -o bssadmin bssadmin.o -L./lib -L$(ROOT)/lib -lbssfw $(LBP) -lici -lpthread - cp bssadmin ./bin - dtn2admin: dtn2admin.o $(BPLIBS) libdtn2fw.dll $(CC) -o dtn2admin dtn2admin.o -L./lib -L$(ROOT)/lib -ldtn2fw $(LBP) -lici -lpthread cp dtn2admin ./bin @@ -166,12 +159,6 @@ $(CC) -o imcfw imcfw.o -L./lib -L$(ROOT)/lib -limcfw -lipnfw $(LBP) -lici -lpthread cp imcfw ./bin -# - - BSS executables - - - - - - -bssfw: bssfw.o $(BPLIBS) libbssfw.dll libcgr.dll - $(CC) -o bssfw bssfw.o -L./lib -L$(ROOT)/lib -lbssfw -lcgr $(LBP) -lici -lpthread - cp bssfw ./bin - # - - DTN2 executables - - - - dtn2fw: dtn2fw.o $(BPLIBS) libdtn2fw.dll @@ -185,7 +172,7 @@ # - - LTP executables - - - - - ltpcli: ltpcli.o $(BPLIBS) - $(CC) -o ltpcli ltpcli.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -lltp -lici -lpthread + $(CC) -o ltpcli ltpcli.o -L./lib -L$(ROOT)/lib $(LBP) -lltp -lici -lpthread cp ltpcli ./bin ltpclo: ltpclo.o $(BPLIBS) @@ -195,7 +182,7 @@ # - - TCP executables - - - - - tcpcli: tcpcli.o $(BPLIBS) libtcpcla.dll - $(CC) -o tcpcli tcpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread -lws2_32 + $(CC) -o tcpcli tcpcli.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread -lws2_32 cp tcpcli ./bin tcpclo: tcpclo.o $(BPLIBS) libtcpcla.dll @@ -205,7 +192,7 @@ # - - STCP executables - - - - stcpcli: stcpcli.o $(BPLIBS) libtcpcla.dll - $(CC) -o stcpcli stcpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread -lws2_32 + $(CC) -o stcpcli stcpcli.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread -lws2_32 cp stcpcli ./bin stcpclo: stcpclo.o $(BPLIBS) libtcpcla.dll @@ -215,27 +202,37 @@ # - - UDP executables - - - - - udpcli: udpcli.o $(BPLIBS) libudpcla.dll - $(CC) -o udpcli udpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ludpcla $(LBP) -lici -lpthread -lws2_32 + $(CC) -o udpcli udpcli.o -L./lib -L$(ROOT)/lib -ludpcla $(LBP) -lici -lpthread -lws2_32 cp udpcli ./bin udpclo: udpclo.o $(BPLIBS) libudpcla.dll $(CC) -o udpclo udpclo.o -L./lib -L$(ROOT)/lib -ludpcla $(LBP) -lici -lpthread -lws2_32 cp udpclo ./bin +# - - BSSP executables - - - - + +bsspcli: bsspcli.o $(BPLIBS) + $(CC) -o bsspcli bsspcli.o -L./lib -L$(ROOT)/lib $(LBP) -lbssp -lici -lpthread + cp bsspcli ./bin + +bsspclo: bsspclo.o $(BPLIBS) + $(CC) -o bsspclo bsspclo.o -L./lib -L$(ROOT)/lib $(LBP) -lbssp -lici -lpthread + cp bsspclo ./bin + # - - DGR executable - - - - - dgrcla: dgrcla.o $(BPLIBS) - $(CC) -o dgrcla dgrcla.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -ldgr -lici -lpthread -lws2_32 + $(CC) -o dgrcla dgrcla.o -L./lib -L$(ROOT)/lib $(LBP) -ldgr -lici -lpthread -lws2_32 cp dgrcla ./bin # - - BRS executables - - - - brsscla: brsscla.o $(BPLIBS) libtcpcla.dll - $(CC) -o brsscla brsscla.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread -lws2_32 + $(CC) -o brsscla brsscla.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread -lws2_32 cp brsscla ./bin brsccla: brsccla.o $(BPLIBS) libtcpcla.dll - $(CC) -o brsccla brsccla.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread -lws2_32 + $(CC) -o brsccla brsccla.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread -lws2_32 cp brsccla ./bin # - - Test executables - - - - @@ -268,6 +265,10 @@ $(CC) -o bprecvfile bprecvfile.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread cp bprecvfile ./bin +bpnmtest: bpnmtest.o libbp.dll $(BPLIBS) + $(CC) -o bpnmtest bpnmtest.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread + cp bpnmtest ./bin + # - - Libraries - - - - - libbp.dll: libbp.o $(BPPOBJS) libbpnm.o @@ -286,10 +287,6 @@ $(LD) -o libimcfw.dll libimcfw.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread cp libimcfw.dll ./lib -libbssfw.dll: libbssfw.o - $(LD) -o libbssfw.dll libbssfw.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread - cp libbssfw.dll ./lib - libdtn2fw.dll: libdtn2fw.o $(LD) -o libdtn2fw.dll libdtn2fw.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread cp libdtn2fw.dll ./lib @@ -307,8 +304,8 @@ %.o: $(API)/%.c $(CC) -c $< -%.o: $(CRYPTO)/%.c - $(CC) -c $< +#%.o: $(API)/ext/snid/%.c +# $(CC) -c $< %.o: $(API)/ext/ecos/%.c $(CC) -c $< @@ -319,8 +316,8 @@ %.o: $(API)/ext/bsp/%.c $(CC) -c $< -#%.o: $(API)/ext/phn/%.c -# $(CC) -c $< +%.o: $(API)/ext/phn/%.c + $(CC) -c $< %.o: $(TEST)/%.c $(CC) -c $< @@ -340,7 +337,7 @@ %.o: $(IMC)/%.c $(CC) -c $< -%.o: $(BSS)/%.c +%.o: $(BSSP)/%.c $(CC) -c $< %.o: $(DTN2)/%.c diff -Nru ion-3.2.0~dfsg1/bp/i86-redhat/Makefile ion-3.2.1+dfsg/bp/i86-redhat/Makefile --- ion-3.2.0~dfsg1/bp/i86-redhat/Makefile 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/i86-redhat/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -6,7 +6,7 @@ CGR = ../cgr IPN = ../ipn IMC = ../imc -BSS = ../bss +BSSP = ../bssp DTN2 = ../dtn2 LTP = ../ltp TCP = ../tcp @@ -14,11 +14,11 @@ BRS = ../brs UDP = ../udp DCCP = ../dccp -CRYPTO = $(API)/crypto/NULL_SUITES # OPT = -O -Dlinux OPT = -g -Wall -Werror -Dlinux -DENABLE_BPACS -DENABLE_IMC -CC = gcc $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/crypto -I$(API)/acs -I$(API)/ext -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(API)/ext/cteb -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED +CC = gcc $(OPT) -I$(IPN) -I$(IMC) -I$(DTN2) -I$(API) -I$(API)/acs -I$(API)/ext -I$(API)/ext/phn -I$(API)/ext/ecos -I$(API)/ext/bae -I$(API)/ext/bsp -I$(API)/ext/cteb -I$(INCL) -I$(ROOT)/include -DBP_EXTENDED +# -I$(API)/ext/snid LDFLAGS = -fPIC -shared -rdynamic LD = gcc $(LDFLAGS) @@ -30,7 +30,7 @@ $(IPN)/ipnfw.h \ $(IMC)/imcfw.h \ $(IMC)/imcP.h \ - $(BSS)/bssfw.h \ + $(BSSP)/bsspcla.h \ $(DTN2)/dtn2fw.h \ $(BRS)/brscla.h \ $(UDP)/udpcla.h \ @@ -42,25 +42,23 @@ BPLIBS = \ libbp.so -BPPOBJS = libbpP.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o crypto.o acstx.o acsrx.o acsserialize.o acsappend.o acsid.o cteb.o libimcfw.o -# phn.o - -LFW = -lbssfw -ldtn2fw -# -lipnfw +BPPOBJS = libbpP.o phn.o ecos.o bae.o bei.o extbsputil.o extbspbab.o extbsppcb.o extbsppib.o acstx.o acsrx.o acsserialize.o acsappend.o acsid.o cteb.o libimcfw.o +# snid.o LBP = -lbp -RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep bssadmin bssfw dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys bping bpstats2 bpchat acsadmin acslist imcadmin imcfw \ -bpnmtest +RUNTIMES = bpadmin bpsink bpsource bpdriver bpecho bpcounter bpsendfile bprecvfile bpclock ipnadmin ipnfw ipnadminep dtn2admin dtn2fw dtn2adminep tcpcli tcpclo stcpcli stcpclo brsscla brsccla udpcli udpclo dgrcla ltpcli ltpclo lgsend lgagent bptrace bpstats bplist bpcancel hmackeys bping bpstats2 bpchat acsadmin acslist imcadmin imcfw bsspcli bsspclo bpnmtest # dccpcli dccpclo -ALL = check $(BPLIBS) libcgr.so libipnfw.so libimcfw.so libdtn2fw.so libbssfw.so libtcpcla.so libudpcla.so $(RUNTIMES) +ALL = check $(BPLIBS) libcgr.so libipnfw.so libimcfw.so libdtn2fw.so libtcpcla.so libudpcla.so $(RUNTIMES) all: $(ALL) check: $(BPINCLS) $(PUBINCLS) rm -f *.o touch check + mkdir -p lib + mkdir -p bin clean: rm -f *.o @@ -93,10 +91,6 @@ $(CC) -o imcadmin imcadmin.o -L./lib -L$(ROOT)/lib -limcfw $(LBP) -lici -lpthread cp imcadmin ./bin -bssadmin: bssadmin.o $(BPLIBS) libbssfw.so - $(CC) -o bssadmin bssadmin.o -L./lib -L$(ROOT)/lib -lbssfw $(LBP) -lici -lpthread - cp bssadmin ./bin - dtn2admin: dtn2admin.o $(BPLIBS) libdtn2fw.so $(CC) -o dtn2admin dtn2admin.o -L./lib -L$(ROOT)/lib -ldtn2fw $(LBP) -lici -lpthread cp dtn2admin ./bin @@ -165,12 +159,6 @@ $(CC) -o imcfw imcfw.o -L./lib -L$(ROOT)/lib -limcfw -lipnfw $(LBP) -lici -lpthread cp imcfw ./bin -# - - BSS executables - - - - - - -bssfw: bssfw.o $(BPLIBS) libbssfw.so libcgr.so - $(CC) -o bssfw bssfw.o -L./lib -L$(ROOT)/lib -lbssfw -lcgr $(LBP) -lici -lpthread - cp bssfw ./bin - # - - DTN2 executables - - - - dtn2fw: dtn2fw.o $(BPLIBS) libdtn2fw.so @@ -184,7 +172,7 @@ # - - LTP executables - - - - - ltpcli: ltpcli.o $(BPLIBS) - $(CC) -o ltpcli ltpcli.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -lltp -lltpP -lici -lpthread + $(CC) -o ltpcli ltpcli.o -L./lib -L$(ROOT)/lib $(LBP) -lltp -lltpP -lici -lpthread cp ltpcli ./bin ltpclo: ltpclo.o $(BPLIBS) @@ -194,7 +182,7 @@ # - - TCP executables - - - - - tcpcli: tcpcli.o $(BPLIBS) libtcpcla.so - $(CC) -o tcpcli tcpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o tcpcli tcpcli.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp tcpcli ./bin tcpclo: tcpclo.o $(BPLIBS) libtcpcla.so @@ -204,7 +192,7 @@ # - - STCP executables - - - - stcpcli: stcpcli.o $(BPLIBS) libtcpcla.so - $(CC) -o stcpcli stcpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o stcpcli stcpcli.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp stcpcli ./bin stcpclo: stcpclo.o $(BPLIBS) libtcpcla.so @@ -214,17 +202,27 @@ # - - UDP executables - - - - - udpcli: udpcli.o $(BPLIBS) libudpcla.so - $(CC) -o udpcli udpcli.o -L./lib -L$(ROOT)/lib $(LFW) -ludpcla $(LBP) -lici -lpthread + $(CC) -o udpcli udpcli.o -L./lib -L$(ROOT)/lib -ludpcla $(LBP) -lici -lpthread cp udpcli ./bin udpclo: udpclo.o $(BPLIBS) libudpcla.so $(CC) -o udpclo udpclo.o -L./lib -L$(ROOT)/lib -ludpcla $(LBP) -lici -lpthread cp udpclo ./bin +# - - BSSP executables - - - - + +bsspcli: bsspcli.o $(BPLIBS) + $(CC) -o bsspcli bsspcli.o -L./lib -L$(ROOT)/lib $(LBP) -lbssp -lbsspP -lici -lpthread + cp bsspcli ./bin + +bsspclo: bsspclo.o $(BPLIBS) + $(CC) -o bsspclo bsspclo.o -L./lib -L$(ROOT)/lib $(LBP) -lbssp -lbsspP -lici -lpthread + cp bsspclo ./bin + # - - DCCP executables - - - - dccpcli: dccpcli.o $(BPLIBS) - $(CC) -o dccpcli dccpcli.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -lici -lpthread + $(CC) -o dccpcli dccpcli.o -L./lib -L$(ROOT)/lib $(LBP) -lici -lpthread cp dccpcli ./bin dccpclo: dccpclo.o $(BPLIBS) @@ -234,17 +232,17 @@ # - - DGR executable - - - - - dgrcla: dgrcla.o $(BPLIBS) - $(CC) -o dgrcla dgrcla.o -L./lib -L$(ROOT)/lib $(LFW) $(LBP) -ldgr -lici -lpthread + $(CC) -o dgrcla dgrcla.o -L./lib -L$(ROOT)/lib $(LBP) -ldgr -lici -lpthread cp dgrcla ./bin # - - BRS executables - - - - brsscla: brsscla.o $(BPLIBS) libtcpcla.so - $(CC) -o brsscla brsscla.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o brsscla brsscla.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp brsscla ./bin brsccla: brsccla.o $(BPLIBS) libtcpcla.so - $(CC) -o brsccla brsccla.o -L./lib -L$(ROOT)/lib $(LFW) -ltcpcla $(LBP) -lici -lpthread + $(CC) -o brsccla brsccla.o -L./lib -L$(ROOT)/lib -ltcpcla $(LBP) -lici -lpthread cp brsccla ./bin # - - Test executables - - - - @@ -299,10 +297,6 @@ $(LD) -o libimcfw.so libimcfw.o cp libimcfw.so ./lib -libbssfw.so: libbssfw.o - $(LD) -o libbssfw.so libbssfw.o - cp libbssfw.so ./lib - libdtn2fw.so: libdtn2fw.o $(LD) -o libdtn2fw.so libdtn2fw.o cp libdtn2fw.so ./lib @@ -320,8 +314,8 @@ %.o: $(API)/%.c $(CC) -c $< -%.o: $(CRYPTO)/%.c - $(CC) -c $< +#%.o: $(API)/ext/snid/%.c +# $(CC) -c $< %.o: $(API)/ext/ecos/%.c $(CC) -c $< @@ -332,8 +326,8 @@ %.o: $(API)/ext/bsp/%.c $(CC) -c $< -#%.o: $(API)/ext/phn/%.c -# $(CC) -c $< +%.o: $(API)/ext/phn/%.c + $(CC) -c $< %.o: $(TEST)/%.c $(CC) -c $< @@ -353,7 +347,7 @@ %.o: $(IMC)/%.c $(CC) -c $< -%.o: $(BSS)/%.c +%.o: $(BSSP)/%.c $(CC) -c $< %.o: $(DTN2)/%.c diff -Nru ion-3.2.0~dfsg1/bp/imc/imcfw.c ion-3.2.1+dfsg/bp/imc/imcfw.c --- ion-3.2.0~dfsg1/bp/imc/imcfw.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/imc/imcfw.c 2014-07-08 02:17:38.000000000 +0000 @@ -39,6 +39,44 @@ sm_SemEnd(_imcfwSemaphore(NULL)); } +static int deliverAtSource(Object bundleObj, Bundle *bundle) +{ + char nss[64]; + VEndpoint *vpoint; + PsmAddress vpointElt; + Bundle newBundle; + Object newBundleObj; + + isprintf(nss, sizeof nss, UVAST_FIELDSPEC ".%d", + bundle->destination.c.nodeNbr, + bundle->destination.c.serviceNbr); + findEndpoint("imc", nss, NULL, &vpoint, &vpointElt); + if (vpoint == NULL) + { + return 0; + } + + if (bpClone(bundle, &newBundle, &newBundleObj, 0, 0) < 0) + { + putErrmsg("Failed on clone.", NULL); + return -1; + } + + if (deliverBundle(newBundleObj, &newBundle, vpoint) < 0) + { + putErrmsg("Bundle delivery failed.", NULL); + return -1; + } + + if ((getBpVdb())->watching & WATCH_z) + { + putchar('z'); + fflush(stdout); + } + + return 0; +} + static int enqueueToNeighbor(Bundle *bundle, Object bundleObj, uvast nodeNbr) { @@ -249,6 +287,21 @@ { sdr_read(sdr, (char *) &group, groupAddr, sizeof(ImcGroup)); + if (group.isMember + && bundle.clDossier.senderNodeNbr == 0 + && bundle.id.source.c.nodeNbr == ownNodeNbr) + { + /* Must deliver locally. */ + if (deliverAtSource(bundleAddr, + &bundle) < 0) + { + putErrmsg("Source delivery NG.", + NULL); + running = 0; + break; /* Loop. */ + } + } + for (elt3 = sdr_list_first(sdr, group.members); elt3; elt3 = sdr_list_next(sdr, elt3)) { @@ -259,7 +312,7 @@ { continue; } - + if (bpClone(&bundle, &newBundle, &newBundleObj, 0, 0) < 0) { diff -Nru ion-3.2.0~dfsg1/bp/imc/libimcfw.c ion-3.2.1+dfsg/bp/imc/libimcfw.c --- ion-3.2.0~dfsg1/bp/imc/libimcfw.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/imc/libimcfw.c 2014-07-08 02:17:38.000000000 +0000 @@ -582,6 +582,10 @@ Object addr; Object elt = 0; /* Default. */ +#if IMCDEBUG +printf("Creating group (" UVAST_FIELDSPEC ").\n", groupNbr); +fflush(stdout); +#endif group.groupNbr = groupNbr; group.isMember = 0; group.timestamp.seconds = 0; @@ -651,6 +655,7 @@ #if IMCDEBUG printf("Handling type-%d petition from " UVAST_FIELDSPEC " at \ node " UVAST_FIELDSPEC ".\n", isMember, metaEid.nodeNbr, getOwnNodeNbr()); +fflush(stdout); #endif CHKERR(sdr_begin_xn(sdr)); if (locateRelative(metaEid.nodeNbr, &nextRelative) == 0) @@ -668,6 +673,7 @@ { #if IMCDEBUG puts("Ignoring cancellation of membership in nonexistent group."); +fflush(stdout); #endif sdr_exit_xn(sdr); return 0; @@ -688,6 +694,7 @@ { #if IMCDEBUG puts("Silently ignoring non-current petition."); +fflush(stdout); #endif return sdr_end_xn(sdr); /* Not a current petition. */ } @@ -710,6 +717,7 @@ { #if IMCDEBUG puts("Ignoring assertion."); +fflush(stdout); #endif /* Nothing to do: current member. */ @@ -721,7 +729,8 @@ /* Must add new member of group at this point. */ #if IMCDEBUG -printf("Adding member " UVAST_FIELDSPEC ".\n", metaEid.nodeNbr); +printf("Adding member " UVAST_FIELDSPEC " to group " UVAST_FIELDSPEC ".\n", metaEid.nodeNbr, groupNbr); +fflush(stdout); #endif addr = createNodeId(sdr, metaEid.nodeNbr); if (elt) @@ -771,12 +780,14 @@ /* Nothing to do: not a current member. */ #if IMCDEBUG puts("Ignoring cancellation by non-member."); +fflush(stdout); #endif return sdr_end_xn(sdr); } #if IMCDEBUG printf("Deleting member " UVAST_FIELDSPEC ".\n", metaEid.nodeNbr); +fflush(stdout); #endif sdr_list_delete(sdr, elt, NULL, NULL); @@ -789,6 +800,7 @@ #if IMCDEBUG printf("Canceling own membership in group (" UVAST_FIELDSPEC ").\n", getOwnNodeNbr()); +fflush(stdout); #endif if (forwardPetition(group, 0, getOwnNodeNbr()) < 0) { @@ -798,6 +810,7 @@ { #if IMCDEBUG puts("Destroying group."); +fflush(stdout); #endif destroyGroup(groupElt); } @@ -825,9 +838,6 @@ groupElt = locateGroup(groupNbr, &nextGroup); if (groupElt == 0) { -#if IMCDEBUG -printf("Creating group (" UVAST_FIELDSPEC ").\n", getOwnNodeNbr()); -#endif groupElt = createGroup(groupNbr, nextGroup); if (groupElt == 0) { @@ -845,8 +855,8 @@ * may be redundant.) */ #if IMCDEBUG -printf("Asserting own membership in group (" UVAST_FIELDSPEC ").\n", -getOwnNodeNbr()); +printf("Node " UVAST_FIELDSPEC " asserting own membership in group " UVAST_FIELDSPEC ".\n", getOwnNodeNbr(), groupNbr); +fflush(stdout); #endif if (forwardPetition(&group, 1, ownNodeNbr) < 0) { @@ -893,6 +903,7 @@ #if IMCDEBUG printf("Cancelling own membership in group (" UVAST_FIELDSPEC ").\n", getOwnNodeNbr()); +fflush(stdout); #endif if (forwardPetition(&group, 0, ownNodeNbr) < 0) { @@ -902,6 +913,7 @@ { #if IMCDEBUG printf("Destroying group (" UVAST_FIELDSPEC ").\n", getOwnNodeNbr()); +fflush(stdout); #endif destroyGroup(groupElt); } diff -Nru ion-3.2.0~dfsg1/bp/include/bp.h ion-3.2.1+dfsg/bp/include/bp.h --- ion-3.2.0~dfsg1/bp/include/bp.h 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/include/bp.h 2014-07-08 02:17:38.000000000 +0000 @@ -67,12 +67,6 @@ typedef struct bpsap_st *BpSAP; -typedef struct -{ - unsigned int seconds; - unsigned int count; -} BpTimestamp; - typedef enum { BpPayloadPresent = 1, diff -Nru ion-3.2.0~dfsg1/bp/ipn/libipnfw.c ion-3.2.1+dfsg/bp/ipn/libipnfw.c --- ion-3.2.0~dfsg1/bp/ipn/libipnfw.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/ipn/libipnfw.c 2014-07-08 02:17:38.000000000 +0000 @@ -68,40 +68,6 @@ /* * * Routing information mgt functions * */ -static int lookupIpnEid(char *uriBuffer, char *neighborClId) -{ - Sdr sdr = getIonsdr(); - Object elt; - OBJ_POINTER(IpnPlan, plan); - - for (elt = sdr_list_first(sdr, (_ipnConstants())->plans); elt; - elt = sdr_list_next(sdr, elt)) - { - GET_OBJ_POINTER(sdr, IpnPlan, plan, sdr_list_data(sdr, elt)); - switch (clIdMatches(neighborClId, &plan->defaultDirective)) - { - case -1: - putErrmsg("Failed looking up IPN EID.", NULL); - return -1; - - case 0: - continue; /* No match. */ - - default: - - /* Found the plan for transmission to - * this neighbor, so now we know the - * neighbor's EID. */ - - isprintf(uriBuffer, SDRSTRING_BUFSZ, - "ipn:" UVAST_FIELDSPEC ".0", plan->nodeNbr); - return 1; - } - } - - return 0; -} - int ipnInit() { Sdr sdr = getIonsdr(); @@ -111,7 +77,6 @@ /* Recover the IPN database, creating it if necessary. */ CHKERR(sdr_begin_xn(sdr)); - oK(senderEidLookupFunctions(lookupIpnEid)); ipndbObject = sdr_find(sdr, IPN_DBNAME, NULL); switch (ipndbObject) { diff -Nru ion-3.2.0~dfsg1/bp/library/acs/acstx.c ion-3.2.1+dfsg/bp/library/acs/acstx.c --- ion-3.2.0~dfsg1/bp/library/acs/acstx.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/acs/acstx.c 2014-07-08 02:17:38.000000000 +0000 @@ -101,7 +101,7 @@ } - if (getAcssdr() < 0) + if (getAcssdr() == NULL) { putErrmsg("ACS can't find ACS SDR.", NULL); return -1; diff -Nru ion-3.2.0~dfsg1/bp/library/bpP.h ion-3.2.1+dfsg/bp/library/bpP.h --- ion-3.2.0~dfsg1/bp/library/bpP.h 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/bpP.h 2014-07-08 02:17:38.000000000 +0000 @@ -791,16 +791,6 @@ Object eid; /* sdrstring for fwd */ } FwdDirective; -/* Definitions supporting determination of sender endpoint ID. */ - -typedef int (*BpEidLookupFn)(char *uriBuffer, char *neighborClId); - -extern BpEidLookupFn *senderEidLookupFunctions(BpEidLookupFn fn); -extern void getSenderEid(char **eidBuffer, char *neighborClId); -extern int clIdMatches(char *neighborClId, FwdDirective *dir); - -extern void getSenderEid(char **eidBuffer, char *neighborClId); - /* Definitions supporting the use of QoS-sensitive bandwidth * management. */ @@ -1341,12 +1331,17 @@ extern Object insertBpTimelineEvent(BpEvent *newEvent); extern void destroyBpTimelineEvent(Object timelineElt); +extern int decodeBundle(Sdr sdr, Object zco, unsigned char *buf, + Bundle *image, char **dictionary, + unsigned int *bundleLength); extern int findBundle(char *sourceEid, BpTimestamp *creationTime, unsigned int fragmentOffset, unsigned int fragmentLength, Object *bundleAddr); extern int retrieveInTransitBundle(Object bundleZco, Object *obj); +extern int deliverBundle(Object bundleObj, Bundle *bundle, + VEndpoint *vpoint); extern int forwardBundle(Object bundleObj, Bundle *bundle, char *stationEid); diff -Nru ion-3.2.0~dfsg1/bp/library/crypto/crypto.h ion-3.2.1+dfsg/bp/library/crypto/crypto.h --- ion-3.2.0~dfsg1/bp/library/crypto/crypto.h 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/crypto/crypto.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -/****************************************************************************** - ** COPYRIGHT NOTICE - ** (c) 2009 The Johns Hopkins University Applied Physics Laboratory - ** All rights reserved. - ** - ** This material may only be used, modified, or reproduced by or for the - ** U.S. Government pursuant to the license rights granted under - ** FAR clause 52.227-14 or DFARS clauses 252.227-7013/7014 - ** - ** For any other permissions, please contact the Legal Office at JHU/APL. - ******************************************************************************/ - -#ifndef _CRYPTO_H_ -#define _CRYPTO_H_ - -#define NULL_CRYPTO_SUITES - -#include "platform.h" - - -/***************************************************************************** - * CONSTANTS DEFINITIONS * - *****************************************************************************/ -extern char* crypto_suite_name; - - -/***************************************************************************** - * HMAC-SHA-1 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int hmac_sha1_context_length(); -void hmac_sha1_init(void *context, unsigned char *key, int key_length); -void hmac_sha1_update(void *context, unsigned char *data, int data_length); -void hmac_sha1_final(void *context, unsigned char *result, int resultLen); -void hmac_sha1_reset(void *context); -int hmac_authenticate(char * mac_buffer, const int mac_size, const char * key, const int key_length, const char * message, const int message_length); - - -/***************************************************************************** - * HMAC-SHA-256 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int hmac_sha256_context_length(); -void hmac_sha256_init(void *context, unsigned char *key, int key_length); -void hmac_sha256_update(void *context, unsigned char *data, int data_length); -void hmac_sha256_final(void *context, unsigned char *result, int resultLen); -void hmac_sha256_reset(void *context); - -/***************************************************************************** - * SHA-256 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int sha256_context_length(); -void sha256_init(void *context); -void sha256_update(void *context, unsigned char *data, int data_length); -void sha256_final(void *context, unsigned char *result, int resultLen); - - -/***************************************************************************** - * arc4 FUNCTION DEFINITIONS * - * From polarssl polarssl.org * - *****************************************************************************/ - -/** - * \brief ARC4 context structure - */ -typedef struct -{ - int x; /*!< permutation index */ - int y; /*!< permutation index */ - unsigned char m[256]; /*!< permutation table */ -} -arc4_context; - -/** - * \brief ARC4 key schedule - * - * \param ctx ARC4 context to be initialized - * \param key the secret key - * \param keylen length of the key - */ -void arc4_setup( arc4_context *ctx, const unsigned char *key, unsigned int keylen ); - -/** - * \brief ARC4 cipher function - * - * \param ctx ARC4 context - * \param length length of the input data - * \param input buffer holding the input data - * \param output buffer for the output data - * - * \return 0 if successful - */ -int arc4_crypt( arc4_context *ctx, size_t length, const unsigned char *input, - unsigned char *output ); - -#endif - diff -Nru ion-3.2.0~dfsg1/bp/library/crypto/NULL_SUITES/crypto.c ion-3.2.1+dfsg/bp/library/crypto/NULL_SUITES/crypto.c --- ion-3.2.0~dfsg1/bp/library/crypto/NULL_SUITES/crypto.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/crypto/NULL_SUITES/crypto.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,190 +0,0 @@ -/****************************************************************************** - ** COPYRIGHT NOTICE - ** (c) 2009 The Johns Hopkins University Applied Physics Laboratory - ** All rights reserved. - ** - ** This material may only be used, modified, or reproduced by or for the - ** U.S. Government pursuant to the license rights granted under - ** FAR clause 52.227-14 or DFARS clauses 252.227-7013/7014 - ** - ** For any other permissions, please contact the Legal Office at JHU/APL. - ******************************************************************************/ - -#include "crypto.h" - -/***************************************************************************** - * CONSTANTS DEFINITIONS * - *****************************************************************************/ -char* crypto_suite_name="NULL_SUITES"; - - -/***************************************************************************** - * HMAC-SHA-1 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int hmac_sha1_context_length() -{ - // Made it maximum - return 20; -} - -void hmac_sha1_init(void *context, unsigned char *key, int key_length) -{ - /* Set the context as the key, for specious authentication */ - if(key_length > 20) - { - key_length = 20; - } - memset(context, 0, 20); - memcpy(context, key, key_length); - return; -} - -void hmac_sha1_update(void *context, unsigned char *data, int data_length) -{ - return; -} - -void hmac_sha1_final(void *context, unsigned char *result, int resultLen) -{ - /* Context contains the key */ - /* This function simply sets the security result to be the key */ - memset(result,0,resultLen); - if(resultLen > 20) - { - resultLen = 20; - } - memcpy(result, context, resultLen); -} - -void hmac_sha1_reset(void *context) -{ - return; -} - -int hmac_authenticate(char * mac_buffer, const int mac_size, const char * key, const int key_length, const char * message, const int message_length) -{ - memset(mac_buffer, 0, mac_size); - return mac_size; - -} - - -/***************************************************************************** - * HMAC-SHA-256 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int hmac_sha256_context_length() -{ - // Made it maximum - return 32; -} - -void hmac_sha256_init(void *context, unsigned char *key, int key_length) -{ - /* Set the context as the key, for specious authentication */ - if(key_length > 32) - { - key_length = 32; - } - memset(context, 0, 32); - memcpy(context, key, key_length); - return; -} - -void hmac_sha256_update(void *context, unsigned char *data, int data_length) -{ - return; -} - -void hmac_sha256_final(void *context, unsigned char *result, int resultLen) -{ - /* Context contains the key */ - /* This function simply sets the security result to be the key */ - memset(result,0,resultLen); - if(resultLen > 32) - { - resultLen = 32; - } - memcpy(result, context, resultLen); -} - -void hmac_sha256_reset(void *context) -{ - return; -} - - -/***************************************************************************** - * SHA-256 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int sha256_context_length() -{ - return 1; -} - -void sha256_init(void *context) -{ - return; -} - -void sha256_update(void *context, unsigned char *data, int data_length) -{ - return; -} - -void sha256_final(void *context, unsigned char *result, int resultLen) -{ - memset(result, 0, resultLen); -} - - -/***************************************************************************** - * RSA SIGNING FUNCTION DEFINITIONS * - *****************************************************************************/ - -int rsa_sha256_sign_context_length() -{ - return 1; -} - -void rsa_sha256_sign_init(void *context) -{ - return; -} - -int rsa_sha256_sign(void *context, int hashlen, void *hashData, int signatureLen, void *signature) -{ - memset(signature, 0, signatureLen); - return 0; -} - -int rsa_sha256_verify(void *context, int hashlen, void *hashData, int signatureLen, void *signature) -{ - memset(signature, 0, signatureLen); - return 0; -} - - -/***************************************************************************** - * arc4 FUNCTION DEFINITIONS * - *****************************************************************************/ - -/* - * ARC4 key schedule - */ -void arc4_setup( arc4_context *ctx, const unsigned char *key, unsigned int keylen ) -{ - return; -} - -/* - * ARC4 cipher function - */ -int arc4_crypt( arc4_context *ctx, size_t length, const unsigned char *input, - unsigned char *output ) -{ - memcpy(output, input, length); - return( 0 ); -} diff -Nru ion-3.2.0~dfsg1/bp/library/crypto/sample_crypto.h ion-3.2.1+dfsg/bp/library/crypto/sample_crypto.h --- ion-3.2.0~dfsg1/bp/library/crypto/sample_crypto.h 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/crypto/sample_crypto.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -/****************************************************************************** - ** COPYRIGHT NOTICE - ** (c) 2009 The Johns Hopkins University Applied Physics Laboratory - ** All rights reserved. - ** - ** This material may only be used, modified, or reproduced by or for the - ** U.S. Government pursuant to the license rights granted under - ** FAR clause 52.227-14 or DFARS clauses 252.227-7013/7014 - ** - ** For any other permissions, please contact the Legal Office at JHU/APL. - ******************************************************************************/ - -#ifndef _CRYPTO_H_ -#define _CRYPTO_H_ - -#define NULL_CRYPTO_SUITES - -#include "platform.h" - -#include "NULL_SUITES/sha1.h" -#include "NULL_SUITES/hmac.h" - - - -/***************************************************************************** - * CONSTANTS DEFINITIONS * - *****************************************************************************/ -extern char* crypto_suite_name; - - -/***************************************************************************** - * HMAC-SHA-1 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int hmac_sha1_context_length(); -void hmac_sha1_init(void *context, unsigned char *key, int key_length); -void hmac_sha1_update(void *context, unsigned char *data, int data_length); -void hmac_sha1_final(void *context, unsigned char *result, int resultLen); -void hmac_sha1_reset(void *context); -int hmac_authenticate(char * mac_buffer, const int mac_size, const char * key, const int key_length, const char * message, const int message_length); - - - - -/***************************************************************************** - * SHA-256 FUNCTION DEFINITIONS * - *****************************************************************************/ - -int sha256_context_length(); -void sha256_init(void *context); -void sha256_update(void *context, unsigned char *data, int data_length); -void sha256_final(void *context, unsigned char *result, int resultLen); - - -#endif - diff -Nru ion-3.2.0~dfsg1/bp/library/ext/bpextensions.c ion-3.2.1+dfsg/bp/library/ext/bpextensions.c --- ion-3.2.0~dfsg1/bp/library/ext/bpextensions.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/ext/bpextensions.c 2014-07-08 02:17:38.000000000 +0000 @@ -13,6 +13,10 @@ /* Add external function declarations between here... */ +#if 0 +#include "snid.h" +#endif +#include "phn.h" #include "ecos.h" #include "bae.h" #include "extbspbab.h" @@ -27,21 +31,36 @@ static ExtensionDef extensions[] = { - { "bab", BSP_BAB_TYPE, 0, - // NK changed the name from "bsp_bab_pre" - bsp_babOffer, - bsp_babRelease, - bsp_babAcquire, - bsp_babPreCheck, - 0, - bsp_babClear, - bsp_babCopy, - {0, - 0, - 0, - bsp_babPreProcessOnDequeue, + { "phn", EXTENSION_TYPE_PHN, 0, + phn_offer, + phn_release, + phn_acquire, + phn_check, + phn_record, + phn_clear, + phn_copy, + {phn_processOnFwd, + phn_processOnAccept, + phn_processOnEnqueue, + phn_processOnDequeue, + 0} + }, +#if 0 + { "snid", EXTENSION_TYPE_SNID, 0, + snid_offer, + snid_release, + snid_acquire, + snid_check, + snid_record, + snid_clear, + snid_copy, + {snid_processOnFwd, + snid_processOnAccept, + snid_processOnEnqueue, + snid_processOnDequeue, 0} }, +#endif { "ecos", EXTENSION_TYPE_ECOS, 0, ecos_offer, ecos_release, @@ -114,6 +133,21 @@ bsp_pcbProcessOnDequeue, 0} }, + { "bab", BSP_BAB_TYPE, 0, + // NK changed the name from "bsp_bab_pre" + bsp_babOffer, + bsp_babRelease, + bsp_babAcquire, + bsp_babPreCheck, + 0, + bsp_babClear, + bsp_babCopy, + {0, + 0, + 0, + bsp_babPreProcessOnDequeue, + 0} + }, { "bsp_bab_post", BSP_BAB_TYPE, 1, bsp_babOffer, bsp_babRelease, diff -Nru ion-3.2.0~dfsg1/bp/library/ext/bsp/extbspbab.c ion-3.2.1+dfsg/bp/library/ext/bsp/extbspbab.c --- ion-3.2.0~dfsg1/bp/library/ext/bsp/extbspbab.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/ext/bsp/extbspbab.c 2014-07-08 02:17:38.000000000 +0000 @@ -1167,7 +1167,7 @@ if (addCollaborationBlock(bundle, (CollabBlockHdr *) &collab) < 0) { BAB_DEBUG_ERR("x bsp_babPreProcessOnDequeue: Can't add \ -collaboration block."); +collaboration block.", NULL); result = -1; } } diff -Nru ion-3.2.0~dfsg1/bp/library/ext/bsp/extbsputil.c ion-3.2.1+dfsg/bp/library/ext/bsp/extbsputil.c --- ion-3.2.0~dfsg1/bp/library/ext/bsp/extbsputil.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/ext/bsp/extbsputil.c 2014-07-08 02:17:38.000000000 +0000 @@ -1166,7 +1166,8 @@ *resultZco = zco_create(sdr, ZcoSdrSource, 0, 0, 0); if (*resultZco == (Object) ERROR) { - putErrmsg("extbsputil: Can't start file source ZCO.", NULL); + putErrmsg("extbsputil: Can't start file source ZCO.", + NULL); sdr_cancel_xn(sdr); return -1; } @@ -1179,7 +1180,8 @@ { if (igetcwd(cwd, sizeof cwd) == NULL) { - putErrmsg("extbsputil: Can't get CWD for acq file name.", NULL); + putErrmsg("extbsputil: Can't get CWD for acq file \ +name.", NULL); sdr_cancel_xn(sdr); return -1; } @@ -1190,7 +1192,8 @@ fd = open(fileName, O_WRONLY | O_CREAT, 0666); if (fd < 0) { - putSysErrmsg("extbsputil: Can't create acq file", fileName); + putSysErrmsg("extbsputil: Can't create acq file", + fileName); sdr_cancel_xn(sdr); return -1; } @@ -1198,24 +1201,35 @@ fileLength = 0; *acqFileRef = zco_create_file_ref(sdr, fileName, ""); } - else /* Writing more to file. */ - { - oK(zco_file_ref_path(sdr, *acqFileRef, fileName, - sizeof fileName)); - fd = open(fileName, O_WRONLY, 0666); - if (fd < 0 || (fileLength = lseek(fd, 0, SEEK_END)) < 0) - { - putSysErrmsg("extbsputil: Can't reopen acq file", fileName); + else /* Writing more to file. */ + { + oK(zco_file_ref_path(sdr, *acqFileRef, fileName, + sizeof fileName)); + fd = open(fileName, O_WRONLY, 0666); + if (fd < 0) + { + putSysErrmsg("extbsputil: Can't reopen acq file", + fileName); sdr_cancel_xn(sdr); return -1; - } - } + } + + if ((fileLength = lseek(fd, 0, SEEK_END)) < 0) + { + putSysErrmsg("extbsputil: Can't get acq file length", + fileName); + sdr_cancel_xn(sdr); + close(fd); + return -1; + } + } // Write the data to the file if (write(fd, bytes, length) < 0) { putSysErrmsg("extbsputil: Can't append to acq file", fileName); sdr_cancel_xn(sdr); + close(fd); return -1; } diff -Nru ion-3.2.0~dfsg1/bp/library/ext/phn/phn.c ion-3.2.1+dfsg/bp/library/ext/phn/phn.c --- ion-3.2.0~dfsg1/bp/library/ext/phn/phn.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/ext/phn/phn.c 2014-07-08 02:17:38.000000000 +0000 @@ -9,7 +9,8 @@ * Author: Scott Burleigh, JPL */ -#include "../../bpP.h" +#include "bpP.h" +#include "bei.h" #include "phn.h" int phn_offer(ExtensionBlock *blk, Bundle *bundle) @@ -63,19 +64,11 @@ int result; suppressExtensionBlock(blk); /* Default. */ - if (strcmp(context->protocolName, "ltp") == 0) - { - /* The phn block isn't needed; ltpcli can compute - * the previous-hop node EID from engine number. */ - - return 0; - } - /* The phn block is needed. To figure out which - * admin EID to use as the previous-hop node EID, - * look at the EID scheme of the proximate node EID; - * use the same scheme, since you know the receiver - * understands that scheme. */ + /* To figure out which admin EID to use as the previous- + * hop node EID, look at the EID scheme of the proximate + * node EID; use the same scheme, since you know the + * receiver understands that scheme. */ result = parseEidString(context->proxNodeEid, &metaEid, &vscheme, &vschemeElt); @@ -136,12 +129,9 @@ int phn_acquire(AcqExtBlock *blk, AcqWorkArea *wk) { - int schemeLength; char *lastByte; - char *scheme; - int nssLength; - char *nss; int eidLen; + char *eid; /* Data parsed out of the phn byte array go directly into * the work area structure, not into a block-specific @@ -149,7 +139,7 @@ blk->size = 0; blk->object = NULL; - if (wk->senderEid != NULL) /* Provided by CL. */ + if (wk->senderEid) /* Provided another way. */ { return 1; /* Ignore PHN block. */ } @@ -165,16 +155,8 @@ return 0; /* Malformed. */ } - scheme = ((char *) (blk->bytes)) + (blk->length - blk->dataLength); - schemeLength = strlen(scheme); - nss = scheme + (schemeLength + 1); - if (nss > lastByte) /* No NSS in EID. */ - { - return 0; /* Malformed. */ - } - - nssLength = strlen(nss); - eidLen = schemeLength + 1 + nssLength + 1; + eid = ((char *) (blk->bytes)) + (blk->length - blk->dataLength); + eidLen = blk->dataLength; wk->senderEid = MTAKE(eidLen); if (wk->senderEid == NULL) { @@ -182,7 +164,7 @@ return -1; } - isprintf(wk->senderEid, eidLen, "%s:%s", scheme, nss); + istrcpy(wk->senderEid, eid, eidLen); return 1; } diff -Nru ion-3.2.0~dfsg1/bp/library/ext/snid/snid.c ion-3.2.1+dfsg/bp/library/ext/snid/snid.c --- ion-3.2.0~dfsg1/bp/library/ext/snid/snid.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/ext/snid/snid.c 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * snid.c: implementation of the extension definition + * functions for the Bundle Age Extension block. + * + * Copyright (c) 2014, California Institute of Technology. + * ALL RIGHTS RESERVED. U.S. Government Sponsorship + * acknowledged. + * + * Author: Scott Burleigh, JPL + */ + +#include "bpP.h" +#include "bei.h" +#include "snid.h" + +int snid_offer(ExtensionBlock *blk, Bundle *bundle) +{ + Sdnv nodeNbrSdnv; + char dataBuffer[32]; + + blk->blkProcFlags = BLK_MUST_BE_COPIED | BLK_REMOVE_IF_NG; + encodeSdnv(&nodeNbrSdnv, getOwnNodeNbr()); + blk->dataLength = nodeNbrSdnv.length; + blk->size = 0; + blk->object = 0; + memcpy(dataBuffer, nodeNbrSdnv.text, nodeNbrSdnv.length); + return serializeExtBlk(blk, NULL, dataBuffer); +} + +void snid_release(ExtensionBlock *blk) +{ + return; +} + +int snid_record(ExtensionBlock *sdrBlk, AcqExtBlock *ramBlk) +{ + return 0; +} + +int snid_copy(ExtensionBlock *newBlk, ExtensionBlock *oldBlk) +{ + return 0; +} + +int snid_processOnFwd(ExtensionBlock *blk, Bundle *bundle, void *ctxt) +{ + return 0; +} + +int snid_processOnAccept(ExtensionBlock *blk, Bundle *bundle, void *ctxt) +{ + return 0; +} + +int snid_processOnEnqueue(ExtensionBlock *blk, Bundle *bundle, void *ctxt) +{ + return 0; +} + +int snid_processOnDequeue(ExtensionBlock *blk, Bundle *bundle, void *ctxt) +{ + return 0; +} + +int snid_acquire(AcqExtBlock *blk, AcqWorkArea *wk) +{ + uvast senderNodeNbr; + unsigned char *cursor; + int bytesRemaining; + char uriBuffer[32]; + int eidLen; + + if (blk->dataLength < 1) + { + return 0; /* Malformed. */ + } + + blk->size = 0; + blk->object = NULL; + + /* Sender ID from SNID block doesn't override sender ID + * determined from other sources, such as PHN block. */ + + if (wk->senderEid) /* Provided another way. */ + { + return 1; /* Ignore SNID block. */ + } + + cursor = blk->bytes + (blk->length - blk->dataLength); + bytesRemaining = blk->dataLength; + extractSdnv(&senderNodeNbr, &cursor, &bytesRemaining); + if (bytesRemaining != 0) + { + return 0; /* Malformed. */ + } + + eidLen = _isprintf(uriBuffer, sizeof uriBuffer, + "ipn:" UVAST_FIELDSPEC ".0", senderNodeNbr) + 1; + wk->senderEid = MTAKE(eidLen); + if (wk->senderEid == NULL) + { + putErrmsg("Can't record sender EID.", NULL); + return -1; + } + + istrcpy(wk->senderEid, uriBuffer, eidLen); + return 1; +} + +int snid_check(AcqExtBlock *blk, AcqWorkArea *wk) +{ + discardExtensionBlock(blk); + return 0; +} + +void snid_clear(AcqExtBlock *blk) +{ + return; +} diff -Nru ion-3.2.0~dfsg1/bp/library/ext/snid/snid.h ion-3.2.1+dfsg/bp/library/ext/snid/snid.h --- ion-3.2.0~dfsg1/bp/library/ext/snid/snid.h 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/ext/snid/snid.h 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * snid.h: definitions supporting implementation of + * the Sending Node IDentification (SNID) + * extension block. + * + * Copyright (c) 2014, California Institute of Technology. + * ALL RIGHTS RESERVED. U.S. Government Sponsorship + * acknowledged. + * + * Author: Scott Burleigh, JPL + */ + +#include "bei.h" + +#define EXTENSION_TYPE_SNID 65 + +extern int snid_offer(ExtensionBlock *, Bundle *); +extern void snid_release(ExtensionBlock *); +extern int snid_record(ExtensionBlock *, AcqExtBlock *); +extern int snid_copy(ExtensionBlock *, ExtensionBlock *); +extern int snid_processOnFwd(ExtensionBlock *, Bundle *, void *); +extern int snid_processOnAccept(ExtensionBlock *, Bundle *, void *); +extern int snid_processOnEnqueue(ExtensionBlock *, Bundle *, void *); +extern int snid_processOnDequeue(ExtensionBlock *, Bundle *, void *); +extern int snid_acquire(AcqExtBlock *, AcqWorkArea *); +extern int snid_check(AcqExtBlock *, AcqWorkArea *); +extern void snid_clear(AcqExtBlock *); diff -Nru ion-3.2.0~dfsg1/bp/library/libbpP.c ion-3.2.1+dfsg/bp/library/libbpP.c --- ion-3.2.0~dfsg1/bp/library/libbpP.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/library/libbpP.c 2014-07-08 02:17:38.000000000 +0000 @@ -1835,8 +1835,10 @@ return 0; /* BP service is now available. */ } -void bpDetach(){ - char *stop=NULL; +void bpDetach() +{ + char *stop = NULL; + oK(_bpvdb(&stop)); return; } @@ -2165,158 +2167,6 @@ } } -BpEidLookupFn *senderEidLookupFunctions(BpEidLookupFn fn) -{ - static BpEidLookupFn fns[16] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; - int i; - - if (fn == NULL) /* Requesting pointer to table. */ - { - return fns; - } - - for (i = 0; i < 16; i++) - { - if (fns[i] == fn) - { - break; /* Already in table. */ - } - - if (fns[i] == NULL) - { - fns[i] = fn; /* Add to table. */ - break; - } - } - - if (i == 16) - { - writeMemo("[?] EID lookup functions table is full."); - } - - return NULL; -} - -void getSenderEid(char **eidBuffer, char *neighborClEid) -{ - BpEidLookupFn *lookupFns; - int i; - BpEidLookupFn lookupEid; - Sdr sdr = getIonsdr(); - int result; - - CHKVOID(eidBuffer); - CHKVOID(*eidBuffer); - CHKVOID(*neighborClEid); - lookupFns = senderEidLookupFunctions(NULL); - for (i = 0; i < 16; i++) - { - lookupEid = lookupFns[i]; - if (lookupEid == NULL) - { - break; /* Reached end of table. */ - } - - CHKVOID(sdr_begin_xn(sdr)); - result = lookupEid(*eidBuffer, neighborClEid); - sdr_exit_xn(sdr); - switch (result) - { - case -1: - putErrmsg("Failed getting sender EID.", NULL); - sm_Abort(); - break; - - case 0: - continue; /* No match yet. */ - - default: - return; /* Figured out sender EID. */ - } - } - - *eidBuffer = NULL; /* Sender EID not found. */ -} - -int clIdMatches(char *neighborClId, FwdDirective *dir) -{ - Sdr sdr = getIonsdr(); - char *firstNonNumeric; - char ductNameBuffer[SDRSTRING_BUFSZ]; - char *ductClId; - Object ductObj; - OBJ_POINTER(Outduct, duct); - int neighborIdLen; - int ductIdLen; - int idLen; - int digitCount UNUSED; - - if (dir->action == fwd) - { - return 0; - } - - /* This is a directive for transmission to a neighbor. */ - - neighborIdLen = strlen(neighborClId); - if (dir->destDuctName) - { - if (sdr_string_read(sdr, ductNameBuffer, dir->destDuctName) < 0) - { - putErrmsg("Missing dest duct name.", NULL); - return -1; /* DB error. */ - } - - ductClId = ductNameBuffer; - } - else - { - ductObj = sdr_list_data(sdr, dir->outductElt); - GET_OBJ_POINTER(sdr, Outduct, duct, ductObj); - ductClId = duct->name; - } - - if (strcmp(ductClId, "localhost") == 0) - { - /* Convert to dotted-string representation for - * match with canonical form of the IPv4 address - * that the neighbor CL ID must be. */ - - ductClId = "127.0.0.1"; - } - - ductIdLen = strlen(ductClId); - digitCount = strtol(ductClId, &firstNonNumeric, 0); - if (*firstNonNumeric == '\0') - { - /* Neighbor CL ID is a number, e.g., an LTP - * engine number. IDs must be the same length - * in order to match. */ - - if (ductIdLen != neighborIdLen) - { - return 0; /* Different numbers. */ - } - - idLen = ductIdLen; - } - else - { - /* IDs are character strings, e.g., hostnames. - * Matches if shorter string matches the leading - * characters of longer string. */ - - idLen = neighborIdLen < ductIdLen ? neighborIdLen : ductIdLen; - } - - if (strncmp(neighborClId, ductClId, idLen) == 0) - { - return 1; /* Found neighbor's duct. */ - } - - return 0; /* A different neighbor. */ -} - int startBpTask(Object cmd, Object cmdParms, int *pid) { Sdr bpSdr = getIonsdr(); @@ -2745,8 +2595,7 @@ if ((_bpvdb(NULL))->watching & WATCH_expire) { - putchar('!'); - fflush(stdout); + iwatch('!'); } if (!(bundle.bundleProcFlags & BDL_IS_ADMIN) @@ -5706,8 +5555,7 @@ bpSourceTally(classOfService, bundle.payload.length); if (bpvdb->watching & WATCH_a) { - putchar('a'); - fflush(stdout); + iwatch('a'); } if (sdr_end_xn(bpSdr) < 0) @@ -6128,8 +5976,7 @@ return 0; } -static int deliverBundle(Object bundleObj, Bundle *bundle, - VEndpoint *vpoint) +int deliverBundle(Object bundleObj, Bundle *bundle, VEndpoint *vpoint) { char *dictionary; int result; @@ -6231,8 +6078,7 @@ if ((_bpvdb(NULL))->watching & WATCH_z) { - putchar('z'); - fflush(stdout); + iwatch('z'); } if (bundle->bundleProcFlags & BDL_DEST_IS_SINGLETON) @@ -6691,6 +6537,7 @@ { putErrmsg("Can't create file ref.", NULL); sdr_cancel_xn(sdr); + close(fd); return -1; } } @@ -6699,18 +6546,27 @@ oK(zco_file_ref_path(sdr, work->acqFileRef, fileName, sizeof fileName)); fd = iopen(fileName, O_WRONLY, 0666); - if (fd < 0 || (fileLength = lseek(fd, 0, SEEK_END)) < 0) + if (fd < 0) { putSysErrmsg("Can't reopen acq file", fileName); sdr_cancel_xn(sdr); return -1; } + + if ((fileLength = lseek(fd, 0, SEEK_END)) < 0) + { + putSysErrmsg("Can't get acq file length", fileName); + sdr_cancel_xn(sdr); + close(fd); + return -1; + } } if (write(fd, bytes, length) < 0) { putSysErrmsg("Can't append to acq file", fileName); sdr_cancel_xn(sdr); + close(fd); return -1; } @@ -7423,8 +7279,7 @@ if ((_bpvdb(NULL))->watching & WATCH_x) { - putchar('x'); - fflush(stdout); + iwatch('x'); } } @@ -7778,8 +7633,7 @@ bundle->payload.length); if ((_bpvdb(NULL))->watching & WATCH_y) { - putchar('y'); - fflush(stdout); + iwatch('y'); } /* Other decisions and reporting are left to the @@ -9032,8 +8886,7 @@ if ((_bpvdb(NULL))->watching & WATCH_w) { - putchar('w'); - fflush(stdout); + iwatch('w'); } /* Insert Endpoint ID of custodial endpoint. */ @@ -9365,8 +9218,7 @@ sdr_write(bpSdr, bundleObj, (char *) bundle, sizeof(Bundle)); if ((_bpvdb(NULL))->watching & WATCH_b) { - putchar('b'); - fflush(stdout); + iwatch('b'); } /* Finally, if outduct is started then wake up CLO. */ @@ -9437,8 +9289,7 @@ bpDbTally(BP_DB_TO_LIMBO, bundle->payload.length); if ((_bpvdb(NULL))->watching & WATCH_limbo) { - putchar('j'); - fflush(stdout); + iwatch('j'); } return 0; @@ -9621,8 +9472,7 @@ bpDbTally(BP_DB_FROM_LIMBO, bundle.payload.length); if ((_bpvdb(NULL))->watching & WATCH_delimbo) { - putchar('k'); - fflush(stdout); + iwatch('k'); } /* Now see if the bundle can finally be transmitted. */ @@ -9775,8 +9625,7 @@ if ((_bpvdb(NULL))->watching & WATCH_abandon) { - putchar('~'); - fflush(stdout); + iwatch('~'); } return ((result1 + result2) == 0 ? 0 : -1); @@ -10417,8 +10266,7 @@ bundle.payload.length); if ((_bpvdb(NULL))->watching & WATCH_c) { - putchar('c'); - fflush(stdout); + iwatch('c'); } /* Consume estimated transmission capacity. */ @@ -10776,9 +10624,8 @@ } } -static int decodeBundle(Sdr sdr, Object zco, unsigned char *buffer, - Bundle *image, char **dictionary, - unsigned int *bundleLength) +int decodeBundle(Sdr sdr, Object zco, unsigned char *buffer, Bundle *image, + char **dictionary, unsigned int *bundleLength) { ZcoReader reader; int bytesBuffered; @@ -11077,8 +10924,7 @@ if ((_bpvdb(NULL))->watching & WATCH_timeout) { - putchar('#'); - fflush(stdout); + iwatch('#'); } if (bpReforwardBundle(bundleAddr) < 0) @@ -11389,8 +11235,7 @@ { if (bpvdb->watching & WATCH_m) { - putchar('m'); - fflush(stdout); + iwatch('m'); } forgetSnub(bundle, bundleAddr, bundleSourceEid); @@ -11433,8 +11278,7 @@ if (bpvdb->watching & WATCH_refusal) { - putchar('&'); - fflush(stdout); + iwatch('&'); } } diff -Nru ion-3.2.0~dfsg1/bp/ltp/ltpcli.c ion-3.2.1+dfsg/bp/ltp/ltpcli.c --- ion-3.2.0~dfsg1/bp/ltp/ltpcli.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/ltp/ltpcli.c 2014-07-08 02:17:38.000000000 +0000 @@ -31,15 +31,7 @@ static int acquireRedBundles(AcqWorkArea *work, Object zco, uvast senderEngineNbr) { - char engineNbrString[21]; - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; - - isprintf(engineNbrString, sizeof engineNbrString, UVAST_FIELDSPEC, - senderEngineNbr); - senderEid = senderEidBuffer; - getSenderEid(&senderEid, engineNbrString); - if (bpBeginAcq(work, 0, senderEid) < 0) + if (bpBeginAcq(work, 0, NULL) < 0) { putErrmsg("Can't begin acquisition of bundle(s).", NULL); return -1; @@ -68,9 +60,6 @@ static LtpSessionId currentSessionId = { 0, 0 }; static unsigned int currentOffset = 0; unsigned int fillLength; - char engineNbrString[21]; - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; ZcoReader reader; int result; @@ -106,11 +95,7 @@ { /* Start new green bundle acquisition. */ - isprintf(engineNbrString, sizeof engineNbrString, - UVAST_FIELDSPEC, sessionId->sourceEngineId); - senderEid = senderEidBuffer; - getSenderEid(&senderEid, engineNbrString); - if (bpBeginAcq(work, 0, senderEid) < 0) + if (bpBeginAcq(work, 0, NULL) < 0) { putErrmsg("Can't begin acquisition of bundle.", NULL); return -1; @@ -127,8 +112,16 @@ if (offset > currentOffset) { - /* Must insert fill data -- partial loss of - * bundle payload, for example, may be okay. */ + /* Convergence layer must not deliver incomplete + * bundles to BP. Practically speaking, this + * gap in segment sequence must be treated as + * malformation of the bundle. */ + + work->malformed = 1; + + /* But continue bundle acquisition anyway, in + * case the incomplete bundle is useful for some + * diagnostic purpose. */ fillLength = offset - currentOffset; if (fillLength > *buflen) @@ -486,11 +479,6 @@ return -1; } - /* Initialize sender endpoint ID lookup. */ - - ipnInit(); - dtn2Init(); - /* Set up signal handling; SIGTERM is shutdown signal. */ ionNoteMainThread("ltpcli"); diff -Nru ion-3.2.0~dfsg1/bp/tcp/stcpcli.c ion-3.2.1+dfsg/bp/tcp/stcpcli.c --- ion-3.2.0~dfsg1/bp/tcp/stcpcli.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/tcp/stcpcli.c 2014-07-08 02:17:38.000000000 +0000 @@ -22,8 +22,6 @@ typedef struct { - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; VInduct *vduct; LystElt elt; pthread_mutex_t *mutex; @@ -81,7 +79,7 @@ while (threadRunning && *(parms->running)) { - if (bpBeginAcq(work, 0, parms->senderEid) < 0) + if (bpBeginAcq(work, 0, NULL) < 0) { putErrmsg("Can't begin acquisition of bundle.", NULL); ionKillMainThread(procName); @@ -150,9 +148,6 @@ socklen_t nameLength; ReceiverThreadParms *parms; LystElt elt; - struct sockaddr_in *fromAddr; - unsigned int hostNbr; - char hostName[MAXHOSTNAMELEN + 1]; pthread_t thread; snooze(1); /* Let main thread become interruptable. */ @@ -212,13 +207,6 @@ parms->mutex = &mutex; parms->bundleSocket = newSocket; - fromAddr = (struct sockaddr_in *) &cloSocketName; - memcpy((char *) &hostNbr, - (char *) &(fromAddr->sin_addr.s_addr), 4); - hostNbr = ntohl(hostNbr); - printDottedString(hostNbr, hostName); - parms->senderEid = parms->senderEidBuffer; - getSenderEid(&(parms->senderEid), hostName); parms->running = &(atp->running); if (pthread_begin(&(parms->thread), NULL, receiveBundles, parms)) @@ -393,11 +381,6 @@ } } - /* Initialize sender endpoint ID lookup. */ - - ipnInit(); - dtn2Init(); - /* Set up signal handling: SIGTERM is shutdown signal. */ ionNoteMainThread("stcpcli"); diff -Nru ion-3.2.0~dfsg1/bp/tcp/tcpcli.c ion-3.2.1+dfsg/bp/tcp/tcpcli.c --- ion-3.2.0~dfsg1/bp/tcp/tcpcli.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/tcp/tcpcli.c 2014-07-08 02:17:38.000000000 +0000 @@ -110,8 +110,6 @@ typedef struct { - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; VInduct *vduct; LystElt elt; struct sockaddr cloSocketName; @@ -173,6 +171,7 @@ } /* Set up parameters for the keepalive thread */ + kparms = (KeepaliveThreadParms *) MTAKE(sizeof(KeepaliveThreadParms)); if (kparms == NULL) @@ -257,7 +256,7 @@ while (threadRunning && *(parms->cliRunning) && parms->receiveRunning) { - if (bpBeginAcq(work, 0, parms->senderEid) < 0) + if (bpBeginAcq(work, 0, NULL) < 0) { putErrmsg("Can't begin acquisition of bundle.", NULL); ionKillMainThread(procName); @@ -336,9 +335,6 @@ socklen_t nameLength; ReceiverThreadParms *parms; LystElt elt; - struct sockaddr_in *fromAddr; - unsigned int hostNbr; - char hostName[MAXHOSTNAMELEN + 1]; pthread_t thread; snooze(1); /* Let main thread become interruptable. */ @@ -399,13 +395,6 @@ parms->mutex = &mutex; parms->bundleSocket = newSocket; - fromAddr = (struct sockaddr_in *) &cloSocketName; - memcpy((char *) &hostNbr, - (char *) &(fromAddr->sin_addr.s_addr), 4); - hostNbr = ntohl(hostNbr); - printDottedString(hostNbr, hostName); - parms->senderEid = parms->senderEidBuffer; - getSenderEid(&(parms->senderEid), hostName); parms->cloSocketName = cloSocketName; parms->cliRunning = &(atp->running); parms->receiveRunning = 1; @@ -593,11 +582,6 @@ } } - /* Initialize sender endpoint ID lookup. */ - - ipnInit(); - dtn2Init(); - /* Set up signal handling: SIGTERM is shutdown signal. */ ionNoteMainThread("tcpcli"); diff -Nru ion-3.2.0~dfsg1/bp/test/bpchat.c ion-3.2.1+dfsg/bp/test/bpchat.c --- ion-3.2.0~dfsg1/bp/test/bpchat.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/test/bpchat.c 2014-07-08 02:17:38.000000000 +0000 @@ -50,7 +50,7 @@ break; } - CHKNULL(sdr_begin_xn(sdr)); + oK(sdr_begin_xn(sdr)); bundlePayload = sdr_malloc(sdr, lineLength); if(bundlePayload) { sdr_write(sdr, bundlePayload, lineBuffer, lineLength); @@ -102,7 +102,7 @@ break; } - if(dlv.result == BpReceptionInterrupted) { + if(dlv.result == BpReceptionInterrupted || dlv.adu == 0) { bp_release_delivery(&dlv, 1); continue; } @@ -113,7 +113,7 @@ break; } - CHKNULL(sdr_begin_xn(sdr)); + oK(sdr_begin_xn(sdr)); bundleLenRemaining = zco_source_data_length(sdr, dlv.adu); zco_start_receiving(dlv.adu, &reader); while(bundleLenRemaining > 0) { diff -Nru ion-3.2.0~dfsg1/bp/test/bping.c ion-3.2.1+dfsg/bp/test/bping.c --- ion-3.2.0~dfsg1/bp/test/bping.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/test/bping.c 2014-07-08 02:17:38.000000000 +0000 @@ -148,7 +148,7 @@ /* ReceptionInterrupted means this process received a signal but not * a bundle. Try receiving again... */ - if(dlv.result == BpReceptionInterrupted) { + if(dlv.result == BpReceptionInterrupted || dlv.adu == 0) { if(verbosity) fprintf(stderr, "Reception interrupted.\n"); bp_release_delivery(&dlv, 1); continue; @@ -164,7 +164,7 @@ contentLength = zco_source_data_length(sdr, dlv.adu); bytesToRead = MIN(contentLength, sizeof(buffer)-1); zco_start_receiving(dlv.adu, &reader); - CHKNULL(sdr_begin_xn(sdr)); + oK(sdr_begin_xn(sdr)); result = zco_receive_source(sdr, &reader, bytesToRead, buffer); if (sdr_end_xn(sdr) < 0 || result < 0) { diff -Nru ion-3.2.0~dfsg1/bp/udp/udpcli.c ion-3.2.1+dfsg/bp/udp/udpcli.c --- ion-3.2.0~dfsg1/bp/udp/udpcli.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/udp/udpcli.c 2014-07-08 02:17:38.000000000 +0000 @@ -42,8 +42,6 @@ struct sockaddr_in fromAddr; unsigned int hostNbr; char hostName[MAXHOSTNAMELEN + 1]; - char senderEidBuffer[SDRSTRING_BUFSZ]; - char *senderEid; snooze(1); /* Let main thread become interruptable. */ work = bpGetAcqArea(rtp->vduct); @@ -90,9 +88,7 @@ (char *) &(fromAddr.sin_addr.s_addr), 4); hostNbr = ntohl(hostNbr); printDottedString(hostNbr, hostName); - senderEid = senderEidBuffer; - getSenderEid(&senderEid, hostName); - if (bpBeginAcq(work, 0, senderEid) < 0 + if (bpBeginAcq(work, 0, NULL) < 0 || bpContinueAcq(work, buffer, bundleLength) < 0 || bpEndAcq(work) < 0) { @@ -225,11 +221,6 @@ return -1; } - /* Initialize sender endpoint ID lookup. */ - - ipnInit(); - dtn2Init(); - /* Set up signal handling; SIGTERM is shutdown signal. */ ionNoteMainThread("udpcli"); diff -Nru ion-3.2.0~dfsg1/bp/utils/bprecvfile.c ion-3.2.1+dfsg/bp/utils/bprecvfile.c --- ion-3.2.0~dfsg1/bp/utils/bprecvfile.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/utils/bprecvfile.c 2014-07-08 02:17:38.000000000 +0000 @@ -71,7 +71,7 @@ zco_start_receiving(dlv->adu, &reader); remainingLength = contentLength; - CHKERR(sdr_begin_xn(sdr)); + oK(sdr_begin_xn(sdr)); while (remainingLength > 0) { recvLength = BPRECVBUFSZ; diff -Nru ion-3.2.0~dfsg1/bp/utils/hmackeys.c ion-3.2.1+dfsg/bp/utils/hmackeys.c --- ion-3.2.0~dfsg1/bp/utils/hmackeys.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bp/utils/hmackeys.c 2014-07-08 02:17:38.000000000 +0000 @@ -19,6 +19,7 @@ int i; int val; unsigned char key[20]; + int result = 0; if (*line == '#') /* Comment. */ { @@ -49,11 +50,11 @@ { printf("Can't write key to %s: %s\n", fileName, system_error_msg()); - return -1; + result = -1; } close(fd); - return 0; + return result; } int main(int argc, char **argv) diff -Nru ion-3.2.0~dfsg1/bss/i86_64-fedora/Makefile ion-3.2.1+dfsg/bss/i86_64-fedora/Makefile --- ion-3.2.0~dfsg1/bss/i86_64-fedora/Makefile 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bss/i86_64-fedora/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -14,7 +14,7 @@ PUBINCLS = \ $(INCL)/bss.h -RUNTIMES = bssrecv bssStreamingApp +RUNTIMES = bssrecv bssStreamingApp bsscounter bssdriver ALL = check libbss.so $(RUNTIMES) @@ -45,6 +45,14 @@ $(CC) -o bssStreamingApp bssStreamingApp.o -L./lib -L$(ROOT)/lib -lbss -lbp -lici -lpthread cp bssStreamingApp ./bin +bsscounter: bsscounter.o libbss.so + $(CC) -o bsscounter bsscounter.o -L./lib -L$(ROOT)/lib -lbss -lbp -lici -lpthread + cp bsscounter ./bin + +bssdriver: bssdriver.o libbss.so + $(CC) -o bssdriver bssdriver.o -L./lib -L$(ROOT)/lib -lbss -lbp -lici -lpthread + cp bssdriver ./bin + # - - Libraries - - - - - libbss.so: $(LIBBSSOBJS) $(API)/bssP.h diff -Nru ion-3.2.0~dfsg1/bss/library/libbssP.c ion-3.2.1+dfsg/bss/library/libbssP.c --- ion-3.2.0~dfsg1/bss/library/libbssP.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bss/library/libbssP.c 2014-07-08 02:17:38.000000000 +0000 @@ -1138,6 +1138,7 @@ if (*lst < 0) { putSysErrmsg("BSS Library: can't open .lst file", fileName); + close(*dat); return -1; } @@ -1146,6 +1147,8 @@ if (*tbl < 0) { putSysErrmsg("BSS Library: can't open .tbl file", fileName); + close(*lst); + close(*dat); return -1; } @@ -1234,6 +1237,7 @@ if (lstRO < 0) { putSysErrmsg("BSS Library: can't open .lst file", fileName); + close(datRO); return -1; } @@ -1242,6 +1246,8 @@ if (tblRO < 0) { putSysErrmsg("BSS Library: can't open .tbl file", fileName); + close(lstRO); + close(datRO); return -1; } diff -Nru ion-3.2.0~dfsg1/bss/test/bssdriver.c ion-3.2.1+dfsg/bss/test/bssdriver.c --- ion-3.2.0~dfsg1/bss/test/bssdriver.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bss/test/bssdriver.c 2014-07-08 02:17:38.000000000 +0000 @@ -24,13 +24,7 @@ { int priority = 0; BpExtendedCOS extendedCOS = { 0, 0, 0 }; - - /* - * ****************************************************** - * BSS traffic bundles must always be marked as custodial - * ****************************************************** - */ - BpCustodySwitch custodySwitch = SourceCustodyRequired; + BpCustodySwitch custodySwitch = NoCustodyRequested; BpSAP sap; Sdr sdr; unsigned int i = 0; diff -Nru ion-3.2.0~dfsg1/bss/test/bssrecv.c ion-3.2.1+dfsg/bss/test/bssrecv.c --- ion-3.2.0~dfsg1/bss/test/bssrecv.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bss/test/bssrecv.c 2014-07-08 02:17:38.000000000 +0000 @@ -182,14 +182,13 @@ PUTS("Please enter DB name, path and eid separated by whitespace."); PUTS("e.g.: bssDB /home/user/experiments/bss ipn:2.71"); fflush(stdout); - - if(igets(fd, parameters, sizeof parameters, ¶mLen) == NULL) + if (igets(fd, parameters, sizeof parameters, ¶mLen) == NULL) { PUTS("Error in reading arguments"); return -1; } - if(sscanf (parameters, "%63s %255s %31s", bssName, path, eid) != 3) + if (sscanf(parameters, "%63s %255s %31s", bssName, path, eid) != 3) { PUTS("Wrong number of arguments"); return -1; @@ -372,14 +371,13 @@ { PUTS("Pls provide replay period: fromTime toTime "); PUTS("fromTime and toTime format: yyyy/mm/dd-hh:mm:ss"); - if(igets(cmdFile, menuNav, sizeof(menuNav), - &navLen) == NULL) + if (igets(cmdFile, menuNav, sizeof(menuNav), &navLen) == NULL) { PUTS("Error in reading arguments"); break; } - if(sscanf (menuNav, "%19s %19s", fromTime, toTime) != 2) + if (sscanf(menuNav, "%19s %19s", fromTime, toTime) != 2) { PUTS("Wrong number of arguments"); break; diff -Nru ion-3.2.0~dfsg1/bss/test/bssStreamingApp.c ion-3.2.1+dfsg/bss/test/bssStreamingApp.c --- ion-3.2.0~dfsg1/bss/test/bssStreamingApp.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/bss/test/bssStreamingApp.c 2014-07-08 02:17:38.000000000 +0000 @@ -57,14 +57,8 @@ { int priority = 0; BpExtendedCOS extendedCOS = { 0, 0, 0 }; - - /* - * ****************************************************** - * BSS traffic bundles must always be marked as custodial - * ****************************************************** - */ - BpCustodySwitch custodySwitch = SourceCustodyRequired; - BptestState state; + BpCustodySwitch custodySwitch = NoCustodyRequested; + BptestState state = { NULL, 1 }; Sdr sdr; Object bundlePayload; Object bundleZco; @@ -127,9 +121,9 @@ CHKZERO(sdr_begin_xn(sdr)); bundlePayload = sdr_malloc(sdr, sizeof(framePayload)); - if(bundlePayload == 0) { + if (bundlePayload == 0) + { sdr_cancel_xn(sdr); - bp_close(state.sap); putErrmsg("No space for frame payload.", NULL); break; } @@ -143,26 +137,43 @@ bundleZco = zco_create(sdr, ZcoSdrSource, bundlePayload, 0, sizeof(framePayload)); - if (sdr_end_xn(sdr) < 0 || bundleZco == (Object) ERROR - || bundleZco == 0) + switch (bundleZco) + { + case 0: + writeMemoNote("[?] Not enough ZCO space for BSS \ +payload", itoa(i)); + sdr_free(sdr, bundlePayload); + break; + + case (Object) ERROR: + bundleZco = 0; + sdr_free(sdr, bundlePayload); + } + + if (sdr_end_xn(sdr)) { - bp_close(state.sap); putErrmsg("bssStreamingApp can't create bundle ZCO.", NULL); break; } /* Send the bundle payload. */ - if(bp_send(state.sap, destEid, NULL, 86400, priority, custodySwitch, - 0, 0, &extendedCOS, bundleZco, &newBundle) <= 0) + if (bundleZco) { - putErrmsg("bssStreamingApp can't send frame.", NULL); - break; + if (bp_send(state.sap, destEid, NULL, 86400, priority, + custodySwitch, 0, 0, &extendedCOS, bundleZco, + &newBundle) <= 0) + { + putErrmsg("bssStreamingApp can't send frame.", + NULL); + break; + } + + isprintf(info, sizeof info, "A frame with payload: %s \ +and size: %d has been sent\n", framePayload, sizeof(framePayload)); + PUTS(info); } - isprintf(info, sizeof info, "A frame with payload: %s and \ -size: %d has been sent\n", framePayload, sizeof(framePayload)); - PUTS(info); microsnooze(SNOOZE_INTERVAL); } diff -Nru ion-3.2.0~dfsg1/bssp/daemon/bsspclock.c ion-3.2.1+dfsg/bssp/daemon/bsspclock.c --- ion-3.2.0~dfsg1/bssp/daemon/bsspclock.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/daemon/bsspclock.c 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,248 @@ +/* + * bsspclock.c: scheduled-event management daemon for BSSP. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + */ + +#include "bsspP.h" + +static int _running(long *newValue) +{ + void *value; + long state; + + if (newValue) /* Changing state. */ + { + value = (void *) (*newValue); + state = (long) sm_TaskVar(&value); + } + else /* Just check. */ + { + state = (long) sm_TaskVar(NULL); + } + + return state; +} + +static void shutDown() /* Commands bsspclock termination. */ +{ + long stop = 0; + + oK(_running(&stop)); /* Terminates bsspclock. */ +} + +static int dispatchEvents(Sdr sdr, Object events, time_t currentTime) +{ + Object elt; + Object eventObj; + BsspEvent event; + int result; + + while (1) + { + CHKERR(sdr_begin_xn(sdr)); + elt = sdr_list_first(sdr, events); + if (elt == 0) /* No more events to dispatch. */ + { + sdr_exit_xn(sdr); + return 0; + } + + eventObj = sdr_list_data(sdr, elt); + sdr_read(sdr, (char *) &event, eventObj, sizeof(BsspEvent)); + if (event.scheduledTime > currentTime) + { + /* This is the first future event. */ + + sdr_exit_xn(sdr); + return 0; + } + + sdr_free(sdr, eventObj); + sdr_list_delete(sdr, elt, NULL, NULL); + switch (event.type) + { + case BsspResendBlock: + result = bsspResendBlock(event.refNbr2); + break; /* Out of switch. */ + + default: /* Spurious event. */ + result = 0; /* Event is ignored. */ + } + + if (result < 0) /* Dispatching failed. */ + { + sdr_cancel_xn(sdr); + putErrmsg("failed handing BSSP event", NULL); + return result; + } + + if (sdr_end_xn(sdr) < 0) + { + putErrmsg("failed dispatching BSSP event", NULL); + return -1; + } + } +} + +static int manageLinks(Sdr sdr, time_t currentTime) +{ + PsmPartition ionwm = getIonwm(); + BsspVdb *bsspvdb = getBsspVdb(); + IonVdb *ionvdb = getIonVdb(); + PsmAddress elt; + BsspVspan *vspan; + IonNeighbor *neighbor; + PsmAddress nextElt; + unsigned int priorXmitRate; + + CHKERR(sdr_begin_xn(sdr)); + for (elt = sm_list_first(ionwm, bsspvdb->spans); elt; + elt = sm_list_next(ionwm, elt)) + { + vspan = (BsspVspan *) psp(ionwm, sm_list_data(ionwm, elt)); + + /* Find Neighbor object encapsulating the current + * known state of this BSSP engine. */ + + neighbor = findNeighbor(ionvdb, vspan->engineId, &nextElt); + if (neighbor == NULL) + { + neighbor = addNeighbor(ionvdb, vspan->engineId); + if (neighbor == NULL) + { + putErrmsg("Can't update span.", NULL); + return -1; + } + } + + if (neighbor->xmitRate == 0) + { + if (vspan->localXmitRate > 0) + { + vspan->localXmitRate = 0; + bsspStopXmit(vspan); + } + } + else + { + if (vspan->localXmitRate == 0) + { + vspan->localXmitRate = neighbor->xmitRate; + bsspStartXmit(vspan); + } + } + + if (neighbor->fireRate == 0) + { + if (vspan->remoteXmitRate > 0) + { + priorXmitRate = vspan->remoteXmitRate; + vspan->remoteXmitRate = 0; + if (bsspSuspendTimers(vspan, elt, currentTime, + priorXmitRate)) + { + putErrmsg("Can't manage links.", NULL); + return -1; + } + } + } + else + { + if (vspan->remoteXmitRate == 0) + { + vspan->remoteXmitRate = neighbor->fireRate; + if (bsspResumeTimers(vspan, elt, currentTime, + vspan->remoteXmitRate)) + { + putErrmsg("Can't manage links.", NULL); + return -1; + } + } + } + + vspan->owltInbound = neighbor->owltInbound; + vspan->owltOutbound = neighbor->owltOutbound; + } + + if (sdr_end_xn(sdr) < 0) + { + putErrmsg("bsspclock failed managing links.", NULL); + return -1; + } + + return 0; +} + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int bsspclock(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ +#else +int main(int argc, char *argv[]) +{ +#endif + Sdr sdr; + BsspDB *bsspConstants; + long state = 1; + time_t currentTime; + + if (bsspInit(0) < 0) + { + putErrmsg("bsspclock can't initialize BSSP.", NULL); + return 1; + } + + sdr = getIonsdr(); + bsspConstants = getBsspConstants(); + isignal(SIGTERM, shutDown); + + /* Main loop: wait for event occurrence time, then + * execute applicable events. */ + + oK(_running(&state)); + writeMemo("[i] bsspclock is running."); + while (_running(NULL)) + { + /* Sleep for 1 second, then dispatch all events + * whose executions times have now been reached. */ + + snooze(1); + currentTime = getUTCTime(); + + /* Infer link state changes from rate changes + * noted in the shared ION database. */ + + if (manageLinks(sdr, currentTime) < 0) + { + putErrmsg("Can't manage links.", NULL); + state = 0; /* Terminate loop. */ + oK(_running(&state)); + continue; + } + + /* Then dispatch retransmission events, as + * constrained by the new link state. */ + + if (dispatchEvents(sdr, bsspConstants->timeline, currentTime) + < 0) + { + putErrmsg("Can't dispatch events.", NULL); + state = 0; /* Terminate loop. */ + oK(_running(&state)); + continue; + } + } + + writeErrmsgMemos(); + writeMemo("[i] bsspclock has ended."); + ionDetach(); + return 0; +} diff -Nru ion-3.2.0~dfsg1/bssp/doc/Makefile ion-3.2.1+dfsg/bssp/doc/Makefile --- ion-3.2.0~dfsg1/bssp/doc/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,62 @@ +PODM1 = pod2man -s 1 -c "BSSP executables" +PODM3 = pod2man -s 3 -c "BSSP library functions" +PODM5 = pod2man -s 5 -c "BSSP configuration files" +PODH = pod2html --noindex + +MANFILES = \ + ./man/man1/bsspadmin.1 \ + ./man/man1/bsspclock.1 \ + ./man/man1/udpbsi.1 \ + ./man/man1/udpbso.1 \ + ./man/man1/tcpbsi.1 \ + ./man/man1/tcpbso.1 \ + ./man/man5/bssprc.5 \ + ./man/man3/bssp.3 + +HTMLFILES = \ + ./html/man1/bsspadmin.html \ + ./html/man1/bsspclock.html \ + ./html/man1/udpbsi.html \ + ./html/man1/udpbso.html \ + ./html/man1/tcpbsi.html \ + ./html/man1/tcpbso.html \ + ./html/man5/bssprc.html \ + ./html/man3/bssp.html + +ALL = $(MANFILES) $(HTMLFILES) + +all: $(ALL) + +clean: + rm -f man/man1/*.1 + rm -f man/man3/*.3 + rm -f man/man5/*.5 + rm -f html/man1/*.html + rm -f html/man3/*.html + rm -f html/man5/*.html + rm -f *.tmp + +install: + cp man/man1/*.1 $(ROOT)/man/man1 + cp man/man3/*.3 $(ROOT)/man/man3 + cp man/man5/*.5 $(ROOT)/man/man5 + +# - - Man files - - - - - + +./man/man1/%.1: pod1/%.pod + $(PODM1) $< $@ + +./man/man3/%.3: pod3/%.pod + $(PODM3) $< $@ + +./man/man5/%.5: pod5/%.pod + $(PODM5) $< $@ + +./html/man1/%.html: pod1/%.pod + $(PODH) --infile=$< --outfile=$@ + +./html/man3/%.html: pod3/%.pod + $(PODH) --infile=$< --outfile=$@ + +./html/man5/%.html: pod5/%.pod + $(PODH) --infile=$< --outfile=$@ diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod1/bsspadmin.pod ion-3.2.1+dfsg/bssp/doc/pod1/bsspadmin.pod --- ion-3.2.0~dfsg1/bssp/doc/pod1/bsspadmin.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod1/bsspadmin.pod 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,96 @@ +=head1 NAME + +bsspadmin - Bundle Streaming Service Protocol (BSSP) administration interface + +=head1 SYNOPSIS + +B [ I | . ] + +=head1 DESCRIPTION + +B configures, starts, manages, and stops BSSP operations for +the local ION node. + +It operates in response to BSSP configuration commands found in the file +I, if provided; if not, B prints +a simple prompt (:) so that the user may type commands +directly into standard input. If I is a period (.), the +effect is the same as if a command file containing the single command 'x' +were passed to B -- that is, the ION node's I task +and link service adapter tasks are stopped. + +The format of commands for I can be queried from B +with the 'h' or '?' commands at the prompt. The commands are documented in +bssprc(5). + +=head1 EXIT STATUS + +=over 4 + +=item C<0> + +Successful completion of BSSP administration. + +=back + +=head1 EXAMPLES + +=over 4 + +=item bsspadmin + +Enter interactive BSSP configuration command entry mode. + +=item bsspadmin host1.bssp + +Execute all configuration commands in I, then terminate immediately. + +=item bsspadmin . + +Stop all BSSP operations on the local node. + +=back + +=head1 FILES + +See bssprc(5) for details of the BSSP configuration commands. + +=head1 ENVIRONMENT + +No environment variables apply. + +=head1 DIAGNOSTICS + +B: all ION administration utilities expect source file input to be +lines of ASCII text that are NL-delimited. If you edit the bssprc file on +a Windows machine, be sure to B +before presenting it to B. Otherwise B will detect syntax +errors and will not function satisfactorily. + +The following diagnostics may be issued to the logfile ion.log: + +=over 4 + +=item bsspadmin can't attach to ION. + +There is no SDR data store for I to use. You should run ionadmin(1) +first, to set up an SDR data store for ION. + +=item Can't open command file... + +The I specified in the command line doesn't exist. + +=back + +Various errors that don't cause B to fail but are noted in the +B log file may be caused by improperly formatted commands +given at the prompt or in the I file. +Please see bssprc(5) for details. + +=head1 BUGS + +Report bugs to + +=head1 SEE ALSO + +bssprc(5) diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod1/bsspclock.pod ion-3.2.1+dfsg/bssp/doc/pod1/bsspclock.pod --- ion-3.2.0~dfsg1/bssp/doc/pod1/bsspclock.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod1/bsspclock.pod 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,106 @@ +=head1 NAME + +bsspclock - BSSP daemon task for managing scheduled events + +=head1 SYNOPSIS + +B + +=head1 DESCRIPTION + +B is a background "daemon" task that periodically performs +scheduled BSSP activities. It is spawned automatically by B in +response to the 's' command that starts operation of the BSSP protocol, and +it is terminated by B in response to an 'x' (STOP) command. + +Once per second, B takes the following action: + +=over 4 + +First it manages the current state of all links ("spans"). Specifically, +it infers link state changes ("link cues") from data rate changes as noted +in the RFX database by B: + +=over 4 + +If the rate of transmission to a neighbor was zero but is now non-zero, then +transmission to that neighbor resumes. The applicable "buffer empty" +semaphore is given (enabling start of a new transmission session) and +the best-efforts and/or reliable "segments ready" semaphores are given if the +corresponding outbound segment queues are non-empty (enabling transmission of +segments by the link service output task). + +If the rate of transmission to a neighbor was non-zero but is now zero, then +transmission to that neighbor is suspended -- i.e., the semaphores triggering +transmission will no longer be given. + +If the imputed rate of transmission from a neighbor was non-zero but is now +zero, then all best-efforts transmission acknowledgment timers affecting +transmission to that neighbor are suspended. This has the effect of extending +the interval of each affected timer by the length of time that the timers +remain suspended. + +If the imputed rate of transmission from a neighbor was zero but is now +non-zero, then all best-efforts transmission acknowledgment timers affecting +transmission to that neighbor are resumed. + +=back + +Then B enqueues for reliable transmission all segments for which +the best-efforts transmission acknowledgment timeout interval has now expired +but no acknowledgment has yet been received. + +=back + +=head1 EXIT STATUS + +=over 4 + +=item 0 + +B terminated, for reasons noted in the B file. If this +termination was not commanded, investigate and solve the problem identified +in the log file and use B to restart B. + +=item 1 + +B was unable to attach to BSSP protocol operations, probably because +B has not yet been run. + +=back + +=head1 FILES + +No configuration files are needed. + +=head1 ENVIRONMENT + +No environment variables apply. + +=head1 DIAGNOSTICS + +The following diagnostics may be issued to the B log file: + +=over 4 + +=item bsspclock can't initialize BSSP. + +B has not yet initialized BSSP protocol operations. + +=item Can't dispatch events. + +An unrecoverable database error was encountered. B terminates. + +=item Can't manage links. + +An unrecoverable database error was encountered. B terminates. + +=back + +=head1 BUGS + +Report bugs to + +=head1 SEE ALSO + +bsspadmin(1), rfxclock(1) diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod1/tcpbsi.pod ion-3.2.1+dfsg/bssp/doc/pod1/tcpbsi.pod --- ion-3.2.0~dfsg1/bssp/doc/pod1/tcpbsi.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod1/tcpbsi.pod 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,84 @@ +=head1 NAME + +tcpbsi - TCP-based reliable link service input task for BSSP + +=head1 SYNOPSIS + +B {I | @}[:I] + +=head1 DESCRIPTION + +B is a background "daemon" task that receives TCP stream data via a +TCP socket bound to I and I, extracts BSSP +segments from that stream, and passes them to the local BSSP engine. +Host name "@" signifies that the host name returned by hostname(1) is to +be used as the socket's host name. If not specified, port number defaults +to 4556. + +The link service input task is spawned automatically by B in +response to the 's' command that starts operation of the BSSP protocol; +the text of the command that is used to spawn the task must be provided +as a parameter to the 's' command. The link service input task is +terminated by B in response to an 'x' (STOP) command. + +=head1 EXIT STATUS + +=over 4 + +=item 0 + +B terminated normally, for reasons noted in the B file. If +this termination was not commanded, investigate and solve the problem identified +in the log file and use B to restart B. + +=item 1 + +B terminated abnormally, for reasons noted in the B file. +Investigate and solve the problem identified in the log file, then use +B to restart B. + +=back + +=head1 FILES + +No configuration files are needed. + +=head1 ENVIRONMENT + +No environment variables apply. + +=head1 DIAGNOSTICS + +The following diagnostics may be issued to the B log file: + +=over 4 + +=item tcpbsi can't initialize BSSP. + +B has not yet initialized BSSP protocol operations. + +=item RL-BSI task is already started. + +Redundant initiation of B. + +=item RL-BSI can't open TCP socket + +Operating system error. Check errtext, correct problem, and restart B. + +=item RL-BSI can't initialize socket + +Operating system error. Check errtext, correct problem, and restart B. + +=item tcpbsi can't create receiver thread + +Operating system error. Check errtext, correct problem, and restart B. + +=back + +=head1 BUGS + +Report bugs to + +=head1 SEE ALSO + +bsspadmin(1), tcpbso(1), udpbsi(1) diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod1/tcpbso.pod ion-3.2.1+dfsg/bssp/doc/pod1/tcpbso.pod --- ion-3.2.0~dfsg1/bssp/doc/pod1/tcpbso.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod1/tcpbso.pod 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,84 @@ +=head1 NAME + +tcpbso - TCP-based reliable link service output task for BSSP + +=head1 SYNOPSIS + +B {I | @}[:I] I + +=head1 DESCRIPTION + +B is a background "daemon" task that extracts BSSP segments from the +queue of segments bound for the indicated remote BSSP engine and uses a TCP +socket to send them to the indicated TCP port on the indicated host. If not +specified, port number defaults to 4556. + +Each "span" of BSSP data interchange between the local BSSP engine and a +neighboring BSSP engine requires its own best-effort and reliable link service +output tasks. All link service output tasks are spawned automatically by +B in response to the 's' command that starts operation of the +BSSP protocol, and they are all terminated by B in response to an +'x' (STOP) command. + +=head1 EXIT STATUS + +=over 4 + +=item 0 + +B terminated normally, for reasons noted in the B file. If +this termination was not commanded, investigate and solve the problem identified +in the log file and use B to restart B. + +=item 1 + +B terminated abnormally, for reasons noted in the B file. +Investigate and solve the problem identified in the log file, then use +B to restart B. + +=back + +=head1 FILES + +No configuration files are needed. + +=head1 ENVIRONMENT + +No environment variables apply. + +=head1 DIAGNOSTICS + +The following diagnostics may be issued to the B log file: + +=over 4 + +=item tcpbso can't initialize BSSP. + +B has not yet initialized BSSP protocol operations. + +=item No such engine in database. + +I is invalid, or the applicable span has not yet +been added to the BSSP database by B. + +=item RL-BSO task is already started for this engine. + +Redundant initiation of B. + +=item RL-BSO can't open TCP socket + +Operating system error. Check errtext, correct problem, and restart B. + +=item RL-BSO can't bind TCP socket + +Operating system error. Check errtext, correct problem, and restart B. + +=back + +=head1 BUGS + +Report bugs to + +=head1 SEE ABSO + +bsspadmin(1), tcpbsi(1), udpbso(1) diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod1/udpbsi.pod ion-3.2.1+dfsg/bssp/doc/pod1/udpbsi.pod --- ion-3.2.0~dfsg1/bssp/doc/pod1/udpbsi.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod1/udpbsi.pod 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,84 @@ +=head1 NAME + +udpbsi - UDP-based best-effort link service input task for BSSP + +=head1 SYNOPSIS + +B {I | @}[:I] + +=head1 DESCRIPTION + +B is a background "daemon" task that receives UDP datagrams via a +UDP socket bound to I and I, extracts BSSP +segments from those datagrams, and passes them to the local BSSP engine. +Host name "@" signifies that the host name returned by hostname(1) is to +be used as the socket's host name. If not specified, port number defaults +to 6001. + +The link service input task is spawned automatically by B in +response to the 's' command that starts operation of the BSSP protocol; +the text of the command that is used to spawn the task must be provided +as a parameter to the 's' command. The link service input task is +terminated by B in response to an 'x' (STOP) command. + +=head1 EXIT STATUS + +=over 4 + +=item 0 + +B terminated normally, for reasons noted in the B file. If +this termination was not commanded, investigate and solve the problem identified +in the log file and use B to restart B. + +=item 1 + +B terminated abnormally, for reasons noted in the B file. +Investigate and solve the problem identified in the log file, then use +B to restart B. + +=back + +=head1 FILES + +No configuration files are needed. + +=head1 ENVIRONMENT + +No environment variables apply. + +=head1 DIAGNOSTICS + +The following diagnostics may be issued to the B log file: + +=over 4 + +=item udpbsi can't initialize BSSP. + +B has not yet initialized BSSP protocol operations. + +=item BE-BSI task is already started. + +Redundant initiation of B. + +=item BE-BSI can't open UDP socket + +Operating system error. Check errtext, correct problem, and restart B. + +=item BE-BSI can't initialize socket + +Operating system error. Check errtext, correct problem, and restart B. + +=item udpbsi can't create receiver thread + +Operating system error. Check errtext, correct problem, and restart B. + +=back + +=head1 BUGS + +Report bugs to + +=head1 SEE ALSO + +bsspadmin(1), tcpbsi(1), udpbso(1) diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod1/udpbso.pod ion-3.2.1+dfsg/bssp/doc/pod1/udpbso.pod --- ion-3.2.0~dfsg1/bssp/doc/pod1/udpbso.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod1/udpbso.pod 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,94 @@ +=head1 NAME + +udpbso - UDP-based best-effort link service output task for BSSP + +=head1 SYNOPSIS + +B {I | @}[:I] I I + +=head1 DESCRIPTION + +B is a background "daemon" task that extracts BSSP segments from the +queue of segments bound for the indicated remote BSSP engine, encapsulates +them in UDP datagrams, and sends those datagrams to the indicated UDP port +on the indicated host. If not specified, port number defaults to 6001. + +UDP congestion can be controlled by setting udpbso's rate of UDP datagram +transmission I (transmission rate in bits per second) to the value +that is supported by the underlying network. + +Each "span" of BSSP data interchange between the local BSSP engine and a +neighboring BSSP engine requires its own best-effort and reliable link service +output tasks. All link service output tasks are spawned automatically by +B in response to the 's' command that starts operation of the +BSSP protocol, and they are all terminated by B in response to an +'x' (STOP) command. + +=head1 EXIT STATUS + +=over 4 + +=item "0" + +B terminated normally, for reasons noted in the B file. If +this termination was not commanded, investigate and solve the problem identified +in the log file and use B to restart B. + +=item "1" + +B terminated abnormally, for reasons noted in the B file. +Investigate and solve the problem identified in the log file, then use +B to restart B. + +=back + +=head1 FILES + +No configuration files are needed. + +=head1 ENVIRONMENT + +No environment variables apply. + +=head1 DIAGNOSTICS + +The following diagnostics may be issued to the B log file: + +=over 4 + +=item udpbso can't initialize BSSP. + +B has not yet initialized BSSP protocol operations. + +=item No such engine in database. + +I is invalid, or the applicable span has not yet +been added to the BSSP database by B. + +=item BE-BSO task is already started for this engine. + +Redundant initiation of B. + +=item BE-BSO can't open UDP socket + +Operating system error. Check errtext, correct problem, and restart B. + +=item BE-BSO can't bind UDP socket + +Operating system error. Check errtext, correct problem, and restart B. + +=item Segment is too big for UDP BSO. + +Configuration error: segments that are too large for UDP transmission (i.e., +larger than 65535 bytes) are being enqueued for B. Use B +to change maximum segment size for this span. + +=back + +=head1 BUGS + +Report bugs to + +=head1 SEE ABSO + +bsspadmin(1), tcpbso(1), udpbsi(1) diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod3/bssp.pod ion-3.2.1+dfsg/bssp/doc/pod3/bssp.pod --- ion-3.2.0~dfsg1/bssp/doc/pod3/bssp.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod3/bssp.pod 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,139 @@ +=head1 NAME + +bssp - Bundle Streaming Service Protocol (BSSP) communications library + +=head1 SYNOPSIS + + #include "bssp.h" + + typedef enum + { + BsspNoNotice = 0, + BsspXmitSuccess, + BsspXmitFailure, + BsspRecvSuccess + } BsspNoticeType; + + [see description for available functions] + +=head1 DESCRIPTION + +The bssp library provides functions enabling application software to use BSSP +to send and receive streaming data in bundles. + +BSSP is designed to forward streaming data in original transmission order +wherever possible but to retransmit data as necessary to ensure that the +entire stream is available for playback eventually. To this end, BSSP uses +not one but two underlying "link service" channels: (a) an unreliable "best +efforts" channel, for data items that are successfully received upon initial +transmission over every extent of the end-to-end path, and (b) a "reliable" +channel, for data items that were lost at some point, had to be retransmitted, +and therefore are now out of order. The BSS library at the destination node +supports immediate "real-time" display of all data received on the "best +efforts" channel in transmission order, together with database retention of +all data eventually received on the "reliable" channel. + +The BSSP notion of B corresponds closely to the Internet notion of +a host, and in ION engine IDs are normally indistinguishable from node numbers +including the node numbers in Bundle Protocol endpoint IDs conforming to +the "ipn" scheme. + +The BSSP notion of B corresponds closely to the Internet notion of +"protocol number" as used in the Internet Protocol. It enables data from +multiple applications -- clients -- to be multiplexed over a single reliable +link. However, for ION operations we normally use BSSP exclusively for the +transmission of Bundle Protocol data, identified by client ID = 1. + +=over 4 + +=item int bssp_attach() + +Attaches the application to BSSP functionality on the lcoal computer. Returns +0 on success, -1 on any error. + +=item void bssp_detach() + +Terminates all access to BSSP functionality on the local computer. + +=item int bssp_engine_is_started() + +Returns 1 if the local BSSP engine has been started and not yet stopped, +0 otherwise. + +=item int bssp_send(uvast destinationEngineId, unsigned int clientId, Object clientServiceData, int inOrder, BsspSessionId *sessionId) + +Sends a client service data unit to the application that is waiting for +data tagged with the indicated I as received at the remote BSSP +engine identified by I. + +I must be a "zero-copy object" reference as returned +by zco_create(). Note that BSSP will privately make and destroy its own +reference to the client service data object; the application is free to +destroy its reference at any time. + +I is a Boolean value indicating whether or not the service data item +that is being sent is "in order", i.e., was originally transmitted after all +items that have previously been sent to this destination by this local BSSP +engine: 0 if no (meaning that the item must be transmitted using the +"reliable" channel), 1 if yes (meaning that the item must be transmitted +using the "best-efforts" channel. + +On success, the function populates I<*sessionId> with the source engine ID +and the "session number" assigned to transmission of this client service +data unit and returns zero. The session number may be used to link future +BSSP processing events to the affected client service data. bssp_send() +returns -1 on any error. + +=item int bssp_open(unsigned int clientId) + +Establishes the application's exclusive access to received service data +units tagged with the indicated BSSP client service data ID. At any time, +only a single application task is permitted to receive service data units +for any single client service data ID. + +Returns 0 on success, -1 on any error (e.g., the indicated client service +is already being held open by some other application task). + +=item int bssp_get_notice(unsigned int clientId, BsspNoticeType *type, BsspSessionId *sessionId, unsigned char *reasonCode, unsigned int *dataLength, Object *data) + +Receives notices of BSSP processing events pertaining to the flow of service +data units tagged with the indicated client service ID. The nature of each +event is indicated by I<*type>. Additional parameters characterizing the +event are returned in I<*sessionId>, I<*reasonCode>, I<*dataLength>, and +I<*data> as relevant. + +The value returned in I<*data> is always a zero-copy object; use the +zco_* functions defined in "zco.h" to retrieve the content of that object. + +When the notice is an BsspRecvSuccess, the ZCO returned in I<*data> +contains the content of a single BSSP block. + +The cancellation of an export session results in delivery of a +BsspXmitFailure notice. In this case, the ZCO returned in *data is a +service data unit ZCO that had previously been passed to bssp_send(). + +bssp_get_notice() always blocks indefinitely until an BSSP processing event +is delivered. + +Returns zero on success, -1 on any error. + +=item void bssp_interrupt(unsigned int clientId) + +Interrupts an bssp_get_notice() invocation. This function is designed to be +called from a signal handler; for this purpose, I may need to be +obtained from a static variable. + +=item void bssp_release_data(Object data) + +Releases the resources allocated to hold I, a client service data ZCO. + +=item void bssp_close(unsigned int clientId) + +Terminates the application's exclusive access to received service data +units tagged with the indicated client service data ID. + +=back + +=head1 SEE ALSO + +bsspadmin(1), bssprc(5), zco(3) diff -Nru ion-3.2.0~dfsg1/bssp/doc/pod5/bssprc.pod ion-3.2.1+dfsg/bssp/doc/pod5/bssprc.pod --- ion-3.2.0~dfsg1/bssp/doc/pod5/bssprc.pod 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/doc/pod5/bssprc.pod 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,189 @@ +=head1 NAME + +bssprc - Bundle Streaming Service Protocol management commands file + +=head1 DESCRIPTION + +BSSP management commands are passed to B either in a file of +text lines or interactively at B's command prompt (:). Commands +are interpreted line-by line, with exactly one command per line. The formats +and effects of the BSSP management commands are described below. + +=head1 COMMANDS + +=over 4 + +=item B + +The B command. This will display a listing of the commands and their +formats. It is the same as the B command. + +=item B<#> + +Comment line. Lines beginning with B<#> are not interpreted. + +=item B { 1 | 0 } + +Echo control. Setting echo to 1 causes all output printed by bsspadmin to be +logged as well as sent to stdout. Setting echo to 0 disables this behavior. + +=item B + +Version number. Prints out the version of ION currently installed. HINT: +combine with B command to log the version number at startup. + +=item B<1> I + +The B command. Until this command is executed, BSSP is not +in operation on the local ION node and most I commands will fail. + +The command uses I to configure the hashtable it +will use to manage access to transmission sessions that are currently +in progress. For optimum performance, I should +normally equal or exceed the summation of I over all +spans as discussed below. + +=item B I I I 'I' 'I [I] + +The B command. This command declares that a I of potential +BSSP data interchange exists between the local BSSP engine and the indicated +(neighboring) BSSP engine. + +The I is expressed as a number of bytes of data. +I is used to configure transmission buffer sizes; as such, it +limits client data item size. + +I constitutes, in effect, the local BSSP engine's +retransmission "window" for this span. The retransmission windows of the +spans impose flow control on BSSP transmission, reducing the chance ofx +allocation of all available space in the ION node's data store to BSSP +transmission sessions. + +I is script text that will be executed when BSSP is started on +this node, to initiate operation of the best-efforts transmission channel task +for this span. Note that " I" will automatically be +appended to I by B before the command is executed, +so only the link-service-specific portion of the command should be provided +in the I string itself. + +I is script text that will be executed when BSSP is started on +this node, to initiate operation of the reliable transmission channel task +for this span. Note that " I" will automatically be +appended to I by B before the command is executed, +so only the link-service-specific portion of the command should be provided +in the I string itself. + +I is the estimated number of seconds that we expect to lapse +between reception of a segment at this node and transmission of an +acknowledging segment, due to processing delay in the node. (See the +'m ownqtime' command below.) The default value is 1. + +If I a negative number, the absolute value of this number +is used as the actual queuing latency and session purging is enabled; +otherwise session purging is disabled. If session purging is enabled +for a span then at the end of any period of transmission over this span +all of the span's export sessions that are currently in progress are +automatically canceled. Notionally this forces re-forwarding of the DTN +bundles in each session's block, to avoid having to wait for the restart +of transmission on this span before those bundles can be successfully +transmitted. + +=item B I I I 'I' 'I [I] + +The B command. This command sets the indicated span's +configuration parameters to the values provided as arguments. + +=item B I + +The B command. This command deletes the span identified +by I. The command will fail if any outbound segments +for this span are pending transmission or any inbound blocks from the +peer engine are incomplete. + +=item B I + +This command will print information (all configuration parameters) +about the span identified by I. + +=item B + +This command lists all declared BSSP data interchange spans. + +=item B 'I' 'I' + +The B command. This command starts reliable and best-efforts link +service output tasks for all BSSP spans (to remote engines) from the local +BSSP engine, and it starts the reliable and best-efforts link service input +tasks for the local engine. + +=item B I + +The B command. This command sets the number of +seconds of predicted additional latency attributable to processing delay +within the local engine itself that should be included whenever BSSP computes +the nominal round-trip time for an exchange of data with any remote engine. +The default value is 1. + +=item B + +The B command. This command stops all link service input and output +tasks for the local BSSP engine. + +=item B { 0 | 1 | } + +The B command. This command enables and disables production of +a continuous stream of user-selected BSSP activity indication characters. A +watch parameter of "1" selects all BSSP activity indication characters; "0" +de-selects all BSSP activity indication characters; any other I +such as "df=" selects all activity indication characters in the string, +de-selecting all others. BSSP will print each selected activity indication +character to B every time a processing event of the associated type +occurs: + +B bssp send completed + +B bssp block constructed for issuance + +B bssp block issued + +B bssp block popped from best-efforts transmission queue + +B positive ACK received for bssp block, session ended + +B bssp block received + +B bssp block popped from reliable transmission queue + +B<=> unacknowledged best-efforts block requeued for reliable transmission + +B<{> session canceled locally by sender + +=item B + +The B command. This will display a listing of the commands and their +formats. It is the same as the B command. + +=back + +=head1 EXAMPLES + +=over 4 + +=item a span 19 20 4096 'udpbso node19.ohio.edu:5001' 'tcpbso node19.ohio.edu:5001' + +Declares a data interchange span between the local BSSP engine and the remote +engine (ION node) numbered 19. There can be at most 20 concurrent sessions +of BSSP transmission activity to this node. Maximum block size for this span +is set to 4096 bytes, and the best-efforts and reliable link service +output tasks that are initiated when BSSP is started on the local ION node +will execute the I and I programs as indicated. + +=item m ownqtime 2 + +Sets local queuing delay allowance to 2 seconds. + +=back + +=head1 SEE ALSO + +bsspadmin(1), udpbsi(1), udpbso(1), tcpbsi(1), tcpbso(1) diff -Nru ion-3.2.0~dfsg1/bssp/i86_64-fedora/Makefile ion-3.2.1+dfsg/bssp/i86_64-fedora/Makefile --- ion-3.2.0~dfsg1/bssp/i86_64-fedora/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/i86_64-fedora/Makefile 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,103 @@ +API = ../library +INCL = ../include +UTILS = ../utils +DAEMON = ../daemon +UDP = ../udp +TCP = ../tcp + +# OPT = -O -Dlinux +OPT = -g -Wall -Werror -Dlinux -fPIC -DSPACE_ORDER=3 +CC = gcc $(OPT) -I$(API) -I$(INCL) -I$(UDP) -I$(TCP) -I$(ROOT)/include +LDFLAGS = -fPIC -shared +LD = gcc $(LDFLAGS) + +PUBINCLS = \ + $(INCL)/bssp.h + +LTPINCLS = \ + $(API)/bsspP.h \ + $(UDP)/udpbsa.h \ + $(TCP)/tcpbsa.h + +RUNTIMES = bsspadmin bsspclock udpbso udpbsi tcpbso tcpbsi + +ALL = check libbsspP.so libbssp.so libtcpbsa.so $(RUNTIMES) + +all: $(ALL) + +check: $(LTPINCLS) $(PUBINCLS) + rm -f *.o + touch check + +clean: + rm -f *.o + rm -f $(ALL) + rm -f ./lib/* + rm -f ./bin/* + +install: + cp ../include/* $(ROOT)/include + cp lib/* $(ROOT)/lib + cp bin/* $(ROOT)/bin + +# - - Daemon executables - - - - + +bsspclock: bsspclock.o libbsspP.so + $(CC) -o bsspclock bsspclock.o -L./lib -L$(ROOT)/lib -lbsspP -lici -lpthread + cp bsspclock ./bin + +# - - Utility executables - - - - + +bsspadmin: bsspadmin.o libbsspP.so + $(CC) -o bsspadmin bsspadmin.o -L./lib -L$(ROOT)/lib -lbssp -lbsspP -lici -lpthread + cp bsspadmin ./bin + +# - - UDP executables - - - - - + +udpbsi: udpbsi.o libbsspP.so + $(CC) -o udpbsi udpbsi.o -L./lib -L$(ROOT)/lib -lbsspP -lici -lpthread + cp udpbsi ./bin + +udpbso: udpbso.o libbsspP.so + $(CC) -o udpbso udpbso.o -L./lib -L$(ROOT)/lib -lbsspP -lici -lpthread + cp udpbso ./bin + +# - - TCP executables- - - - - +tcpbsi: tcpbsi.o libbsspP.so + $(CC) -o tcpbsi tcpbsi.o -L./lib -L$(ROOT)/lib -ltcpbsa -lbsspP -lici -lpthread + cp tcpbsi ./bin + +tcpbso: tcpbso.o libbsspP.so + $(CC) -o tcpbso tcpbso.o -L./lib -L$(ROOT)/lib -ltcpbsa -lbsspP -lici -lpthread + cp tcpbso ./bin + +# - - Libraries - - - - - + +libbsspP.so: libbsspP.o + $(LD) -o libbsspP.so libbsspP.o + cp libbsspP.so ./lib + +libbssp.so: libbssp.o + $(LD) -o libbssp.so libbssp.o + cp libbssp.so ./lib + +libtcpbsa.so: libtcpbsa.o + $(LD) -o libtcpbsa.so libtcpbsa.o + cp libtcpbsa.so ./lib + +# - - Object modules - - - - - + +%.o: $(API)/%.c + $(CC) -c $< + +%.o: $(UTILS)/%.c + $(CC) -c $< + +%.o: $(DAEMON)/%.c + $(CC) -c $< + +%.o: $(UDP)/%.c + $(CC) -c $< + +%.o: $(TCP)/%.c + $(CC) -c $< diff -Nru ion-3.2.0~dfsg1/bssp/i86-mingw/Makefile ion-3.2.1+dfsg/bssp/i86-mingw/Makefile --- ion-3.2.0~dfsg1/bssp/i86-mingw/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/i86-mingw/Makefile 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,100 @@ +API = ../library +INCL = ../include +UTILS = ../utils +DAEMON = ../daemon +UDP = ../udp +TCP = ../tcp + +OPT = -g -Wall -Dmingw +CC = gcc $(OPT) -I$(API) -I$(INCL) -I$(UDP) -I$(TCP) -I$(ROOT)/include +LDFLAGS = -fPIC -shared +LD = gcc $(LDFLAGS) + +PUBINCLS = \ + $(INCL)/bssp.h + +LTPINCLS = \ + $(API)/bsspP.h \ + $(UDP)/udpbsa.h \ + $(TCP)/tcpbsa.h + +RUNTIMES = bsspadmin bsspclock udpbso udpbsi tcpbso tcpbsi + +ALL = check libbssp.dll libtcpbsa.dll $(RUNTIMES) + +all: $(ALL) + +check: $(LTPINCLS) $(PUBINCLS) + rm -f *.o + touch check + +clean: + rm -f *.o + rm -f *.exe + rm -f $(ALL) + rm -f ./lib/* + rm -f ./bin/* + +install: + cp ../include/* $(ROOT)/include + cp lib/* $(ROOT)/lib + cp bin/* $(ROOT)/bin + +# - - Daemon executables - - - - + +bsspclock: bsspclock.o libbssp.dll + $(CC) -o bsspclock bsspclock.o -L./lib -L$(ROOT)/lib -lbssp -lici -lpthread + cp bsspclock ./bin + +# - - Utility executables - - - - + +bsspadmin: bsspadmin.o libbssp.dll + $(CC) -o bsspadmin bsspadmin.o -L./lib -L$(ROOT)/lib -lbssp -lbssp -lici -lpthread + cp bsspadmin ./bin + +# - - UDP executables - - - - - + +udpbsi: udpbsi.o libbssp.dll + $(CC) -o udpbsi udpbsi.o -L./lib -L$(ROOT)/lib -lbssp -lici -lpthread -lws2_32 + cp udpbsi ./bin + +udpbso: udpbso.o libbssp.dll + $(CC) -o udpbso udpbso.o -L./lib -L$(ROOT)/lib -lbssp -lici -lpthread -lws2_32 + cp udpbso ./bin + +# - - TCP executables- - - - - + +tcpbsi: tcpbsi.o libbssp.dll + $(CC) -o tcpbsi tcpbsi.o -L./lib -L$(ROOT)/lib -ltcpbsa -lbssp -lici -lpthread -lws2_32 + cp tcpbsi ./bin + +tcpbso: tcpbso.o libbssp.dll + $(CC) -o tcpbso tcpbso.o -L./lib -L$(ROOT)/lib -ltcpbsa -lbssp -lici -lpthread -lws2_32 + cp tcpbso ./bin + +# - - Libraries - - - - - + +libbssp.dll: libbsspP.o libbssp.o + $(LD) -o libbssp.dll libbsspP.o libbssp.o -L$(ROOT)/lib -lici -lpthread + cp libbssp.dll ./lib + +libtcpbsa.dll: libtcpbsa.o + $(LD) -o libtcpbsa.dll libtcpbsa.o -L./lib -L$(ROOT)/lib -lbssp -lici -lpthread -lws2_32 + cp libtcpbsa.dll ./lib + +# - - Object modules - - - - - + +%.o: $(API)/%.c + $(CC) -c $< + +%.o: $(UTILS)/%.c + $(CC) -c $< + +%.o: $(DAEMON)/%.c + $(CC) -c $< + +%.o: $(UDP)/%.c + $(CC) -c $< + +%.o: $(TCP)/%.c + $(CC) -c $< diff -Nru ion-3.2.0~dfsg1/bssp/i86-redhat/Makefile ion-3.2.1+dfsg/bssp/i86-redhat/Makefile --- ion-3.2.0~dfsg1/bssp/i86-redhat/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/i86-redhat/Makefile 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,103 @@ +API = ../library +INCL = ../include +UTILS = ../utils +DAEMON = ../daemon +UDP = ../udp +TCP = ../tcp + +# OPT = -O -Dlinux +OPT = -g -Wall -Werror -Dlinux +CC = gcc $(OPT) -I$(API) -I$(INCL) -I$(UDP) -I$(TCP) -I$(ROOT)/include +LDFLAGS = -fPIC -shared -rdynamic +LD = gcc $(LDFLAGS) + +PUBINCLS = \ + $(INCL)/bssp.h + +LTPINCLS = \ + $(API)/bsspP.h \ + $(UDP)/udpbsa.h \ + $(TCP)/tcpbsa.h + +RUNTIMES = bsspadmin bsspclock udpbso udpbsi tcpbso tcpbsi + +ALL = check libbsspP.so libbssp.so libtcpbsa.so $(RUNTIMES) + +all: $(ALL) + +check: $(LTPINCLS) $(PUBINCLS) + rm -f *.o + touch check + +clean: + rm -f *.o + rm -f $(ALL) + rm -f ./lib/* + rm -f ./bin/* + +install: + cp ../include/* $(ROOT)/include + cp lib/* $(ROOT)/lib + cp bin/* $(ROOT)/bin + +# - - Daemon executables - - - - + +bsspclock: bsspclock.o libbsspP.so + $(CC) -o bsspclock bsspclock.o -L./lib -L$(ROOT)/lib -lbsspP -lici -lpthread + cp bsspclock ./bin + +# - - Utility executables - - - - + +bsspadmin: bsspadmin.o libbsspP.so + $(CC) -o bsspadmin bsspadmin.o -L./lib -L$(ROOT)/lib -lbssp -lbsspP -lici -lpthread + cp bsspadmin ./bin + +# - - UDP executables - - - - - + +udpbsi: udpbsi.o libbsspP.so + $(CC) -o udpbsi udpbsi.o -L./lib -L$(ROOT)/lib -lbsspP -lici -lpthread + cp udpbsi ./bin + +udpbso: udpbso.o libbsspP.so + $(CC) -o udpbso udpbso.o -L./lib -L$(ROOT)/lib -lbsspP -lici -lpthread + cp udpbso ./bin + +# - - TCP executables- - - - - +tcpbsi: tcpbsi.o libbsspP.so + $(CC) -o tcpbsi tcpbsi.o -L./lib -L$(ROOT)/lib -ltcpbsa -lbsspP -lici -lpthread + cp tcpbsi ./bin + +tcpbso: tcpbso.o libbsspP.so + $(CC) -o tcpbso tcpbso.o -L./lib -L$(ROOT)/lib -ltcpbsa -lbsspP -lici -lpthread + cp tcpbso ./bin + +# - - Libraries - - - - - + +libbsspP.so: libbsspP.o + $(LD) -o libbsspP.so libbsspP.o + cp libbsspP.so ./lib + +libbssp.so: libbssp.o + $(LD) -o libbssp.so libbssp.o + cp libbssp.so ./lib + +libtcpbsa.so: libtcpbsa.o + $(LD) -o libtcpbsa.so libtcpbsa.o + cp libtcpbsa.so ./lib + +# - - Object modules - - - - - + +%.o: $(API)/%.c + $(CC) -c $< + +%.o: $(UTILS)/%.c + $(CC) -c $< + +%.o: $(DAEMON)/%.c + $(CC) -c $< + +%.o: $(UDP)/%.c + $(CC) -c $< + +%.o: $(TCP)/%.c + $(CC) -c $< diff -Nru ion-3.2.0~dfsg1/bssp/include/bssp.h ion-3.2.1+dfsg/bssp/include/bssp.h --- ion-3.2.0~dfsg1/bssp/include/bssp.h 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/include/bssp.h 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,110 @@ +/* + * bssp.h: definitions supporting the implementation of BSSP + * (Bundle Streaming Service Protocol) application software. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ + +#include "platform.h" +#include "ion.h" +#include "sdr.h" + +#ifndef _BSSP_H_ +#define _BSSP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + uvast sourceEngineId; + unsigned int sessionNbr; /* Assigned by source. */ +} BsspSessionId; + +/* * * BSSP initialization * * * */ + +extern int bssp_attach(); + +extern void bssp_detach(); + +extern int bssp_engine_is_started(); + /* Returns 1 if the local BSSP engine has been + * started and not yet stopped, 0 otherwise. */ + +/* * * BSSP data transmission * * * */ + +extern int bssp_send(uvast destinationEngineId, + unsigned int clientId, + Object clientServiceData, + int inOrder, + BsspSessionId *sessionId); + + /* clientServiceData must be a "zero-copy object" + * reference as returned by zco_create(). Note + * that BSSP will privately make and destroy its + * own reference to the client service data; the + * application is free to destroy its reference + * at any time. The inOrder parameter is a + * Boolean variable indicating whether or not + * the service data item that is being sent is + * "in order", i.e., was originally transmitted + * after all items that have previously been + * sent to this destination by this local BSSP + * engine: 0 if no (meaning that the item must + * be transmitted using the "reliable" channel), + * 1 if yes (meaning that the item must be + * transmitted using the "best-efforts" channel). + */ + +/* * * BSSP data reception * * * */ + +typedef enum +{ + BsspNoNotice = 0, + BsspXmitSuccess, + BsspXmitFailure, + BsspRecvSuccess +} BsspNoticeType; + +extern int bssp_open(unsigned int clientId); + +extern int bssp_get_notice(unsigned int clientId, + BsspNoticeType *type, + BsspSessionId *sessionId, + unsigned char *reasonCode, + unsigned int *dataLength, + Object *data); + /* The value returned in *data is always a zero- + * copy object; use the zco_* functions defined + * in "zco.h" to retrieve the content of that + * object. + * + * When the notice is a BsspRecvSuccess, the ZCO + * returned in *data contains the content of a + * single BSSP block. + * + * The cancellation of an export session results + * in delivery of a BsspXmitFailure notice. In + * this case, the ZCO returned in *data is a + * service data unit that had previously beenx + * passed to the bssp_send function. */ + +extern void bssp_interrupt(unsigned int clientId); + +extern void bssp_release_data(Object data); + +extern void bssp_close(unsigned int clientId); + +#ifdef __cplusplus +} +#endif + +#endif diff -Nru ion-3.2.0~dfsg1/bssp/library/bsspP.h ion-3.2.1+dfsg/bssp/library/bsspP.h --- ion-3.2.0~dfsg1/bssp/library/bsspP.h 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/library/bsspP.h 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,352 @@ +/* + * bsspP.h: private definitions supporting the implementation + * of BSSP (Bundle Streaming Service Protocol) engines. + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + * Author: Sotirios-Angelos Lenas, Space Internetworking Center + */ + +#include "rfx.h" +#include "lyst.h" +#include "smlist.h" +#include "zco.h" +#include "bssp.h" +#include "sdrhash.h" + +#ifndef _BSSPP_H_ +#define _BSSPP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define BSSP_MAX_NBR_OF_CLIENTS 8 +#ifndef BSSP_MEAN_SEARCH_LENGTH +#define BSSP_MEAN_SEARCH_LENGTH 4 +#endif +#define MAX_BSSP_CLIENT_NBR (BSSP_MAX_NBR_OF_CLIENTS - 1) + +/* BSSP block structure definitions. */ + +#define BSSP_ACK_FLAG 0x01 + +typedef enum +{ + BsspDs = 0, + BsspAck +} BsspBlkTypeCode; + +typedef enum +{ + BsspTimerSuspended=0, + BsspTimerRunning +} BsspTimerState; + +typedef struct +{ + time_t pduArrivalTime; + time_t ackDeadline; + BsspTimerState state; +} BsspTimer; + +typedef enum +{ + BsspCancelByUser = 0, + //BsspClientSvcUnreachable, //Note, I'm not sure if we actually need something like this + BsspRetransmitLimitExceeded, + BsspCancelByEngine +} BsspCancelReasonCode; + +typedef struct +{ + BsspBlkTypeCode blkTypeCode; + + /* Fields used for multiple segment classes. */ + + BsspTimer timer; /* Checkpoint or report. */ + + /* Fields for data blocks. */ + + unsigned int clientSvcId; /* Destination. */ + unsigned int length; + Object svcData;/* Session svcDataObjects. */ + + /* Fields for management blocks. */ + + BsspCancelReasonCode reasonCode; +} BsspPdu; + +typedef enum +{ + BsspData, + BsspAckn +} BsspPduClass; + +/* An BsspRecvBlk encapsulates a block that has been acquired + * by the local BSSP engine, for handling. + */ + +typedef struct +{ + Object sessionObj; + Object sessionListElt; + BsspPduClass pduClass; + BsspPdu pdu; +} BsspRecvBlk; + +/* An BsspXmitBlock encapsulates a block that has been produced + * by the local BSSP engine, for transmission. + */ + +typedef struct +{ + unsigned int sessionNbr; + uvast remoteEngineId; + short ohdLength; + Object queueListElt; + Object sessionObj; + BsspPduClass pduClass; + BsspPdu pdu; +} BsspXmitBlock; + +/* Session structures */ + +typedef struct +{ + Object span; /* Transmission span. */ + unsigned int sessionNbr; /* Assigned by self. */ + Sdnv sessionNbrSdnv; + unsigned int clientSvcId; + Sdnv clientSvcIdSdnv; + int totalLength; + BsspTimer timer; /* For cancellation. */ + int reasonCode; /* For cancellation. */ + Object svcDataObject; /* ZCO */ + Object block; /* BsspXmitBlock */ +} ExportSession; + +/* Timeline event structure */ + +typedef enum +{ + BsspResendBlock = 1, +} BsspEventType; + +typedef struct +{ + uvast refNbr1; /* Engine ID. */ + unsigned int refNbr2; /* Session number. */ + Object parm; /* Non-specific use. */ + time_t scheduledTime; /* Seconds since Jan 1970. */ + BsspEventType type; +} BsspEvent; + +/* Span structure characterizing the communication span between the + * local engine and some remote engine. Note that a single BSSP span + * might be serviced by multiple communication links, e.g., simultaneous + * S-band and Ka-band transmission. */ + +typedef struct +{ + uvast engineId; /* ID of remote engine. */ + Sdnv engineIdSdnv; + unsigned int remoteQtime; /* In seconds. */ + unsigned int maxExportSessions; + int purge; /* Boolean. */ + Object bsoBECmd; /* Starts Best Effort BSO. */ + Object bsoRLCmd; /* Starts Reliable BSO. */ + unsigned int maxBlockSize; /* Bytes */ + Object currentExportSessionObj; + unsigned int lengthOfBufferedBlock; + unsigned int clientSvcIdOfBufferedBlock; + Object exportSessions; + + Object beBlocks; /* SDR list of BsspXmitBlocks + enqueued for best-effort + transmission */ + Object rlBlocks; /* SDR list of BsspXmitBlocks + enqueued for reliable + transmission */ +} BsspSpan; + + +/* The volatile span object encapsulates the current volatile state + * of the corresponding BsspSpan. */ + +typedef struct +{ + Object spanElt; /* Reference to BsspSpan. */ + uvast engineId; /* ID of remote engine. */ + unsigned int localXmitRate; /* Bytes per second. */ + unsigned int remoteXmitRate; /* Bytes per second. */ + unsigned int owltInbound; /* In seconds. */ + unsigned int owltOutbound; /* In seconds. */ + int bsoBEPid; /* Stops best-effort BSO. */ + int bsoRLPid; /* Stops reliable BSO. */ + + /* * * Work area * * * */ + + PsmAddress beBuffer; /* Holds 1 max-size block. */ + PsmAddress rlBuffer; /* Holds 1 max-size block. */ + + /* The blockSemaphore of a BsspVspan is given by the + * sendBlock function every time an outbound block is + * enqueued for transmission over this span. This + * signifies that the BSO task may now obtain a block + * from the BsspSpan's blocks list and transmit it + * -- thus eliminating polling from BSSP transmission + * processing. The bsspDequeueOutboundBlock function + * takes this semaphore before the BSO task proceeds to + * transmit the block via its link service protocol. */ + + sm_SemId bufOpenSemaphore; + + sm_SemId beSemaphore; /* For best-effort xmit of + outbound blocks. */ + sm_SemId rlSemaphore; /* For reliable xmit of + outbound blocks. */ +} BsspVspan; + +/* Client and notice structures */ + +typedef struct +{ + BsspSessionId sessionId; + unsigned int dataLength; + BsspNoticeType type; + unsigned char reasonCode; + Object data; /* To be serialized. */ +} BsspNotice; + +typedef struct +{ + Object notices; /* SDR list of LtpNotices */ +} BsspClient; + +/* The volatile client object encapsulates the current volatile state + * of the corresponding LtpClient. */ + +typedef struct +{ + Object notices; /* Copied from BsspClient. */ + int pid; + sm_SemId semaphore; /* For notices. */ +} BsspVclient; + +/* Database structure */ + +typedef struct +{ + uvast ownEngineId; + Sdnv ownEngineIdSdnv; + BsspClient clients[BSSP_MAX_NBR_OF_CLIENTS]; + int estMaxExportSessions; + unsigned int ownQtime; + unsigned int sessionCount; + Object exportSessionsHash; + + Object spans; /* SDR list: BsspSpan */ + Object timeline; /* SDR list: BsspEvent */ + /* A catalogue that logs all the pairs of + * node-service numbers and the latest + * creation of each pair forwarded by + * BSSP-CL */ +} BsspDB; + +/* The volatile database object encapsulates the current volatile + * state of the database. */ + +/* "Watch" switches for BSSP operation. */ +#define WATCH_d (1) /* bssp send completed */ +#define WATCH_e (2) /* costructDataBlk */ +#define WATCH_f (4) /* xmitBlock issuance */ +#define WATCH_g (8) /* DequeueBEOutboundBlock */ +#define WATCH_h (16) /* HandleAck */ +#define WATCH_s (32) /* HandleInbound */ +#define WATCH_t (64) /* DequeueRLOutboundBlock */ +#define WATCH_CS (128) /* cancel Session by Sender */ +#define WATCH_resendBlk (256) /* bssp resend xmitBlock "=" */ + + +typedef struct +{ + uvast ownEngineId; + int beBsiPid; /* Stops best-effort BSI. */ + int rlBsiPid; /* Stops the reliable BSI. */ + int clockPid; /* For stopping bsspclock. */ + int watching; /* Boolean activity watch. */ + PsmAddress spans; /* SM list: BsspVspan* */ + BsspVclient clients[BSSP_MAX_NBR_OF_CLIENTS]; +} BsspVdb; + +extern int bsspInit(); +extern void bsspDropVdb(); +extern void bsspRaiseVdb(); +extern int bsspStart(); +extern void bsspStop(); +extern int bsspAttach(); +extern void bsspDetach(); + +extern Object getBsspDbObject(); +extern BsspDB *getBsspConstants(); +extern BsspVdb *getBsspVdb(); + +extern void findSpan(uvast engineId, BsspVspan **vspan, + PsmAddress *vspanElt); +extern int addSpan(uvast engineId, + unsigned int maxExportSessions, + unsigned int maxBlockSize, + char *bsoBECmd, char *bsoRLCmd, + unsigned int qTime, int purge); +extern int updateSpan(uvast engineId, + unsigned int maxExportSessions, + unsigned int maxBlockSize, + char *bsoBECmd, char *bsoRLCmd, + unsigned int qTime, int purge); +extern int removeSpan(uvast engineId); + +extern int bsspStartSpan(uvast engineId); +extern void bsspStopSpan(uvast engineId); + +extern int startExportSession(Sdr sdr, Object spanObj, + BsspVspan *vspan); + +extern int issueXmitBlock(Sdr sdr, BsspSpan *span, + BsspVspan *vspan, ExportSession *session, + Object sessionObj, int inOrder); + +extern int bsspAttachClient(unsigned int clientSvcId); +extern void bsspDetachClient(unsigned int clientSvcId); + +extern int enqueueNotice(BsspVclient *client, + uvast sourceEngineId, + unsigned int sessionNbr, + unsigned int dataLength, + BsspNoticeType type, + unsigned char reasonCode, + Object data); + +extern int bsspDequeueBEOutboundBlock(BsspVspan *vspan, + char **buf); +extern int bsspDequeueRLOutboundBlock(BsspVspan *vspan, + char **buf); +extern int bsspHandleInboundBlock(char *buf, int length); + +extern void bsspStartXmit(BsspVspan *vspan); +extern void bsspStopXmit(BsspVspan *vspan); +extern int bsspSuspendTimers(BsspVspan *vspan, PsmAddress vspanElt, + time_t suspendTime, unsigned int priorXmitRate); +extern int bsspResumeTimers(BsspVspan *vspan, PsmAddress vspanElt, + time_t resumeTime, unsigned int remoteXmitRate); + +extern int bsspResendBlock(unsigned int sessionNbr); +#ifdef __cplusplus +} +#endif + +#endif diff -Nru ion-3.2.0~dfsg1/bssp/library/libbssp.c ion-3.2.1+dfsg/bssp/library/libbssp.c --- ion-3.2.0~dfsg1/bssp/library/libbssp.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/library/libbssp.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,308 @@ +/* + * libbssp.c: functions enabling the implementation of + * BSSP applications. + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + * Author: Sotirios-Angelos Lenas, Space Internetworking Center + */ + +#include "bsspP.h" + +int bssp_attach() +{ + return bsspAttach(); +} + +void bssp_detach() +{ +#if (!(defined (VXWORKS) || defined (RTEMS) || defined (bionic))) + bsspDetach(); +#endif + ionDetach(); +} + +int bssp_engine_is_started() +{ + BsspVdb *vdb = getBsspVdb(); + + return (vdb && vdb->clockPid != ERROR); +} + +int bssp_send(uvast destinationEngineId, unsigned int clientSvcId, + Object clientServiceData, int inOrder, BsspSessionId *sessionId) +{ + BsspVdb *vdb = getBsspVdb(); + Sdr sdr = getIonsdr(); + BsspVspan *vspan; + PsmAddress vspanElt; + unsigned int dataLength; + Object spanObj; + BsspSpan span; + ExportSession session; + int blockIssued; + + CHKERR(clientSvcId <= MAX_BSSP_CLIENT_NBR); + CHKERR(clientServiceData); + CHKERR(inOrder == 0 || inOrder == 1); + CHKERR(sessionId); + CHKERR(sdr_begin_xn(sdr)); + findSpan(destinationEngineId, &vspan, &vspanElt); + if (vspanElt == 0) + { + sdr_exit_xn(sdr); + putErrmsg("Destination BSSP engine unknown.", + utoa(destinationEngineId)); + return -1; + } + + dataLength = zco_length(sdr, clientServiceData); + spanObj = sdr_list_data(sdr, vspan->spanElt); + sdr_stage(sdr, (char *) &span, spanObj, sizeof(BsspSpan)); + + /* Every service data unit is encapculated * + * into a single block. */ + + while (1) + { + if (span.currentExportSessionObj) + { + /* Span has been initialized with a + * pdu buffer (block) into which + * service data can be inserted. */ + + if (sdr_list_length(sdr, span.exportSessions) + < span.maxExportSessions) + { + break; /* Out of loop. */ + } + + } + + /* currentExportSessionObj not initialiazed * + * yet or this is an overlimit export session. * + * Must wait for one to be released. */ + + sdr_exit_xn(sdr); + if (sm_SemTake(vspan->bufOpenSemaphore) < 0) + { + putErrmsg("Can't take buffer open semaphore.", + itoa(vspan->engineId)); + return -1; + } + + if (sm_SemEnded(vspan->bufOpenSemaphore)) + { + putErrmsg("Span has been stopped.", + itoa(vspan->engineId)); + return 0; + } + + CHKERR(sdr_begin_xn(sdr)); + sdr_stage(sdr, (char *) &span, spanObj, sizeof(BsspSpan)); + } + + /* Now append the outbound SDU to the block that is * + * currently being available for this span and give * + * the span's be/rl Semaphore. */ + sdr_stage(sdr, (char *) &session, span.currentExportSessionObj, + sizeof(ExportSession)); + session.svcDataObject = clientServiceData; + span.clientSvcIdOfBufferedBlock = clientSvcId; + span.lengthOfBufferedBlock += dataLength; + sdr_write(sdr, spanObj, (char *) &span, sizeof(BsspSpan)); + session.clientSvcId = span.clientSvcIdOfBufferedBlock; + encodeSdnv(&(session.clientSvcIdSdnv), session.clientSvcId); + session.totalLength = span.lengthOfBufferedBlock; + + blockIssued = issueXmitBlock(sdr, &span, vspan, &session, + span.currentExportSessionObj, inOrder); + switch (blockIssued) + { + case -1: /* System error. */ + putErrmsg("Can't issue block.", NULL); + sdr_cancel_xn(sdr); + return -1; + + case 0: /* Database too full. */ + sdr_cancel_xn(sdr); + return 0; + } + + /* xmitBlock issuance succeeded. */ + + if (vdb->watching & WATCH_f) + { + putchar('f'); + fflush(stdout); + } + /* Commit changes to current session to the + * database. */ + + sdr_write(sdr, span.currentExportSessionObj, (char *) &session, + sizeof(ExportSession)); + + /* Reinitialize span's block buffer. */ + + span.lengthOfBufferedBlock = 0; + span.clientSvcIdOfBufferedBlock = 0; + span.currentExportSessionObj = 0; + sdr_write(sdr, spanObj, (char *) &span, sizeof(BsspSpan)); + + /* Start an export session for the next block. */ + + if (startExportSession(sdr, spanObj, vspan) < 0) + { + putErrmsg("bssp_send can't start new session.", + utoa(destinationEngineId)); + return -1; + } + + if (vdb->watching & WATCH_d) + { + putchar('d'); + fflush(stdout); + } + + if (sdr_end_xn(sdr)) + { + putErrmsg("Can't send data.", NULL); + return -1; + } + + sessionId->sourceEngineId = vdb->ownEngineId; + sessionId->sessionNbr = session.sessionNbr; + return 1; +} + +int bssp_open(unsigned int clientSvcId) +{ + return bsspAttachClient(clientSvcId); +} + +int bssp_get_notice(unsigned int clientSvcId, BsspNoticeType *type, + BsspSessionId *sessionId, unsigned char *reasonCode, + unsigned int *dataLength, Object *data) +{ + Sdr sdr = getIonsdr(); + BsspVdb *vdb = getBsspVdb(); + BsspVclient *client; + Object elt; + Object noticeAddr; + BsspNotice notice; + + CHKERR(clientSvcId <= MAX_BSSP_CLIENT_NBR); + CHKERR(type); + CHKERR(sessionId); + CHKERR(reasonCode); + CHKERR(dataLength); + CHKERR(data); + *type = BsspNoNotice; /* Default. */ + CHKERR(sdr_begin_xn(sdr)); + client = vdb->clients + clientSvcId; + if (client->pid != sm_TaskIdSelf()) + { + sdr_exit_xn(sdr); + putErrmsg("Can't get notice: not owner of client service.", + itoa(client->pid)); + return -1; + } + + elt = sdr_list_first(sdr, client->notices); + if (elt == 0) + { + sdr_exit_xn(sdr); + + /* Wait until BSSP engine announces an event + * by giving the client's semaphore. */ + + if (sm_SemTake(client->semaphore) < 0) + { + putErrmsg("BSSP client can't take semaphore.", NULL); + return -1; + } + + if (sm_SemEnded(client->semaphore)) + { + writeMemo("[?] Client access terminated."); + + /* End task, but without error. */ + + return -1; + } + + CHKERR(sdr_begin_xn(sdr)); + elt = sdr_list_first(sdr, client->notices); + if (elt == 0) /* Function was interrupted. */ + { + sdr_exit_xn(sdr); + return 0; + } + } + + /* Got next inbound notice. Remove it from the queue + * for this client. */ + + noticeAddr = sdr_list_data(sdr, elt); + sdr_list_delete(sdr, elt, (SdrListDeleteFn) NULL, NULL); + sdr_read(sdr, (char *) ¬ice, noticeAddr, sizeof(BsspNotice)); + sdr_free(sdr, noticeAddr); + + /* Note that an ExportSessionCanceled notice may have + * associated data of zero. + */ + + if (sdr_end_xn(sdr)) + { + putErrmsg("Can't get inbound notice.", NULL); + return -1; + } + + *type = notice.type; + sessionId->sourceEngineId = notice.sessionId.sourceEngineId; + sessionId->sessionNbr = notice.sessionId.sessionNbr; + *reasonCode = notice.reasonCode; + *dataLength = notice.dataLength; + *data = notice.data; + return 0; +} + +void bssp_interrupt(unsigned int clientSvcId) +{ + BsspVdb *vdb; + BsspVclient *client; + + if (clientSvcId <= MAX_BSSP_CLIENT_NBR) + { + vdb = getBsspVdb(); + client = vdb->clients + clientSvcId; + if (client->semaphore != SM_SEM_NONE) + { + sm_SemGive(client->semaphore); + } + } +} + +void bssp_release_data(Object data) +{ + Sdr bsspSdr = getIonsdr(); + + if (data) + { + CHKVOID(sdr_begin_xn(bsspSdr)); + zco_destroy(bsspSdr, data); + if (sdr_end_xn(bsspSdr) < 0) + { + putErrmsg("Failed releasing BSSP notice object.", NULL); + } + } +} + +void bssp_close(unsigned int clientSvcId) +{ + bsspDetachClient(clientSvcId); +} diff -Nru ion-3.2.0~dfsg1/bssp/library/libbsspP.c ion-3.2.1+dfsg/bssp/library/libbsspP.c --- ion-3.2.0~dfsg1/bssp/library/libbsspP.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/library/libbsspP.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,2957 @@ +/* + * libbsspP.c: private functions enabling the implementation of + * BSSP engines. + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + * Author: Sotirios-Angelos Lenas, Space Internetworking Center + */ + +#include "bsspP.h" + +#define EST_LINK_OHD 16 + +#ifndef BSSPDEBUG +#define BSSPDEBUG 0 +#endif + +#define BSSP_VERSION 0; + +/* * * Helpful utility functions * * */ + +static Object _bsspdbObject(Object *newDbObj) +{ + static Object obj = 0; + + if (newDbObj) + { + obj = *newDbObj; + } + + return obj; +} + +static BsspDB *_bsspConstants() +{ + static BsspDB buf; + static BsspDB *db = NULL; + Sdr sdr; + Object dbObject; + + if (db == NULL) + { + /* Load constants into a conveniently accessed + * structure. Note that this CANNOT be treated + * as a current database image in later + * processing. */ + + sdr = getIonsdr(); + CHKNULL(sdr); + dbObject = _bsspdbObject(NULL); + if (dbObject) + { + if (sdr_heap_is_halted(sdr)) + { + sdr_read(sdr, (char *) &buf, dbObject, + sizeof(BsspDB)); + } + else + { + CHKNULL(sdr_begin_xn(sdr)); + sdr_read(sdr, (char *) &buf, dbObject, + sizeof(BsspDB)); + sdr_exit_xn(sdr); + } + + db = &buf; + } + } + + return db; +} + +/* * * BSSP service control functions * * */ + +static void resetClient(BsspVclient *client) +{ + if (client->semaphore == SM_SEM_NONE) + { + client->semaphore = sm_SemCreate(SM_NO_KEY, SM_SEM_FIFO); + } + else + { + sm_SemUnend(client->semaphore); + } + + sm_SemTake(client->semaphore); /* Lock. */ + client->pid = ERROR; /* None. */ +} + +static void raiseClient(BsspVclient *client) +{ + client->semaphore = SM_SEM_NONE; + resetClient(client); +} + +static void resetSpan(BsspVspan *vspan) +{ + if (vspan->bufOpenSemaphore == SM_SEM_NONE) + { + vspan->bufOpenSemaphore = sm_SemCreate(SM_NO_KEY, SM_SEM_FIFO); + } + else + { + sm_SemUnend(vspan->bufOpenSemaphore); + } + + sm_SemTake(vspan->bufOpenSemaphore); /* Lock. */ + if (vspan->beSemaphore == SM_SEM_NONE) + { + vspan->beSemaphore = sm_SemCreate(SM_NO_KEY, SM_SEM_FIFO); + } + else + { + sm_SemUnend(vspan->beSemaphore); + } + + sm_SemTake(vspan->beSemaphore); /* Lock. */ + if (vspan->rlSemaphore == SM_SEM_NONE) + { + vspan->rlSemaphore = sm_SemCreate(SM_NO_KEY, SM_SEM_FIFO); + } + else + { + sm_SemUnend(vspan->rlSemaphore); + } + + sm_SemTake(vspan->rlSemaphore); /* Lock. */ + vspan->bsoBEPid = ERROR; /* None. */ + vspan->bsoRLPid = ERROR; /* None. */ +} + +static int raiseSpan(Object spanElt, BsspVdb *bsspvdb) +{ + Sdr bsspSdr = getIonsdr(); + PsmPartition bsspwm = getIonwm(); + Object spanObj; + BsspSpan span; + BsspVspan *vspan; + PsmAddress vspanElt; + PsmAddress addr; + + spanObj = sdr_list_data(bsspSdr, spanElt); + sdr_read(bsspSdr, (char *) &span, spanObj, sizeof(BsspSpan)); + findSpan(span.engineId, &vspan, &vspanElt); + if (vspanElt) /* Span is already raised. */ + { + return 0; + } + + addr = psm_zalloc(bsspwm, sizeof(BsspVspan)); + if (addr == 0) + { + return -1; + } + + vspanElt = sm_list_insert_last(bsspwm, bsspvdb->spans, addr); + if (vspanElt == 0) + { + psm_free(bsspwm, addr); + return -1; + } + + vspan = (BsspVspan *) psp(bsspwm, addr); + memset((char *) vspan, 0, sizeof(BsspVspan)); + vspan->spanElt = spanElt; + vspan->engineId = span.engineId; + vspan->beBuffer = psm_malloc(bsspwm, span.maxBlockSize); + if (vspan->beBuffer == 0) + { + oK(sm_list_delete(bsspwm, vspanElt, NULL, NULL)); + psm_free(bsspwm, addr); + return -1; + } + + vspan->rlBuffer = psm_malloc(bsspwm, span.maxBlockSize); + if (vspan->rlBuffer == 0) + { + oK(sm_list_delete(bsspwm, vspanElt, NULL, NULL)); + psm_free(bsspwm, addr); + return -1; + } + + vspan->bufOpenSemaphore = SM_SEM_NONE; + vspan->beSemaphore = SM_SEM_NONE; + vspan->rlSemaphore = SM_SEM_NONE; + resetSpan(vspan); + return 0; +} + +static void dropSpan(BsspVspan *vspan, PsmAddress vspanElt) +{ + PsmPartition bsspwm = getIonwm(); + PsmAddress vspanAddr; + + vspanAddr = sm_list_data(bsspwm, vspanElt); + if (vspan->bufOpenSemaphore != SM_SEM_NONE) + { + sm_SemDelete(vspan->bufOpenSemaphore); + } + + if (vspan->beSemaphore != SM_SEM_NONE) + { + sm_SemDelete(vspan->beSemaphore); + } + + if (vspan->rlSemaphore != SM_SEM_NONE) + { + sm_SemDelete(vspan->rlSemaphore); + } + + psm_free(bsspwm, vspan->beBuffer); + psm_free(bsspwm, vspan->rlBuffer); + oK(sm_list_delete(bsspwm, vspanElt, NULL, NULL)); + psm_free(bsspwm, vspanAddr); +} + +Object getBsspDbObject() +{ + return _bsspdbObject(NULL); +} + +int startExportSession(Sdr sdr, Object spanObj, BsspVspan *vspan) +{ + Object dbobj; + BsspSpan span; + BsspDB bsspdb; + unsigned int sessionNbr; + Object sessionObj; + Object elt; + ExportSession session; + + CHKERR(vspan); + CHKERR(sdr_begin_xn(sdr)); + sdr_stage(sdr, (char *) &span, spanObj, sizeof(BsspSpan)); + + /* Get next session number. */ + + dbobj = getBsspDbObject(); + + sdr_stage(sdr, (char *) &bsspdb, dbobj, sizeof(BsspDB)); + bsspdb.sessionCount++; + sdr_write(sdr, dbobj, (char *) &bsspdb, sizeof(BsspDB)); + sessionNbr = bsspdb.sessionCount; + + /* Record the session object in the database. The + * exportSessions list element points to the session + * structure. exportSessionHash entry points to the + * list element. */ + + sessionObj = sdr_malloc(sdr, sizeof(ExportSession)); + if (sessionObj == 0 + || (elt = sdr_list_insert_last(sdr, span.exportSessions, + sessionObj)) == 0 + || sdr_hash_insert(sdr, bsspdb.exportSessionsHash, + (char *) &sessionNbr, elt, NULL) < 0) + { + putErrmsg("Can't start session.", NULL); + sdr_cancel_xn(sdr); + return -1; + } + + /* Populate session object in database. */ + + memset((char *) &session, 0, sizeof(ExportSession)); + session.span = spanObj; + session.sessionNbr = sessionNbr; + encodeSdnv(&(session.sessionNbrSdnv), session.sessionNbr); + session.svcDataObject = 0; + session.block = 0; + sdr_write(sdr, sessionObj, (char *) &session, sizeof(ExportSession)); + + /* Note session address in span, then finish: unless span + * is currently inactive (i.e., localXmitRate is currently + * zero), give the buffer-empty semaphore so that the + * pending service data object (if any) can be inserted + * into the buffer. */ + + span.currentExportSessionObj = sessionObj; + sdr_write(sdr, spanObj, (char *) &span, sizeof(BsspSpan)); + if (vspan->localXmitRate > 0) + { + sm_SemGive(vspan->bufOpenSemaphore); + } + if (sdr_end_xn(sdr)) + { + putErrmsg("Can't start session.", NULL); + return -1; + } + return 0; +} + +static void startSpan(BsspVspan *vspan) +{ + Sdr bsspSdr = getIonsdr(); + BsspSpan span; + Object spanObj; + char cmd[SDRSTRING_BUFSZ]; + char engineIdString[11]; + char bsoCmdString[SDRSTRING_BUFSZ + 64]; + + CHKVOID(sdr_begin_xn(bsspSdr)); + if (vspan->spanElt == 0) + { + putErrmsg("No such engine in database.", NULL); + return ; + } + + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + sdr_read(bsspSdr, (char *) &span, spanObj, sizeof(BsspSpan)); + + if (span.currentExportSessionObj == 0) /* New span. */ + { + /* Must start span's initial session. */ + sdr_exit_xn(bsspSdr); + if (startExportSession(bsspSdr, spanObj, vspan) < 0) + { + putErrmsg("Failed to initialize export session object.", + NULL); + } + + CHKVOID(sdr_begin_xn(bsspSdr)); + } + + sdr_string_read(bsspSdr, cmd, span.bsoBECmd); + isprintf(engineIdString, sizeof engineIdString, UVAST_FIELDSPEC, + span.engineId); + isprintf(bsoCmdString, sizeof bsoCmdString, "%s %s", cmd, + engineIdString); + vspan->bsoBEPid = pseudoshell(bsoCmdString); + + sdr_string_read(bsspSdr, cmd, span.bsoRLCmd); + isprintf(bsoCmdString, sizeof bsoCmdString, "%s %s", cmd, + engineIdString); + vspan->bsoRLPid = pseudoshell(bsoCmdString); + + sdr_exit_xn(bsspSdr); +} + +static void stopSpan(BsspVspan *vspan) +{ + if (vspan->bufOpenSemaphore != SM_SEM_NONE) + { + sm_SemEnd(vspan->bufOpenSemaphore); + } + + if (vspan->beSemaphore != SM_SEM_NONE) + { + sm_SemEnd(vspan->beSemaphore); + } + + if (vspan->rlSemaphore != SM_SEM_NONE) + { + sm_SemEnd(vspan->rlSemaphore); + } +} + +static void waitForSpan(BsspVspan *vspan) +{ + if (vspan->bsoBEPid != ERROR) + { + while (sm_TaskExists(vspan->bsoBEPid)) + { + microsnooze(100000); + } + } + + if (vspan->bsoRLPid != ERROR) + { + while (sm_TaskExists(vspan->bsoRLPid)) + { + microsnooze(100000); + } + } +} + +static char *_bsspvdbName() +{ + return "bsspvdb"; +} + +static BsspVdb *_bsspvdb(char **name) +{ + static BsspVdb *vdb = NULL; + + if (name) + { + if (*name == NULL) /* Terminating. */ + { + vdb = NULL; + return vdb; + } + + /* Attaching to volatile database. */ + + PsmPartition wm; + PsmAddress vdbAddress; + PsmAddress elt; + + wm = getIonwm(); + if (psm_locate(wm, *name, &vdbAddress, &elt) < 0) + { + putErrmsg("Failed searching for vdb.", NULL); + return vdb; + } + + if (elt) + { + vdb = (BsspVdb *) psp(wm, vdbAddress); + return vdb; + } + + /* BSSP volatile database doesn't exist yet. */ + Sdr sdr; + BsspDB *db; + Object sdrElt; + int i; + BsspVclient *client; + + sdr = getIonsdr(); + CHKNULL(sdr_begin_xn(sdr)); /* To lock memory. */ + + /* Create and catalogue the BsspVdb object. */ + + vdbAddress = psm_zalloc(wm, sizeof(BsspVdb)); + if (vdbAddress == 0) + { + sdr_exit_xn(sdr); + putErrmsg("No space for dynamic database.", NULL); + return NULL; + } + + db = _bsspConstants(); + vdb = (BsspVdb *) psp(wm, vdbAddress); + memset((char *) vdb, 0, sizeof(BsspVdb)); + vdb->ownEngineId = db->ownEngineId; + vdb->beBsiPid = ERROR; /* None yet. */ + vdb->rlBsiPid = ERROR; /* None yet. */ + vdb->clockPid = ERROR; /* None yet. */ + if ((vdb->spans = sm_list_create(wm)) == 0 + || psm_catlg(wm, *name, vdbAddress) < 0) + { + sdr_exit_xn(sdr); + putErrmsg("Can't initialize volatile database.", NULL); + return NULL; + } + + /* Raise all clients. */ + + for (i = 0, client = vdb->clients; i < BSSP_MAX_NBR_OF_CLIENTS; + i++, client++) + { + client->notices = db->clients[i].notices; + raiseClient(client); + } + + /* Raise all spans. */ + + for (sdrElt = sdr_list_first(sdr, db->spans); + sdrElt; sdrElt = sdr_list_next(sdr, sdrElt)) + { + if (raiseSpan(sdrElt, vdb) < 0) + { + sdr_exit_xn(sdr); + putErrmsg("Can't raise all spans.", NULL); + return NULL; + } + } + + sdr_exit_xn(sdr); /* Unlock memory. */ + } + + return vdb; +} + +static char *_bsspdbName() +{ + return "bsspdb"; +} + +int bsspInit(int estMaxExportSessions) +{ + Sdr bsspSdr; + Object bsspdbObject; + IonDB iondb; + BsspDB bsspdbBuf; + int i; + char *bsspvdbName = _bsspvdbName(); + if (ionAttach() < 0) + { + putErrmsg("BSSP can't attach to ION.", NULL); + return -1; + } + + bsspSdr = getIonsdr(); + srand(time(NULL)); + + /* Recover the BSSP database, creating it if necessary. */ + + CHKERR(sdr_begin_xn(bsspSdr)); + bsspdbObject = sdr_find(bsspSdr, _bsspdbName(), NULL); + + switch (bsspdbObject) + { + case -1: /* SDR error. */ + + putErrmsg("Can't search for BSSP database in SDR.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + + case 0: /* Not found; must create new DB. */ + + if (estMaxExportSessions <= 0) + { + sdr_exit_xn(bsspSdr); + putErrmsg("Must supply estMaxExportSessions.", NULL); + return -1; + } + + sdr_read(bsspSdr, (char *) &iondb, getIonDbObject(), + sizeof(IonDB)); + bsspdbObject = sdr_malloc(bsspSdr, sizeof(BsspDB)); + if (bsspdbObject == 0) + { + putErrmsg("No space for database.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + } + + /* Initialize the non-volatile database. */ + + memset((char *) &bsspdbBuf, 0, sizeof(BsspDB)); + bsspdbBuf.ownEngineId = iondb.ownNodeNbr; + encodeSdnv(&(bsspdbBuf.ownEngineIdSdnv), bsspdbBuf.ownEngineId); + bsspdbBuf.estMaxExportSessions = estMaxExportSessions; + bsspdbBuf.ownQtime = 1; /* Default. */ + bsspdbBuf.sessionCount = 0; + for (i = 0; i < BSSP_MAX_NBR_OF_CLIENTS; i++) + { + bsspdbBuf.clients[i].notices = sdr_list_create(bsspSdr); + } + bsspdbBuf.exportSessionsHash = sdr_hash_create(bsspSdr, + sizeof(unsigned int), estMaxExportSessions, + BSSP_MEAN_SEARCH_LENGTH); + bsspdbBuf.spans = sdr_list_create(bsspSdr); + bsspdbBuf.timeline = sdr_list_create(bsspSdr); + + /* Initialize sessionCount with a random value, * + * to minimize the risk of DoS attacks since * + * this value also serves as the unique serial * + * number per ExportSession used in the * + * acknowledgement procedure. * + */ + + do + { + bsspdbBuf.sessionCount = rand(); + } while (bsspdbBuf.sessionCount == 0); + sdr_write(bsspSdr, bsspdbObject, (char *) &bsspdbBuf, + sizeof(BsspDB)); + sdr_catlg(bsspSdr, _bsspdbName(), 0, bsspdbObject); + if (sdr_end_xn(bsspSdr)) + { + putErrmsg("Can't create BSSP database.", NULL); + return -1; + } + + break; + + default: /* Found DB in the SDR. */ + + sdr_exit_xn(bsspSdr); + } + + oK(_bsspdbObject(&bsspdbObject)); /* Save location. */ + oK(_bsspConstants()); + /* Load volatile database, initializing as necessary. */ + if (_bsspvdb(&bsspvdbName) == NULL) + { + putErrmsg("BSSP can't initialize vdb.", NULL); + return -1; + } + + return 0; /* BSSP service is available. */ +} + +static void dropVdb(PsmPartition wm, PsmAddress vdbAddress) +{ + BsspVdb *vdb; + int i; + BsspVclient *client; + PsmAddress elt; + BsspVspan *vspan; + + vdb = (BsspVdb *) psp(wm, vdbAddress); + for (i = 0, client = vdb->clients; i < BSSP_MAX_NBR_OF_CLIENTS; + i++, client++) + { + if (client->semaphore != SM_SEM_NONE) + { + sm_SemDelete(client->semaphore); + } + } + + while ((elt = sm_list_first(wm, vdb->spans)) != 0) + { + vspan = (BsspVspan *) psp(wm, sm_list_data(wm, elt)); + dropSpan(vspan, elt); + } + + sm_list_destroy(wm, vdb->spans, NULL, NULL); +} + +void bsspDropVdb() +{ + PsmPartition wm = getIonwm(); + char *bsspvdbName = _bsspvdbName(); + PsmAddress vdbAddress; + PsmAddress elt; + char *stop = NULL; + + /* Destroy volatile database. */ + + if (psm_locate(wm, bsspvdbName, &vdbAddress, &elt) < 0) + { + putErrmsg("BSSP failed searching for vdb.", NULL); + return; + } + + if (elt) + { + dropVdb(wm, vdbAddress); /* Destroy Vdb. */ + psm_free(wm,vdbAddress); + if (psm_uncatlg(wm, bsspvdbName) < 0) + { + putErrmsg("BSSP failed uncataloging vdb.",NULL); + } + } + + oK(_bsspvdb(&stop)); /* Forget old Vdb. */ +} + +void bsspRaiseVdb() +{ + char *bsspvdbName = _bsspvdbName(); + + if (_bsspvdb(&bsspvdbName) == NULL) /* Create new Vdb. */ + { + putErrmsg("BSSP can't reinitialize vdb.", NULL); + } +} + +BsspDB *getBsspConstants() +{ + return _bsspConstants(); +} + +BsspVdb *getBsspVdb() +{ + return _bsspvdb(NULL); +} + +int bsspStart(char *beBsiCmd, char *rlBsiCmd) +{ + Sdr bsspSdr = getIonsdr(); + PsmPartition bsspwm = getIonwm(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + PsmAddress elt; + + if (beBsiCmd == NULL || rlBsiCmd == NULL) + { + putErrmsg("BSSP can't start: no BE-BSI or RL-BSI command.", + NULL); + return -1; + } + + CHKERR(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + + /* Start the BSSP events clock if necessary. */ + + if (bsspvdb->clockPid == ERROR || sm_TaskExists(bsspvdb->clockPid) == 0) + { + bsspvdb->clockPid = pseudoshell("bsspclock"); + } + + /* Start input link service if necessary. */ + + if (bsspvdb->beBsiPid == ERROR || sm_TaskExists(bsspvdb->beBsiPid) == 0) + { + bsspvdb->beBsiPid = pseudoshell(beBsiCmd); + } + + if (bsspvdb->rlBsiPid == ERROR || sm_TaskExists(bsspvdb->rlBsiPid) == 0) + { + bsspvdb->rlBsiPid = pseudoshell(rlBsiCmd); + } + + sdr_exit_xn(bsspSdr); /* Unlock memory. */ + + /* Start output link services for remote spans. */ + + for (elt = sm_list_first(bsspwm, bsspvdb->spans); elt; + elt = sm_list_next(bsspwm, elt)) + { + startSpan((BsspVspan *) psp(bsspwm, sm_list_data(bsspwm, elt))); + } + + return 0; +} + +void bsspStop() /* Reverses bsspStart. */ +{ + Sdr bsspSdr = getIonsdr(); + PsmPartition bsspwm = getIonwm(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + int i; + BsspVclient *client; + PsmAddress elt; + BsspVspan *vspan; + + /* Tell all BSSP processes to stop. */ + + CHKVOID(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + for (i = 0, client = bsspvdb->clients; i < BSSP_MAX_NBR_OF_CLIENTS; + i++, client++) + { + if (client->semaphore != SM_SEM_NONE) + { + sm_SemEnd(client->semaphore); + } + } + + if (bsspvdb->beBsiPid != ERROR) + { + sm_TaskKill(bsspvdb->beBsiPid, SIGTERM); + } + + if (bsspvdb->rlBsiPid != ERROR) + { + sm_TaskKill(bsspvdb->rlBsiPid, SIGTERM); + } + + for (elt = sm_list_first(bsspwm, bsspvdb->spans); elt; + elt = sm_list_next(bsspwm, elt)) + { + vspan = (BsspVspan *) psp(bsspwm, sm_list_data(bsspwm, elt)); + stopSpan(vspan); + } + + if (bsspvdb->clockPid != ERROR) + { + sm_TaskKill(bsspvdb->clockPid, SIGTERM); + } + + sdr_exit_xn(bsspSdr); /* Unlock memory. */ + + /* Wait until all BSSP processes have stopped. */ + + if (bsspvdb->beBsiPid != ERROR) + { + while (sm_TaskExists(bsspvdb->beBsiPid)) + { + microsnooze(100000); + } + } + + if (bsspvdb->rlBsiPid != ERROR) + { + while (sm_TaskExists(bsspvdb->rlBsiPid)) + { + microsnooze(100000); + } + } + + for (elt = sm_list_first(bsspwm, bsspvdb->spans); elt; + elt = sm_list_next(bsspwm, elt)) + { + vspan = (BsspVspan *) psp(bsspwm, sm_list_data(bsspwm, elt)); + waitForSpan(vspan); + } + + if (bsspvdb->clockPid != ERROR) + { + while (sm_TaskExists(bsspvdb->clockPid)) + { + microsnooze(100000); + } + } + + /* Now erase all the tasks and reset the semaphores. */ + + CHKVOID(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + bsspvdb->clockPid = ERROR; + for (i = 0, client = bsspvdb->clients; i < BSSP_MAX_NBR_OF_CLIENTS; + i++, client++) + { + resetClient(client); + } + + bsspvdb->beBsiPid = ERROR; + bsspvdb->rlBsiPid = ERROR; + for (elt = sm_list_first(bsspwm, bsspvdb->spans); elt; + elt = sm_list_next(bsspwm, elt)) + { + vspan = (BsspVspan *) psp(bsspwm, sm_list_data(bsspwm, elt)); + resetSpan(vspan); + } + + sdr_exit_xn(bsspSdr); /* Unlock memory. */ +} + +int bsspAttach() +{ + Object bsspdbObject = _bsspdbObject(NULL); + BsspVdb *bsspvdb = _bsspvdb(NULL); + Sdr bsspSdr; + char *bsspvdbName = _bsspvdbName(); + + if (bsspdbObject && bsspvdb) + { + return 0; /* Already attached. */ + } + + if (ionAttach() < 0) + { + putErrmsg("BSSP can't attach to ION.", NULL); + return -1; + } + + bsspSdr = getIonsdr(); + srand(time(NULL)); + + /* Locate the BSSP database. */ + + if (bsspdbObject == 0) + { + CHKERR(sdr_begin_xn(bsspSdr)); + bsspdbObject = sdr_find(bsspSdr, _bsspdbName(), NULL); + sdr_exit_xn(bsspSdr); + if (bsspdbObject == 0) + { + putErrmsg("Can't find BSSP database.", NULL); + return -1; + } + + oK(_bsspdbObject(&bsspdbObject)); + } + + oK(_bsspConstants()); + + /* Locate the BSSP volatile database. */ + + if (bsspvdb == NULL) + { + if (_bsspvdb(&bsspvdbName) == NULL) + { + putErrmsg("BSSP volatile database not found.", NULL); + return -1; + } + } + + return 0; /* BSSP service is available. */ +} + +void bsspDetach(){ + char *stop=NULL; + oK(_bsspvdb(&stop)); + return; +} + +/* * * BSSP span mgt and access functions * */ + +void findSpan(uvast engineId, BsspVspan **vspan, PsmAddress *vspanElt) +{ + PsmPartition bsspwm = getIonwm(); + PsmAddress elt; + + CHKVOID(ionLocked()); + CHKVOID(vspan); + CHKVOID(vspanElt); + for (elt = sm_list_first(bsspwm, (_bsspvdb(NULL))->spans); elt; + elt = sm_list_next(bsspwm, elt)) + { + *vspan = (BsspVspan *) psp(bsspwm, sm_list_data(bsspwm, elt)); + if ((*vspan)->engineId == engineId) + { + break; + } + } + + *vspanElt = elt; /* (Zero if vspan was not found.) */ +} + +void checkReservationLimit() +{ + Sdr bsspSdr = getIonsdr(); + Object dbobj = getBsspDbObject(); + BsspDB db; + int totalSessionsAvbl; + Object elt; + OBJ_POINTER(BsspSpan, span); + + CHKVOID(sdr_begin_xn(bsspSdr)); + sdr_read(bsspSdr, (char *) &db, dbobj, sizeof(BsspDB)); + totalSessionsAvbl = db.estMaxExportSessions; + for (elt = sdr_list_first(bsspSdr, db.spans); elt; + elt = sdr_list_next(bsspSdr, elt)) + { + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, sdr_list_data(bsspSdr, + elt)); + totalSessionsAvbl -= span->maxExportSessions; + } + + if (totalSessionsAvbl < 0) + { + writeMemoNote("[?] Total max export sessions exceeds \ +estimate. Session lookup speed may be degraded", itoa(totalSessionsAvbl)); + } + else + { + writeMemo("[i] Total max export sessions does not exceed \ +estimate."); + } + + sdr_exit_xn(bsspSdr); +} + +int addSpan(uvast engineId, unsigned int maxExportSessions, + unsigned int maxBlockSize, char *bsoBECmd, char *bsoRLCmd, + unsigned int qTime, int purge) +{ + Sdr bsspSdr = getIonsdr(); + BsspVspan *vspan; + PsmAddress vspanElt; + BsspSpan spanBuf; + Object addr; + Object spanElt = 0; + + if (bsoBECmd == NULL || *bsoBECmd == '\0' || + bsoRLCmd == NULL || *bsoRLCmd == '\0') + { + writeMemoNote("[?] BSO commands missing, can't add span", + utoa(engineId)); + return 0; + } + + if (engineId == 0 || maxExportSessions == 0) + { + writeMemoNote("[?] Missing span parameter(s)", utoa(engineId)); + return 0; + } + + if (strlen(bsoBECmd) > MAX_SDRSTRING ) + { + writeMemoNote("[?] Link service output command string too long", + bsoBECmd); + return 0; + } + + if (strlen(bsoRLCmd) > MAX_SDRSTRING ) + { + writeMemoNote("[?] Link service output command string too long", + bsoRLCmd); + return 0; + } + + /* Note: RFC791 says that IPv4 hosts cannot set maximum + * IP packet length to any value less than 576 bytes (the + * PPP MTU size). IPv4 packet header length ranges from + * 20 to 60 bytes, and UDP header length is 8 bytes. So + * the maximum allowed size for a UDP datagram on a given + * host should not be less than 508 bytes, so we warn if + * maximum BSSP block size is less than 508. */ + + if (maxBlockSize < 508) + { + writeMemoNote("[i] Note max segment size is less than 508", + utoa(maxBlockSize)); + } + + CHKERR(sdr_begin_xn(bsspSdr)); + findSpan(engineId, &vspan, &vspanElt); + if (vspanElt) /* This is a known span. */ + { + sdr_exit_xn(bsspSdr); + writeMemoNote("[?] Duplicate span", itoa(engineId)); + return 0; + } + + /* All parameters validated, okay to add the span. */ + + memset((char *) &spanBuf, 0, sizeof(BsspSpan)); + spanBuf.engineId = engineId; + encodeSdnv(&(spanBuf.engineIdSdnv), spanBuf.engineId); + spanBuf.remoteQtime = qTime; + spanBuf.purge = purge ? 1 : 0; + spanBuf.bsoBECmd = sdr_string_create(bsspSdr, bsoBECmd); + spanBuf.bsoRLCmd = sdr_string_create(bsspSdr, bsoRLCmd); + spanBuf.maxExportSessions = maxExportSessions; + spanBuf.maxBlockSize = maxBlockSize; + spanBuf.exportSessions = sdr_list_create(bsspSdr); + spanBuf.beBlocks = sdr_list_create(bsspSdr); + spanBuf.rlBlocks = sdr_list_create(bsspSdr); + + addr = sdr_malloc(bsspSdr, sizeof(BsspSpan)); + if (addr) + { + spanElt = sdr_list_insert_last(bsspSdr, _bsspConstants()->spans, + addr); + sdr_write(bsspSdr, addr, (char *) &spanBuf, sizeof(BsspSpan)); + } + + if (sdr_end_xn(bsspSdr) < 0 || spanElt == 0) + { + putErrmsg("Can't add span.", itoa(engineId)); + return -1; + } + + CHKERR(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + if (raiseSpan(spanElt, _bsspvdb(NULL)) < 0) + { + sdr_exit_xn(bsspSdr); + putErrmsg("Can't raise span.", NULL); + return -1; + } + + sdr_exit_xn(bsspSdr); + return 1; +} + +int updateSpan(uvast engineId, unsigned int maxExportSessions, + unsigned int maxBlockSize, char *bsoBECmd, char *bsoRLCmd, + unsigned int qTime, int purge) +{ + Sdr bsspSdr = getIonsdr(); + BsspVspan *vspan; + PsmAddress vspanElt; + Object addr; + BsspSpan spanBuf; + + if (bsoBECmd) + { + if (*bsoBECmd == '\0') + { + writeMemoNote("[?] No BE LSO command, can't update \ +span", utoa(engineId)); + return 0; + } + else + { + if (strlen(bsoBECmd) > MAX_SDRSTRING) + { + writeMemoNote("[?] Link service output command \ +string too long.", bsoBECmd); + return 0; + } + } + } + + if (bsoRLCmd) + { + if (*bsoRLCmd == '\0') + { + writeMemoNote("[?] No RL LSO command, can't update \ +span", utoa(engineId)); + return 0; + } + else + { + if (strlen(bsoRLCmd) > MAX_SDRSTRING) + { + writeMemoNote("[?] Link service output command \ +string too long.", bsoRLCmd); + return 0; + } + } + } + + if (maxBlockSize) + { + if (maxBlockSize < 508) + { + writeMemoNote("[i] Note max segment size is less than \ +508", utoa(maxBlockSize)); + } + } + + CHKERR(sdr_begin_xn(bsspSdr)); + findSpan(engineId, &vspan, &vspanElt); + if (vspanElt == 0) /* This is an unknown span. */ + { + sdr_exit_xn(bsspSdr); + writeMemoNote("[?] Unknown span", itoa(engineId)); + return 0; + } + + addr = (Object) sdr_list_data(bsspSdr, vspan->spanElt); + sdr_stage(bsspSdr, (char *) &spanBuf, addr, sizeof(BsspSpan)); + if (maxExportSessions == 0) + { + maxExportSessions = spanBuf.maxExportSessions; + } + + /* All parameters validated, okay to update the span. */ + + spanBuf.maxExportSessions = maxExportSessions; + + if (bsoBECmd) + { + if (spanBuf.bsoBECmd) + { + sdr_free(bsspSdr, spanBuf.bsoBECmd); + } + + spanBuf.bsoBECmd = sdr_string_create(bsspSdr, bsoBECmd); + } + + if (bsoRLCmd) + { + if (spanBuf.bsoRLCmd) + { + sdr_free(bsspSdr, spanBuf.bsoRLCmd); + } + + spanBuf.bsoRLCmd = sdr_string_create(bsspSdr, bsoRLCmd); + } + + spanBuf.remoteQtime = qTime; + spanBuf.purge = purge ? 1 : 0; + if (maxBlockSize) + { + spanBuf.maxBlockSize = maxBlockSize; + } + + sdr_write(bsspSdr, addr, (char *) &spanBuf, sizeof(BsspSpan)); + if (sdr_end_xn(bsspSdr) < 0) + { + putErrmsg("Can't update span.", itoa(engineId)); + return -1; + } + + return 1; +} + +int removeSpan(uvast engineId) +{ + Sdr bsspSdr = getIonsdr(); + BsspVspan *vspan; + PsmAddress vspanElt; + Object spanElt; + Object spanObj; + OBJ_POINTER(BsspSpan, span); + + /* Must stop the span before trying to remove it. */ + + CHKERR(sdr_begin_xn(bsspSdr)); /* Lock memory. */ + findSpan(engineId, &vspan, &vspanElt); + if (vspanElt == 0) /* This is an unknown span. */ + { + sdr_exit_xn(bsspSdr); + writeMemoNote("[?] Unknown span", itoa(engineId)); + return 0; + } + + /* All parameters validated. */ + + stopSpan(vspan); + sdr_exit_xn(bsspSdr); + waitForSpan(vspan); + CHKERR(sdr_begin_xn(bsspSdr)); + resetSpan(vspan); + spanElt = vspan->spanElt; + spanObj = (Object) sdr_list_data(bsspSdr, spanElt); + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, spanObj); + if (sdr_list_length(bsspSdr, span->beBlocks) != 0) + { + sdr_exit_xn(bsspSdr); + writeMemoNote("[?] Span has backlog, can't be removed", + itoa(engineId)); + return 0; + } + + if (sdr_list_length(bsspSdr, span->rlBlocks) != 0) + { + sdr_exit_xn(bsspSdr); + writeMemoNote("[?] Span has backlog, can't be removed", + itoa(engineId)); + return 0; + } + + if (sdr_list_length(bsspSdr, span->exportSessions) != 0) + { + sdr_exit_xn(bsspSdr); + writeMemoNote("[?] Span has open sessions, can't be removed", + itoa(engineId)); + return 0; + } + + /* Okay to remove this span from the database. */ + + dropSpan(vspan, vspanElt); + if (span->bsoBECmd) + { + sdr_free(bsspSdr, span->bsoBECmd); + } + + if (span->bsoRLCmd) + { + sdr_free(bsspSdr, span->bsoRLCmd); + } + + sdr_list_destroy(bsspSdr, span->exportSessions, NULL, NULL); + sdr_list_destroy(bsspSdr, span->beBlocks, NULL, NULL); + sdr_list_destroy(bsspSdr, span->rlBlocks, NULL, NULL); + sdr_free(bsspSdr, spanObj); + sdr_list_delete(bsspSdr, spanElt, NULL, NULL); + if (sdr_end_xn(bsspSdr) < 0) + { + putErrmsg("Can't remove span.", itoa(engineId)); + return -1; + } + + return 1; +} + +int bsspStartSpan(uvast engineId) +{ + Sdr bsspSdr = getIonsdr(); + BsspVspan *vspan; + PsmAddress vspanElt; + + CHKERR(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + findSpan(engineId, &vspan, &vspanElt); + if (vspanElt == 0) + { + sdr_exit_xn(bsspSdr); /* Unlock memory. */ + writeMemoNote("[?] Unknown span", itoa(engineId)); + return 0; + } + + startSpan(vspan); + sdr_exit_xn(bsspSdr); /* Unlock memory. */ + return 1; +} + +void bsspStopSpan(uvast engineId) +{ + Sdr bsspSdr = getIonsdr(); + BsspVspan *vspan; + PsmAddress vspanElt; + + CHKVOID(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + findSpan(engineId, &vspan, &vspanElt); + if (vspanElt == 0) /* This is an unknown span. */ + { + sdr_exit_xn(bsspSdr); /* Unlock memory. */ + writeMemoNote("[?] Unknown span", itoa(engineId)); + return; + } + + stopSpan(vspan); + sdr_exit_xn(bsspSdr); /* Unlock memory. */ + waitForSpan(vspan); + CHKVOID(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + resetSpan(vspan); + sdr_exit_xn(bsspSdr); /* Unlock memory. */ +} + +/* * * BSSP event mgt and access functions * */ + +static Object insertBsspTimelineEvent(BsspEvent *newEvent) +{ + Sdr bsspSdr = getIonsdr(); + BsspDB *bsspConstants = _bsspConstants(); + Object eventObj; + Object elt; + OBJ_POINTER(BsspEvent, event); + + CHKZERO(ionLocked()); + eventObj = sdr_malloc(bsspSdr, sizeof(BsspEvent)); + if (eventObj == 0) + { + putErrmsg("No space for timeline event.", NULL); + return 0; + } + + /* Search list from newest to oldest, insert after last + event with scheduled time less than or equal to that + of the new event. */ + + sdr_write(bsspSdr, eventObj, (char *) newEvent, sizeof(BsspEvent)); + for (elt = sdr_list_last(bsspSdr, bsspConstants->timeline); elt; + elt = sdr_list_prev(bsspSdr, elt)) + { + GET_OBJ_POINTER(bsspSdr, BsspEvent, event, sdr_list_data(bsspSdr, + elt)); + if (event->scheduledTime <= newEvent->scheduledTime) + { + return sdr_list_insert_after(bsspSdr, elt, eventObj); + } + } + + return sdr_list_insert_first(bsspSdr, bsspConstants->timeline, eventObj); +} + +static void cancelEvent(BsspEventType type, uvast refNbr1, + unsigned int refNbr2) +{ + Sdr bsspSdr = getIonsdr(); + Object elt; + Object eventObj; + OBJ_POINTER(BsspEvent, event); + + for (elt = sdr_list_first(bsspSdr, (_bsspConstants())->timeline); elt; + elt = sdr_list_next(bsspSdr, elt)) + { + eventObj = sdr_list_data(bsspSdr, elt); + GET_OBJ_POINTER(bsspSdr, BsspEvent, event, eventObj); + if (event->type == type && event->refNbr1 == refNbr1 + && event->refNbr2 == refNbr2) + { + sdr_free(bsspSdr, eventObj); + sdr_list_delete(bsspSdr, elt, NULL, NULL); + return; + } + } +} + +/* * * BSSP client mgt and access functions * */ + +int bsspAttachClient(unsigned int clientSvcId) +{ + Sdr bsspSdr = getIonsdr(); + BsspVclient *client; + + if (clientSvcId > MAX_BSSP_CLIENT_NBR) + { + putErrmsg("Client svc number over limit.", itoa(clientSvcId)); + return -1; + } + + CHKERR(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + client = (_bsspvdb(NULL))->clients + clientSvcId; + if (client->pid != ERROR) + { + if (sm_TaskExists(client->pid)) + { + sdr_exit_xn(bsspSdr); + if (client->pid == sm_TaskIdSelf()) + { + return 0; + } + + putErrmsg("Client service already in use.", + itoa(clientSvcId)); + return -1; + } + + /* Application terminated without closing the + * endpoint, so simply close it now. */ + + client->pid = ERROR; + } + + client->pid = sm_TaskIdSelf(); + sdr_exit_xn(bsspSdr); /* Unlock memory. */ + return 0; +} + +void bsspDetachClient(unsigned int clientSvcId) +{ + Sdr bsspSdr = getIonsdr(); + BsspVclient *client; + + if (clientSvcId > MAX_BSSP_CLIENT_NBR) + { + return; + } + + CHKVOID(sdr_begin_xn(bsspSdr)); /* Just to lock memory. */ + client = (_bsspvdb(NULL))->clients + clientSvcId; + if (client->pid != sm_TaskIdSelf()) + { + sdr_exit_xn(bsspSdr); + putErrmsg("Can't close: not owner of client service.", NULL); + return; + } + + client->pid = -1; + sdr_exit_xn(bsspSdr); /* Unlock memory. */ +} + +/* * * Service interface functions * * */ + +int enqueueNotice(BsspVclient *client, uvast sourceEngineId, + unsigned int sessionNbr, unsigned int dataLength, + BsspNoticeType type, unsigned char reasonCode, + Object data) +{ + Sdr bsspSdr = getIonsdr(); + Object noticeObj; + BsspNotice notice; + + CHKERR(client); + if (client->pid == ERROR) + { + return 0; /* No client task to report to. */ + } + + CHKERR(ionLocked()); + noticeObj = sdr_malloc(bsspSdr, sizeof(BsspNotice)); + if (noticeObj == 0) + { + return -1; + } + + if (sdr_list_insert_last(bsspSdr, client->notices, noticeObj) == 0) + { + return -1; + } + + notice.sessionId.sourceEngineId = sourceEngineId; + notice.sessionId.sessionNbr = sessionNbr; + notice.dataLength = dataLength; + notice.type = type; + notice.reasonCode = reasonCode; + notice.data = data; + sdr_write(bsspSdr, noticeObj, (char *) ¬ice, sizeof(BsspNotice)); + + /* Tell client that a notice is waiting. */ + + sm_SemGive(client->semaphore); + return 0; +} + +/* * * Session management functions * * */ + +static void getExportSession(unsigned int sessionNbr, Object *sessionObj) +{ + Sdr bsspSdr = getIonsdr(); + Object elt; + + CHKVOID(ionLocked()); + if (sdr_hash_retrieve(bsspSdr, (_bsspConstants())->exportSessionsHash, + (char *) &sessionNbr, (Address *) &elt, NULL) == 1) + { + *sessionObj = sdr_list_data(bsspSdr, elt); + return; + } + + /* Unknown session. */ + + *sessionObj = 0; +} + +static void destroyDataXmitBlk(Object blockObj, BsspXmitBlock *blk) +{ + Sdr bsspSdr = getIonsdr(); + + CHKVOID(ionLocked()); + + cancelEvent(BsspResendBlock, 0, blk->sessionNbr); + + if (blk->queueListElt) /* Queued for retransmission. */ + { + sdr_list_delete(bsspSdr, blk->queueListElt, NULL, NULL); + } + + sdr_free(bsspSdr, blockObj); +} + +static void stopExportSession(ExportSession *session) +{ + Sdr bsspSdr = getIonsdr(); + Object blkObj; + OBJ_POINTER(BsspXmitBlock, blk); + + CHKVOID(ionLocked()); + blkObj = session->block; + GET_OBJ_POINTER(bsspSdr, BsspXmitBlock, blk, blkObj); + destroyDataXmitBlk(blkObj, blk); +} + +static void closeExportSession(Object sessionObj) +{ + Sdr bsspSdr = getIonsdr(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + Object dbobj = getBsspDbObject(); + OBJ_POINTER(ExportSession, session); + OBJ_POINTER(BsspSpan, span); + BsspVspan *vspan; + PsmAddress vspanElt; + BsspDB db; + Object elt; + + CHKVOID(ionLocked()); + GET_OBJ_POINTER(bsspSdr, ExportSession, session, sessionObj); + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, session->span); + findSpan(span->engineId, &vspan, &vspanElt); + sdr_stage(bsspSdr, (char *) &db, dbobj, sizeof(BsspDB)); + + /* Note that cancellation of an export session causes + * the block's service data object to be passed up to + * the user in BsspXmitFailure notice, destroys the + * svcDataObject, and sets the svcDataObject to zero. + * In that event, review of the service data object + * in this function is foregone. + */ + + if (session->svcDataObject) + { + if (enqueueNotice(bsspvdb->clients + + session->clientSvcId, db.ownEngineId, + session->sessionNbr, 0, + BsspXmitSuccess, 0, session->svcDataObject) + < 0) + { + putErrmsg("Can't post ExportSessionComplete notice.", + NULL); + sdr_cancel_xn(bsspSdr); + return; + } + } + + sdr_write(bsspSdr, dbobj, (char *) &db, sizeof(BsspDB)); + + session->block = 0; + + /* Finally erase the session itself, reducing the session + * list length and thereby possibly enabling a blocked + * client to append an SDU to the current block. */ + + sdr_hash_remove(bsspSdr, db.exportSessionsHash, + (char *) &(session->sessionNbr), (Address *) &elt); + sdr_list_delete(bsspSdr, elt, NULL, NULL); + sdr_free(bsspSdr, sessionObj); +#if BSSPDEBUG +putErrmsg("Closed export session.", itoa(session->sessionNbr)); +#endif + if (vspanElt == 0) + { + putErrmsg("Can't find vspan for engine.", utoa(span->engineId)); + } + else + { + sm_SemGive(vspan->bufOpenSemaphore); + } +} + +/* * * Segment issuance functions * * */ + +static void serializeHeader(BsspXmitBlock *block, Sdnv *engineIdSdnv, + char **cursor) +{ + char firstByte = BSSP_VERSION; + Sdnv sessionNbrSdnv; + + firstByte <<= 1; + firstByte += block->pdu.blkTypeCode; + **cursor = firstByte; + (*cursor)++; + + memcpy((*cursor), engineIdSdnv->text, engineIdSdnv->length); + (*cursor) += engineIdSdnv->length; + + encodeSdnv(&sessionNbrSdnv, block->sessionNbr); + memcpy((*cursor), sessionNbrSdnv.text, sessionNbrSdnv.length); + (*cursor) += sessionNbrSdnv.length; + + **cursor = 0; /* Both extension counts = 0. */ + (*cursor)++; +} + +static void serializeDataPDU(BsspXmitBlock *block, char *buf) +{ + char *cursor = buf; + Sdnv sdnv; + + /* Origin is the local engine. */ + + serializeHeader(block, &((_bsspConstants())->ownEngineIdSdnv), + &cursor); + + /* Append client service number. */ + + encodeSdnv(&sdnv, block->pdu.clientSvcId); + memcpy(cursor, sdnv.text, sdnv.length); + cursor += sdnv.length; + + + /* Append length of data. */ + + encodeSdnv(&sdnv, block->pdu.length); + memcpy(cursor, sdnv.text, sdnv.length); + cursor += sdnv.length; + + + /* Note: client service data was copied into the trailing + * bytes of the buffer before this function was called. */ +} + +static void serializeAck(BsspXmitBlock *block, char *buf) +{ + char *cursor = buf; + Sdnv sdnv; + + /* Report is from local engine, so origin is the remote + * engine. */ + + encodeSdnv(&sdnv, block->remoteEngineId); + serializeHeader(block, &sdnv, &cursor); +} + +static int setTimer(BsspTimer *timer, Address timerAddr, time_t currentSec, + BsspVspan *vspan, int blockLength, BsspEvent *event) +{ + Sdr bsspSdr = getIonsdr(); + BsspDB BsspDB; + int radTime; + OBJ_POINTER(BsspSpan, span); + + CHKERR(ionLocked()); + sdr_read(bsspSdr, (char *) &BsspDB, getBsspDbObject(), sizeof(BsspDB)); + if (vspan->localXmitRate == 0) /* Should never be, but... */ + { + radTime = 0; /* Avoid divide by zero. */ + } + else + { + radTime = (blockLength + EST_LINK_OHD) / vspan->localXmitRate; + } + + /* Block should arrive at the remote node following + * about half of the local node's telecom processing + * turnaround time (ownQtime) plus the time consumed in + * simply radiating all the bytes of the block + * (including estimated link-layer overhead) at the + * current transmission rate over this span, plus + * the current outbound signal propagation time (owlt). */ + + timer->pduArrivalTime = currentSec + radTime + vspan->owltOutbound + + ((BsspDB.ownQtime >> 1) & 0x7fffffff); + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, sdr_list_data(bsspSdr, + vspan->spanElt)); + + /* Following arrival of the block, the response from + * the remote node should arrive here following the + * remote node's entire telecom processing turnaround + * time (remoteQtime) plus the current inbound signal + * propagation time (owlt) plus the other half of the + * local node's telecom processing turnaround time. + * + * Technically, we should also include in this interval + * the time consumed in simply transmitting all bytes + * of the response at the current fire rate over this + * span. But in practice this interval is too small + * to be worth the trouble of managing it (i.e, it is + * not known unless the remote node is currently + * transmitting, it needs to be backed out and later + * restored on suspension/resumption of the link because + * the remote fire rate might change, etc.). */ + + timer->ackDeadline = timer->pduArrivalTime + + span->remoteQtime + vspan->owltInbound + + ((BsspDB.ownQtime >> 1) & 0x7fffffff); + if (vspan->remoteXmitRate > 0) + { + event->scheduledTime = timer->ackDeadline; + if (insertBsspTimelineEvent(event) == 0) + { + putErrmsg("Can't set timer.", NULL); + return -1; + } + + timer->state = BsspTimerRunning; + } + else + { + timer->state = BsspTimerSuspended; + } + + sdr_write(bsspSdr, timerAddr, (char *) timer, sizeof(BsspTimer)); + return 0; +} + +static int readFromExportBlock(char *buffer, Object svcDataObject, + unsigned int length) +{ + Sdr bsspSdr = getIonsdr(); + unsigned int svcDataLength; + int totalBytesRead = 0; + ZcoReader reader; + unsigned int bytesToRead; + int bytesRead; + + svcDataLength = zco_length(bsspSdr, svcDataObject); + + zco_start_transmitting(svcDataObject, &reader); + + bytesToRead = length; + if (bytesToRead > svcDataLength) + { + bytesToRead = svcDataLength; + } + + bytesRead = zco_transmit(bsspSdr, &reader, bytesToRead, + buffer + totalBytesRead); + if (bytesRead != bytesToRead) + { + putErrmsg("Failed reading SDU.", NULL); + return -1; + } + + totalBytesRead += bytesRead; + return totalBytesRead; +} + +int bsspDequeueBEOutboundBlock(BsspVspan *vspan, char **buf) +{ + Sdr bsspSdr = getIonsdr(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + Object spanObj; + BsspSpan spanBuf; + Object elt; + char memo[64]; + Object blkAddr; + BsspXmitBlock block; + int blockLength; + time_t currentTime; + BsspEvent event; + BsspTimer *timer; + + CHKERR(vspan); + CHKERR(buf); + *buf = (char *) psp(getIonwm(), vspan->beBuffer); + CHKERR(sdr_begin_xn(bsspSdr)); + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + sdr_stage(bsspSdr, (char *) &spanBuf, spanObj, sizeof(BsspSpan)); + + elt = sdr_list_first(bsspSdr, spanBuf.beBlocks); + while (elt == 0 || vspan->localXmitRate == 0) + { + sdr_exit_xn(bsspSdr); + + /* Wait until bssp_send has announced an outbound + * block by giving span's beSemaphore. */ + + if (sm_SemTake(vspan->beSemaphore) < 0) + { + putErrmsg("BSO can't take best-effort semaphore.", + itoa(vspan->engineId)); + return -1; + } + + if (sm_SemEnded(vspan->beSemaphore)) + { + isprintf(memo, sizeof memo, + "[i] BSO best-effort channel to engine " \ +UVAST_FIELDSPEC " is stopped.", vspan->engineId); + writeMemo(memo); + return 0; + } + + CHKERR(sdr_begin_xn(bsspSdr)); + sdr_stage(bsspSdr, (char *) &spanBuf, spanObj, + sizeof(BsspSpan)); + elt = sdr_list_first(bsspSdr, spanBuf.beBlocks); + } + + /* Got next outbound block. Remove it from the queue + * for this span. */ + + blkAddr = sdr_list_data(bsspSdr, elt); + sdr_stage(bsspSdr, (char *) &block, blkAddr, sizeof(BsspXmitBlock)); + sdr_list_delete(bsspSdr, elt, NULL, NULL); + block.queueListElt = 0; + + /* Copy blocks's content into buffer. */ + + blockLength = block.ohdLength; + if (block.pduClass == BsspData) + { + blockLength += block.pdu.length; + + /* Load client service data at the end of the + * block first, before filling in the header. */ + + if (readFromExportBlock((*buf) + block.ohdLength, + block.pdu.svcData, block.pdu.length) < 0) + { + putErrmsg("Can't read data from export block.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + } + } + + /* Rewrite it to record change of queueListElt to 0. */ + + sdr_write(bsspSdr, blkAddr, (char *) &block, sizeof(BsspXmitBlock)); + + /* Post timeout event as necessary. */ + + currentTime = getUTCTime(); + event.parm = 0; + + event.type = BsspResendBlock; + event.refNbr1 = 0; + event.refNbr2 = block.sessionNbr; + timer = &block.pdu.timer; + if (setTimer(timer, blkAddr + FLD_OFFSET(timer, &block), + currentTime, vspan, blockLength, &event) < 0) + { + putErrmsg("Can't schedule event.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + } + + /* Now serialize the block overhead and prepend that + * overhead to the content of the segment (if any), + * and return to link service output process. + */ + + serializeDataPDU(&block, *buf); + + if (sdr_end_xn(bsspSdr)) + { + putErrmsg("Can't get best effort outbound block for span.", + NULL); + return -1; + } + + if (bsspvdb->watching & WATCH_g) + { + putchar('g'); + fflush(stdout); + } + + return blockLength; +} + +int bsspDequeueRLOutboundBlock(BsspVspan *vspan, char **buf) +{ + Sdr bsspSdr = getIonsdr(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + Object spanObj; + BsspSpan spanBuf; + Object elt; + char memo[64]; + Object blkAddr; + BsspXmitBlock block; + int blockLength; + time_t currentTime; + BsspEvent event; + BsspTimer *timer; + + CHKERR(vspan); + CHKERR(buf); + *buf = (char *) psp(getIonwm(), vspan->rlBuffer); + CHKERR(sdr_begin_xn(bsspSdr)); + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + sdr_stage(bsspSdr, (char *) &spanBuf, spanObj, sizeof(BsspSpan)); + + elt = sdr_list_first(bsspSdr, spanBuf.rlBlocks); + while (elt == 0 || vspan->localXmitRate == 0) + { + sdr_exit_xn(bsspSdr); + + /* Wait until bssp_send has announced an outbound + * segment by giving span's segSemaphore. */ + + if (sm_SemTake(vspan->rlSemaphore) < 0) + { + putErrmsg("BSO can't take reliable block semaphore.", + itoa(vspan->engineId)); + return -1; + } + + if (sm_SemEnded(vspan->rlSemaphore)) + { + isprintf(memo, sizeof memo, + "[i] BSO real-time channel to engine " UVAST_FIELDSPEC \ +" is stopped.", vspan->engineId); + writeMemo(memo); + return 0; + } + + CHKERR(sdr_begin_xn(bsspSdr)); + sdr_stage(bsspSdr, (char *) &spanBuf, spanObj, + sizeof(BsspSpan)); + + elt = sdr_list_first(bsspSdr, spanBuf.rlBlocks); + } + + /* Got next outbound segment. Remove it from the queue + * for this span. */ + + blkAddr = sdr_list_data(bsspSdr, elt); + sdr_stage(bsspSdr, (char *) &block, blkAddr, sizeof(BsspXmitBlock)); + sdr_list_delete(bsspSdr, elt, NULL, NULL); + block.queueListElt = 0; + + /* Copy blocks's content into buffer. */ + + blockLength = block.ohdLength; + if (block.pduClass == BsspData) + { + blockLength += block.pdu.length; + + /* Load client service data at the end of the + * block first, before filling in the header. */ + + if (readFromExportBlock((*buf) + block.ohdLength, + block.pdu.svcData, block.pdu.length) < 0) + { + putErrmsg("Can't read data from export block.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + } + } + + /* Remove block from database if possible, i.e., + * if it needn't ever be retransmitted. Otherwise + * rewrite it to record change of queueListElt to 0. */ + + if (block.pdu.blkTypeCode == 0) + { + sdr_write(bsspSdr, blkAddr, (char *) &block, + sizeof(BsspXmitBlock)); + } + else /* This is an Ack block, no need to retain it. */ + { + sdr_free(bsspSdr, blkAddr); + } + + /* Post timeout event as necessary. */ + + currentTime = getUTCTime(); + event.parm = 0; + if (block.pdu.blkTypeCode == 0) + { + event.type = BsspResendBlock; + event.refNbr1 = 0; + event.refNbr2 = block.sessionNbr; + timer = &block.pdu.timer; + if (setTimer(timer, blkAddr + FLD_OFFSET(timer, &block), + currentTime, vspan, blockLength, &event) < 0) + { + putErrmsg("Can't schedule event.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + } + } + + /* Now serialize the segment overhead and prepend that + * overhead to the content of the block (if any), and + * return to link service output process. */ + + if (block.pdu.blkTypeCode == 0) + { + serializeDataPDU(&block, *buf); + } + else + { + serializeAck(&block, *buf); + } + + if (sdr_end_xn(bsspSdr)) + { + putErrmsg("Can't get reliable outbound block for span.", NULL); + return -1; + } + + if (bsspvdb->watching & WATCH_t) + { + putchar('t'); + fflush(stdout); + } + + return blockLength; +} + +/* * Control segment construction functions * */ +static void signalBeBso(unsigned int engineId) +{ + BsspVspan *vspan; + PsmAddress vspanElt; + + findSpan(engineId, &vspan, &vspanElt); + if (vspan != NULL && vspan->localXmitRate > 0) + { + /* Tell Best-Effort BSO that output is waiting. */ + + sm_SemGive(vspan->beSemaphore); + } +} + +static void signalRlBso(unsigned int engineId) +{ + BsspVspan *vspan; + PsmAddress vspanElt; + + findSpan(engineId, &vspan, &vspanElt); + if (vspan != NULL && vspan->localXmitRate > 0) + { + /* Tell Reliable BSO that output is waiting. */ + + sm_SemGive(vspan->rlSemaphore); + } +} + +static int cancelSessionBySender(ExportSession *session, + Object sessionObj, BsspCancelReasonCode reasonCode) +{ + Sdr bsspSdr = getIonsdr(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + Object dbobj = getBsspDbObject(); + BsspDB db; + Object spanObj = session->span; + BsspSpan span; + BsspVspan *vspan; + PsmAddress vspanElt; + Object elt; + + CHKERR(ionLocked()); + session->reasonCode = reasonCode; /* (For CS resend.)*/ + sdr_stage(bsspSdr, (char *) &span, spanObj, sizeof(BsspSpan)); + findSpan(span.engineId, &vspan, &vspanElt); + if (vspanElt == 0) + { + putErrmsg("Can't find vspan for engine.", utoa(span.engineId)); + return -1; + } + + if (sessionObj == span.currentExportSessionObj) + { + /* Finish up session so it can be reported. */ + + session->clientSvcId = span.clientSvcIdOfBufferedBlock; + encodeSdnv(&(session->clientSvcIdSdnv), session->clientSvcId); + session->totalLength = span.lengthOfBufferedBlock; + } + + if (bsspvdb->watching & WATCH_CS) + { + putchar('{'); + fflush(stdout); + } + + sdr_stage(bsspSdr, (char *) &db, dbobj, sizeof(BsspDB)); + stopExportSession(session); + + if (enqueueNotice(bsspvdb->clients + session->clientSvcId, + db.ownEngineId, session->sessionNbr, 0, + BsspXmitFailure, reasonCode, session->svcDataObject) < 0) + { + putErrmsg("Can't post ExportSessionCanceled notice.", + NULL); + return -1; + } + + sdr_write(bsspSdr, dbobj, (char *) &db, sizeof(BsspDB)); + + session->svcDataObject = 0; + sdr_write(bsspSdr, sessionObj, (char *) session, sizeof(ExportSession)); + + /* Remove session from active sessions pool, so that the + * cancellation won't affect flow control. */ + + sdr_hash_remove(bsspSdr, db.exportSessionsHash, + (char *) &(session->sessionNbr), (Address *) &elt); + sdr_list_delete(bsspSdr, elt, NULL, NULL); + + /* Span now has room for another session to start. */ + + if (sessionObj == span.currentExportSessionObj) + { + /* Reinitialize span's block buffer. */ + + span.lengthOfBufferedBlock = 0; + span.clientSvcIdOfBufferedBlock = 0; + span.currentExportSessionObj = 0; + sdr_write(bsspSdr, spanObj, (char *) &span, sizeof(BsspSpan)); + + /* Re-start the current export session. */ + + if (startExportSession(bsspSdr, spanObj, vspan) < 0) + { + putErrmsg("Can't re-start the current session.", + utoa(span.engineId)); + return -1; + } + } + else + { + /* The canceled session isn't the current + * session, but cancelling this session + * reduced the session list length, possibly + * enabling a blocked client to append an SDU + * to the current block. */ + + sm_SemGive(vspan->bufOpenSemaphore); + } + + + return 0; +} + +static Object enqueueAckBlock(Object spanObj, Object blockObj) +{ + Sdr bsspSdr = getIonsdr(); + OBJ_POINTER(BsspSpan, span); + Object elt; + OBJ_POINTER(BsspXmitBlock, block); + + CHKZERO(ionLocked()); + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, spanObj); + for (elt = sdr_list_first(bsspSdr, span->rlBlocks); elt; + elt = sdr_list_next(bsspSdr, elt)) + { + GET_OBJ_POINTER(bsspSdr, BsspXmitBlock, block, + sdr_list_data(bsspSdr, elt)); + switch (block->pdu.blkTypeCode) + { + case BsspAck: + continue; + + default: /* Found first non-ACK block. */ + break; /* Out of switch. */ + } + + break; /* Out of loop. */ + } + + if (elt) + { + elt = sdr_list_insert_before(bsspSdr, elt, blockObj); + } + else + { + elt = sdr_list_insert_last(bsspSdr, span->rlBlocks, blockObj); + } + + return elt; +} + +static int constructAck(BsspXmitBlock *rs, Object spanObj) +{ + Sdr bsspSdr = getIonsdr(); + //Sdnv sdnv; + Object rsObj; + OBJ_POINTER(BsspSpan, span); + + CHKERR(ionLocked()); + rsObj = sdr_malloc(bsspSdr, sizeof(BsspXmitBlock)); + if (rsObj == 0) + { + return -1; + } + + rs->queueListElt = enqueueAckBlock(spanObj, rsObj); + if (rs->queueListElt == 0) + { + return -1; + } + + sdr_write(bsspSdr, rsObj, (char *) rs, sizeof(BsspXmitBlock)); + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, spanObj); + signalRlBso(span->engineId); +#if BSSPDEBUG +char buf[256]; +sprintf(buf, "Sending Ack"); +#endif + return 0; +} + +static int sendAck(unsigned int sessionNbr, Object spanObj) +{ + Sdr bsspSdr = getIonsdr(); + OBJ_POINTER(BsspSpan, span); + int baseOhdLength; + BsspXmitBlock rsBuf; + Sdnv sessionNbrSdnv; + + CHKERR(ionLocked()); + CHKERR(spanObj); + + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, spanObj); + encodeSdnv(&sessionNbrSdnv, sessionNbr); + baseOhdLength = 1 + span->engineIdSdnv.length + + sessionNbrSdnv.length + 1; + + /* Set the acknowledgement values. */ + + memset((char *) &rsBuf, 0, sizeof(BsspXmitBlock)); + rsBuf.sessionNbr = sessionNbr; + rsBuf.remoteEngineId = span->engineId; + rsBuf.pduClass = BsspAckn; + rsBuf.pdu.blkTypeCode = BsspAck; + rsBuf.ohdLength = baseOhdLength; + + /* Ship this Ack. */ + + if (constructAck(&rsBuf, spanObj) < 0) + { + return -1; + } + + return 0; +} + +/* * * Segment handling functions * * */ + +static int handleDataBlock(uvast sourceEngineId, BsspDB *bsspdb, + unsigned int sessionNbr, BsspRecvBlk *block, + BsspPdu *pdu, char **cursor, int *bytesRemaining) +{ + Sdr bsspSdr = getIonsdr(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + BsspVspan *vspan; + PsmAddress vspanElt; + Object spanObj; + BsspVclient *client; + Object pduObj; + Object clientSvcData = 0; + + /* First finish parsing the block. */ + + extractSmallSdnv(&(pdu->clientSvcId), cursor, bytesRemaining); + extractSmallSdnv(&(pdu->length), cursor, bytesRemaining); + + /* At this point, the remaining bytes should all be + * client service data. */ + + CHKERR(sdr_begin_xn(bsspSdr)); + findSpan(sourceEngineId, &vspan, &vspanElt); + if (vspanElt == 0) + { +#if BSSPDEBUG +putErrmsg("Discarded data block.", itoa(sessionNbr)); +#endif + /* Block is from an unknown engine, so we + * can't process it. */ + + return sdr_end_xn(bsspSdr); + } + + if (pdu->length > *bytesRemaining) + { +#if BSSPDEBUG +putErrmsg("Discarded data block.", itoa(sessionNbr)); +#endif + /* Malformed block: data length is overstated. + * Block must be discarded. */ + return sdr_end_xn(bsspSdr); + } + + /* Now process the data. */ + + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + block->pduClass = BsspData; + if (pdu->clientSvcId > MAX_BSSP_CLIENT_NBR + || (client = bsspvdb->clients + pdu->clientSvcId)->pid == ERROR) + { + /* Data block is for an unknown client service, * + * so must discard it. */ +#if 0 + oK(enqueueNotice(bsspvdb->clients + session->clientSvcId, + span->engineId, sessionNbr, 0, + BsspRecvFailure, BsspClientSvcUnreachable, 0)); +#endif + if (sdr_end_xn(bsspSdr) < 0) + { + putErrmsg("Can't handle data Block.", NULL); + return -1; + } + +#if BSSPDEBUG +putErrmsg("Discarded data block.", itoa(sessionNbr)); +#endif + return 0; + } + + pduObj = sdr_insert(bsspSdr, *cursor, pdu->length); + if (pduObj == 0) + { + putErrmsg("Can't record data block.", NULL); + return -1; + } + + clientSvcData = zco_create(bsspSdr, ZcoSdrSource, pduObj, 0, + pdu->length); + + switch (clientSvcData) + { + case (Object) ERROR: + putErrmsg("Can't record data block.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + + case 0: /* No ZCO space. Silently discard block. */ +#if BSSPDEBUG +putErrmsg("Can't handle data block, would exceed available heap space.", +utoa(pdu->length)); +#endif + return 0; + } + + if (enqueueNotice(client, sourceEngineId, sessionNbr, pdu->length, + BsspRecvSuccess, 0, clientSvcData) < 0) + { + putErrmsg("Can't enqueue notice to bssp client.", NULL); + return 0; + } + + if (sendAck(sessionNbr, spanObj) < 0) + { + putErrmsg("Can't send reception acknowledgement.", NULL); + sdr_cancel_xn(bsspSdr); + return -1; + } + + if (sdr_end_xn(bsspSdr) < 0) + { + putErrmsg("Can't handle data block.", NULL); + return -1; + } + + return 0; /* Data block handled okay. */ +} +static int constructDataBlock(Sdr sdr, ExportSession *session, + Object sessionObj, BsspVspan *vspan, + BsspSpan *span, int inOrder) +{ + Sdr bsspSdr = getIonsdr(); + Object blockObj; + BsspXmitBlock block; + int length; + int dataBlockOverhead; + int worstCaseDataPDUSize; + Sdnv lengthSdnv; + +#if BSSPDEBUG +char buf[256]; +#endif + + blockObj = sdr_malloc(bsspSdr, sizeof(BsspXmitBlock)); + if (blockObj == 0) + { + return -1; + } + + memset((char *) &block, 0, sizeof(BsspXmitBlock)); + if (inOrder) + { + block.queueListElt = sdr_list_insert_last(bsspSdr, + span->beBlocks, blockObj); + } + else + { + block.queueListElt = sdr_list_insert_last(bsspSdr, + span->rlBlocks, blockObj); + } + + if (block.queueListElt == 0) + { + return -1; + } + + /* Compute length of segment's known overhead. */ + + block.ohdLength = 1 + (_bsspConstants())->ownEngineIdSdnv.length + + session->sessionNbrSdnv.length + 1; + block.ohdLength += session->clientSvcIdSdnv.length; + + /* Determine length of block. */ + + /* Compute worst-case block size. */ + + length = session->totalLength; + encodeSdnv(&lengthSdnv, length); + dataBlockOverhead = block.ohdLength + lengthSdnv.length; + worstCaseDataPDUSize = length + dataBlockOverhead; + if (worstCaseDataPDUSize > span->maxBlockSize) + { + putErrmsg("Bssp XmitDataBlock size exceeds maximum block size.", + NULL); + return -1; + } + + /* Now have enough information to finish the segment. */ + + session->block = blockObj; + + block.sessionNbr = session->sessionNbr; + block.remoteEngineId = span->engineId; + block.sessionObj = sessionObj; + block.pduClass = BsspData; + block.pdu.blkTypeCode = 0; + block.pdu.clientSvcId = session->clientSvcId; + block.pdu.length = length; + encodeSdnv(&lengthSdnv, block.pdu.length); + block.ohdLength += lengthSdnv.length; + block.pdu.svcData = session->svcDataObject; + + sdr_write(bsspSdr, blockObj, (char *) &block, sizeof(BsspXmitBlock)); + + if (inOrder) + { + signalBeBso(span->engineId); + } + else + { + signalRlBso(span->engineId); + } + +#if BSSPDEBUG +sprintf(buf, "Sent data block: session %u blkTypeCode %d length %d.", +session->sessionNbr, block.pdu.blkTypeCode, length); +putErrmsg(buf, itoa(session->sessionNbr)); +#endif + + if ((_bsspvdb(NULL))->watching & WATCH_e) + { + putchar('e'); + fflush(stdout); + } + + return 0; +} + +int issueXmitBlock(Sdr sdr, BsspSpan *span, BsspVspan *vspan, + ExportSession *session, Object sessionObj, int inOrder) +{ + Sdr bsspSdr = getIonsdr(); + + CHKERR(session); + if (session->svcDataObject == 0) /* Canceled. */ + { + return 0; + } + + CHKERR(ionLocked()); + CHKERR(span); + CHKERR(vspan); + + if (constructDataBlock(bsspSdr, session, sessionObj, + vspan, span, inOrder) < 0) + { + putErrmsg("Can't construct data xmit block.", NULL); + return -1; + } + + /* Block processing succeeded */ + + return 1; +} + +static void getSessionContext(BsspDB *BsspDB, unsigned int sessionNbr, + Object *sessionObj, ExportSession *sessionBuf, + Object *spanObj, BsspSpan *spanBuf, BsspVspan **vspan, + PsmAddress *vspanElt) +{ + Sdr bsspSdr = getIonsdr(); + + CHKVOID(ionLocked()); + *spanObj = 0; /* Default: no context. */ + getExportSession(sessionNbr, sessionObj); + if (*sessionObj != 0) /* Known session. */ + { + sdr_stage(bsspSdr, (char *) sessionBuf, *sessionObj, + sizeof(ExportSession)); + if (sessionBuf->totalLength > 0)/* A live session. */ + { + *spanObj = sessionBuf->span; + } + } + + if (*spanObj == 0) /* Can't set session context. */ + { + return; + } + + sdr_read(bsspSdr, (char *) spanBuf, *spanObj, sizeof(BsspSpan)); + findSpan(spanBuf->engineId, vspan, vspanElt); + if (*vspanElt == 0) + { +#if BSSPDEBUG +putErrmsg("Discarding stray block.", itoa(sessionNbr)); +#endif + /* Block is not from a known engine, so we * + * treat it as a misdirected transmission. */ + + *spanObj = 0; /* Disable acknowledgment. */ + } +} + +static int handleAck(BsspDB *BsspDB, unsigned int sessionNbr, + BsspRecvBlk *block, BsspPdu *pdu, char **cursor, + int *bytesRemaining) +{ + Sdr bsspSdr = getIonsdr(); + BsspVdb *bsspvdb = _bsspvdb(NULL); + Object sessionObj; + ExportSession sessionBuf; + Object spanObj = 0; + BsspSpan spanBuf; + BsspVspan *vspan; + PsmAddress vspanElt; + BsspXmitBlock dsBuf; +#if BSSPDEBUG +putErrmsg("Handling acknowledgment.", utoa(sessionNbr)); +#endif + + CHKERR(sdr_begin_xn(bsspSdr)); + getSessionContext(BsspDB, sessionNbr, &sessionObj, + &sessionBuf, &spanObj, &spanBuf, &vspan, &vspanElt); + if (spanObj == 0) /* Unknown provenance, ignore. */ + { + sdr_exit_xn(bsspSdr); + return 0; + } + + if (sessionObj == 0) + { + /* Ack for an unknown session: must be in + * response to arrival of retransmitted blocks + * following session closure. So the remote + * import session is an erroneous resurrection + * of a closed session and we need to help the + * remote engine terminate it. We do so by + * ignoring the acknowledgement. + */ + + sdr_exit_xn(bsspSdr); + return 0; + } + + /* Now process the acknowledgement if possible. */ + + if (sessionBuf.totalLength == 0)/* Reused session nbr. */ + { +#if BSSPDEBUG +putErrmsg("Discarding report.", NULL); +#endif + return sdr_end_xn(bsspSdr); /* Ignore ACK. */ + } + + /* Deactivate the retransmission timer. Block has been + * received so there will never be any need to retransmit + * it. */ + + sdr_stage(bsspSdr, (char *) &dsBuf, sessionBuf.block, + sizeof(BsspXmitBlock)); + dsBuf.pdu.timer.pduArrivalTime = 0; + sdr_write(bsspSdr, sessionBuf.block, (char *) &dsBuf, + sizeof(BsspXmitBlock)); + + stopExportSession(&sessionBuf); + closeExportSession(sessionObj); + + if (sdr_end_xn(bsspSdr) < 0) + { + putErrmsg("Can't handle report block.", NULL); + return -1; + } + + if (bsspvdb->watching & WATCH_h) + { + putchar('h'); + fflush(stdout); + } + + return 1; /* Complete, successful export. */ +} + +int bsspHandleInboundBlock(char *buf, int length) +{ + BsspRecvBlk block; + BsspPdu *pdu = &block.pdu; + char *cursor = buf; + int bytesRemaining = length; + uvast sourceEngineId; + unsigned int sessionNbr; + Sdr sdr; + OBJ_POINTER(BsspDB, bsspdb); + + CHKERR(buf); + CHKERR(length > 0); + memset((char *) &block, 0, sizeof(BsspRecvBlk)); + + /* Get block type (flags). Ignore version number. */ + pdu->blkTypeCode = (*cursor) & 0x01; + /* Based on the 1-bit shift performed in the + * serializeHeader function. */ + cursor++; + bytesRemaining--; + + /* Get session ID. */ + + extractSdnv(&sourceEngineId, &cursor, &bytesRemaining); + extractSmallSdnv(&sessionNbr, &cursor, &bytesRemaining); + + cursor++; + bytesRemaining--; + + /* Handle segment according to its segment type code. */ + + if ((_bsspvdb(NULL))->watching & WATCH_s) + { + putchar('s'); + fflush(stdout); + } + + sdr = getIonsdr(); + CHKERR(sdr_begin_xn(sdr)); + GET_OBJ_POINTER(getIonsdr(), BsspDB, bsspdb, _bsspdbObject(NULL)); + sdr_exit_xn(sdr); + + /* Since blkTypeCode is just 1-bit long one of the * + * following "if" statements will result TRUE. */ + + if ((pdu->blkTypeCode & BSSP_ACK_FLAG) == 0) /* Data. */ + { + return handleDataBlock(sourceEngineId, bsspdb, sessionNbr, + &block, pdu, &cursor, &bytesRemaining); + } + + /* Check whether block is an ACK block. */ + + if ((pdu->blkTypeCode & BSSP_ACK_FLAG) == 1) /* Ack. */ + { + return handleAck(bsspdb, sessionNbr, &block, pdu, &cursor, + &bytesRemaining); + } + + return 0; /* Just to prevent compiler warning. */ +} + +/* * * Functions that respond to events * */ + +void bsspStartXmit(BsspVspan *vspan) +{ + Sdr bsspSdr = getIonsdr(); + Object spanObj; + BsspSpan span; + + CHKVOID(ionLocked()); + CHKVOID(vspan); + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + sdr_read(bsspSdr, (char *) &span, spanObj, sizeof(BsspSpan)); + sm_SemGive(vspan->bufOpenSemaphore); + if (sdr_list_length(bsspSdr, span.beBlocks) > 0) + { + sm_SemGive(vspan->beSemaphore); + } + + if (sdr_list_length(bsspSdr, span.rlBlocks) > 0) + { + sm_SemGive(vspan->rlSemaphore); + } +} + +void bsspStopXmit(BsspVspan *vspan) +{ + Sdr bsspSdr = getIonsdr(); + Object spanObj; + BsspSpan span; + Object elt; + Object nextElt; + Object sessionObj; + ExportSession session; + + CHKVOID(ionLocked()); + CHKVOID(vspan); + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + sdr_read(bsspSdr, (char *) &span, spanObj, sizeof(BsspSpan)); + if (span.purge) + { + /* At end of transmission on this span we must + * cancel all export sessions that are currently + * in progress. Notionally this forces re- + * forwarding of the DTN bundles in each session's + * block, to avoid having to wait for the restart + * of transmission on this span before those + * bundles can be successfully transmitted. */ + + for (elt = sdr_list_first(bsspSdr, span.exportSessions); elt; + elt = nextElt) + { + nextElt = sdr_list_next(bsspSdr, elt); + sessionObj = sdr_list_data(bsspSdr, elt); + sdr_stage(bsspSdr, (char *) &session, sessionObj, + sizeof(ExportSession)); + if (session.svcDataObject == 0) + { + /* Session is not yet populated + * with any service data objects. */ + + continue; + } + + oK(cancelSessionBySender(&session, sessionObj, + BsspCancelByEngine)); + } + } +} + +static void suspendTimer(time_t suspendTime, BsspTimer *timer, + Address timerAddr, unsigned int qTime, + unsigned int remoteXmitRate, BsspEventType eventType, + uvast eventRefNbr1, unsigned int eventRefNbr2) +{ + time_t latestAckXmitStartTime; + + CHKVOID(ionLocked()); + latestAckXmitStartTime = timer->pduArrivalTime + qTime; + if (latestAckXmitStartTime < suspendTime) + { + /* Transmission of ack should have begun before + * link was stopped. Timer must not be suspended. */ + + return; + } + + /* Must suspend timer while remote engine is unable to + * transmit. */ + + cancelEvent(eventType, eventRefNbr1, eventRefNbr2); + + /* Change state of timer object and save it. */ + + timer->state = BsspTimerSuspended; + sdr_write(getIonsdr(), timerAddr, (char *) timer, sizeof(BsspTimer)); +} + +int bsspSuspendTimers(BsspVspan *vspan, PsmAddress vspanElt, + time_t suspendTime, unsigned int priorXmitRate) +{ + Sdr bsspSdr = getIonsdr(); + Object spanObj; + OBJ_POINTER(BsspSpan, span); + unsigned int qTime; + Object elt; + Object sessionObj; + BsspTimer *timer; + ExportSession xsessionBuf; + BsspXmitBlock dsBuf; + + CHKERR(ionLocked()); + CHKERR(vspan); + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, spanObj); + qTime = span->remoteQtime; + + /* Suspend relevant timers for export sessions. */ + + for (elt = sdr_list_first(bsspSdr, span->exportSessions); elt; + elt = sdr_list_next(bsspSdr, elt)) + { + sessionObj = sdr_list_data(bsspSdr, elt); + sdr_read(bsspSdr, (char *) &xsessionBuf, sessionObj, + sizeof(ExportSession)); + + if (xsessionBuf.block != 0) + { + + /* Suspend block retransmission timer + * for each export session. */ + + sdr_stage(bsspSdr, (char *) &dsBuf, xsessionBuf.block, + sizeof(BsspXmitBlock)); + if (dsBuf.pdu.timer.pduArrivalTime == 0) + { + continue; /* Not active. */ + } + + timer = &dsBuf.pdu.timer; + suspendTimer(suspendTime, timer, + xsessionBuf.block + FLD_OFFSET(timer, &dsBuf), + qTime, priorXmitRate, BsspResendBlock, 0, + xsessionBuf.sessionNbr); + } + } + + return 0; +} + +static int resumeTimer(time_t resumeTime, BsspTimer *timer, + Address timerAddr, unsigned int qTime, + unsigned int remoteXmitRate, BsspEventType eventType, + uvast refNbr1, unsigned int refNbr2) +{ + time_t earliestAckXmitStartTime; + int additionalDelay; + BsspEvent event; + + CHKERR(ionLocked()); + earliestAckXmitStartTime = timer->pduArrivalTime + qTime; + additionalDelay = resumeTime - earliestAckXmitStartTime; + if (additionalDelay > 0) + { + /* Must revise deadline. */ + + timer->ackDeadline += additionalDelay; + } + + /* Change state of timer object and save it. */ + + timer->state = BsspTimerRunning; + sdr_write(getIonsdr(), timerAddr, (char *) timer, sizeof(BsspTimer)); + + /* Re-post timeout event. */ + + event.type = eventType; + event.refNbr1 = refNbr1; + event.refNbr2 = refNbr2; + event.parm = 0; + event.scheduledTime = timer->ackDeadline; + if (insertBsspTimelineEvent(&event) == 0) + { + putErrmsg("Can't insert timeout event.", NULL); + return -1; + } + + return 0; +} + +int bsspResumeTimers(BsspVspan *vspan, PsmAddress vspanElt, + time_t resumeTime, unsigned int remoteXmitRate) +{ + Sdr bsspSdr = getIonsdr(); + Object spanObj; + OBJ_POINTER(BsspSpan, span); + unsigned int qTime; + Object elt; + Object sessionObj; + BsspTimer *timer; + ExportSession xsessionBuf; + BsspXmitBlock dsBuf; + + CHKERR(ionLocked()); + CHKERR(vspan); + spanObj = sdr_list_data(bsspSdr, vspan->spanElt); + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, spanObj); + qTime = span->remoteQtime; + + /* Resume relevant timers for export sessions. */ + + for (elt = sdr_list_first(bsspSdr, span->exportSessions); elt; + elt = sdr_list_next(bsspSdr, elt)) + { + sessionObj = sdr_list_data(bsspSdr, elt); + sdr_read(bsspSdr, (char *) &xsessionBuf, sessionObj, + sizeof(ExportSession)); + + /* Resume block retransmission timer for each + * session. */ + + if (xsessionBuf.block != 0) + { + sdr_stage(bsspSdr, (char *) &dsBuf, xsessionBuf.block, + sizeof(BsspXmitBlock)); + if (dsBuf.pdu.timer.pduArrivalTime == 0) + { + continue; /* Not active. */ + } + + if (dsBuf.pdu.timer.state != BsspTimerSuspended) + { + continue; /* Not suspended. */ + } + + /* Must resume: re-insert timeout event. */ + + timer = &dsBuf.pdu.timer; + if (resumeTimer(resumeTime, timer, + xsessionBuf.block + FLD_OFFSET(timer, &dsBuf), + qTime, remoteXmitRate, BsspResendBlock, 0, + xsessionBuf.sessionNbr) < 0) + + { + putErrmsg("Can't resume timers for span.", + itoa(span->engineId)); + sdr_cancel_xn(bsspSdr); + return -1; + } + } + } + + return 0; +} + +int bsspResendBlock(unsigned int sessionNbr) +{ + Sdr bsspSdr = getIonsdr(); + Object sessionObj; + ExportSession sessionBuf; + BsspXmitBlock dblkBuf; + OBJ_POINTER(BsspSpan, span); + +#if BSSPDEBUG +putErrmsg("Resending block.", itoa(sessionNbr)); +#endif + CHKERR(sdr_begin_xn(bsspSdr)); + getExportSession(sessionNbr, &sessionObj); + if (sessionObj == 0) /* Session is gone. */ + { +#if BSSPDEBUG +putErrmsg("Session is gone.", itoa(sessionNbr)); +#endif + return sdr_end_xn(bsspSdr); + } + + sdr_stage(bsspSdr, (char *) &sessionBuf, sessionObj, + sizeof(ExportSession)); + + if (sessionBuf.block == 0) /* Block is gone. */ + { +#if BSSPDEBUG +putErrmsg("Checkpoint is gone.", itoa(sessionNbr)); +#endif + return sdr_end_xn(bsspSdr); + } + + sdr_stage(bsspSdr, (char *) &dblkBuf, sessionBuf.block, + sizeof(BsspXmitBlock)); + if (dblkBuf.pdu.timer.pduArrivalTime == 0) + { +#if BSSPDEBUG +putErrmsg("Checkpoint is already acknowledged.", itoa(sessionNbr)); +#endif + return sdr_end_xn(bsspSdr); + } + + GET_OBJ_POINTER(bsspSdr, BsspSpan, span, sessionBuf.span); + dblkBuf.queueListElt = sdr_list_insert_last(bsspSdr, + span->rlBlocks, sessionBuf.block); + sdr_write(bsspSdr, sessionBuf.block, (char *) &dblkBuf, + sizeof(BsspXmitBlock)); + signalRlBso(span->engineId); + if ((_bsspvdb(NULL))->watching & WATCH_resendBlk) + { + putchar('='); + fflush(stdout); + } + + if (sdr_end_xn(bsspSdr)) + { + putErrmsg("Can't resend block.", NULL); + return -1; + } + + return 0; +} diff -Nru ion-3.2.0~dfsg1/bssp/Makefile ion-3.2.1+dfsg/bssp/Makefile --- ion-3.2.0~dfsg1/bssp/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/Makefile 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,40 @@ +OPT = /opt +PLATFORMS = i86-redhat +# i86_64-fedora +# sparc-sol9 +# i86-freebsd + +all: + cd doc; \ + mkdir -p man; \ + mkdir -p man/man1; \ + mkdir -p man/man3; \ + mkdir -p man/man5; \ + mkdir -p html; \ + mkdir -p html/man1; \ + mkdir -p html/man3; \ + mkdir -p html/man5; \ + gmake all ROOT=$(OPT); \ + cd ..; \ + for PF in $(PLATFORMS); \ + do \ + cd $$PF; \ + mkdir -p bin; \ + mkdir -p lib; \ + gmake all ROOT=$(OPT); \ + cd ..; \ + done + +clean: + cd doc; \ + gmake -i clean; \ + cd ..; \ + for PF in $(PLATFORMS); \ + do cd $$PF; gmake -i clean; cd ..; done + +install: + cd doc; \ + gmake -i install ROOT=$(OPT); \ + cd ..; \ + for PF in $(PLATFORMS); \ + do cd $$PF; gmake -i install ROOT=$(OPT); cd ..; done diff -Nru ion-3.2.0~dfsg1/bssp/README.txt ion-3.2.1+dfsg/bssp/README.txt --- ion-3.2.0~dfsg1/bssp/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/README.txt 2014-07-08 02:17:38.000000000 +0000 @@ -0,0 +1,32 @@ +******************************************************************* +NO WARRANTY: + + DISCLAIMER + +THE SOFTWARE AND/OR RELATED MATERIALS ARE PROVIDED "AS-IS" WITHOUT +WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR +MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET +FORTH IN UCC 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE +LICENSED PRODUCT, HOWEVER USED. + +IN NO EVENT SHALL CALTECH/JPL BE LIABLE FOR ANY DAMAGES AND/OR +COSTS, INCLUDING BUT NOT LIMITED TO INCIDENTAL OR CONSEQUENTIAL +DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR INJURY TO +PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER CALTECH/JPL SHALL +BE ADVISED, HAVE REASON TO KNOW, OR IN FACT SHALL KNOW OF THE +POSSIBILITY. + +USER BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE +SOFTWARE AND/OR RELATED MATERIALS. +******************************************************************* +Copyright 2002-2011, by the California Institute of Technology. ALL +RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. + +This software and/or related materials may be subject to U.S. export +control laws. By accepting this software and related materials, the +user agrees to comply with all applicable U.S. export laws and +regulations. User has the responsibility to obtain export licenses +or other export authority as may be required before exporting the +software or related materials to foreign countries or providing +access to foreign persons. +******************************************************************* diff -Nru ion-3.2.0~dfsg1/bssp/tcp/libtcpbsa.c ion-3.2.1+dfsg/bssp/tcp/libtcpbsa.c --- ion-3.2.0~dfsg1/bssp/tcp/libtcpbsa.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/tcp/libtcpbsa.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,170 @@ +/* + * libtcpbsa.c: common functions for TCP BSSP-based + * link service adapter modules. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + */ + +#include "tcpbsa.h" + +int tcpDelayEnabled = 0; +int tcpDelayNsecPerByte = 0; + +/* * * Sender functions * * * */ + +#ifndef mingw +void handleConnectionLoss() +{ + isignal(SIGPIPE, handleConnectionLoss); +} +#endif + +int connectToBSI(struct sockaddr *sn, int *sock) +{ + *sock = -1; + if (sn == NULL) + { + + return -1; /* Silently give up on connection. */ + } + + *sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (*sock < 0) + { + putSysErrmsg("BSO can't open TCP socket", NULL); + return -1; + } + + if (connect(*sock, sn, sizeof(struct sockaddr)) < 0) + { + closesocket(*sock); + *sock = -1; + putSysErrmsg("BSO can't connect to TCP socket", NULL); + return -1; + } + + return 0; +} + +int sendBytesByTCP(int *blockSocket, char *from, int length, + struct sockaddr *sn) +{ + int bytesWritten; + + while (1) /* Continue until not interrupted. */ + { + bytesWritten = isend(*blockSocket, from, length, 0); + if (bytesWritten < 0) + { + switch (errno) + { + case EINTR: /* Interrupted; retry. */ + continue; + + case EPIPE: /* Lost connection. */ + case EBADF: + case ETIMEDOUT: + case ECONNRESET: + closesocket(*blockSocket); + *blockSocket = -1; + bytesWritten = 0; + } + + putSysErrmsg("TCP BSO write() error on socket", NULL); + } + + return bytesWritten; + } +} + +int sendBlockByTCP(struct sockaddr *socketName, int *blockSocket, + int blockLength, char *block) +{ + int totalBytesSent = 0; + int header = htonl(blockLength); + int bytesRemaining; + char *from; + int bytesSent; + + /* Connect to BSI as necessary. */ + + if (*blockSocket < 0) + { + if (connectToBSI(socketName, blockSocket) < 0) + { + /* Treat I/O error as a transient anomaly. */ + + return 0; + } + } + + bytesRemaining = 4; + from = (char *) &header; + while (bytesRemaining > 0) + { + bytesSent = sendBytesByTCP(blockSocket, from, bytesRemaining, + socketName); + if (bytesSent < 0) + { + /* Big problem; shut down. */ + + putErrmsg("Failed to send preamble by TCP.", NULL); + return -1; + } + + if (*blockSocket == -1) + { + /* Just lost connection; treat as a + * transient anomaly, note incomplete + * transmission. */ + + writeMemo("[?] Lost connection to TCP BSI."); + return 0; + } + + bytesRemaining -= bytesSent; + from += bytesSent; + } + + if (blockLength == 0) /* Just a keep-alive. */ + { + return 1; /* Impossible length; means "OK". */ + } + + bytesRemaining = blockLength; + from = block; + while (bytesRemaining > 0) + { + bytesSent = sendBytesByTCP(blockSocket, from, bytesRemaining, + socketName); + if (bytesSent < 0) + { + /* Big problem; shut down. */ + + putErrmsg("Failed to send block by TCP.", NULL); + return -1; + } + + if (*blockSocket == -1) + { + /* Just lost connection; treat as a + * transient anomaly, note incomplete + * transmission. */ + + writeMemo("[?] Lost connection to TCP BSI."); + return 0; + } + + totalBytesSent += bytesSent; + from += bytesSent; + bytesRemaining -= bytesSent; + } + + return totalBytesSent; +} diff -Nru ion-3.2.0~dfsg1/bssp/tcp/tcpbsa.h ion-3.2.1+dfsg/bssp/tcp/tcpbsa.h --- ion-3.2.0~dfsg1/bssp/tcp/tcpbsa.h 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/tcp/tcpbsa.h 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * tcpbsa.h: common definitions for TCP link service + * adapter modules. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ +#ifndef _TCPBSA_H_ +#define _TCPBSA_H_ + +#include "bsspP.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(MIN) +#define MIN(x, y) ((x) < (y) ? (x) : (y)) +#endif + +#define TCPBSA_BUFSZ (64 * 1024) +#define bsspTcpDefaultPortNbr 4556 + +/* TCP has congestion control, so rate control not needed. */ +#define DEFAULT_TCP_RATE -1 + +#ifndef KEEPALIVE_PERIOD +#define KEEPALIVE_PERIOD (15) +#endif + +extern int tcpDelayEnabled; +extern int tcpDelayNsecPerByte; + +extern int _tcpOutductId(struct sockaddr *sn, char *protocolName, + char *ductName); +extern void handleConnectionLoss(); +extern int connectToBSI(struct sockaddr *sn, int *sock); +extern int sendBytesByTCP(int *blockSocket, char *from, int length, + struct sockaddr *sn); +extern int sendBlockByTCP(struct sockaddr *socketName, + int *blockSocket, int blockLength, + char *block); + +#ifdef __cplusplus +} +#endif + +#endif /* _TCPBSA_H */ diff -Nru ion-3.2.0~dfsg1/bssp/tcp/tcpbsi.c ion-3.2.1+dfsg/bssp/tcp/tcpbsi.c --- ion-3.2.0~dfsg1/bssp/tcp/tcpbsi.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/tcp/tcpbsi.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,470 @@ +/* + * tcpbsi.c: BSSP TCP-based link service daemon. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ +#include "tcpbsa.h" + +static void interruptThread() +{ + isignal(SIGTERM, interruptThread); + ionKillMainThread("tcpbsi"); +} + +/* * * Receiver thread functions * * */ + +typedef struct +{ + LystElt elt; + pthread_mutex_t *mutex; + int blockSocket; + pthread_t thread; + int *running; +} ReceiverThreadParms; + +static void terminateReceiverThread(ReceiverThreadParms *parms) +{ + writeErrmsgMemos(); + writeMemo("[i] tcpbsi receiver thread stopping."); + pthread_mutex_lock(parms->mutex); + if (parms->blockSocket != -1) + { + closesocket(parms->blockSocket); + parms->blockSocket = -1; + } + + lyst_delete(parms->elt); + pthread_mutex_unlock(parms->mutex); + MRELEASE(parms); +} + +static int receiveBytesByTCP(int bundleSocket, char *into, int length) +{ + int bytesRead; + + bytesRead = irecv(bundleSocket, into, length, 0); + switch (bytesRead) + { + case -1: + /* The recv() call may have been interrupted by + * arrival of SIGTERM, in which case reception + * should report that it's time to shut down. */ + + if (errno == EINTR) /* Shutdown. */ + { + return 0; + } + + putSysErrmsg("RL-BSI read() error on socket", NULL); + return -1; + + case 0: /* Connection closed. */ + return 0; + + default: + return bytesRead; + } +} + +static int receiveBlockByTCP(int bsiSocket, char *buffer) +{ + unsigned int blockLength = 0; + int bytesToReceive; + char *into; + unsigned int preamble; + int bytesReceived; + + while (blockLength == 0) /* length 0 is keep-alive */ + { + bytesToReceive = 4; + into = (char *) &preamble; + while (bytesToReceive > 0) + { + bytesReceived = receiveBytesByTCP(bsiSocket, into, + bytesToReceive); + if (bytesReceived < 1) + { + return bytesReceived; + } + + into += bytesReceived; + bytesToReceive -= bytesReceived; + } + + blockLength = ntohl(preamble); + if (blockLength > TCPBSA_BUFSZ) + { + writeMemoNote("[?] tcpbsi block length > buffer size", + utoa(blockLength)); + blockLength = 0; /* Ignore. */ + } + } + + bytesToReceive = blockLength; + into = buffer; + while (bytesToReceive > 0) + { + bytesReceived = receiveBytesByTCP(bsiSocket, into, + bytesToReceive); + if (bytesReceived < 1) + { + return bytesReceived; + } + + bytesToReceive -= bytesReceived; + into += bytesReceived; + } + + return blockLength; +} + +static void *receiveBlocks(void *parm) +{ + /* Main loop for bundle reception thread on one + * connection, terminating when connection is lost. */ + + ReceiverThreadParms *parms = (ReceiverThreadParms *) parm; + char *procName = "tcpbsi"; + int threadRunning = 1; + char *buffer; + int blockLength; + + buffer = MTAKE(TCPBSA_BUFSZ); + if (buffer == NULL) + { + putErrmsg("tcpbsi can't get TCP buffer.", NULL); + ionKillMainThread(procName); + terminateReceiverThread(parms); + return NULL; + } + + /* Now start receiving blocks. */ + + while (threadRunning && *(parms->running)) + { + blockLength = receiveBlockByTCP(parms->blockSocket, buffer); + switch (blockLength) + { + case -1: + putErrmsg("Can't receive block.", NULL); + + /* Intentional fall-through to next case. */ + + case 0: /* Normal stop. */ + threadRunning = 0; + continue; + + default: + break; /* Out of switch. */ + } + + if (bsspHandleInboundBlock(buffer, blockLength) < 0) + { + putErrmsg("tcpbsi can't handle inbound block.", NULL); + ionKillMainThread(procName); + threadRunning = 0; + continue; + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + } + + /* End of receiver thread; release resources. */ + + MRELEASE(buffer); + terminateReceiverThread(parms); + return NULL; +} + +/* * * Access thread functions * * * */ + +typedef struct +{ + struct sockaddr socketName; + struct sockaddr_in *inetName; + int bsiSocket; + int running; +} AccessThreadParms; + +static void *spawnReceivers(void *parm) +{ + /* Main loop for acceptance of connections and + * creation of receivers to service those connections. */ + + AccessThreadParms *atp = (AccessThreadParms *) parm; + char *procName = "tcpbsi"; + pthread_mutex_t mutex; + Lyst threads; + int newSocket; + struct sockaddr bsoSocketName; + socklen_t nameLength; + ReceiverThreadParms *parms; + LystElt elt; + pthread_t thread; + + snooze(1); /* Let main thread become interruptable. */ + pthread_mutex_init(&mutex, NULL); + threads = lyst_create_using(getIonMemoryMgr()); + if (threads == NULL) + { + putErrmsg("tcpbsi can't create threads list.", NULL); + ionKillMainThread(procName); + pthread_mutex_destroy(&mutex); + return NULL; + } + + /* Can now begin accepting connections from remote + * contacts. On failure, take down the whole BSI. */ + + while (atp->running) + { + nameLength = sizeof(struct sockaddr); + newSocket = accept(atp->bsiSocket, &bsoSocketName, + &nameLength); + if (newSocket < 0) + { + putSysErrmsg("tcpbsi accept() failed", NULL); + ionKillMainThread(procName); + atp->running = 0; + continue; + } + + if (atp->running == 0) + { + break; /* Main thread has shut down. */ + } + + parms = (ReceiverThreadParms *) + MTAKE(sizeof(ReceiverThreadParms)); + if (parms == NULL) + { + putErrmsg("tcpbsi can't allocate for thread.", NULL); + ionKillMainThread(procName); + atp->running = 0; + continue; + } + + pthread_mutex_lock(&mutex); + parms->elt = lyst_insert_last(threads, parms); + pthread_mutex_unlock(&mutex); + if (parms->elt == NULL) + { + putErrmsg("tcpbsi can't allocate for thread.", NULL); + MRELEASE(parms); + ionKillMainThread(procName); + atp->running = 0; + continue; + } + + parms->mutex = &mutex; + parms->blockSocket = newSocket; + parms->running = &(atp->running); + if (pthread_begin(&(parms->thread), NULL, receiveBlocks, + parms)) + { + putSysErrmsg("tcpbsi can't create new thread", NULL); + MRELEASE(parms); + ionKillMainThread(procName); + atp->running = 0; + continue; + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + } + + closesocket(atp->bsiSocket); + writeErrmsgMemos(); + + /* Shut down all current BSI threads cleanly. */ + + while (1) + { + pthread_mutex_lock(&mutex); + elt = lyst_first(threads); + if (elt == NULL) /* All threads shut down. */ + { + pthread_mutex_unlock(&mutex); + break; + } + + /* Trigger termination of thread. */ + + parms = (ReceiverThreadParms *) lyst_data(elt); + thread = parms->thread; +#ifdef mingw + shutdown(parms->blockSocket, SD_BOTH); +#else + pthread_kill(thread, SIGTERM); +#endif + pthread_mutex_unlock(&mutex); + pthread_join(thread, NULL); + } + + lyst_destroy(threads); + writeErrmsgMemos(); + writeMemo("[i] tcpbsi access thread has ended."); + pthread_mutex_destroy(&mutex); + return NULL; +} + +/* * * Main thread functions * * * */ + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int tcpbsi(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ + char *socketSpec = (char *) a1; +#else +int main(int argc, char *argv[]) +{ + char *socketSpec = (argc > 1 ? argv[1] : NULL); +#endif + + BsspVdb *vdb; + char *hostName; + unsigned short portNbr; + unsigned int hostNbr; + AccessThreadParms atp; + socklen_t nameLength; + char *tcpDelayString; + pthread_t accessThread; + int fd; + + if (socketSpec == NULL) + { + PUTS("Usage: tcpbsi [:]"); + return 0; + } + + if (bsspInit(0) < 0) + { + putErrmsg("tcpbsi can't initialize BSSP.", NULL); + return 1; + } + + vdb = getBsspVdb(); + if (vdb->rlBsiPid != ERROR && vdb->rlBsiPid != sm_TaskIdSelf()) + { + putErrmsg("RL-BSI task is already started.", + itoa(vdb->rlBsiPid)); + return 1; + } + + /* All command-line arguments are now validated. */ + + hostName = socketSpec; + if (parseSocketSpec(socketSpec, &portNbr, &hostNbr) != 0) + { + putErrmsg("RL-BSI can't get IP/port for host.", hostName); + return -1; + } + + if (portNbr == 0) + { + portNbr = bsspTcpDefaultPortNbr; + } + + portNbr = htons(portNbr); + hostNbr = htonl(hostNbr); + memset((char *) &(atp.socketName), 0, sizeof(struct sockaddr)); + atp.inetName = (struct sockaddr_in *) &(atp.socketName); + atp.inetName->sin_family = AF_INET; + atp.inetName->sin_port = portNbr; + memcpy((char *) &(atp.inetName->sin_addr.s_addr), (char *) &hostNbr, 4); + atp.bsiSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (atp.bsiSocket < 0) + { + putSysErrmsg("RL-BSI can't open TCP socket", NULL); + return 1; + } + + nameLength = sizeof(struct sockaddr); + if (reUseAddress(atp.bsiSocket) + || bind(atp.bsiSocket, &(atp.socketName), nameLength) < 0 + || listen(atp.bsiSocket, 5) < 0 + || getsockname(atp.bsiSocket, &(atp.socketName), &nameLength) < 0) + { + closesocket(atp.bsiSocket); + putSysErrmsg("RL-BSI can't initialize socket", NULL); + return 1; + } + + tcpDelayString = getenv("TCP_DELAY_NSEC_PER_BYTE"); + if (tcpDelayString == NULL) + { + tcpDelayEnabled = 0; + } + else /* Artificial TCP delay, for testing purposes. */ + { + tcpDelayEnabled = 1; + tcpDelayNsecPerByte = strtol(tcpDelayString, NULL, 0); + if (tcpDelayNsecPerByte < 0 + || tcpDelayNsecPerByte > 16384) + { + tcpDelayNsecPerByte = 0; + } + } + + /* Set up signal handling: SIGTERM is shutdown signal. */ + + ionNoteMainThread("tcpbsi"); + isignal(SIGTERM, interruptThread); + + /* Start the access thread. */ + + atp.running = 1; + if (pthread_begin(&accessThread, NULL, spawnReceivers, &atp)) + { + closesocket(atp.bsiSocket); + putSysErrmsg("tcpbsi can't create access thread", NULL); + return 1; + } + + /* Now sleep until interrupted by SIGTERM, at which point + * it's time to stop tcpbsi. */ + + { + char txt[500]; + + isprintf(txt, sizeof(txt), + "[i] tcpbsi is running, spec=[%s:%d].", + inet_ntoa(atp.inetName->sin_addr), ntohs(portNbr)); + writeMemo(txt); + } + + ionPauseMainThread(-1); + + /* Time to shut down. */ + + atp.running = 0; + + /* Wake up the access thread by connecting to it. */ + + fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (fd >= 0) + { + oK(connect(fd, &(atp.socketName), sizeof(struct sockaddr))); + + /* Immediately discard the connected socket. */ + + closesocket(fd); + } + + pthread_join(accessThread, NULL); + writeErrmsgMemos(); + writeMemo("[i] tcpbsi has ended."); + ionDetach(); + return 0; +} diff -Nru ion-3.2.0~dfsg1/bssp/tcp/tcpbso.c ion-3.2.1+dfsg/bssp/tcp/tcpbso.c --- ion-3.2.0~dfsg1/bssp/tcp/tcpbso.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/tcp/tcpbso.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,265 @@ +/* + * tcpbso.c: BSSP TCP-based link service output daemon. + * Dedicated to TCP blocks transmission to a + * single remote BSSP engine. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ +#include "tcpbsa.h" + +static sm_SemId tcpbsoSemaphore(sm_SemId *semid) +{ + long temp; + void *value; + sm_SemId semaphore; + + if (semid) /* Add task variable. */ + { + temp = *semid; + value = (void *) temp; + value = sm_TaskVar(&value); + } + else /* Retrieve task variable. */ + { + value = sm_TaskVar(NULL); + } + + temp = (long) value; + semaphore = temp; + return semaphore; +} + +static void shutDownBso() /* Commands CLO termination. */ +{ + isignal(SIGTERM, shutDownBso); + sm_SemEnd(tcpbsoSemaphore(NULL)); +} + +/* * * Keepalive thread functions * * */ + +typedef struct +{ + int *bsoRunning; + pthread_mutex_t *mutex; + struct sockaddr *socketName; + int *ductSocket; +} KeepaliveThreadParms; + +static void *sendKeepalives(void *parm) +{ + KeepaliveThreadParms *parms = (KeepaliveThreadParms *) parm; + int count = KEEPALIVE_PERIOD; + int bytesSent; + + iblock(SIGTERM); + while (*(parms->bsoRunning)) + { + snooze(1); + count++; + if (count < KEEPALIVE_PERIOD) + { + continue; + } + + /* Time to send a keepalive. Note that the + * interval between keepalive attempts will be + * KEEPALIVE_PERIOD plus (if the remote induct + * is not reachable) the length of time taken + * by TCP to determine that the connection + * attempt will not succeed (e.g., 3 seconds). */ + + count = 0; + pthread_mutex_lock(parms->mutex); + bytesSent = sendBlockByTCP(parms->socketName, + parms->ductSocket, 0, NULL); + pthread_mutex_unlock(parms->mutex); + if (bytesSent < 0) + { + shutDownBso(); + break; + } + } + + return NULL; +} + +/* * * Main thread functions * * * */ + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int tcpbso(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ + char *ductName = (char *) a1; + uvast remoteEngineId = a2 != 0 ? strtouvast((char *) a2) : 0; +#else +int main(int argc, char *argv[]) +{ + char *ductName = (argc > 1 ? argv[1] : NULL); + uvast remoteEngineId = argc > 2 ? strtouvast(argv[2]) : 0; +#endif + Sdr sdr; + BsspVspan *vspan; + PsmAddress vspanElt; + char *hostName; + unsigned short portNbr; + unsigned int hostNbr; + struct sockaddr socketName; + struct sockaddr_in *inetName; + int running = 1; + pthread_mutex_t mutex; + KeepaliveThreadParms parms; + pthread_t keepaliveThread; + int blockLength; + char *block; + int ductSocket = -1; + int bytesSent; + + if (remoteEngineId == 0 || ductName == NULL) + { + PUTS("Usage: tcpbso [:] "); + return 0; + } + + if (bsspInit(0) < 0) + { + putErrmsg("tcpbso can't initialize BSSP.", NULL); + return 1; + } + + sdr = getIonsdr(); + CHKZERO(sdr_begin_xn(sdr)); /* Just to lock memory. */ + findSpan(remoteEngineId, &vspan, &vspanElt); + if (vspanElt == 0) + { + sdr_exit_xn(sdr); + putErrmsg("No such engine in database.", itoa(remoteEngineId)); + return 1; + } + + if (vspan->bsoRLPid != ERROR && vspan->bsoRLPid != sm_TaskIdSelf()) + { + sdr_exit_xn(sdr); + putErrmsg("TCP-BSO task is already started for this span.", + itoa(vspan->bsoRLPid)); + return 1; + } + + sdr_exit_xn(sdr); + + /* All command-line arguments are now validated. */ + + hostName = ductName; + parseSocketSpec(ductName, &portNbr, &hostNbr); + if (portNbr == 0) + { + portNbr = bsspTcpDefaultPortNbr; + } + + portNbr = htons(portNbr); + if (hostNbr == 0) + { + putErrmsg("Can't get IP address for host.", hostName); + return -1; + } + + hostNbr = htonl(hostNbr); + memset((char *) &socketName, 0, sizeof socketName); + inetName = (struct sockaddr_in *) &socketName; + inetName->sin_family = AF_INET; + inetName->sin_port = portNbr; + memcpy((char *) &(inetName->sin_addr.s_addr), (char *) &hostNbr, 4); + + /* Set up signal handling. SIGTERM is shutdown signal. */ + + oK(tcpbsoSemaphore(&(vspan->rlSemaphore))); + isignal(SIGTERM, shutDownBso); +#ifndef mingw + isignal(SIGPIPE, handleConnectionLoss); +#endif + + /* Start the keepalive thread to manage the connection. */ + + parms.bsoRunning = &running; + pthread_mutex_init(&mutex, NULL); + parms.mutex = &mutex; + parms.socketName = &socketName; + parms.ductSocket = &ductSocket; + if (pthread_begin(&keepaliveThread, NULL, sendKeepalives, &parms)) + { + putSysErrmsg("tcpbso can't create keepalive thread", NULL); + pthread_mutex_destroy(&mutex); + return 1; + } + + /* Can now begin transmitting to remote duct. */ + + { + char txt[500]; + + isprintf(txt, sizeof(txt), + "[i] tcpbso is running, spec=[%s:%d].", + inet_ntoa(inetName->sin_addr), + ntohs(inetName->sin_port)); + writeMemo(txt); + } + + while (!(sm_SemEnded(tcpbsoSemaphore(NULL)))) + { + + blockLength = bsspDequeueRLOutboundBlock(vspan, &block); + if (blockLength < 0) + { + sm_SemEnd(tcpbsoSemaphore(NULL));/* Stop BSO.*/ + continue; + } + + if (blockLength == 0) /* Interrupted. */ + { + continue; + } + + if (blockLength > TCPBSA_BUFSZ) + { + putErrmsg("Block is too big for TCP BSO.", + itoa(blockLength)); + sm_SemEnd(tcpbsoSemaphore(NULL));/* Stop BSO.*/ + } + else + { + pthread_mutex_lock(&mutex); + bytesSent = sendBlockByTCP(&socketName, &ductSocket, + blockLength, block); + pthread_mutex_unlock(&mutex); + if (bytesSent < blockLength) /* Stop BSO.*/ + { + sm_SemEnd(tcpbsoSemaphore(NULL)); + continue; + } + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + } + + running = 0; /* Terminate keepalive thread. */ + pthread_join(keepaliveThread, NULL); + if (ductSocket != -1) + { + closesocket(ductSocket); + } + + pthread_mutex_destroy(&mutex); + writeErrmsgMemos(); + writeMemo("[i] tcpbso duct has ended."); + return 0; +} diff -Nru ion-3.2.0~dfsg1/bssp/udp/udpbsa.h ion-3.2.1+dfsg/bssp/udp/udpbsa.h --- ion-3.2.0~dfsg1/bssp/udp/udpbsa.h 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/udp/udpbsa.h 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * udpbsa.h: common definitions for UDP link service + * adapter modules. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ +#ifndef _UDPBSA_H_ +#define _UDPBSA_H_ + +#include "bsspP.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define UDPBSA_BUFSZ ((256 * 256) - 1) +#define BsspUdpDefaultPortNbr 6001 + +#ifdef __cplusplus +} +#endif + +#endif /* _UDPBSA_H */ diff -Nru ion-3.2.0~dfsg1/bssp/udp/udpbsi.c ion-3.2.1+dfsg/bssp/udp/udpbsi.c --- ion-3.2.0~dfsg1/bssp/udp/udpbsi.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/udp/udpbsi.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,223 @@ +/* + * udpbsi.c: BSSP UDP-based link service input daemon. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + */ + +#include "udpbsa.h" + +static void interruptThread() +{ + isignal(SIGTERM, interruptThread); + ionKillMainThread("udpbsi"); +} + +/* * * Receiver thread functions * * */ + +typedef struct +{ + int linkSocket; + int running; +} ReceiverThreadParms; + +static void *handleDatagrams(void *parm) +{ + /* Main loop for UDP datagram reception and handling. */ + + ReceiverThreadParms *rtp = (ReceiverThreadParms *) parm; + char *procName = "udpbsi"; + char *buffer; + int blockLength; + struct sockaddr_in fromAddr; + socklen_t fromSize; + + snooze(1); /* Let main thread become interruptable. */ + buffer = MTAKE(UDPBSA_BUFSZ); + if (buffer == NULL) + { + putErrmsg("udpbsi can't get UDP buffer.", NULL); + ionKillMainThread(procName); + return NULL; + } + + /* Can now start receiving bundles. On failure, take + * down the BSI. */ + + while (rtp->running) + { + fromSize = sizeof fromAddr; + blockLength = irecvfrom(rtp->linkSocket, buffer, UDPBSA_BUFSZ, + 0, (struct sockaddr *) &fromAddr, &fromSize); + switch (blockLength) + { + case -1: + putSysErrmsg("Can't acquire block", NULL); + ionKillMainThread(procName); + + /* Intentional fall-through to next case. */ + + case 1: /* Normal stop. */ + rtp->running = 0; + continue; + } + + if (bsspHandleInboundBlock(buffer, blockLength) < 0) + { + putErrmsg("Can't handle inbound block.", NULL); + ionKillMainThread(procName); + rtp->running = 0; + continue; + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + } + + writeErrmsgMemos(); + writeMemo("[i] udpbsi receiver thread has ended."); + + /* Free resources. */ + + MRELEASE(buffer); + return NULL; +} + +/* * * Main thread functions * * * */ + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int udpbsi(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ + char *endpointSpec = (char *) a1; +#else +int main(int argc, char *argv[]) +{ + char *endpointSpec = (argc > 1 ? argv[1] : NULL); +#endif + BsspVdb *vdb; + unsigned short portNbr = 0; + unsigned int ipAddress = INADDR_ANY; + struct sockaddr socketName; + struct sockaddr_in *inetName; + ReceiverThreadParms rtp; + socklen_t nameLength; + pthread_t receiverThread; + int fd; + char quit = '\0'; + + /* Note that bsspadmin must be run before the first + * invocation of bsspbsi, to initialize the BSSP database + * (as necessary) and dynamic database. */ + + if (bsspInit(0) < 0) + { + putErrmsg("udpbsi can't initialize BSSP.", NULL); + return 1; + } + + vdb = getBsspVdb(); + if (vdb->beBsiPid != ERROR && vdb->beBsiPid != sm_TaskIdSelf()) + { + putErrmsg("BE-BSI task is already started.", + itoa(vdb->beBsiPid)); + return 1; + } + + /* All command-line arguments are now validated. */ + + if (endpointSpec) + { + if(parseSocketSpec(endpointSpec, &portNbr, &ipAddress) != 0) + { + putErrmsg("BE-BSI Can't get IP/port for endpointSpec.", + endpointSpec); + return -1; + } + } + if (portNbr == 0) + { + portNbr = BsspUdpDefaultPortNbr; + } + portNbr = htons(portNbr); + ipAddress = htonl(ipAddress); + + memset((char *) &socketName, 0, sizeof socketName); + inetName = (struct sockaddr_in *) &socketName; + inetName->sin_family = AF_INET; + inetName->sin_port = portNbr; + memcpy((char *) &(inetName->sin_addr.s_addr), (char *) &ipAddress, 4); + rtp.linkSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (rtp.linkSocket < 0) + { + putSysErrmsg("BE-BSI can't open UDP socket", NULL); + return -1; + } + + nameLength = sizeof(struct sockaddr); + if (reUseAddress(rtp.linkSocket) + || bind(rtp.linkSocket, &socketName, nameLength) < 0 + || getsockname(rtp.linkSocket, &socketName, &nameLength) < 0) + { + closesocket(rtp.linkSocket); + putSysErrmsg("BE-BSI Can't initialize socket", NULL); + return 1; + } + + /* Set up signal handling; SIGTERM is shutdown signal. */ + + ionNoteMainThread("udpbsi"); + isignal(SIGTERM, interruptThread); + + /* Start the receiver thread. */ + + rtp.running = 1; + if (pthread_begin(&receiverThread, NULL, handleDatagrams, &rtp)) + { + closesocket(rtp.linkSocket); + putSysErrmsg("udpbsi can't create receiver thread", NULL); + return 1; + } + + /* Now sleep until interrupted by SIGTERM, at which point + * it's time to stop the link service. */ + + { + char txt[500]; + + isprintf(txt, sizeof(txt), + "[i] udpbsi is running, spec=[%s:%d].", + inet_ntoa(inetName->sin_addr), ntohs(portNbr)); + writeMemo(txt); + } + + ionPauseMainThread(-1); + + /* Time to shut down. */ + + rtp.running = 0; + + /* Wake up the receiver thread by sending it a 1-byte + * datagram. */ + + fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (fd >= 0) + { + isendto(fd, &quit, 1, 0, &socketName, sizeof(struct sockaddr)); + closesocket(fd); + } + + pthread_join(receiverThread, NULL); + closesocket(rtp.linkSocket); + writeErrmsgMemos(); + writeMemo("[i] udpbsi has ended."); + ionDetach(); + return 0; +} diff -Nru ion-3.2.0~dfsg1/bssp/udp/udpbso.c ion-3.2.1+dfsg/bssp/udp/udpbso.c --- ion-3.2.0~dfsg1/bssp/udp/udpbso.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/udp/udpbso.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,405 @@ +/* + * udpbso.c: BSSP UDP-based link service output daemon. + * Dedicated to UDP datagrams transmission to + * a single remote BSSP engine. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + * + */ + +#include "udpbsa.h" + +#if defined(linux) + +#define IPHDR_SIZE (sizeof(struct iphdr) + sizeof(struct udphdr)) + +#elif defined(mingw) + +#define IPHDR_SIZE (20 + 8) + +#else + +#include "netinet/ip_var.h" +#include "netinet/udp_var.h" + +#define IPHDR_SIZE (sizeof(struct udpiphdr)) + +#endif + +static sm_SemId udpbsoSemaphore(sm_SemId *semid) +{ + static sm_SemId semaphore = -1; + + if (semid) + { + semaphore = *semid; + } + + return semaphore; +} + +static void shutDownBso() /* Commands LSO termination. */ +{ + sm_SemEnd(udpbsoSemaphore(NULL)); +} + +/* * * Receiver thread functions * * */ + +typedef struct +{ + int linkSocket; + int running; +} ReceiverThreadParms; + +static void *handleDatagrams(void *parm) +{ + /* Main loop for UDP datagram reception and handling. */ + + ReceiverThreadParms *rtp = (ReceiverThreadParms *) parm; + char *buffer; + int blockLength; + struct sockaddr_in fromAddr; + socklen_t fromSize; + + buffer = MTAKE(UDPBSA_BUFSZ); + if (buffer == NULL) + { + putErrmsg("udpbsi can't get UDP buffer.", NULL); + shutDownBso(); + return NULL; + } + /* Can now start receiving bundles. On failure, take + * down the BSO. */ + + iblock(SIGTERM); + + while (rtp->running) + { + fromSize = sizeof fromAddr; + blockLength = irecvfrom(rtp->linkSocket, buffer, UDPBSA_BUFSZ, + 0, (struct sockaddr *) &fromAddr, &fromSize); + switch (blockLength) + { + case -1: + putSysErrmsg("Can't acquire block", NULL); + shutDownBso(); + + /* Intentional fall-through to next case. */ + + case 1: /* Normal stop. */ + rtp->running = 0; + continue; + } + if (bsspHandleInboundBlock(buffer, blockLength) < 0) + { + putErrmsg("Can't handle inbound block.", NULL); + shutDownBso(); + rtp->running = 0; + continue; + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + } + + writeErrmsgMemos(); + writeMemo("[i] udpbso receiver thread has ended."); + + /* Free resources. */ + + MRELEASE(buffer); + return NULL; +} + +/* * * Main thread functions * * * */ + +int sendBlockByUDP(int linkSocket, char *from, int length, + struct sockaddr_in *destAddr ) +{ + int bytesWritten; + + while (1) /* Continue until not interrupted. */ + { + bytesWritten = isendto(linkSocket, from, length, 0, + (struct sockaddr *) destAddr, + sizeof(struct sockaddr)); + if (bytesWritten < 0) + { + if (errno == EINTR) /* Interrupted. */ + { + continue; /* Retry. */ + } + + { + char memoBuf[1000]; + struct sockaddr_in *saddr = destAddr; + + isprintf(memoBuf, sizeof(memoBuf), + "udpbso sendto() error, dest=[%s:%d], \ +nbytes=%d, rv=%d, errno=%d", (char *) inet_ntoa(saddr->sin_addr), + ntohs(saddr->sin_port), + length, bytesWritten, errno); + writeMemo(memoBuf); + } + } + return bytesWritten; + } +} + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int udpbso(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ + char *endpointSpec = (char *) a1; + unsigned int txbps = (a2 != 0 ? strtoul((char *) a2, NULL, 0) : 0); + uvast remoteEngineId = a3 != 0 ? strtouvast((char *) a3) : 0; +#else +int main(int argc, char *argv[]) +{ + char *endpointSpec = argc > 1 ? argv[1] : NULL; + unsigned int txbps = (argc > 2 ? strtoul(argv[2], NULL, 0) : 0); + uvast remoteEngineId = argc > 3 ? strtouvast(argv[3]) : 0; +#endif + Sdr sdr; + BsspVspan *vspan; + PsmAddress vspanElt; + unsigned short portNbr = 0; + unsigned int ipAddress = 0; + char ownHostName[MAXHOSTNAMELEN]; + struct sockaddr ownSockName; + struct sockaddr_in *ownInetName; + struct sockaddr bindSockName; + struct sockaddr_in *bindInetName; + struct sockaddr peerSockName; + struct sockaddr_in *peerInetName; + socklen_t nameLength; + ReceiverThreadParms rtp; + pthread_t receiverThread; + int blockLength; + char *block; + int bytesSent; + float sleepSecPerBit = 0; + float sleep_secs; + unsigned int usecs; + int fd; + char quit = '\0'; + + if( txbps != 0 && remoteEngineId == 0 ) + { + remoteEngineId = txbps; + txbps = 0; + } + + if (remoteEngineId == 0 || endpointSpec == NULL) + { + PUTS("Usage: udpbso { | @}[:\ + ] "); + return 0; + } + + /* Note that bsspadmin must be run before the first + * invocation of bsspbso, to initialize the BSSP database + * (as necessary) and dynamic database. */ + + if (bsspInit(0) < 0) + { + putErrmsg("udpbso can't initialize BSSP.", NULL); + return 1; + } + + sdr = getIonsdr(); + CHKZERO(sdr_begin_xn(sdr)); /* Just to lock memory. */ + findSpan(remoteEngineId, &vspan, &vspanElt); + if (vspanElt == 0) + { + sdr_exit_xn(sdr); + putErrmsg("No such engine in database.", itoa(remoteEngineId)); + return 1; + } + + if (vspan->bsoBEPid != ERROR && vspan->bsoBEPid != sm_TaskIdSelf()) + { + sdr_exit_xn(sdr); + putErrmsg("BE-BSO task is already started for this span.", + itoa(vspan->bsoBEPid)); + return 1; + } + + sdr_exit_xn(sdr); + + /* All command-line arguments are now validated. First + * get peer's socket address. */ + + parseSocketSpec(endpointSpec, &portNbr, &ipAddress); + if (portNbr == 0) + { + portNbr = BsspUdpDefaultPortNbr; + } + + getNameOfHost(ownHostName, sizeof ownHostName); + if (ipAddress == 0) /* Default to local host. */ + { + ipAddress = getInternetAddress(ownHostName); + } + + portNbr = htons(portNbr); + ipAddress = htonl(ipAddress); + memset((char *) &peerSockName, 0, sizeof peerSockName); + peerInetName = (struct sockaddr_in *) &peerSockName; + peerInetName->sin_family = AF_INET; + peerInetName->sin_port = portNbr; + memcpy((char *) &(peerInetName->sin_addr.s_addr), + (char *) &ipAddress, 4); + + /* Now compute own socket address, used when the peer + * responds to the link service output socket rather + * than to the advertised link service input socket. */ + + ipAddress = htonl(INADDR_ANY); + memset((char *) &bindSockName, 0, sizeof bindSockName); + bindInetName = (struct sockaddr_in *) &bindSockName; + bindInetName->sin_family = AF_INET; + bindInetName->sin_port = 0; /* Let O/S select it. */ + memcpy((char *) &(bindInetName->sin_addr.s_addr), + (char *) &ipAddress, 4); + + /* Now create the socket that will be used for sending + * datagrams to the peer BSSP engine and receiving + * datagrams from the peer BSSP engine. */ + + rtp.linkSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (rtp.linkSocket < 0) + { + putSysErrmsg("BE-BSO can't open UDP socket", NULL); + return 1; + } + + /* Bind the socket to own socket address so that we can + * send a 1-byte datagram to that address to shut down + * the datagram handling thread. */ + + nameLength = sizeof(struct sockaddr); + if (bind(rtp.linkSocket, &bindSockName, nameLength) < 0 + || getsockname(rtp.linkSocket, &bindSockName, &nameLength) < 0) + { + closesocket(rtp.linkSocket); + putSysErrmsg("BE-BSO can't bind UDP socket", NULL); + return 1; + } + + /* Set up signal handling. SIGTERM is shutdown signal. */ + + oK(udpbsoSemaphore(&(vspan->beSemaphore))); + signal(SIGTERM, shutDownBso); + + /* Start the echo handler thread. */ + + rtp.running = 1; + if (pthread_begin(&receiverThread, NULL, handleDatagrams, &rtp)) + { + closesocket(rtp.linkSocket); + putSysErrmsg("udpbsi can't create receiver thread", NULL); + return 1; + } + + /* Can now begin transmitting to remote engine. */ + + { + char memoBuf[1024]; + + isprintf(memoBuf, sizeof(memoBuf), + "[i] udpbso is running, spec=[%s:%d], txbps=%d \ +(0=unlimited), rengine=%d.", (char *) inet_ntoa(peerInetName->sin_addr), + ntohs(portNbr), txbps, (int) remoteEngineId); + writeMemo(memoBuf); + } + + if (txbps) + { + sleepSecPerBit = 1.0 / txbps; + } + + while (rtp.running && !(sm_SemEnded(vspan->beSemaphore))) + { + blockLength = bsspDequeueBEOutboundBlock(vspan, &block); + if (blockLength < 0) + { + rtp.running = 0; /* Terminate LSO. */ + continue; + } + + if (blockLength == 0) /* Interrupted. */ + { + continue; + } + + if (blockLength > UDPBSA_BUFSZ) + { + putErrmsg("Block is too big for UDP BSO.", + itoa(blockLength)); + rtp.running = 0; /* Terminate LSO. */ + } + else + { + bytesSent = sendBlockByUDP(rtp.linkSocket, block, + blockLength, peerInetName); + if (bytesSent < blockLength) + { + rtp.running = 0;/* Terminate BSO. */ + } + + if (txbps) + { + sleep_secs = sleepSecPerBit + * ((IPHDR_SIZE + blockLength) * 8); + usecs = sleep_secs * 1000000.0; + if (usecs == 0) + { + usecs = 1; + } + + microsnooze(usecs); + } + } + + /* Make sure other tasks have a chance to run. */ + + sm_TaskYield(); + } + + /* Create one-use socket for the closing quit byte. */ + + portNbr = bindInetName->sin_port; /* From binding. */ + ipAddress = getInternetAddress(ownHostName); + ipAddress = htonl(ipAddress); + memset((char *) &ownSockName, 0, sizeof ownSockName); + ownInetName = (struct sockaddr_in *) &ownSockName; + ownInetName->sin_family = AF_INET; + ownInetName->sin_port = portNbr; + memcpy((char *) &(ownInetName->sin_addr.s_addr), + (char *) &ipAddress, 4); + + /* Wake up the receiver thread by sending it a 1-byte + * datagram. */ + + fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + if (fd >= 0) + { + isendto(fd, &quit, 1, 0, &ownSockName, sizeof(struct sockaddr)); + closesocket(fd); + } + + pthread_join(receiverThread, NULL); + closesocket(rtp.linkSocket); + writeErrmsgMemos(); + writeMemo("[i] udpbso has ended."); + return 0; +} diff -Nru ion-3.2.0~dfsg1/bssp/utils/bsspadmin.c ion-3.2.1+dfsg/bssp/utils/bsspadmin.c --- ion-3.2.0~dfsg1/bssp/utils/bsspadmin.c 1970-01-01 00:00:00.000000000 +0000 +++ ion-3.2.1+dfsg/bssp/utils/bsspadmin.c 2014-07-08 02:17:39.000000000 +0000 @@ -0,0 +1,801 @@ +/* + * bsspadmin.c: BSSP engine adminstration interface. + * + * Authors: Sotirios-Angelos Lenas, SPICE + * Scott Burleigh, JPL + * + * Copyright (c) 2013, California Institute of Technology. + * Copyright (c) 2013, Space Internetworking Center, + * Democritus University of Thrace. + * + * All rights reserved. U.S. Government and E.U. Sponsorship acknowledged. + */ + +#include "bsspP.h" +#include "ion.h" + +static int _echo(int *newValue) +{ + static int state = 0; + + if (newValue) + { + if (*newValue == 1) + { + state = 1; + } + else + { + state = 0; + } + } + + return state; +} + +static void printText(char *text) +{ + if (_echo(NULL)) + { + writeMemo(text); + } + + PUTS(text); +} + +static void handleQuit() +{ + printText("Please enter command 'q' to stop the program."); +} + +static void printSyntaxError(int lineNbr) +{ + char buffer[80]; + + isprintf(buffer, sizeof buffer, + "Syntax error at line %d of bsspadmin.c", lineNbr); + printText(buffer); +} + +#define SYNTAX_ERROR printSyntaxError(__LINE__) + +static void printUsage() +{ + PUTS("Valid commands are:"); + PUTS("\tq\tQuit"); + PUTS("\th\tHelp"); + PUTS("\t?\tHelp"); + PUTS("\tv\tPrint version of ION."); + PUTS("\t1\tInitialize"); + PUTS("\t 1 "); + PUTS("\ta\tAdd"); + PUTS("\t a span '' '' [queuing latency, in seconds]"); + PUTS("\t\tIf queuing latency is negative, the absolute value of this \ +number is used as the actual queuing latency and session purging is enabled. \ +See man(5) for bssprc."); + PUTS("\tc\tChange"); + PUTS("\t c span \ +'' '' [queuing latency, in seconds]"); + PUTS("\td\tDelete"); + PUTS("\ti\tInfo"); + PUTS("\t {d|i} span "); + PUTS("\tl\tList"); + PUTS("\t l span"); + PUTS("\tm\tManage"); + PUTS("\t m ownqtime "); + PUTS("\ts\tStart"); + PUTS("\t s '' ''"); + PUTS("\tx\tStop"); + PUTS("\t x"); + PUTS("\tw\tWatch BSSP activity"); + PUTS("\t w { 0 | 1 | }"); + PUTS("\t\tActivity spec is a string of all requested activity \ +indication characters, e.g., df{]. See man(5) for bssprc."); + PUTS("\te\tEnable or disable echo of printed output to log file"); + PUTS("\t e { 0 | 1 }"); + PUTS("\t#\tComment"); + PUTS("\t # "); +} + +static void initializeBssp(int tokenCount, char **tokens) +{ + unsigned int estMaxNbrOfSessions; + + if (tokenCount == 3) + { + tokenCount = 2; + } + + if (tokenCount != 2) + { + SYNTAX_ERROR; + return; + } + estMaxNbrOfSessions = strtol(tokens[1], NULL, 0); + if (ionAttach() < 0) + { + putErrmsg("bssppadmin can't attach to ION.", NULL); + return; + } + if (bsspInit(estMaxNbrOfSessions) < 0) + { + putErrmsg("bssppadmin can't initialize BSSP.", NULL); + return; + } +} + +static int attachToBssp() +{ + if (bsspAttach() < 0) + { + printText("BSSP not initialized yet."); + return -1; + } + return 0; +} + +static void executeAdd(int tokenCount, char **tokens) +{ + uvast engineId; + int qTime = 1; /* Default. */ + int purge = 0; /* Default. */ + if (tokenCount < 2) + { + printText("Add what?"); + return; + } + + if (strcmp(tokens[1], "span") == 0) + { + + switch (tokenCount) + { + case 8: + qTime = strtol(tokens[7], NULL, 0); + if (qTime < 0) + { + purge = 1; + qTime = 0 - qTime; + } + + /* Intentional fall-through to next case. */ + + case 7: + break; + + default: + SYNTAX_ERROR; + return; + } + + engineId = strtouvast(tokens[2]); + oK(addSpan(engineId, strtol(tokens[3], NULL, 0), + strtol(tokens[4], NULL, 0), tokens[5], + tokens[6], (unsigned int) qTime, purge)); + return; + } + + SYNTAX_ERROR; +} + +static void executeChange(int tokenCount, char **tokens) +{ + uvast engineId; + int qTime = 1; /* Default. */ + int purge = 0; /* Default. */ + + if (tokenCount < 2) + { + printText("Add what?"); + return; + } + + if (strcmp(tokens[1], "span") == 0) + { + + switch (tokenCount) + { + case 8: + qTime = strtol(tokens[7], NULL, 0); + if (qTime < 0) + { + purge = 1; + qTime = 0 - qTime; + } + + /* Intentional fall-through to next case. */ + + case 7: + break; + + default: + SYNTAX_ERROR; + return; + } + + engineId = strtouvast(tokens[2]); + oK(updateSpan(engineId, strtol(tokens[3], NULL, 0), + strtol(tokens[4], NULL, 0), tokens[5], + tokens[6], (unsigned int) qTime, purge)); + return; + } + + SYNTAX_ERROR; +} + +static void executeDelete(int tokenCount, char **tokens) +{ + uvast engineId; + + if (tokenCount < 2) + { + printText("Delete what?"); + return; + } + + if (strcmp(tokens[1], "span") == 0) + { + if (tokenCount != 4) + { + SYNTAX_ERROR; + return; + } + + engineId = strtouvast(tokens[2]); + removeSpan(engineId); + return; + } + + SYNTAX_ERROR; +} + +static void printSpan(BsspVspan *vspan) +{ + Sdr sdr = getIonsdr(); + OBJ_POINTER(BsspSpan, span); + char cmd[SDRSTRING_BUFSZ]; + char buffer[256]; + + CHKVOID(sdr_begin_xn(sdr)); + GET_OBJ_POINTER(sdr, BsspSpan, span, + sdr_list_data(sdr, vspan->spanElt)); + sdr_string_read(sdr, cmd, span->bsoBECmd); + isprintf(buffer, sizeof buffer, + UVAST_FIELDSPEC " pid: %d cmd: %.128s", + vspan->engineId, vspan->bsoBEPid, cmd); + printText(buffer); + + sdr_string_read(sdr, cmd, span->bsoRLCmd); + isprintf(buffer, sizeof buffer, + UVAST_FIELDSPEC " pid: %d cmd: %.128s", + vspan->engineId, vspan->bsoRLPid, cmd); + printText(buffer); + + isprintf(buffer, sizeof buffer, "\tmax export sessions: %u", + span->maxExportSessions); + printText(buffer); + + isprintf(buffer, sizeof buffer, "\tmax block size: %u queuing \ + latency: %u purge: %d", span->maxBlockSize, + span->remoteQtime, span->purge); + printText(buffer); + + isprintf(buffer, sizeof buffer, "\towltOutbound: %u localXmit: %u \ + owltInbound: %u remoteXmit: %u", vspan->owltOutbound, + vspan->localXmitRate, vspan->owltInbound, + vspan->remoteXmitRate); + sdr_exit_xn(sdr); + printText(buffer); +} + +static void infoSpan(int tokenCount, char **tokens) +{ + Sdr sdr = getIonsdr(); + uvast engineId; + BsspVspan *vspan; + PsmAddress vspanElt; + + if (tokenCount != 3) + { + SYNTAX_ERROR; + return; + } + + engineId = strtouvast(tokens[2]); + CHKVOID(sdr_begin_xn(sdr)); /* Just to lock memory. */ + findSpan(engineId, &vspan, &vspanElt); + sdr_exit_xn(sdr); + if (vspanElt == 0) + { + printText("Unknown span."); + return; + } + + printSpan(vspan); +} + +static void executeInfo(int tokenCount, char **tokens) +{ + if (tokenCount < 2) + { + printText("Information on what?"); + return; + } + + if (strcmp(tokens[1], "span") == 0) + { + infoSpan(tokenCount, tokens); + return; + } + + SYNTAX_ERROR; +} + +static void listSpans(int tokenCount, char **tokens) +{ + Sdr sdr = getIonsdr(); + BsspVdb *vdb = getBsspVdb(); + PsmPartition ionwm = getIonwm(); + Object bsspdbObj = getBsspDbObject(); + OBJ_POINTER(BsspDB, bsspdb); + char buffer[128]; + PsmAddress elt; + BsspVspan *vspan; + + if (tokenCount != 2) + { + SYNTAX_ERROR; + return; + } + + CHKVOID(sdr_begin_xn(sdr)); /* Just to lock memory. */ + GET_OBJ_POINTER(sdr, BsspDB, bsspdb, bsspdbObj); + isprintf(buffer, sizeof buffer,"(Engine " UVAST_FIELDSPEC " BE-BSI \ +pid: %d)", bsspdb->ownEngineId, vdb->beBsiPid); + printText(buffer); + isprintf(buffer, sizeof buffer,"(Engine " UVAST_FIELDSPEC " RL-BSI \ +pid: %d)", bsspdb->ownEngineId, vdb->rlBsiPid); + printText(buffer); + for (elt = sm_list_first(ionwm, vdb->spans); elt; + elt = sm_list_next(ionwm, elt)) + { + vspan = (BsspVspan *) psp(ionwm, sm_list_data(ionwm, elt)); + printSpan(vspan); + } + + sdr_exit_xn(sdr); +} + +static void executeList(int tokenCount, char **tokens) +{ + if (tokenCount < 2) + { + printText("List what?"); + return; + } + + if (strcmp(tokens[1], "span") == 0) + { + listSpans(tokenCount, tokens); + return; + } + + SYNTAX_ERROR; +} + +static void manageOwnqtime(int tokenCount, char **tokens) +{ + Sdr sdr = getIonsdr(); + Object bsspdbObj = getBsspDbObject(); + BsspDB bsspdb; + int newOwnQtime; + + if (tokenCount != 3) + { + SYNTAX_ERROR; + return; + } + + newOwnQtime = strtol(tokens[2], NULL, 0); + if (newOwnQtime < 0) + { + putErrmsg("Own Q time invalid.", tokens[2]); + return; + } + + CHKVOID(sdr_begin_xn(sdr)); + sdr_stage(sdr, (char *) &bsspdb, bsspdbObj, sizeof(BsspDB)); + bsspdb.ownQtime = newOwnQtime; + sdr_write(sdr, bsspdbObj, (char *) &bsspdb, sizeof(BsspDB)); + if (sdr_end_xn(sdr) < 0) + { + putErrmsg("Can't change own BSSP queuing time.", NULL); + } +} + +static void executeManage(int tokenCount, char **tokens) +{ + if (tokenCount < 2) + { + printText("Manage what?"); + return; + } + + if (strcmp(tokens[1], "ownqtime") == 0) + { + manageOwnqtime(tokenCount, tokens); + return; + } + + SYNTAX_ERROR; +} + +static void switchWatch(int tokenCount, char **tokens) +{ + BsspVdb *vdb = getBsspVdb(); + char buffer[80]; + char *cursor; + + if (tokenCount < 2) + { + printText("Switch watch in what way?"); + return; + } + + if (strcmp(tokens[1], "1") == 0) + { + vdb->watching = -1; + return; + } + + vdb->watching = 0; + if (strcmp(tokens[1], "0") == 0) + { + return; + } + + cursor = tokens[1]; + while (*cursor) + { + switch (*cursor) + { + case 'd': + vdb->watching |= WATCH_d; + break; + + case 'e': + vdb->watching |= WATCH_e; + break; + + case 'g': + vdb->watching |= WATCH_g; + break; + + case 's': + vdb->watching |= WATCH_s; + break; + + case '=': + vdb->watching |= WATCH_resendBlk; + break; + + default: + isprintf(buffer, sizeof buffer, + "Invalid watch char %c.", *cursor); + printText(buffer); + } + + cursor++; + } +} + +static void switchEcho(int tokenCount, char **tokens) +{ + int state; + + if (tokenCount < 2) + { + printText("Echo on or off?"); + return; + } + + switch (*(tokens[1])) + { + case '0': + state = 0; + oK(_echo(&state)); + break; + + case '1': + state = 1; + oK(_echo(&state)); + break; + + default: + printText("Echo on or off?"); + } +} + +static int processLine(char *line, int lineLength) +{ + int tokenCount; + char *cursor; + int i; + char *tokens[12]; + char buffer[80]; + struct timeval done_time; + struct timeval cur_time; + + tokenCount = 0; + for (cursor = line, i = 0; i < 12; i++) + { + if (*cursor == '\0') + { + tokens[i] = NULL; + } + else + { + findToken(&cursor, &(tokens[i])); + tokenCount++; + } + } + + if (tokenCount == 0) + { + return 0; + } + + /* Skip over any trailing whitespace. */ + + while (isspace((int) *cursor)) + { + cursor++; + } + + /* Make sure we've parsed everything. */ + + if (*cursor != '\0') + { + printText("Too many tokens."); + return 0; + } + + /* Have parsed the command. Now execute it. */ + + switch (*(tokens[0])) /* Command code. */ + { + case 0: /* Empty line. */ + case '#': /* Comment. */ + return 0; + + case '?': + case 'h': + printUsage(); + return 0; + + case 'v': + isprintf(buffer, sizeof buffer, "%s", + IONVERSIONNUMBER); + printText(buffer); + return 0; + + case '1': + initializeBssp(tokenCount, tokens); + return 0; + + case 's': + if (attachToBssp() == 0) + { + if (tokenCount < 3) + { + printText("Can't start BSSP: no \ +best-effort or reliable BSI command."); + } + else + { + if (bsspStart(tokens[1], tokens[2]) < 0) + { + putErrmsg("Can't start BSSP.", + NULL); + } + } + /* Wait for bssp to start up */ + getCurrentTime(&done_time); + done_time.tv_sec += STARTUP_TIMEOUT; + while (bssp_engine_is_started() == 0) + { + snooze(1); + getCurrentTime(&cur_time); + if (cur_time.tv_sec >= + done_time.tv_sec + && cur_time.tv_usec >= + done_time.tv_usec) + { + printText("[?] BSSP start hung\ + up, abandoned."); + break; + } + } + + } + + return 0; + + case 'x': + if (attachToBssp() == 0) + { + bsspStop(); + } + + return 0; + + case 'a': + if (attachToBssp() == 0) + { + executeAdd(tokenCount, tokens); + } + + return 0; + + case 'c': + if (attachToBssp() == 0) + { + executeChange(tokenCount, tokens); + } + + return 0; + + case 'd': + if (attachToBssp() == 0) + { + executeDelete(tokenCount, tokens); + } + + return 0; + + case 'i': + if (attachToBssp() == 0) + { + executeInfo(tokenCount, tokens); + } + + return 0; + + case 'l': + if (attachToBssp() == 0) + { + executeList(tokenCount, tokens); + } + + return 0; + + case 'm': + if (attachToBssp() == 0) + { + executeManage(tokenCount, tokens); + } + + return 0; + + case 'w': + if (attachToBssp() == 0) + { + switchWatch(tokenCount, tokens); + } + + return 0; + + case 'e': + switchEcho(tokenCount, tokens); + return 0; + + case 'q': + return -1; /* End program. */ + + default: + printText("Invalid command. Enter '?' for help."); + return 0; + } +} + +#if defined (VXWORKS) || defined (RTEMS) || defined (bionic) +int bsspadmin(int a1, int a2, int a3, int a4, int a5, + int a6, int a7, int a8, int a9, int a10) +{ + char *cmdFileName = (char *) a1; +#else +int main(int argc, char **argv) +{ + char *cmdFileName = (argc > 1 ? argv[1] : NULL); +#endif + int cmdFile; + char line[256]; + int len; + + if (cmdFileName == NULL) /* Interactive. */ + { +#ifdef FSWLOGGER + return 0; /* No stdout. */ +#else + cmdFile = fileno(stdin); + isignal(SIGINT, handleQuit); + while (1) + { + printf(": "); + fflush(stdout); + if (igets(cmdFile, line, sizeof line, &len) == NULL) + { + if (len == 0) + { + break; + } + + putErrmsg("igets failed.", NULL); + break; /* Out of loop. */ + } + + if (len == 0) + { + continue; + } + + if (processLine(line, len)) + { + break; /* Out of loop. */ + } + } +#endif + } + else if (strcmp(cmdFileName, ".") == 0) /* Shutdown. */ + { + if (attachToBssp() == 0) + { + bsspStop(); + } + } + else /* Scripted. */ + { + cmdFile = iopen(cmdFileName, O_RDONLY, 0777); + if (cmdFile < 0) + { + PERROR("Can't open command file"); + } + else + { + while (1) + { + if (igets(cmdFile, line, sizeof line, &len) + == NULL) + { + if (len == 0) + { + break; /* Loop. */ + } + + putErrmsg("igets failed.", NULL); + break; /* Loop. */ + } + + if (len == 0 + || line[0] == '#') /* Comment.*/ + { + continue; + } + + if (processLine(line, len)) + { + break; /* Out of loop. */ + } + } + + close(cmdFile); + } + } + + writeErrmsgMemos(); + printText("Stopping bsspadmin."); + ionDetach(); + + return 0; +} diff -Nru ion-3.2.0~dfsg1/cfdp/library/libcfdp.c ion-3.2.1+dfsg/cfdp/library/libcfdp.c --- ion-3.2.0~dfsg1/cfdp/library/libcfdp.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/cfdp/library/libcfdp.c 2014-07-08 02:17:39.000000000 +0000 @@ -114,6 +114,7 @@ void cfdp_decompress_number(uvast *val, CfdpNumber *nbr) { unsigned char *octet; + vast digit; int i; CHKVOID(val); @@ -121,7 +122,9 @@ *val = 0; for (i = 0, octet = nbr->buffer + 7; i < nbr->length; i++, octet--) { - *val = ((*val) << 8) + *octet; + digit = *octet; + digit <<= (i << 3); + *val += digit; } } diff -Nru ion-3.2.0~dfsg1/cfdp/library/libcfdpP.c ion-3.2.1+dfsg/cfdp/library/libcfdpP.c --- ion-3.2.0~dfsg1/cfdp/library/libcfdpP.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/cfdp/library/libcfdpP.c 2014-07-08 02:17:39.000000000 +0000 @@ -2512,8 +2512,7 @@ if (cfdpvdb->watching & WATCH_p) { - putchar('p'); - fflush(stdout); + iwatch('p'); } return 0; @@ -3674,8 +3673,7 @@ if (cfdpvdb->watching & WATCH_q) { - putchar('q'); - fflush(stdout); + iwatch('q'); } memcpy((char *) &transactionId.sourceEntityNbr, diff -Nru ion-3.2.0~dfsg1/cfdp/utils/bpcp.c ion-3.2.1+dfsg/cfdp/utils/bpcp.c --- ion-3.2.0~dfsg1/cfdp/utils/bpcp.c 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/cfdp/utils/bpcp.c 2014-07-08 02:17:39.000000000 +0000 @@ -402,16 +402,18 @@ cfdp_compress_number(&parms.destinationEntityNbr, entityId); /*Pick a temp file name*/ - for (hndl=0; strlen(tmp_files[hndl])>0 && hndl < NUM_TMP_FILES; hndl++) + for (hndl=0; hndl < NUM_TMP_FILES && strlen(tmp_files[hndl]); hndl++) { /*empty*/ } - if(strlen(tmp_files[hndl])!=0 || hndl > TMP_MAX) + + if (hndl > TMP_MAX || hndl >= NUM_TMP_FILES || strlen(tmp_files[hndl])) { dbgprintf(0, "Error: Too Many Directories Open\n"); exit_nicely(1); } + oK(umask(S_IWGRP | S_IWOTH)); tempfd = mkstemp(template); if (tempfd < 0) { diff -Nru ion-3.2.0~dfsg1/config.h.in ion-3.2.1+dfsg/config.h.in --- ion-3.2.0~dfsg1/config.h.in 2013-12-30 23:31:15.000000000 +0000 +++ ion-3.2.1+dfsg/config.h.in 2014-07-08 02:18:09.000000000 +0000 @@ -163,9 +163,6 @@ /* Build ION NASA protected flight code */ #undef NASA_PROTECTED_FLIGHT_CODE -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE diff -Nru ion-3.2.0~dfsg1/configure ion-3.2.1+dfsg/configure --- ion-3.2.0~dfsg1/configure 2013-12-30 23:31:15.000000000 +0000 +++ ion-3.2.1+dfsg/configure 2014-07-08 02:18:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ion open source 3.2.0. +# Generated by GNU Autoconf 2.69 for ion open source 3.2.1. # # Report bugs to . # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='ion' PACKAGE_TARNAME='ion' -PACKAGE_VERSION='open source 3.2.0' -PACKAGE_STRING='ion open source 3.2.0' +PACKAGE_VERSION='open source 3.2.1' +PACKAGE_STRING='ion open source 3.2.1' PACKAGE_BUGREPORT='http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs' PACKAGE_URL='' @@ -655,6 +655,8 @@ POD_DOCUMENTATION EXPAT_LIBS VALGRIND_COMPAT_CFLAGS +ENABLE_EXPAT_FALSE +ENABLE_EXPAT_TRUE ENABLE_GCOV_FALSE ENABLE_GCOV_TRUE CRYPTO_LIBS @@ -797,6 +799,7 @@ enable_crypto enable_ams_debug with_gcov +with_expat enable_valgrind ' ac_precious_vars='build_alias @@ -1348,7 +1351,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ion open source 3.2.0 to adapt to many kinds of systems. +\`configure' configures ion open source 3.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1418,7 +1421,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ion open source 3.2.0:";; + short | recursive ) echo "Configuration of ion open source 3.2.1:";; esac cat <<\_ACEOF @@ -1454,6 +1457,7 @@ --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov Turn on code coverage instrumentation + --with-expat Turn on libexpat requirements Some influential environment variables: CC C compiler command @@ -1531,7 +1535,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ion configure open source 3.2.0 +ion configure open source 3.2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1954,7 +1958,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ion $as_me open source 3.2.0, which was +It was created by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2308,7 +2312,7 @@ # all of the portability warnings introduced by autoconf v2.69 and # automake v1.12. #AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign]) -am__api_version='1.13' +am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2823,7 +2827,7 @@ # Define the identity of the package. PACKAGE='ion' - VERSION='open source 3.2.0' + VERSION='open source 3.2.1' cat >>confdefs.h <<_ACEOF @@ -2874,6 +2878,47 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi # some source file that will ensure that you are in the right directory. @@ -3671,6 +3716,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3863,131 +3967,6 @@ fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - #Automake v1.12 wants AM_PROG_AR, but it doesn't exist &6 else - am_cv_ar_interface=ar + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; @@ -4129,6 +4114,11 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 @@ -6557,7 +6547,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 @@ -6582,7 +6572,10 @@ ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6601,7 +6594,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*) @@ -12155,6 +12151,33 @@ # +# Dynamically choose whether or not to build against expat libraries. +# Expat is needed by AMS if XML configuration files are used. +# Default is not to build against libexpat. +# + +# Check whether --with-expat was given. +if test "${with_expat+set}" = set; then : + withval=$with_expat; expat=yes; +fi + +if test "x$expat" = "xyes" ; then + echo "Build against libexpat... yes" +else + echo "Build against libexpat... no" + CFLAGS="$CFLAGS -DNOEXPAT" +fi + if test "x$expat" = "xyes"; then + ENABLE_EXPAT_TRUE= + ENABLE_EXPAT_FALSE='#' +else + ENABLE_EXPAT_TRUE='#' + ENABLE_EXPAT_FALSE= +fi + + + +# # If valgrind is present, allow special MTAKE/MRELEASE valgrind tutors. # # Check whether --enable-valgrind was given. @@ -12269,7 +12292,12 @@ EXPAT_LIBS="-lexpat" else - as_fn_error $? "You need to have the Expat XML development library, libexpat1-dev" "$LINENO" 5 + if test -z "$ENABLE_EXPAT_TRUE"; then : + as_fn_error $? "You need to install the libexpat1-dev library to build with expat." "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&5 +$as_echo "$as_me: WARNING: If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the \"./configure --with-expat\" flag." >&2;} +fi fi @@ -13661,6 +13689,10 @@ as_fn_error $? "conditional \"ENABLE_GCOV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_EXPAT_TRUE}" && test -z "${ENABLE_EXPAT_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_EXPAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_AUTODOC_TRUE}" && test -z "${ENABLE_AUTODOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_AUTODOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -14070,7 +14102,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ion $as_me open source 3.2.0, which was +This file was extended by ion $as_me open source 3.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14136,7 +14168,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ion config.status open source 3.2.0 +ion config.status open source 3.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru ion-3.2.0~dfsg1/configure.ac ion-3.2.1+dfsg/configure.ac --- ion-3.2.0~dfsg1/configure.ac 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/configure.ac 2014-07-08 02:17:39.000000000 +0000 @@ -4,7 +4,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.60) -AC_INIT(ion, open source 3.2.0, http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs) +AC_INIT(ion, open source 3.2.1, http://korgano.eecs.ohiou.edu/mailman/listinfo/ion-bugs) IS_NASA_B=0 # Josh Schendel removed the -Werror on 05/15/2012 per issue #355 to deal with @@ -220,6 +220,24 @@ AM_CONDITIONAL([ENABLE_GCOV], [test "x$gcov" = "xyes"]) # +# Dynamically choose whether or not to build against expat libraries. +# Expat is needed by AMS if XML configuration files are used. +# Default is not to build against libexpat. +# +AC_ARG_WITH([expat], +[AS_HELP_STRING([--with-expat], [Turn on libexpat requirements])], +[expat=yes;], +[]) +if test "x$expat" = "xyes" ; then + echo "Build against libexpat... yes" +else + echo "Build against libexpat... no" + CFLAGS="$CFLAGS -DNOEXPAT" +fi +AM_CONDITIONAL([ENABLE_EXPAT], [test "x$expat" = "xyes"]) + + +# # If valgrind is present, allow special MTAKE/MRELEASE valgrind tutors. # AC_ARG_ENABLE([valgrind], AC_HELP_STRING([--disable-valgrind],[Do not enable valgrind debugging [default=check]]), @@ -269,7 +287,7 @@ [expat], [XML_GetCurrentLineNumber], [ AC_SUBST( [EXPAT_LIBS], ["-lexpat"] ) ], - [AC_MSG_ERROR([You need to have the Expat XML development library, libexpat1-dev])] + [ AM_COND_IF([ENABLE_EXPAT], AC_MSG_ERROR([You need to install the libexpat1-dev library to build with expat.]), AC_MSG_WARN([If you wish to use XML configuration files for AMS you will need to compile against the Expat XML development libraries. To do this install the libexpat1-dev library then recompile ION using the "./configure --with-expat" flag.]) )] ) AC_CHECK_LIB( diff -Nru ion-3.2.0~dfsg1/contrib/cgr-viewer/js/jquery.js ion-3.2.1+dfsg/contrib/cgr-viewer/js/jquery.js --- ion-3.2.0~dfsg1/contrib/cgr-viewer/js/jquery.js 2013-12-30 23:22:22.000000000 +0000 +++ ion-3.2.1+dfsg/contrib/cgr-viewer/js/jquery.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license -//# sourceMappingURL=jquery-2.0.3.min.map -*/ -(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);function dt(){}dt.prototype=i.filters=i.pseudos,i.setFilters=new dt;function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="
","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t) -};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,i=0,o=x(this),s=e.match(w)||[];while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*\s*$/g,ct={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1>")+a[2],l=a[0];while(l--)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("