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_ */
