Index: /sample/tidy_pingpong/pingpong
===================================================================
--- /sample/tidy_pingpong/pingpong	(revision 2409)
+++ /sample/tidy_pingpong/pingpong	(revision 2409)
@@ -0,0 +1,147 @@
+#! /bin/bash
+
+# pingpong - temporary wrapper script for .libs/pingpong
+# Generated by ltmain.sh (GNU libtool) 2.2.4 Debian-2.2.4-0ubuntu4
+#
+# The pingpong program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='/bin/sed -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command="(cd /local/SpoVNet-ka/entwicklung/ariba/trunk/sample/tidy_pingpong; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.10/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.10/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons; export LD_LIBRARY_PATH; PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games; export PATH; g++ -g -O2 -o \$progdir/\$file pingpong-TidyPingPongMessage.o pingpong-TidyPingPong.o pingpong-main.o  -L/local/SpoVNet-ka/entwicklung/ariba/trunk/source/ariba /local/SpoVNet-ka/entwicklung/ariba/trunk/source/ariba/.libs/libariba.so -L/usr/lib -lboost_thread-mt -lboost_system-mt -lboost_regex-mt /usr/lib/libgmp.so /usr/lib/liblog4cxx.so /usr/lib/libaprutil-1.so -lldap -llber /usr/lib/libdb-4.6.so -lpq /usr/lib/libmysqlclient_r.so -lnsl -lz /usr/lib/libsqlite3.so /usr/lib/libexpat.so /usr/lib/libapr-1.so -luuid -lrt -lcrypt -lpthread -ldl -Wl,-rpath -Wl,/local/SpoVNet-ka/entwicklung/ariba/trunk/source/ariba/.libs -Wl,-rpath -Wl,/local/SpoVNet-ka/entwicklung/ariba/trunk/build/lib)"
+
+# This environment variable determines our operation mode.
+if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='2.2.4'
+  notinst_deplibs=' /local/SpoVNet-ka/entwicklung/ariba/trunk/source/ariba/libariba.la'
+else
+  # When we are sourced in execute mode, $file and $ECHO are already set.
+  if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
+    ECHO="echo"
+    file="$0"
+    # Make sure echo works.
+    if test "X$1" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+      # Yippee, $ECHO works!
+      :
+    else
+      # Restart under the correct shell, and then maybe $ECHO will work.
+      exec /bin/bash "$0" --no-reexec ${1+"$@"}
+    fi
+  fi
+
+  # Find the directory that this script lives in.
+  thisdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+  test "x$thisdir" = "x$file" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
+  while test -n "$file"; do
+    destdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+
+    # If there was a directory component, then change thisdir.
+    if test "x$destdir" != "x$file"; then
+      case "$destdir" in
+      [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
+      *) thisdir="$thisdir/$destdir" ;;
+      esac
+    fi
+
+    file=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'`
+    file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
+  done
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
+  if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
+    # special case for '.'
+    if test "$thisdir" = "."; then
+      thisdir=`pwd`
+    fi
+    # remove .libs from thisdir
+    case "$thisdir" in
+    *[\\/].libs ) thisdir=`$ECHO "X$thisdir" | $Xsed -e 's%[\\/][^\\/]*$%%'` ;;
+    .libs )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=`cd "$thisdir" && pwd`
+  test -n "$absdir" && thisdir="$absdir"
+
+  program=lt-'pingpong'
+  progdir="$thisdir/.libs"
+
+  if test ! -f "$progdir/$program" ||
+     { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
+       test "X$file" != "X$progdir/$program"; }; then
+
+    file="$$-$program"
+
+    if test ! -d "$progdir"; then
+      mkdir "$progdir"
+    else
+      rm -f "$progdir/$file"
+    fi
+
+    # relink executable if necessary
+    if test -n "$relink_command"; then
+      if relink_command_output=`eval $relink_command 2>&1`; then :
+      else
+	echo "$relink_command_output" >&2
+	rm -f "$progdir/$file"
+	exit 1
+      fi
+    fi
+
+    mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
+    { rm -f "$progdir/$program";
+      mv -f "$progdir/$file" "$progdir/$program"; }
+    rm -f "$progdir/$file"
+  fi
+
+  if test -f "$progdir/$program"; then
+    if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
+      # Run the actual program with our arguments.
+
+      exec "$progdir/$program" ${1+"$@"}
+
+      $ECHO "$0: cannot exec $program $*" 1>&2
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2
+    $ECHO "This script is just a wrapper for $program." 1>&2
+    echo "See the libtool documentation for more information." 1>&2
+    exit 1
+  fi
+fi
Index: /source/ariba/AribaModule.cpp
===================================================================
--- /source/ariba/AribaModule.cpp	(revision 2409)
+++ /source/ariba/AribaModule.cpp	(revision 2409)
@@ -0,0 +1,166 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARIBA PROJECT OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#include "AribaModule.h"
+
+// boost/std includes
+#include <assert.h>
+#include <boost/regex.hpp>
+
+// ariba includes
+#include "ariba/utility/misc/Helper.h"
+
+// hack includes
+#include "ariba/interface/UnderlayAbstraction.h"
+#include "ariba/communication/EndpointDescriptor.h"
+#include "ariba/communication/modules/network/NetworkLocator.h"
+
+using namespace ariba::utility::Helper;
+using ariba::interface::UnderlayAbstraction;
+
+namespace ariba {
+
+AribaModule::AribaModule() {
+
+	// init with default values
+	this->underlay_abs = NULL;
+	this->ip_addr = NULL;
+	this->tcp_port = 41402;
+	this->udp_port = 41402;
+	this->started = false;
+}
+
+AribaModule::~AribaModule() {
+}
+
+
+string AribaModule::getBootstrapHints(const Name& spoVNetName) const {
+
+}
+
+void AribaModule::addBootstrapHints(string boot_info) {
+	string str = boot_info;
+	static ::boost::regex boot_expr("<([^>:]+)[:]?([0-9]+)?>([^<]+)(.*)");
+	::boost::smatch what;
+	while (::boost::regex_match(str, what, boot_expr)) {
+		std::cout << what[1].str() << ":" << what[2].str() << "=" << what[3]
+				<< std::endl;
+		str = what[4].str();
+	}
+}
+
+void AribaModule::addBootstrapNode(const Name& spovnet, const Name& node,
+		communication::EndpointDescriptor* desc) {
+
+}
+
+const communication::EndpointDescriptor* AribaModule::getBootstrapNode(
+		const Name& spovnet) {
+	return NULL;
+}
+
+// @see Module.h
+void AribaModule::initialize() {
+
+	// preconditions
+	assert(!started);
+
+	// init variables
+	underlay_abs = NULL;
+}
+
+// @see Module.h
+void AribaModule::start() {
+
+	// preconditions
+	assert(underlay_abs == NULL);
+	assert(!started);
+
+	// create the base communication component
+	started = true;
+	underlay_abs = new interface::UnderlayAbstraction();
+}
+
+// @see Module.h
+void AribaModule::stop() {
+
+	// preconditions
+	assert(underlay_abs != NULL);
+	assert(started);
+
+	// delete base communication component
+	started = false;
+	delete underlay_abs;
+}
+
+// @see Module.h
+string AribaModule::getName() const {
+	return "ariba";
+}
+
+// @see Module.h
+void AribaModule::setProperty(string key, string value) {
+	if (key == "ip.addr") {
+		if (ip_addr != NULL) delete ip_addr;
+		communication::IPv4Locator* loc = new communication::IPv4Locator();
+		*loc = communication::IPv4Locator::fromString(value);
+		ip_addr = loc;
+	} else if (key == "tcp.port") tcp_port = stoi(value);
+	else if (key == "udp.port") udp_port = stoi(value);
+	else if (key == "bootstrap.hints") addBootstrapHints(value);
+}
+
+// @see Module.h
+const string AribaModule::getProperty(string key) const {
+	if (key == "ip.addr") return ip_addr->toString();
+	else if (key == "tcp.port") return ultos(tcp_port);
+	else if (key == "udp.port") return ultos(udp_port);
+	else if (key == "bootstrap.hints") return getBootstrapHints();
+}
+
+// @see Module.h
+const vector<string> AribaModule::getProperties() const {
+	vector<string> properties;
+	properties.push_back("ip.addr");
+	properties.push_back("tcp.port");
+	properties.push_back("udp.port");
+	properties.push_back("hints");
+	return properties;
+}
+
+} // namespace ariba
Index: /source/ariba/AribaModule.h
===================================================================
--- /source/ariba/AribaModule.h	(revision 2409)
+++ /source/ariba/AribaModule.h	(revision 2409)
@@ -0,0 +1,175 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARIBA PROJECT OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef ARIBAMODULE_H_
+#define ARIBAMODULE_H_
+
+#include <string>
+#include <vector>
+
+// usings
+using std::vector;
+using std::string;
+
+// forward declaration
+namespace ariba {
+class AribaModule;
+}
+
+// local includes
+#include "Name.h"
+#include "Module.h"
+
+namespace ariba {
+
+// forward declarations of old interface
+namespace communication {
+class EndpointDescriptor;
+class NetworkLocator;
+}
+namespace interface {
+class UnderlayAbstraction;
+}
+
+/**
+ * This class implements a container class for ariba base services. Each node
+ * is a running using this base-module. It also manages Bootstrap information
+ * in a abstract simple way.
+ *
+ *        +---+   +---+
+ *        |N1 |   |N2 |
+ *     +--|   |---|   |--+
+ *     |  +---+   +---+  |
+ *     |                 |
+ *     |     AribaModule |
+ *     +-----------------+
+ *
+ * N1, N2 are nodes.
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class AribaModule: public Module {
+	friend class Node;
+public:
+	/**
+	 * Constructor of the ariba underlay module
+	 */
+	AribaModule();
+
+	/**
+	 * Destructor of the ariba underlay module
+	 */
+	virtual ~AribaModule();
+
+	/**
+	 * Returns all known bootstrap endpoints to this ariba module in
+	 * a human-readable string. This information can be used by other
+	 * nodes for bootstraping. It may also be used to publish this info
+	 * to other nodes via the web, for example.
+	 *
+	 * @param The name of the spovnet
+	 * @return A human-readable string containing all known bootstrap
+	 *   information known to this module.
+	 */
+	string getBootstrapHints(const Name& spoVNetName = Name::UNSPECIFIED) const;
+
+	/**
+	 * Adds bootstrap hints to the local database. The format of the string
+	 * must is the same as returned by <code>getBootstrapInfo</code>.
+	 *
+	 * @param bootinfo A string containing bootstrap information.
+	 */
+	void addBootstrapHints(string bootinfo);
+
+	// --- module implementation ---
+
+	/**
+	 * Module Property information:
+	 *
+	 * ip.addr  = preferred ip address (otherwise bind to all)
+	 * tcp.port = preferred tcp port (or use default value)
+	 * udp.port = preferred udp port (or use default value)
+	 * bootstrap.hints = used bootstrap hints
+	 * bootstrap.file  = used file for bootstrap information
+	 */
+	void initialize(); ///< @see Module.h
+	void start(); ///< @see Module.h
+	void stop(); ///< @see Module.h
+	string getName() const; ///< @see Module.h
+	void setProperty(string key, string value); ///< @see Module.h
+	const string getProperty(string key) const; ///< @see Module.h
+	const vector<string> getProperties() const; ///< @see Module.h
+
+private:
+	// bootstrap node
+	class BootstrapNode {
+	public:
+		uint32_t timestamp;
+		communication::EndpointDescriptor* desc;
+	};
+
+	// bootstrap info
+	class BootstrapInfo {
+	public:
+		Name spovnetName;
+		vector<BootstrapNode> desc;
+	};
+	vector<BootstrapInfo> bootstrapNodes;
+
+protected:
+	// members
+	string bootstrapFile; 	//< file with bootstrap information
+	bool started;			//< flag, if module has been started
+
+	// bootstrap node management
+	void addBootstrapNode(const Name& spovnet, const Name& node,
+			communication::EndpointDescriptor* desc);
+	const communication::EndpointDescriptor* getBootstrapNode(
+			const Name& spovnet);
+
+	// TODO: merge with old interface
+	interface::UnderlayAbstraction* underlay_abs;
+
+	// TODO: use "abstract" representations here!
+	communication::NetworkLocator* ip_addr;
+	uint16_t tcp_port, udp_port;
+};
+
+} // namespace ariba
+
+#endif /* ENVIRONMENT_H_ */
Index: /source/ariba/DataMessage.cpp
===================================================================
--- /source/ariba/DataMessage.cpp	(revision 2409)
+++ /source/ariba/DataMessage.cpp	(revision 2409)
@@ -0,0 +1,9 @@
+
+#include "DataMessage.h"
+
+namespace ariba {
+
+const DataMessage DataMessage::UNSPECIFIED;
+
+} // namespace ariba
+
Index: /source/ariba/DataMessage.h
===================================================================
--- /source/ariba/DataMessage.h	(revision 2409)
+++ /source/ariba/DataMessage.h	(revision 2409)
@@ -0,0 +1,89 @@
+#ifndef DATAMESSAGE_H_
+#define DATAMESSAGE_H_
+
+#define USE_MESSAGE_UTILITY
+
+#include <memory>
+#include <inttypes.h>
+
+// use message utility
+#ifdef USE_MESSAGE_UTILITY
+  #include "ariba/utility/messages.h"
+  namespace ariba {
+    typedef utility::Message Message;
+  }
+#endif
+
+namespace ariba {
+
+// define sequence number type
+typedef uint16_t seqnum_t;
+
+/**
+ * This class wraps different representations of a message. In its current
+ * version is allows to specify binary data (as void*) with a size specifying
+ * the number of bytes of data or an message object that can be
+ * serialized if necessary. The main idea is, that simulation environments
+ * do not necessarily need to serialize messages.
+ *
+ * For performance reasons methods of this class are inlined where possible!
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class DataMessage {
+private:
+	void* data;
+	size_t size;
+public:
+	static const DataMessage UNSPECIFIED;
+
+	inline DataMessage() {
+		this->data = NULL;
+		this->size = 0;
+	}
+
+	inline DataMessage( const void* data, const size_t size ) {
+		this->data = const_cast<void*>(data);
+		this->size = size;
+	}
+
+#ifdef USE_MESSAGE_UTILITY
+	inline DataMessage( const Message* message ) {
+		this->data = (void*)const_cast<Message*>(message);
+		this->size = ~0;
+	}
+
+	inline Message* getMessage() const {
+		return (Message*)data;
+	}
+
+	inline operator Message* () const {
+		return (Message*)data;
+	}
+#endif
+
+	inline bool isMessage() const {
+		return size >= 0;
+	}
+
+	inline bool isData() const {
+		return size == ~0;
+	}
+
+	inline void* getData() const {
+		return data;
+	}
+
+	inline size_t getSize() const {
+		return size;
+	}
+
+	inline bool isUnspecified() const {
+		return data == NULL;
+	}
+};
+} // namespace ariba
+
+
+
+#endif /* DATAMESSAGE_H_ */
Index: /source/ariba/Identifiers.cpp
===================================================================
--- /source/ariba/Identifiers.cpp	(revision 2409)
+++ /source/ariba/Identifiers.cpp	(revision 2409)
@@ -0,0 +1,43 @@
+// [Licence]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARIBA PROJECT OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [Licence]
+
+#include "Identifiers.h"
+
+namespace ariba {
+
+} // namespace ariba
Index: /source/ariba/Identifiers.h
===================================================================
--- /source/ariba/Identifiers.h	(revision 2409)
+++ /source/ariba/Identifiers.h	(revision 2409)
@@ -0,0 +1,69 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARIBA PROJECT OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef IDENTIFIERS_H_
+#define IDENTIFIERS_H_
+
+//#include "ariba.h"
+
+// TODO: implement via variable integers to support different node id sizes!!
+//#include "ariba/utility/vtypes/vint.hpp"
+
+// hack
+#include "ariba/utility/types/NodeID.h"
+#include "ariba/utility/types/ServiceID.h"
+#include "ariba/utility/types/LinkID.h"
+#include "ariba/utility/types/SpoVNetID.h"
+
+namespace ariba {
+
+// TODO: implement via variable integers to support different node id sizes!!
+//typedef vint<32> LinkID;
+//typedef vint<32> ServiceID;
+//typedef vint<> NodeID;
+//typedef vint<> SpoVNetID;
+
+// hack: for now, use old identifiers
+typedef utility::NodeID NodeID;
+typedef utility::LinkID LinkID;
+typedef utility::SpoVNetID SpoVNetID;
+typedef utility::ServiceID ServiceID;
+
+} // namespace ariba
+
+#endif /* IDENTIFIERS_H_ */
Index: /source/ariba/LinkProperties.cpp
===================================================================
--- /source/ariba/LinkProperties.cpp	(revision 2409)
+++ /source/ariba/LinkProperties.cpp	(revision 2409)
@@ -0,0 +1,54 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#include "LinkProperties.h"
+
+namespace ariba {
+
+const LinkProperties LinkProperties::DEFAULT;
+
+LinkProperties::LinkProperties() {
+	this->reliable = true;
+//	this->confidential = false;
+//	this->integrity = false;
+}
+
+LinkProperties::~LinkProperties() {
+}
+
+} // namespace ariba
Index: /source/ariba/LinkProperties.h
===================================================================
--- /source/ariba/LinkProperties.h	(revision 2409)
+++ /source/ariba/LinkProperties.h	(revision 2409)
@@ -0,0 +1,71 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef LINKPROPERTIES_H_
+#define LINKPROPERTIES_H_
+
+namespace ariba {
+// forward declaration
+class LinkProperties;
+}
+
+namespace ariba {
+
+class LinkProperties {
+public:
+	LinkProperties();
+	~LinkProperties();
+
+public:
+	static const LinkProperties DEFAULT;
+
+public:
+	bool reliable;
+
+	//TODO: to be extended!
+//	bool confidential;
+//	bool integrity;
+
+	//TODO: implement quality-of-service containers
+//	SpoQ qosUpstream;
+//	SpoQ qosDownstream;
+};
+
+} // namespace ariba
+
+#endif /* LINKPROPERTIES_H_ */
Index: /source/ariba/Makefile.am
===================================================================
--- /source/ariba/Makefile.am	(revision 2396)
+++ /source/ariba/Makefile.am	(revision 2409)
@@ -45,26 +45,26 @@
 #tidy interface
 libariba_la_SOURCES += \
-  tidy/AribaModule.cpp \
-  tidy/AribaModule.h \
-  tidy/TidyCommunicationListener.cpp \
-  tidy/TidyCommunicationListener.h \
-  tidy/Identifiers.cpp \
-  tidy/Identifiers.h \
-  tidy/LinkProperties.cpp \
-  tidy/LinkProperties.h \
-  tidy/TidyMessage.cpp \
-  tidy/TidyMessage.h \
-  tidy/DataMessage.cpp \
-  tidy/DataMessage.h \
-  tidy/Module.cpp \
-  tidy/Module.h \
-  tidy/Name.cpp \
-  tidy/Name.h \
-  tidy/Node.cpp \
-  tidy/Node.h \
-  tidy/NodeListener.cpp \
-  tidy/NodeListener.h \
-  tidy/SpoVNetProperties.cpp \
-  tidy/SpoVNetProperties.h
+  AribaModule.cpp \
+  AribaModule.h \
+  TidyCommunicationListener.cpp \
+  TidyCommunicationListener.h \
+  Identifiers.cpp \
+  Identifiers.h \
+  LinkProperties.cpp \
+  LinkProperties.h \
+  TidyMessage.cpp \
+  TidyMessage.h \
+  DataMessage.cpp \
+  DataMessage.h \
+  Module.cpp \
+  Module.h \
+  Name.cpp \
+  Name.h \
+  Node.cpp \
+  Node.h \
+  NodeListener.cpp \
+  NodeListener.h \
+  SpoVNetProperties.cpp \
+  SpoVNetProperties.h
 
 #communication
Index: /source/ariba/Module.cpp
===================================================================
--- /source/ariba/Module.cpp	(revision 2409)
+++ /source/ariba/Module.cpp	(revision 2409)
@@ -0,0 +1,82 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#include "Module.h"
+
+namespace ariba {
+
+// dummy
+Module::Module() {
+}
+
+// dummy
+Module::~Module() {
+}
+
+// dummy
+void Module::initialize() {
+}
+
+// dummy
+void Module::start() {
+}
+
+// dummy
+void Module::stop() {
+}
+
+// dummy
+string Module::getName() const {
+	return string("<empty module>");
+}
+
+// dummy
+void Module::setProperty( string key, string value ) {
+}
+
+// dummy
+const string Module::getProperty( string key ) const {
+	return string("<n/a>");
+}
+
+// dummy
+const vector<string> Module::getProperties() const {
+	return vector<string>();
+}
+
+} // namespace ariba
Index: /source/ariba/Module.h
===================================================================
--- /source/ariba/Module.h	(revision 2409)
+++ /source/ariba/Module.h	(revision 2409)
@@ -0,0 +1,112 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef MODULE_H_
+#define MODULE_H_
+
+#include <string>
+#include <vector>
+
+// usings
+using std::vector;
+using std::string;
+
+namespace ariba {
+
+/**
+ * This class serves as base class for generic modules that
+ * can be initialized, started, stopped and configured using standard
+ * human-readable properties.
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class Module {
+public:
+	Module();
+	virtual ~Module();
+
+	/**
+	 * This method (re-)initializes this module.
+	 */
+	virtual void initialize();
+
+	/**
+	 * This method (re-)starts this module
+	 */
+	virtual void start();
+
+	/**
+	 * This method stops this module
+	 */
+	virtual void stop();
+
+	/**
+	 * Returns the name of this module
+	 *
+	 * @return The name of this module
+	 */
+	virtual string getName() const;
+
+	/**
+	 * Sets a property in this module
+	 *
+	 * @param key The key of the property
+	 * @param value The value of the property
+	 */
+	virtual void setProperty( string key, string value );
+
+	/**
+	 * Returns the value of a specified property
+	 *
+	 * @param key The key of the property
+	 * @return The value of the property
+	 */
+	virtual const string getProperty( string key ) const;
+
+	/**
+	 * Returns a vector containing all possible property keys in a
+	 * human-readable form
+	 *
+	 * @return A vector containing all possible property keys
+	 */
+	virtual const vector<string> getProperties() const;
+};
+
+} // namespace ariba
+
+#endif /* MODULE_H_ */
Index: /source/ariba/Name.cpp
===================================================================
--- /source/ariba/Name.cpp	(revision 2409)
+++ /source/ariba/Name.cpp	(revision 2409)
@@ -0,0 +1,48 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#include "Name.h"
+
+namespace ariba {
+const Name Name::UNSPECIFIED;
+}
+
+std::ostream& operator<<( std::ostream& s, const ariba::Name& n ) {
+	return s << n.toString();
+}
+
Index: /source/ariba/Name.h
===================================================================
--- /source/ariba/Name.h	(revision 2409)
+++ /source/ariba/Name.h	(revision 2409)
@@ -0,0 +1,213 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef NAME_H_
+#define NAME_H_
+
+#include <iostream>
+#include <memory.h>
+
+// forward declaration
+namespace ariba { class Name; }
+
+std::ostream& operator<<( std::ostream&, const ariba::Name& );
+
+#include "Identifiers.h"
+
+namespace ariba {
+
+/**
+ * This class is a wrapper for canonical names.
+ * Currently only human readable names are supported.
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class Name {
+	friend std::ostream& operator<<( std::ostream&, const ::ariba::Name& );
+
+private:
+	bool _hreadable;
+	bool _copy;
+	int _length;
+	uint8_t* _bytes;
+
+	inline void init(const char* name, int len, bool copy, bool hreadable) {
+		if (len == -1)
+			len = strlen(name);
+
+		if (copy) {
+			_bytes = new uint8_t[len];
+			memcpy(_bytes, name, len);
+		} else {
+			_bytes = (uint8_t*)name;
+		}
+
+		_copy = copy;
+		_length = len;
+		_hreadable = hreadable;
+	}
+
+public:
+	static const Name UNSPECIFIED;
+
+public:
+	/**
+	 * Constructs a new, yet unspecified name.
+	 */
+	inline Name() {
+		_bytes = NULL;
+		_length = 0;
+		_copy = false;
+		_hreadable = false;
+	}
+
+	/**
+	 * Constructs a new name. If no length is specified, a human-readable
+	 * name is assumed.
+	 *
+	 * @param name The name
+	 * @param len The optional name length, if binary data is used as name
+	 * @param copy A flag, whether the name's memory needs to be copied
+	 */
+	inline Name(const char* name, int len = -1, bool copy = false) {
+		init(name, len, copy, len == -1);
+	}
+
+	/**
+	 * Constructs a new name out of a human readable string.
+	 *
+	 * @param name A human readable name
+	 */
+	inline Name(std::string name) {
+		init(name.c_str(), -1, true, true);
+	}
+
+	/**
+	 * The copy constructor.
+	 */
+	inline Name(const Name& name) {
+		init((const char*)name.bytes(), name.length(), true, name._hreadable);
+	}
+
+	/**
+	 * Destroys the name and releases underlying memory if this name is a copy.
+	 */
+	inline ~Name() {
+		if (_copy) delete _bytes;
+	}
+
+	/**
+	 * Returns the binary bytes of the name
+	 *
+	 * @return The binary data
+	 */
+	inline const uint8_t* bytes() const {
+		return _bytes;
+	}
+
+	/**
+	 * Returns the length of the name in bytes.
+	 *
+	 * @return The length of the name
+	 */
+	inline const size_t length() const {
+		return _length;
+	}
+
+	/**
+	 * The common implementation of the "equal" operator.
+	 */
+	inline bool operator==(const Name& name) const {
+		if (_bytes == NULL || name._bytes == NULL) return false;
+		if (name.length() != length()) return false;
+		return (memcmp(name.bytes(), bytes(), length()) == 0);
+	}
+
+	/**
+	 * The common implementation of the "unequal" operator.
+	 */
+	inline bool operator!=(const Name& name) const {
+		return !(*this == name);
+	}
+
+	/**
+	 * Returns true, if the name is yet unspecified
+	 */
+	inline bool isUnspecified() {
+		return *this == UNSPECIFIED;
+	}
+
+	/**
+	 * Returns a random name.
+	 */
+	inline static Name random() {
+		char name[17];
+		for (int i=0;i<16; i++)
+			name[i] = ("abcdefghijklmnopqrstuvwxyz")[((unsigned)rand())%26];
+		name[16] = 0;
+		return Name(name);
+	}
+
+	/**
+	 * Returns a human-readable representation of this name
+	 */
+	inline std::string toString() const {
+		if (_hreadable) {
+			char str[256];
+			for (int i=0; i<length(); i++) str[i] = bytes()[i];
+			str[length()] = 0;
+			return std::string(str);
+		} else {
+			return std::string("<not readable>");
+		}
+	}
+
+	// hack: to be changed!
+	inline NodeID toNodeId() const {
+		return NodeID::sha1( bytes(), length() );
+	}
+
+	// hack: to be changed!
+	inline SpoVNetID toSpoVNetId() const {
+		return SpoVNetID::sha1(bytes(), length() );
+	}
+};
+
+} // namespace ariba
+
+#endif /* NAME_H_ */
Index: /source/ariba/Node.cpp
===================================================================
--- /source/ariba/Node.cpp	(revision 2409)
+++ /source/ariba/Node.cpp	(revision 2409)
@@ -0,0 +1,250 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+
+#include "Node.h"
+
+#include "ariba/overlay/BaseOverlay.h"
+#include "ariba/utility/types/OverlayParameterSet.h"
+#include "ariba/interface/AribaContext.h"
+#include "ariba/interface/ServiceInterface.h"
+#include "ariba/interface/UnderlayAbstraction.h"
+
+using ariba::interface::UnderlayAbstraction;
+
+namespace ariba {
+
+class ServiceInterfaceWrapper: public interface::ServiceInterface {
+private:
+	NodeListener* nodeListener;
+	CommunicationListener* commListener;
+public:
+	ServiceInterfaceWrapper(NodeListener* listener) :
+		nodeListener(listener), commListener(NULL) {
+
+	}
+	ServiceInterfaceWrapper(CommunicationListener* listener) :
+		nodeListener(NULL), commListener(listener) {
+	}
+
+protected:
+	void onOverlayCreate(const SpoVNetID& id) {
+
+	}
+	void onOverlayDestroy(const SpoVNetID& id) {
+
+	}
+
+	bool isJoinAllowed(const NodeID& nodeid, const SpoVNetID& spovnetid) {
+		return true;
+	}
+
+	void onNodeJoin(const NodeID& nodeid, const SpoVNetID& spovnetid) {
+		// not handled
+	}
+
+	void onNodeLeave(const NodeID& id, const SpoVNetID& spovnetid) {
+		// not handled
+	}
+
+	void onJoinSuccess(const SpoVNetID& spovnetid) {
+		if (nodeListener != NULL) nodeListener->onJoinCompleted(spovnetid);
+	}
+
+	void onJoinFail(const SpoVNetID& spovnetid) {
+		if (nodeListener != NULL) nodeListener->onJoinFailed(spovnetid);
+	}
+
+	void onLinkUp(const LinkID& link, const NodeID& local, const NodeID& remote) {
+		if (commListener != NULL) commListener->onLinkUp(link, remote);
+	}
+
+	void onLinkDown(const LinkID& link, const NodeID& local,
+			const NodeID& remote) {
+		if (commListener != NULL) commListener->onLinkDown(link, remote);
+	}
+
+	void onLinkChanged(const LinkID& link, const NodeID& local,
+			const NodeID& remote) {
+		if (commListener != NULL) commListener->onLinkChanged(link, remote);
+	}
+
+	void onLinkFail(const LinkID& id, const NodeID& local, const NodeID& remote) {
+		if (commListener != NULL) commListener->onLinkFail(id, remote);
+	}
+
+	void onLinkQoSChanged(const LinkID& id, const NodeID& local,
+			const NodeID& remote, const QoSParameterSet& qos) {
+		if (commListener != NULL) commListener->onLinkQoSChanged(id, remote,
+				LinkProperties::DEFAULT);
+	}
+
+	bool receiveMessage(const Message* message, const LinkID& link,
+			const NodeID& node) {
+		if (commListener != NULL) commListener->onMessage(
+				const_cast<Message*> (message), node, link);
+	}
+};
+
+const ServiceID Node::anonymousService = 0xFF00;
+
+Node::Node(AribaModule& ariba_mod, const Name& name) :
+	ariba_mod(ariba_mod), name(name) {
+	this->context = NULL;
+}
+
+Node::~Node() {
+}
+
+void Node::join(const Name& vnetname) {
+	spovnetId = vnetname.toSpoVNetId();
+	nodeId = name.toNodeId();
+	this->context = ariba_mod.underlay_abs->joinSpoVNet(spovnetId,
+			*ariba_mod.getBootstrapNode(name), nodeId);
+}
+
+void Node::initiate(const Name& vnetname, const SpoVNetProperties& parm) {
+	utility::OverlayParameterSet ovrpset =
+		(utility::OverlayParameterSet::_OverlayStructure) parm.getBaseOverlayType();
+	spovnetId = vnetname.toSpoVNetId();
+	nodeId = name.toNodeId();
+	this->context = ariba_mod.underlay_abs->createSpoVNet(spovnetId, nodeId,
+			ariba_mod.ip_addr, ariba_mod.tcp_port);
+}
+
+void Node::leave() {
+	// not implemeted yet.
+}
+
+void Node::bind(NodeListener* listener) {
+	this->context->getOverlay().bind(new ServiceInterfaceWrapper(listener),
+			Node::anonymousService);
+}
+
+void Node::unbind(NodeListener* listener) {
+	// TODO: allow unbinding
+}
+
+const SpoVNetProperties& Node::getSpoVNetProperties() const {
+	return SpoVNetProperties::DEFAULT;
+}
+
+const SpoVNetID& Node::getSpoVNetId() const {
+	return SpoVNetID::UNSPECIFIED;
+}
+
+const NodeID& Node::getNodeId(const LinkID& lid) const {
+	return NodeID::UNSPECIFIED;
+}
+
+NodeID Node::generateNodeId(const Name& name) const {
+	return name.toNodeId();
+}
+
+LinkID Node::establishLink(const NodeID& nid, const ServiceID& sid,
+		const LinkProperties& req, const DataMessage& msg) {
+	return context->getOverlay().establishLink(nid, sid);
+}
+
+void Node::dropLink(const LinkID& lnk) {
+	context->getOverlay().dropLink(lnk);
+}
+
+seqnum_t Node::sendMessage(const DataMessage& msg, const NodeID& nid,
+		const ServiceID& sid, const LinkProperties& req) {
+	return context->getOverlay().sendMessage((Message*)msg, nid, sid);
+}
+
+seqnum_t Node::sendMessage(const DataMessage& msg, const LinkID& lnk) {
+	return context->getOverlay().sendMessage((Message*)msg, lnk);
+}
+
+void Node::bind(CommunicationListener* listener, const ServiceID& sid) {
+	this->context->getOverlay().bind(new ServiceInterfaceWrapper(listener), sid);
+}
+
+void Node::unbind(CommunicationListener* listener, const ServiceID& sid) {
+	// TODO
+}
+
+// service directory
+/*
+ void Node::put(const Identifier<>& key, Message* value) {
+ }
+
+ void Node::get(const Identifier<>& key) {
+
+ }
+ */
+
+// @see Module.h
+void Node::initialize() {
+
+}
+
+// @see Module.h
+void Node::start() {
+
+}
+
+// @see Module.h
+void Node::stop() {
+
+}
+
+// @see Module.h
+string Node::getName() const {
+
+}
+
+// @see Module.h
+void Node::setProperty(string key, string value) {
+
+}
+
+// @see Module.h
+const string Node::getProperty(string key) const {
+
+}
+
+// @see Module.h
+const vector<string> Node::getProperties() const {
+
+}
+
+} // namespace ariba
Index: /source/ariba/Node.h
===================================================================
--- /source/ariba/Node.h	(revision 2409)
+++ /source/ariba/Node.h	(revision 2409)
@@ -0,0 +1,323 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+
+#ifndef NODE_H_
+#define NODE_H_
+
+// forward declarations
+namespace ariba {
+class Node;
+}
+
+#include "Module.h"
+#include "Identifiers.h"
+#include "SpoVNetProperties.h"
+#include "NodeListener.h"
+#include "Name.h"
+#include "AribaModule.h"
+#include "TidyCommunicationListener.h"
+#include "DataMessage.h"
+
+namespace ariba {
+
+// forward declaration
+namespace interface {
+class AribaContext;
+class ServiceInterface;
+}
+
+/**
+ * This class should implement all ariba node functionality.
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class Node: public Module {
+public:
+	/**
+	 * Constructs a new node using a given ariba module
+	 *
+	 * @param ariba_mod The ariba module
+	 * @param name The canonical node name of the new node. When NULL a
+	 *   randomly chosen name is created.
+	 * @param len The length of the canonical node name or -1, if the name
+	 *   is a zero-terminated char-string.
+	 */
+	Node(AribaModule& ariba_mod, const Name& name = Name::UNSPECIFIED);
+
+	/**
+	 * Destroys the node. Before destruction some pre-conditions
+	 * must be met:<br />
+	 *
+	 * 1. The node is not part of any SpoVNet <br />
+	 * 2. All listeners must be unbound from this node <br />
+	 * 3. The module has been stopped<br />
+	 */
+	~Node();
+
+	//--- node control ---
+
+	/**
+	 * This method instructs the node to join a particular spovnet.
+	 * Callees may bind with a NodeListener to receive events, when
+	 * a node has been successfully joined.
+	 *
+	 * @param vnetId The SpoVNet name
+	 */
+	void join(const Name& name);
+
+	/**
+	 * This method initiates a new SpoVNet with the given SpoVNetID and
+	 * parameters.
+	 *
+	 * @param name The SpoVNet name
+	 * @param param The SpoVNet properties
+	 */
+	void initiate(const Name& name, const SpoVNetProperties& parm =
+			SpoVNetProperties::DEFAULT);
+
+	/**
+	 * This method initiates the leave procedure of this node.
+	 */
+	void leave();
+
+	/**
+	 * This method is used to bind a node listener to this node.
+	 *
+	 * @param listener The node listener
+	 */
+	void bind(NodeListener* listener);
+
+	/**
+	 * This method is used to unbind a node listener to this node.
+	 *
+	 * @param listener The node listener
+	 */
+	void unbind(NodeListener* listener);
+
+	//--- spovnet properties ---
+
+	/**
+	 * Returns the properties of the spovnet the node has joined.
+	 *
+	 * @return The properties of the spovnet the node has joined
+	 */
+	const SpoVNetProperties& getSpoVNetProperties() const;
+
+	/**
+	 * Returns the spovnet identifier
+	 *
+	 * @return The spovnet idenfifier
+	 */
+	const SpoVNetID& getSpoVNetId() const;
+
+	/**
+	 * Returns true, if the node is part of a spovnet.
+	 *
+	 * @return True, if the node is part of a spovnet
+	 */
+	bool isJoined() const;
+
+	//--- addressing ---
+
+	/**
+	 * Returns the node id of this node if the link id is unspecified or
+	 * the node id of the remote node.
+	 *
+	 * @return The local or the remote node identifier
+	 */
+	const NodeID& getNodeId(const LinkID& lid = LinkID::UNSPECIFIED) const;
+
+	/**
+	 * Returns the node id to a node name according to the currently joined
+	 * spovnet (usually derives a node identifier by hashing the name).
+	 *
+	 * @return The node identifier to the given name
+	 */
+	NodeID generateNodeId(const Name& name) const;
+
+	/**
+	 * Returns the name of this node if the link id is unspecified or
+	 * the node name of the remote node, if known -- otherwise it returns
+	 * an unspecified name.
+	 *
+	 * TODO: RFE -- send request to remote node and inform service.
+	 *
+	 * @return A node's name or an unspecified name, if unknown
+	 */
+	const Name getNodeName(const LinkID& lid = LinkID::UNSPECIFIED) const;
+
+	//--- communication ---
+
+	/**
+	 * Establishes a new link to another node and service with the given
+	 * link properties. An optional message could be sent with the request.
+	 *
+	 * @param nid The remote node identifier
+	 * @param sid The remote service identifier
+	 * @param req The required link properties
+	 * @param msg An optional message that is sent with the request
+	 * @return A new link id
+	 */
+	LinkID establishLink(const NodeID& nid, const ServiceID& sid,
+			const LinkProperties& req = LinkProperties::DEFAULT,
+			const DataMessage& msg = DataMessage::UNSPECIFIED);
+
+	/**
+	 * This method drops an established link.
+	 *
+	 * @param lnk The link identifier of an active link
+	 */
+	void dropLink(const LinkID& lnk);
+
+	// message sending
+
+	/**
+	 * Sends a one-shot message to a service. If link properties are specified,
+	 * the node tries to fulfill those requirements. This may cause the node
+	 * to first establish a temporary link, second sending the message and last
+	 * dropping the link. This would result in a small amount of extra latency
+	 * until the message is delivered. If reliable transport was selected,
+	 * the method returns a sequence number and a communication event is
+	 * triggered on message delivery or loss.
+	 *
+	 * @param msg The message to be sent
+	 * @param nid The remote node identifier
+	 * @param sid The remote service identifier
+	 * @param req The requirements associated with the message
+	 * @return A sequence number
+	 */
+	seqnum_t sendMessage(const DataMessage& msg, const NodeID& nid, const ServiceID& sid,
+			const LinkProperties& req = LinkProperties::DEFAULT);
+
+	/**
+	 * Sends a message via an established link. If reliable transport was
+	 * selected, the method returns a sequence number and a communication event
+	 * is triggered on message delivery or loss.
+	 *
+	 * @param msg The message to be sent
+	 * @param lnk The link to be used for sending the message
+	 */
+	seqnum_t sendMessage(const DataMessage& msg, const LinkID& lnk);
+
+	// --- communication listeners ---
+
+	/**
+	 * Binds a listener to a specifed service identifier.
+	 * Whenever a link is established/dropped or messages are received the
+	 * events inside the interface are called.
+	 *
+	 * @param listener The listener to be registered
+	 * @param sid The service identifier
+	 */
+	void bind(CommunicationListener* listener, const ServiceID& sid);
+
+	/**
+	 * Un-binds a listener from this node.
+	 *
+	 * @param The listener to be unbound
+	 */
+	void unbind(CommunicationListener* listener, const ServiceID& sid);
+
+	// --- extension proposal: service directory -- TODO
+	// main-idea: use this methods to register groups/rendevous points inside
+	// the base overlay via a distributed storage service.
+	//
+	//void put(const KeyID& key, Message* value);
+	//void get(const KeyID& key);
+	//-------------------------------------------------------------------------
+	//
+	// --- optimization proposal: allow direct endpoint descriptor exchange ---
+	// main-idea: directly allow exchanging endpoint descriptors to establish
+	// links. Depending on the overlay structure used in the base overlay, this
+	// allows a node to directly establish links between two nodes when an
+	// endpoint descriptor is known.
+	//
+	//const EndpointDescriptor& getEndpointDescriptor( const LinkID& lid );
+	//void sendMessage( EndpointDescriptor& epd, Message* msg );
+	//LinkID setupLink( const EndpointDescriptor& endpointDesc,
+	//		const LinkProperties& req = LinkProperties::UNSPECIFIED,
+	//		const Message* msg = NULL );
+	//
+	//-------------------------------------------------------------------------
+
+	// --- module implementation ---
+	//
+	// main-idea: use module properties to configure nodeid, spovnetid etc. and
+	// select start/stop procedures. This allows simulations to start a
+	// node without manually calling join etc.
+
+	/** @see Module.h */
+	void initialize();
+
+	/** @see Module.h */
+	void start();
+
+	/** @see Module.h */
+	void stop();
+
+	/** @see Module.h */
+	string getName() const;
+
+	/** @see Module.h */
+	void setProperty(string key, string value);
+
+	/** @see Module.h */
+	const string getProperty(string key) const;
+
+	/** @see Module.h */
+	const vector<string> getProperties() const;
+
+protected:
+	// friends
+	friend class AribaModule;
+
+	// member variables
+	Name name;				//< node name
+	AribaModule& ariba_mod;	//< ariba module
+	SpoVNetID spovnetId; 	//< current spovnet id
+	NodeID nodeId; 			//< current node id
+
+	// delegates
+	interface::AribaContext* context;
+	static const ServiceID anonymousService;
+};
+
+} // namespace ariba
+
+#endif /* NODE_H_ */
Index: /source/ariba/NodeListener.cpp
===================================================================
--- /source/ariba/NodeListener.cpp	(revision 2409)
+++ /source/ariba/NodeListener.cpp	(revision 2409)
@@ -0,0 +1,68 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+
+#include "NodeListener.h"
+
+namespace ariba {
+
+// dummy
+NodeListener::NodeListener() {
+}
+
+// dummy
+NodeListener::~NodeListener() {
+}
+
+// dummy
+void NodeListener::onJoinCompleted(const SpoVNetID& vid ) {
+}
+
+// dummy
+void NodeListener::onJoinFailed(const SpoVNetID& vid ) {
+}
+
+// dummy
+void NodeListener::onLeaveCompleted(const SpoVNetID& vid ) {
+}
+
+// dummy
+void NodeListener::onLeaveFailed(const SpoVNetID& vid ) {
+}
+
+} // namespace ariba
Index: /source/ariba/NodeListener.h
===================================================================
--- /source/ariba/NodeListener.h	(revision 2409)
+++ /source/ariba/NodeListener.h	(revision 2409)
@@ -0,0 +1,103 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef NODELISTENER_H_
+#define NODELISTENER_H_
+
+// forward declaration
+namespace ariba {
+class NodeListener;
+class Node;
+class ServiceInterfaceWrapper;
+}
+
+#include "Identifiers.h"
+
+namespace ariba {
+
+/**
+ * This class is used to inform a listener about node changes.
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class NodeListener {
+	friend class Node;
+	friend class ServiceInterfaceWrapper;
+public:
+
+	NodeListener();
+	virtual ~NodeListener();
+
+protected:
+	/**
+	 * This event method is called, when a node has completed its join
+	 * procedure.
+	 *
+	 * @param vid The spovnet id
+	 * @param nid The node id
+	 */
+	virtual void onJoinCompleted( const SpoVNetID& vid );
+
+	/**
+	 * This event method is called, when a node failed to join a spovnet.
+	 *
+	 * @param vid The spovnet id
+	 * @param nid The node id
+	 */
+	virtual void onJoinFailed( const SpoVNetID& vid );
+
+	/**
+	 * This event method is called, when a node succeeded to leave a spovnet.
+	 *
+	 * @param vid The spovnet id
+	 * @param nid The node id
+	 */
+	virtual void onLeaveCompleted( const SpoVNetID& vid );
+
+	/**
+	 * This event method is called, when a node failed to leave a spovnet.
+	 *
+	 * @param vid The spovnet id
+	 * @param nid The node id
+	 */
+	virtual void onLeaveFailed( const SpoVNetID& vid );
+};
+
+} // namespace ariba
+
+#endif /* NODELISTENER_H_ */
Index: /source/ariba/SpoVNetProperties.cpp
===================================================================
--- /source/ariba/SpoVNetProperties.cpp	(revision 2409)
+++ /source/ariba/SpoVNetProperties.cpp	(revision 2409)
@@ -0,0 +1,45 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#include "SpoVNetProperties.h"
+
+namespace ariba {
+
+const SpoVNetProperties SpoVNetProperties::DEFAULT;
+
+}
Index: /source/ariba/SpoVNetProperties.h
===================================================================
--- /source/ariba/SpoVNetProperties.h	(revision 2409)
+++ /source/ariba/SpoVNetProperties.h	(revision 2409)
@@ -0,0 +1,192 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef SPOVNETPROPERTIES_H_
+#define SPOVNETPROPERTIES_H_
+
+#include <string>
+#include <iostream>
+#include <streambuf>
+
+using std::string;
+
+namespace ariba {
+// forward declaration
+class SpoVNetProperties;
+}
+
+#include "Identifiers.h"
+#include "Name.h"
+
+namespace ariba {
+
+/**
+ * This class implements a container that holds all properties of a
+ * SpoVNet instance. It may evolve with new features when new features
+ * are introduced.
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class SpoVNetProperties {
+public:
+	enum OverlayType {
+		ONE_HOP_OVERLAY = 0,
+		CHORD_OVERLAY = 1,
+		KADEMLIA_OVERLAY = 2,
+	};
+private:
+	Name name;
+	SpoVNetID id;
+	uint8_t  type;
+	uint16_t idLength;
+	NodeID initiator;
+	bool hidden;
+
+public:
+	/**
+	 * This object holds the default settings for a newly created spovnet
+	 * instance.
+	 */
+	const static SpoVNetProperties DEFAULT;
+
+public:
+	/**
+	 * Constructs a new default SpoVnet property object.
+	 */
+	SpoVNetProperties() {
+		name = Name::random();
+		id = name.toSpoVNetId();
+		type = ONE_HOP_OVERLAY;
+		idLength = 192;
+		initiator = NodeID::UNSPECIFIED;
+		hidden = false;
+	}
+
+	/**
+	 * Constructs a new SpoVnet property object.
+	 *
+	 * TODO: replace with setters! for downwards compatibility
+	 */
+	/*
+	SpoVNetProperties(const Name& name, SpoVNetID id, OverlayType type,
+			uint16_t idLength, const NodeID& initiator, bool hidden = false) :
+		name(name), id(id), type(type), idLength(idLength),
+				initiator(initiator), hidden(hidden) {
+	}*/
+
+	/**
+	 * Copy constructor.
+	 */
+	SpoVNetProperties(const SpoVNetProperties& copy) {
+		this->name = copy.name;
+		this->id = copy.id;
+		this->type = copy.type;
+		this->idLength = copy.idLength;
+		this->initiator = copy.initiator;
+		this->hidden = copy.hidden;
+	}
+
+	/**
+	 * Destructor.
+	 */
+	~SpoVNetProperties() {
+	}
+
+	/**
+	 * Returns the canonical SpoVNet name
+	 */
+	const Name& getName() const {
+		return name;
+	}
+
+	/**
+	 * Returns the SpoVNet id
+	 */
+	const SpoVNetID& getId() const {
+		return id;
+	}
+
+	/**
+	 * Returns the node id of the initiator of the spovnet.
+	 * If the node id is unspecified, the initiator wanted to be anonymous.
+	 */
+	const NodeID& getInitiator() const {
+		return initiator;
+	}
+
+	/**
+	 * Returns the node identifier length in bites
+	 */
+	uint16_t getIdentifierLength() const {
+		return idLength;
+	}
+
+	/**
+	 * Returns the overlay type.
+	 */
+	const OverlayType getBaseOverlayType() const {
+		return (OverlayType)type;
+	}
+
+	/**
+	 * Returns true, if the spovnet is hidden
+	 */
+	bool isHidden() const {
+		return hidden;
+	}
+
+	/**
+	 * Returns a human readable string representation of the SpoVNet properties
+	 *
+	 * @return A human readable string representation of the SpoVNet properties
+	 */
+	std::string toString() const {
+		std::ostringstream buf;
+		buf << "spovnet"
+			<< " name=" << name.toString()
+			<< " id=" << id.toString()
+				<< " base_overlay_type=" << type << " id_length="
+				<< idLength << " initiator=" << initiator
+				<< " hidden=" << hidden;
+		return buf.str();
+	}
+};
+
+}
+
+#endif /* SPOVNETPROPERTIES_H_ */
Index: /source/ariba/TidyCommunicationListener.cpp
===================================================================
--- /source/ariba/TidyCommunicationListener.cpp	(revision 2409)
+++ /source/ariba/TidyCommunicationListener.cpp	(revision 2409)
@@ -0,0 +1,88 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#include "TidyCommunicationListener.h"
+
+namespace ariba {
+
+// dummy
+CommunicationListener::CommunicationListener() {
+}
+
+// dummy
+CommunicationListener::~CommunicationListener() {
+}
+
+// dummy
+void CommunicationListener::onLinkUp(const LinkID& l, const NodeID& r) {
+}
+
+// dummy
+void CommunicationListener::onLinkDown(const LinkID& l, const NodeID& r) {
+}
+
+// dummy
+void CommunicationListener::onLinkChanged(const LinkID& l, const NodeID& r) {
+}
+
+// dummy
+void CommunicationListener::onLinkFail(const LinkID& l, const NodeID& r) {
+}
+
+// dummy
+void CommunicationListener::onLinkQoSChanged(const LinkID& l, const NodeID& r,
+		const LinkProperties& p) {
+}
+
+// dummy
+bool CommunicationListener::onLinkRequest(const NodeID& remote,
+		const DataMessage& msg) {
+	return false;
+}
+
+// dummy
+void CommunicationListener::onMessage(const DataMessage& msg,
+		const NodeID& remote, const LinkID& lnk) {
+}
+
+// dummy
+void CommunicationListener::onMessageSent(seqnum_t seq_num, bool failed,
+		const DataMessage& msg) {
+}
+
+} // namespace ariba
Index: /source/ariba/TidyCommunicationListener.h
===================================================================
--- /source/ariba/TidyCommunicationListener.h	(revision 2409)
+++ /source/ariba/TidyCommunicationListener.h	(revision 2409)
@@ -0,0 +1,97 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef COMMUNICATIONLISTENER_H_
+#define COMMUNICATIONLISTENER_H_
+
+namespace ariba {
+// forward declaration
+class CommunicationListener;
+class ServiceInterfaceWrapper;
+}
+
+#include "TidyMessage.h"
+#include "Identifiers.h"
+#include "LinkProperties.h"
+#include "DataMessage.h"
+
+namespace ariba {
+
+/**
+ *
+ */
+class CommunicationListener {
+	friend class Node;
+	friend class ServiceInterfaceWrapper;
+protected:
+	CommunicationListener();
+	virtual ~CommunicationListener();
+
+	// --- link events ---
+
+	virtual void onLinkUp(const LinkID& lnk, const NodeID& remote);
+
+	virtual void onLinkDown(const LinkID& lnk, const NodeID& remote);
+
+	virtual void onLinkChanged(const LinkID& lnk, const NodeID& remote);
+
+	virtual void onLinkFail(const LinkID& lnk, const NodeID& remote);
+
+	virtual void onLinkQoSChanged(const LinkID& lnk, const NodeID& remote,
+			const LinkProperties& prop);
+
+	// --- service specific events ---
+
+	virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg);
+
+	// --- general receive method ---
+
+	virtual void onMessage(const DataMessage& msg, const NodeID& remote,
+			const LinkID& lnk = LinkID::UNSPECIFIED);
+
+	virtual void onMessageSent(seqnum_t seq_num, bool failed,
+			const DataMessage& msg = DataMessage::UNSPECIFIED);
+
+	// --- dht functionality ---
+	//	virtual void onGetResponse( const Identifier<> id, const Message* msg );
+	//	virtual void onPutResponse( const Identifier<> id, const Message* msg );
+};
+
+} // namespace ariba
+
+#endif /* COMMUNICATIONLISTENER_H_ */
Index: /source/ariba/TidyMessage.cpp
===================================================================
--- /source/ariba/TidyMessage.cpp	(revision 2409)
+++ /source/ariba/TidyMessage.cpp	(revision 2409)
@@ -0,0 +1,44 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#include "TidyMessage.h"
+
+namespace ariba {
+
+
+} // namespace ariba
Index: /source/ariba/TidyMessage.h
===================================================================
--- /source/ariba/TidyMessage.h	(revision 2409)
+++ /source/ariba/TidyMessage.h	(revision 2409)
@@ -0,0 +1,50 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef TIDYMESSAGE_H_
+#define TIDYMESSAGE_H_
+
+#include <inttypes.h>
+#include "ariba/utility/messages.h"
+
+namespace ariba {
+typedef uint16_t seqnum_t;
+typedef utility::Message Message;
+} // namespace ariba
+
+#endif /* MESSAGE_H_ */
Index: /source/ariba/ariba.h
===================================================================
--- /source/ariba/ariba.h	(revision 2409)
+++ /source/ariba/ariba.h	(revision 2409)
@@ -0,0 +1,58 @@
+// [License]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [License]
+
+#ifndef ARIBA_H_
+#define ARIBA_H_
+
+/**
+ * This file includes all standard headers for a working ariba substrate
+ */
+
+#include "AribaModule.h"
+#include "DataMessage.h"
+#include "Identifiers.h"
+#include "LinkProperties.h"
+#include "Module.h"
+#include "Name.h"
+#include "Node.h"
+#include "NodeListener.h"
+#include "SpoVNetProperties.h"
+#include "TidyCommunicationListener.h"
+#include "TidyMessage.h"
+
+#endif /* ARIBA_H_ */
Index: /trash/pingpong/Makefile.am
===================================================================
--- /trash/pingpong/Makefile.am	(revision 2409)
+++ /trash/pingpong/Makefile.am	(revision 2409)
@@ -0,0 +1,60 @@
+# sources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+if OMNET
+lib_LTLIBRARIES = libpingpong.la
+else
+bin_PROGRAMS 	= pingpong
+endif
+
+# compiler flags ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+AM_CPPFLAGS     = -DLINUX -D_LINUX -I../../source -D_REENTRANT
+AM_CPPFLAGS    += $(BOOST_CPPFLAGS)
+
+if DEBUG
+AM_CPPFLAGS    += -ggdb -DDEBUG -D_DEBUG -O0
+endif
+
+if PROFILING
+AM_CPPFLAGS    += -pg
+endif
+
+if OMNET
+AM_CPPFLAGS    += -fPIC -DUNDERLAY_OMNET
+endif
+
+# linker flags ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+AM_LDFLAGS      = -L../../source/ariba -lariba
+
+if PROFILING
+AM_LDFLAGS     += -pg
+endif
+
+if OMNET
+AM_LDFLAGS     += -shared -rdynamic
+endif
+
+# sources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+if OMNET
+
+libpingpong_la_SOURCES = \
+  PingPong.cpp \
+  PingPong.h \
+  PingPongMessage.cpp \
+  PingPongMessage.h
+
+else
+
+#needed to fix autotools bug
+pingpong_CPPFLAGS = $(AM_CPPFLAGS)
+
+pingpong_SOURCES = \
+  PingPong.cpp \
+  PingPong.h \
+  PingPongMessage.cpp \
+  PingPongMessage.h \
+  main.cpp
+
+endif
Index: /trash/pingpong/PingPong.cpp
===================================================================
--- /trash/pingpong/PingPong.cpp	(revision 2409)
+++ /trash/pingpong/PingPong.cpp	(revision 2409)
@@ -0,0 +1,173 @@
+#include "PingPong.h"
+
+#include "ariba/interface/UnderlayAbstraction.h"
+
+namespace ariba {
+namespace appplication {
+namespace pingpong {
+
+use_logging_cpp(PingPong);
+ServiceID PingPong::PINGPONG_ID = ServiceID(111);
+
+PingPong::PingPong() : pingid( 0 ) {
+}
+
+PingPong::~PingPong(){
+}
+
+void PingPong::setMode(bool startingNode){
+	startping = startingNode;
+}
+
+void PingPong::startup(){
+	abstraction = new UnderlayAbstraction();
+
+	logging_info( "starting up PingPong service ... " );
+
+	SpoVNetID spovnetid (Identifier(5000));
+
+	setMode( !Configuration::instance().read<bool>("GENERAL_Initiator") );
+
+	NodeID nodeid = (Configuration::instance().exists("BASE_nodeid") ?
+			NodeID(Identifier(Configuration::instance().read<unsigned long>("BASE_nodeid"))) :
+			NodeID::UNSPECIFIED);
+
+	IPv4Locator* locallocator = (Configuration::instance().exists("BASE_localLocator") ?
+					&(IPv4Locator::fromString(Configuration::instance().read<string>("BASE_localLocator"))) :
+					NULL);
+
+	uint16_t localport = Configuration::instance().exists("BASE_port") ?
+				Configuration::instance().read<uint16_t>("BASE_port") :
+				ARIBA_DEFAULT_PORT;
+
+	if( !startping ){
+
+		context = abstraction->createSpoVNet(
+			spovnetid, nodeid, locallocator, localport );
+
+	} else {
+
+		if( !Configuration::instance().exists("BASE_bootstrapIP")){
+			logging_fatal( "no bootstrap address found" );
+			return;
+		}
+
+		logging_info( "using bootstrap point " <<
+			Configuration::instance().read<string>("BASE_bootstrapIP") );
+
+		EndpointDescriptor bootstrap(
+		new IPv4Locator(IPv4Locator::fromString(
+			Configuration::instance().read<string>("BASE_bootstrapIP"))));
+
+		context = abstraction->joinSpoVNet(
+			spovnetid, bootstrap, nodeid, locallocator, localport );
+
+	}
+
+	overlay = &context->getOverlay();
+	overlay->bind( this, PingPong::PINGPONG_ID );
+
+	logging_info( "PingPong started up" );
+
+	// trigger the creation of the pathload measurement module
+	//PathloadMeasurement::instance( overlay );
+}
+
+void PingPong::shutdown(){
+	logging_info( "shutting down PingPong service ..." );
+
+	overlay->unbind( this, PingPong::PINGPONG_ID );
+	Timer::stop();
+
+	if( !startping ) abstraction->destroySpoVNet( context );
+	else             abstraction->leaveSpoVNet( context );
+
+	delete abstraction;
+
+	logging_info( "PingPong service shut down" );
+}
+
+bool PingPong::receiveMessage(const Message* message, const LinkID& link, const NodeID& node){
+
+	PingPongMessage* incoming = ((Message*)message)->decapsulate<PingPongMessage>();
+
+	logging_info( "received ping message on link " << link.toString() <<
+				 " from node with id " << (int)incoming->getid());
+
+// 	if( ((int)incoming->getid() % 5) == 0 )
+// 		PathloadMeasurement::instance().measure( node, this );
+}
+
+void PingPong::eventFunction(){
+
+	logging_info( "pinging our remote nodes" );
+
+	RemoteNodes::iterator i = remoteNodes.begin();
+	RemoteNodes::iterator iend = remoteNodes.end();
+
+	pingid++;
+
+	for( ; i != iend; i++ ){
+		logging_info( "     -> pinging " << i->first );
+
+		PingPongMessage pingmsg( pingid );
+		overlay->sendMessage( &pingmsg, i->second );
+	}
+}
+
+void PingPong::onMeasurement(NodeID node, double mbps){
+	logging_info( "pingpong received measurement for node " << node.toString() << " with result " << mbps );
+}
+
+void PingPong::onJoinSuccess( const SpoVNetID& spovnetid ){
+}
+
+void PingPong::onOverlayCreate( const SpoVNetID& id ){
+}
+
+void PingPong::onOverlayDestroy( const SpoVNetID& id ){
+}
+
+bool PingPong::isJoinAllowed( const NodeID& nodeid, const SpoVNetID& spovnetid ){
+	return true;
+}
+
+void PingPong::onNodeJoin( const NodeID& nodeid, const SpoVNetID& spovnetid ){
+
+	if( !startping ){
+
+		logging_info( "establishing link to node " << nodeid.toString() );
+		const LinkID link = overlay->establishLink( nodeid, PingPong::PINGPONG_ID );
+
+		logging_info( "adding node to registered nodes in pingpong: " << nodeid.toString() );
+		remoteNodes.insert( make_pair(nodeid,link) );
+
+		Timer::setInterval( 2000 );
+		Timer::start();
+	}
+}
+
+void PingPong::onNodeLeave( const NodeID& id, const SpoVNetID& spovnetid ){
+	RemoteNodes::iterator i = remoteNodes.find( id );
+	if( i != remoteNodes.end() ) remoteNodes.erase( i );
+}
+
+void PingPong::onJoinFail( const SpoVNetID& spovnetid ){
+}
+
+void PingPong::onLinkUp( const LinkID& link, const NodeID& local, const NodeID& remote ){
+}
+
+void PingPong::onLinkDown( const LinkID& link, const NodeID& local, const NodeID& remote ){
+}
+
+void PingPong::onLinkChanged( const LinkID& link, const NodeID& local, const NodeID& remote ){
+}
+
+void PingPong::onLinkFail(const LinkID& id, const NodeID& local, const NodeID& remote){
+}
+
+void PingPong::onLinkQoSChanged(const LinkID& id, const NodeID& local, const NodeID& remote , const QoSParameterSet& qos){
+}
+
+}}} // namespace ariba, appplication, pingpong
Index: /trash/pingpong/PingPong.h
===================================================================
--- /trash/pingpong/PingPong.h	(revision 2409)
+++ /trash/pingpong/PingPong.h	(revision 2409)
@@ -0,0 +1,100 @@
+#ifndef __PINGPONG_H_
+#define __PINGPONG_H_
+
+#include <map>
+#include <iostream>
+#include <vector>
+#include "ariba/utility/types.h"
+#include "ariba/utility/system/Timer.h"
+#include "ariba/utility/misc/Helper.h"
+#include "ariba/utility/messages.h"
+#include "ariba/utility/measurement/PathloadMeasurement.h"
+#include "ariba/utility/configuration/Configuration.h"
+#include "ariba/utility/logging/Logging.h"
+#include "ariba/utility/measurement/PathloadMeasurement.h"
+#include "ariba/utility/system/StartupInterface.h"
+#include "ariba/interface/UnderlayAbstraction.h"
+#include "ariba/interface/AribaContext.h"
+#include "ariba/interface/ServiceInterface.h"
+#include "PingPongMessage.h"
+
+using std::vector;
+using std::map;
+using std::cout;
+using ariba::application::pingpong::PingPongMessage;
+using ariba::interface::ServiceInterface;
+using ariba::interface::UnderlayAbstraction;
+using ariba::interface::AribaContext;
+using ariba::utility::NodeID;
+using ariba::utility::LinkID;
+using ariba::utility::StartupInterface;
+using ariba::utility::Timer;
+using ariba::utility::Configuration;
+using ariba::utility::NodeID;
+using ariba::utility::Identifier;
+using ariba::utility::ServiceID;
+using ariba::utility::PathloadMeasurement;
+using ariba::utility::PathloadMeasurementListener;
+
+namespace ariba {
+namespace appplication {
+namespace pingpong {
+
+/**
+/* The PingPong main class
+/* This class implements an example service for demonstration purposes
+/* The pingpong class sends and receives messages between two SpoVNet
+/* instances
+**/
+class PingPong :
+	public ServiceInterface,
+	public StartupInterface,
+	public Timer,
+	public PathloadMeasurementListener {
+
+	use_logging_h(PingPong);
+
+public:
+	PingPong();
+	virtual ~PingPong();
+	void setMode( bool startingNode );
+
+
+	virtual void onOverlayCreate( const SpoVNetID& id );
+	virtual void onOverlayDestroy( const SpoVNetID& id );
+	virtual bool isJoinAllowed( const NodeID& nodeid, const SpoVNetID& spovnetid );
+	virtual void onNodeJoin( const NodeID& nodeid, const SpoVNetID& spovnetid );
+	virtual void onNodeLeave( const NodeID& id, const SpoVNetID& spovnetid );
+	virtual void onJoinSuccess( const SpoVNetID& spovnetid );
+	virtual void onJoinFail( const SpoVNetID& spovnetid );
+	virtual void onLinkUp( const LinkID& link, const NodeID& local, const NodeID& remote );
+	virtual void onLinkDown( const LinkID& link, const NodeID& local, const NodeID& remote );
+	virtual void onLinkChanged( const LinkID& link, const NodeID& local, const NodeID& remote );
+	virtual void onLinkFail(const LinkID& id, const NodeID& local, const NodeID& remote);
+	virtual void onLinkQoSChanged(const LinkID& id, const NodeID& local, const NodeID& remote , const QoSParameterSet& qos);
+
+	virtual bool receiveMessage( const Message* message, const LinkID& link, const NodeID& node );
+
+protected:
+	virtual void startup();
+	virtual void shutdown();
+
+	virtual void eventFunction(); // timer event function
+	virtual void onMeasurement(NodeID node, double mbps); // measurement event function
+
+private:
+	bool startping;
+	UnderlayAbstraction* abstraction;
+	AribaContext* context;
+	BaseOverlay* overlay;
+	static ServiceID PINGPONG_ID;
+	unsigned long pingid;
+	typedef map<NodeID, LinkID> RemoteNodes;
+	RemoteNodes remoteNodes;
+};
+
+ARIBA_SIMULATION_SERVICE(PingPong);
+
+}}} // namespace ariba, appplication, pingpong
+
+#endif // __PINGPONG_H_
Index: /trash/pingpong/PingPongMessage.cpp
===================================================================
--- /trash/pingpong/PingPongMessage.cpp	(revision 2409)
+++ /trash/pingpong/PingPongMessage.cpp	(revision 2409)
@@ -0,0 +1,26 @@
+#include "PingPongMessage.h"
+
+namespace ariba {
+namespace application {
+namespace pingpong {
+
+vsznDefault(PingPongMessage);
+
+PingPongMessage::PingPongMessage() : id(0) {
+}
+
+PingPongMessage::PingPongMessage(uint8_t _id) : id(_id) {
+}
+
+PingPongMessage::~PingPongMessage(){
+}
+
+string PingPongMessage::info(){
+	return "ping pong message id " + ariba::utility::Helper::ultos(id);
+}
+
+uint8_t PingPongMessage::getid(){
+	return id;
+}
+
+}}} // namespace ariba, appplication, pingpong
Index: /trash/pingpong/PingPongMessage.h
===================================================================
--- /trash/pingpong/PingPongMessage.h	(revision 2409)
+++ /trash/pingpong/PingPongMessage.h	(revision 2409)
@@ -0,0 +1,38 @@
+#ifndef PINGPONGMESSAGES_H_
+#define PINGPONGMESSAGES_H_
+
+#include <string>
+#include "ariba/utility/messages.h"
+#include "ariba/utility/serialization.h"
+#include "ariba/utility/misc/Helper.h"
+
+using std::string;
+using ariba::utility::Message;
+
+namespace ariba {
+namespace application {
+namespace pingpong {
+
+using_serialization;
+
+class PingPongMessage : public Message {
+	VSERIALIZEABLE;
+public:
+	PingPongMessage();
+	PingPongMessage(uint8_t _id);
+	virtual ~PingPongMessage();
+	
+	string info();
+	uint8_t getid();
+
+private:
+	uint8_t id;
+};
+
+}}} // namespace ariba, appplication , pingpong
+
+sznBeginDefault( ariba::application ::pingpong::PingPongMessage, X ) {
+	X && id;
+} sznEnd();
+
+#endif /* PINGPONGMESSAGES_H_ */
Index: /trash/pingpong/main.cpp
===================================================================
--- /trash/pingpong/main.cpp	(revision 2409)
+++ /trash/pingpong/main.cpp	(revision 2409)
@@ -0,0 +1,25 @@
+#include <string>
+#include "ariba/utility/system/StartupWrapper.h"
+#include "PingPong.h"
+
+using std::string;
+using ariba::utility::StartupWrapper;
+using ariba::appplication::pingpong::PingPong;
+
+int main( int argc, char** argv ) {
+
+	string config = "../etc/settings.cnf";
+	if (argc >= 2) config = argv[1];
+
+	StartupWrapper::initConfig( config );
+	StartupWrapper::initSystem();
+
+	// this will do the main functionality and block
+	PingPong ping;
+	StartupWrapper::startup(&ping, true);
+
+	// this will run blocking until <enter> is hit
+
+	StartupWrapper::shutdown();
+	return 0;
+}
