Index: /etc/pingpong/settings_node3.cnf
===================================================================
--- /etc/pingpong/settings_node3.cnf	(revision 3690)
+++ /etc/pingpong/settings_node3.cnf	(revision 3690)
@@ -0,0 +1,7 @@
+#node.name = biff
+node.initiator = false
+#ariba.ip.addr =
+ariba.tcp.port = 5005
+#ariba.udp.port =
+ariba.bootstrap.hints=pingpong{ip{127.0.0.1},tcp(ip,{5002})}
+
Index: /etc/pingpong/settings_node4.cnf
===================================================================
--- /etc/pingpong/settings_node4.cnf	(revision 3690)
+++ /etc/pingpong/settings_node4.cnf	(revision 3690)
@@ -0,0 +1,7 @@
+#node.name = biff
+node.initiator = false
+#ariba.ip.addr =
+ariba.tcp.port = 5006
+#ariba.udp.port =
+ariba.bootstrap.hints=pingpong{ip{127.0.0.1},tcp(ip,{5002})}
+
Index: /etc/pingpong/settings_node5.cnf
===================================================================
--- /etc/pingpong/settings_node5.cnf	(revision 3690)
+++ /etc/pingpong/settings_node5.cnf	(revision 3690)
@@ -0,0 +1,7 @@
+#node.name = biff
+node.initiator = false
+#ariba.ip.addr =
+ariba.tcp.port = 5007
+#ariba.udp.port =
+ariba.bootstrap.hints=pingpong{ip{127.0.0.1},tcp(ip,{5002})}
+
Index: /source/ariba/Identifiers.cpp
===================================================================
--- /source/ariba/Identifiers.cpp	(revision 3683)
+++ /source/ariba/Identifiers.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Identifiers.h"
Index: /source/ariba/Makefile.am
===================================================================
--- /source/ariba/Makefile.am	(revision 3683)
+++ /source/ariba/Makefile.am	(revision 3690)
@@ -268,4 +268,5 @@
   overlay/messages/JoinReply.cpp \
   overlay/messages/JoinRequest.cpp \
+  overlay/messages/LinkRequest.cpp \
   overlay/messages/OverlayMsg.cpp
 
@@ -273,4 +274,5 @@
   overlay/messages/JoinReply.h \
   overlay/messages/JoinRequest.h \
+  overlay/messages/LinkRequest.h \
   overlay/messages/OverlayMsg.h
 
@@ -300,4 +302,21 @@
   overlay/modules/onehop/messages/NodeListingRequest.h \
   overlay/modules/onehop/messages/NodeListingReply.h
+
+#------------> overlay :: modules :: chord
+
+libariba_la_SOURCES += \
+  overlay/modules/chord/Chord.cpp \
+  overlay/modules/chord/messages/ChordMessage.cpp \
+  overlay/modules/chord/messages/Discovery.cpp 
+
+nobase_libariba_la_HEADERS += \
+  overlay/modules/chord/Chord.h \
+  overlay/modules/chord/messages/ChordMessage.h \
+  overlay/modules/chord/messages/Discovery.h \
+  overlay/modules/chord/detail/chord_routing_table.hpp \
+  overlay/modules/chord/detail/comparators.hpp \
+  overlay/modules/chord/detail/distances.hpp \
+  overlay/modules/chord/detail/minimizer_table.hpp \
+  overlay/modules/chord/detail/table_listener.hpp 
 
 #------------> utility
Index: /source/ariba/SpoVNetProperties.cpp
===================================================================
--- /source/ariba/SpoVNetProperties.cpp	(revision 3683)
+++ /source/ariba/SpoVNetProperties.cpp	(revision 3690)
@@ -44,5 +44,5 @@
 
 SpoVNetProperties::SpoVNetProperties() :
-		name( Name::random() ), type( ONE_HOP_OVERLAY ), idLength( 192 ),
+		name( Name::random() ), type( CHORD_OVERLAY ), idLength( 192 ),
 		initiator( NodeID::UNSPECIFIED ), hidden( false ) {
 
@@ -51,5 +51,5 @@
 
 SpoVNetProperties::SpoVNetProperties(const SpoVNetProperties& copy) :
-		name( copy.name ), id( copy.id ), 
+		name( copy.name ), id( copy.id ),
 		type( copy.type ), idLength( copy.idLength ),
 		initiator( copy.initiator ), hidden( copy.hidden ) {
@@ -88,6 +88,6 @@
 		<< " name=" << name.toString()
 		<< " id=" << id.toString()
-		<< " overlay_type=" << type 
-		<< " id_length=" << idLength 
+		<< " overlay_type=" << type
+		<< " id_length=" << idLength
 		<< " initiator=" << initiator
 		<< " hidden=" << hidden;
Index: /source/ariba/SpoVNetProperties.h
===================================================================
--- /source/ariba/SpoVNetProperties.h	(revision 3683)
+++ /source/ariba/SpoVNetProperties.h	(revision 3690)
@@ -127,4 +127,9 @@
 	uint16_t getIdentifierLength() const;
 
+	void setIdentifierLength( uint16_t length ) {
+		this->idLength = length;
+	}
+
+
 	/**
 	 * Returns the overlay type.
@@ -132,8 +137,17 @@
 	const OverlayType getBaseOverlayType() const;
 
+	void setBaseOverlayType( OverlayType type ) {
+		this->type = type;
+	}
+
+
 	/**
 	 * Returns true, if the spovnet is hidden
 	 */
 	bool isHidden() const;
+
+	void setHidden( bool is_hidden ) {
+		this->hidden = is_hidden;
+	}
 
 	/**
Index: /source/ariba/communication/BaseCommunication.cpp
===================================================================
--- /source/ariba/communication/BaseCommunication.cpp	(revision 3683)
+++ /source/ariba/communication/BaseCommunication.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "BaseCommunication.h"
@@ -160,8 +160,13 @@
 
 const LinkID BaseCommunication::establishLink(
-			const EndpointDescriptor& descriptor,
-			const QoSParameterSet& qos,
-			const SecurityParameterSet& sec){
-
+	const EndpointDescriptor& descriptor,
+	const LinkID& link_id,
+	const QoSParameterSet& qos,
+	const SecurityParameterSet& sec) {
+
+	// copy link id
+	LinkID linkid = link_id;
+
+	// debug
 	logging_debug( "request to establish link" );
 
@@ -169,5 +174,4 @@
 	// just use the first locator in the endp descriptors
 	//
-
 	if( descriptor.locator == NULL ){
 		logging_error( "invalid destination endpoint" );
@@ -183,10 +187,6 @@
 	const NetworkLocator* local =  localDescriptor.locator;
 
-	//
-	// create link and link descriptor
-	//
-
-	LinkID linkid = LinkID::create();
-
+	// create link identifier and link descriptor
+	if (linkid.isUnspecified()) linkid = LinkID::create();
 	logging_debug( "creating new local descriptor entry with local link id " << linkid.toString() );
 	LinkDescriptor linkDescriptor( linkid, local, LinkID::UNSPECIFIED, remote, descriptor, false );
Index: /source/ariba/communication/BaseCommunication.h
===================================================================
--- /source/ariba/communication/BaseCommunication.h	(revision 3683)
+++ /source/ariba/communication/BaseCommunication.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef BASECOMMUNICATION_H_
@@ -147,14 +147,15 @@
 
 	/**
-	 * Establishes a link to another end-point
+	 * Establishes a link to another end-point.
 	 */
 	const LinkID establishLink(
-			const EndpointDescriptor& descriptor,
-			const QoSParameterSet& qos = QoSParameterSet::DEFAULT,
-			const SecurityParameterSet& sec = SecurityParameterSet::DEFAULT
+		const EndpointDescriptor& descriptor,
+		const LinkID& linkid = LinkID::UNSPECIFIED,
+		const QoSParameterSet& qos = QoSParameterSet::DEFAULT,
+		const SecurityParameterSet& sec = SecurityParameterSet::DEFAULT
 	);
 
 	/**
-	 * Drops a link
+	 * Drops a link.
 	 *
 	 * @param The link id of the link that should be dropped
Index: /source/ariba/communication/CommunicationEvents.cpp
===================================================================
--- /source/ariba/communication/CommunicationEvents.cpp	(revision 3683)
+++ /source/ariba/communication/CommunicationEvents.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "CommunicationEvents.h"
Index: /source/ariba/communication/CommunicationEvents.h
===================================================================
--- /source/ariba/communication/CommunicationEvents.h	(revision 3683)
+++ /source/ariba/communication/CommunicationEvents.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __COMMUNICATION_EVENTS_H
Index: /source/ariba/communication/EndpointDescriptor.cpp
===================================================================
--- /source/ariba/communication/EndpointDescriptor.cpp	(revision 3683)
+++ /source/ariba/communication/EndpointDescriptor.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "EndpointDescriptor.h"
Index: /source/ariba/communication/EndpointDescriptor.h
===================================================================
--- /source/ariba/communication/EndpointDescriptor.h	(revision 3683)
+++ /source/ariba/communication/EndpointDescriptor.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef ENDPOINTDESCRIPTOR_H_
@@ -56,5 +56,5 @@
 using_serialization;
 
-class EndpointDescriptor : VSerializeable {
+class EndpointDescriptor : public VSerializeable {
 	VSERIALIZEABLE;
 
Index: /source/ariba/communication/messages/AribaBaseMsg.cpp
===================================================================
--- /source/ariba/communication/messages/AribaBaseMsg.cpp	(revision 3683)
+++ /source/ariba/communication/messages/AribaBaseMsg.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "AribaBaseMsg.h"
Index: /source/ariba/communication/messages/AribaBaseMsg.h
===================================================================
--- /source/ariba/communication/messages/AribaBaseMsg.h	(revision 3683)
+++ /source/ariba/communication/messages/AribaBaseMsg.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef ARIBA_BASE_MSG_H__
Index: /source/ariba/communication/modules/_namespace.h
===================================================================
--- /source/ariba/communication/modules/_namespace.h	(revision 3683)
+++ /source/ariba/communication/modules/_namespace.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #undef NAMESPACE_BEGIN
Index: /source/ariba/communication/modules/modules.h
===================================================================
--- /source/ariba/communication/modules/modules.h	(revision 3683)
+++ /source/ariba/communication/modules/modules.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MODULES_H_
Index: /source/ariba/communication/modules/network/NetworkLocator.cpp
===================================================================
--- /source/ariba/communication/modules/network/NetworkLocator.cpp	(revision 3683)
+++ /source/ariba/communication/modules/network/NetworkLocator.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NetworkLocator.h"
Index: /source/ariba/communication/modules/network/NetworkLocator.h
===================================================================
--- /source/ariba/communication/modules/network/NetworkLocator.h	(revision 3683)
+++ /source/ariba/communication/modules/network/NetworkLocator.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef NETWORKLOCATOR_H_
Index: /source/ariba/communication/modules/network/NetworkProtocol.cpp
===================================================================
--- /source/ariba/communication/modules/network/NetworkProtocol.cpp	(revision 3683)
+++ /source/ariba/communication/modules/network/NetworkProtocol.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NetworkProtocol.h"
Index: /source/ariba/communication/modules/network/NetworkProtocol.h
===================================================================
--- /source/ariba/communication/modules/network/NetworkProtocol.h	(revision 3683)
+++ /source/ariba/communication/modules/network/NetworkProtocol.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef NETWORKPROTOCOL_H_
Index: /source/ariba/communication/modules/network/ip/IPv4Locator.cpp
===================================================================
--- /source/ariba/communication/modules/network/ip/IPv4Locator.cpp	(revision 3683)
+++ /source/ariba/communication/modules/network/ip/IPv4Locator.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "IPv4Locator.h"
Index: /source/ariba/communication/modules/network/ip/IPv4Locator.h
===================================================================
--- /source/ariba/communication/modules/network/ip/IPv4Locator.h	(revision 3683)
+++ /source/ariba/communication/modules/network/ip/IPv4Locator.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef IPV4LOCATOR_H_
Index: /source/ariba/communication/modules/network/ip/IPv4NetworkProtocol.cpp
===================================================================
--- /source/ariba/communication/modules/network/ip/IPv4NetworkProtocol.cpp	(revision 3683)
+++ /source/ariba/communication/modules/network/ip/IPv4NetworkProtocol.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "IPv4NetworkProtocol.h"
Index: /source/ariba/communication/modules/network/ip/IPv4NetworkProtocol.h
===================================================================
--- /source/ariba/communication/modules/network/ip/IPv4NetworkProtocol.h	(revision 3683)
+++ /source/ariba/communication/modules/network/ip/IPv4NetworkProtocol.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef IPV4_NETWORK_PROTOCOL_H__
Index: /source/ariba/communication/modules/network/omnet/OmnetNetworkProtocol.cpp
===================================================================
--- /source/ariba/communication/modules/network/omnet/OmnetNetworkProtocol.cpp	(revision 3683)
+++ /source/ariba/communication/modules/network/omnet/OmnetNetworkProtocol.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OmnetNetworkProtocol.h"
Index: /source/ariba/communication/modules/network/omnet/OmnetNetworkProtocol.h
===================================================================
--- /source/ariba/communication/modules/network/omnet/OmnetNetworkProtocol.h	(revision 3683)
+++ /source/ariba/communication/modules/network/omnet/OmnetNetworkProtocol.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __OMNET_NETWORK_PROTOCOL_H
Index: /source/ariba/communication/modules/transport/TransportLocator.cpp
===================================================================
--- /source/ariba/communication/modules/transport/TransportLocator.cpp	(revision 3683)
+++ /source/ariba/communication/modules/transport/TransportLocator.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "TransportLocator.h"
Index: /source/ariba/communication/modules/transport/TransportLocator.h
===================================================================
--- /source/ariba/communication/modules/transport/TransportLocator.h	(revision 3683)
+++ /source/ariba/communication/modules/transport/TransportLocator.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef TRANSPORTLOCATOR_H_
Index: /source/ariba/communication/modules/transport/TransportProtocol.cpp
===================================================================
--- /source/ariba/communication/modules/transport/TransportProtocol.cpp	(revision 3683)
+++ /source/ariba/communication/modules/transport/TransportProtocol.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "TransportProtocol.h"
Index: /source/ariba/communication/modules/transport/TransportProtocol.h
===================================================================
--- /source/ariba/communication/modules/transport/TransportProtocol.h	(revision 3683)
+++ /source/ariba/communication/modules/transport/TransportProtocol.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef TRANSPORTPROTOCOL_H_
Index: /source/ariba/communication/modules/transport/omnet/AribaOmnetMessage.msg
===================================================================
--- /source/ariba/communication/modules/transport/omnet/AribaOmnetMessage.msg	(revision 3683)
+++ /source/ariba/communication/modules/transport/omnet/AribaOmnetMessage.msg	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 message AribaOmnetMessage
Index: /source/ariba/communication/modules/transport/omnet/AribaOmnetModule.cpp
===================================================================
--- /source/ariba/communication/modules/transport/omnet/AribaOmnetModule.cpp	(revision 3683)
+++ /source/ariba/communication/modules/transport/omnet/AribaOmnetModule.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "AribaOmnetModule.h"
Index: /source/ariba/communication/modules/transport/omnet/AribaOmnetModule.h
===================================================================
--- /source/ariba/communication/modules/transport/omnet/AribaOmnetModule.h	(revision 3683)
+++ /source/ariba/communication/modules/transport/omnet/AribaOmnetModule.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef ARIBA_OMNET_MODULE_H__
Index: /source/ariba/communication/modules/transport/tcp/TCPTransport.cpp
===================================================================
--- /source/ariba/communication/modules/transport/tcp/TCPTransport.cpp	(revision 3683)
+++ /source/ariba/communication/modules/transport/tcp/TCPTransport.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "TCPTransport.h"
Index: /source/ariba/communication/modules/transport/tcp/TCPTransport.h
===================================================================
--- /source/ariba/communication/modules/transport/tcp/TCPTransport.h	(revision 3683)
+++ /source/ariba/communication/modules/transport/tcp/TCPTransport.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef TCPTRANSPORT_H_
Index: /source/ariba/communication/modules/transport/tcp/TCPTransportLocator.cpp
===================================================================
--- /source/ariba/communication/modules/transport/tcp/TCPTransportLocator.cpp	(revision 3683)
+++ /source/ariba/communication/modules/transport/tcp/TCPTransportLocator.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "TCPTransportLocator.h"
Index: /source/ariba/communication/modules/transport/tcp/TCPTransportLocator.h
===================================================================
--- /source/ariba/communication/modules/transport/tcp/TCPTransportLocator.h	(revision 3683)
+++ /source/ariba/communication/modules/transport/tcp/TCPTransportLocator.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef TCPTRANSPORTLOCATOR_H_
Index: /source/ariba/communication/networkinfo/AddressInformation.cpp
===================================================================
--- /source/ariba/communication/networkinfo/AddressInformation.cpp	(revision 3683)
+++ /source/ariba/communication/networkinfo/AddressInformation.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "AddressInformation.h"
Index: /source/ariba/communication/networkinfo/AddressInformation.h
===================================================================
--- /source/ariba/communication/networkinfo/AddressInformation.h	(revision 3683)
+++ /source/ariba/communication/networkinfo/AddressInformation.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __ADDRESS_INFORMATION_H
Index: /source/ariba/communication/networkinfo/NetworkChangeDetection.cpp
===================================================================
--- /source/ariba/communication/networkinfo/NetworkChangeDetection.cpp	(revision 3683)
+++ /source/ariba/communication/networkinfo/NetworkChangeDetection.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NetworkChangeDetection.h"
Index: /source/ariba/communication/networkinfo/NetworkChangeDetection.h
===================================================================
--- /source/ariba/communication/networkinfo/NetworkChangeDetection.h	(revision 3683)
+++ /source/ariba/communication/networkinfo/NetworkChangeDetection.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __NETWORK_CHANGE_DETECTION_H
Index: /source/ariba/communication/networkinfo/NetworkChangeInterface.h
===================================================================
--- /source/ariba/communication/networkinfo/NetworkChangeInterface.h	(revision 3683)
+++ /source/ariba/communication/networkinfo/NetworkChangeInterface.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __NETWORK_CHANGE_INTERFACE_H
Index: /source/ariba/communication/networkinfo/NetworkInformation.cpp
===================================================================
--- /source/ariba/communication/networkinfo/NetworkInformation.cpp	(revision 3683)
+++ /source/ariba/communication/networkinfo/NetworkInformation.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NetworkInformation.h"
Index: /source/ariba/communication/networkinfo/NetworkInformation.h
===================================================================
--- /source/ariba/communication/networkinfo/NetworkInformation.h	(revision 3683)
+++ /source/ariba/communication/networkinfo/NetworkInformation.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __NETWORK_INFORMATION_H
Index: /source/ariba/communication/networkinfo/NetworkInterface.cpp
===================================================================
--- /source/ariba/communication/networkinfo/NetworkInterface.cpp	(revision 3683)
+++ /source/ariba/communication/networkinfo/NetworkInterface.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NetworkInterface.h"
Index: /source/ariba/communication/networkinfo/NetworkInterface.h
===================================================================
--- /source/ariba/communication/networkinfo/NetworkInterface.h	(revision 3683)
+++ /source/ariba/communication/networkinfo/NetworkInterface.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __NETWORK_INTERFACE_H
Index: /source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- /source/ariba/overlay/BaseOverlay.cpp	(revision 3683)
+++ /source/ariba/overlay/BaseOverlay.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "BaseOverlay.h"
@@ -43,4 +43,9 @@
 #include "ariba/CommunicationListener.h"
 #include "ariba/SideportListener.h"
+
+#include "ariba/overlay/messages/OverlayMsg.h"
+#include "ariba/overlay/messages/JoinRequest.h"
+#include "ariba/overlay/messages/JoinReply.h"
+#include "ariba/overlay/messages/LinkRequest.h"
 
 namespace ariba {
@@ -175,10 +180,8 @@
 void BaseOverlay::createSpoVNet(const SpoVNetID& id, const OverlayParameterSet& param, const SecurityParameterSet& sec, const QoSParameterSet& qos){
 
-	//
-	// set the state that we are an initiator,
-	// this way incoming messages are handled correctly
-	//
-
-	logging_info( "creating spovnet " + id.toString() << " with nodeid " << nodeId.toString() );
+	// set the state that we are an initiator, this way incoming messages are
+	// handled correctly
+	logging_info( "creating spovnet " + id.toString() <<
+			" with nodeid " << nodeId.toString() );
 
 	spovnetId = id;
@@ -192,12 +195,8 @@
 	}
 
-	//
 	// bootstrap against ourselfs
-	//
-
 	overlayInterface->joinOverlay();
-	BOOST_FOREACH( NodeListener* i, nodeListeners ){
+	BOOST_FOREACH( NodeListener* i, nodeListeners )
 		i->onJoinCompleted( spovnetId );
-	}
 
 	ovl.visChangeNodeIcon ( ovlId, nodeId, OvlVis::ICON_ID_CAMERA );
@@ -205,21 +204,8 @@
 }
 
-const LinkID BaseOverlay::establishLink(const NodeID& node, const ServiceID& service){
-
-	// TODO: if this is not a onehop overlay the operation will go asynchronously
-	const EndpointDescriptor& endpoint = overlayInterface->resolveNode( node );
-	if( endpoint == EndpointDescriptor::UNSPECIFIED ){
-		logging_error( "could not resolve node to endpoint. unable to establish link" );
-		return LinkID::UNSPECIFIED;
-	}
-
-	logging_debug( "baseoverlay called to establish link between node " <<
-			node.toString() << " on endpoint " << endpoint.toString() <<
-			" for service " << service.toString() );
-
-	return establishLink( endpoint, service );
-}
-
-const LinkID BaseOverlay::establishLink(const EndpointDescriptor& ep, const ServiceID& service){
+
+/// establishes a link between two arbitrary nodes
+const LinkID BaseOverlay::establishLink( const NodeID& node,
+		const ServiceID& service, const LinkID& link_id ) {
 
 	if( !communicationListeners.contains( service ) ){
@@ -228,5 +214,45 @@
 	}
 
-	const LinkID link = bc->establishLink( ep );
+	// copy link id
+	LinkID linkid = link_id;
+
+	// create link id if necessary
+	if (linkid.isUnspecified()) linkid = LinkID::create();
+
+	// debug message
+	logging_debug( "BaseOverlay called to establish link between node " <<
+			node.toString() << " for service " << service.toString() );
+
+	// create link request message with own link id
+	OverlayMsg overlay_msg( OverlayMsg::OverlayMessageTypeLinkRequest, service, nodeId );
+	uint32_t nonce = (uint32_t)(rand() ^ (rand() << 16) ^ time(NULL));
+	LinkRequest link_request_msg( nonce, &bc->getEndpointDescriptor() );
+	overlay_msg.encapsulate( &link_request_msg );
+	pendingLinks.insert( make_pair(nonce, linkid) );
+
+	// debug message
+	logging_debug( "BaseOverlay routes LinkRequest message to node " << node.toString() );
+
+	// route message to overlay node
+	overlayInterface->routeMessage( node, &overlay_msg );
+
+	CommunicationListener* receiver = communicationListeners.get( service );
+	assert( receiver != NULL );
+
+	LinkItem item (linkid, NodeID::UNSPECIFIED, service, receiver);
+	linkMapping.insert( make_pair(linkid, item) );
+
+	return linkid;
+}
+
+const LinkID BaseOverlay::establishLink( const EndpointDescriptor& ep,
+		const ServiceID& service, const LinkID& linkid  ){
+
+	if( !communicationListeners.contains( service ) ){
+		logging_error( "no registered listener on serviceid " << service.toString() );
+		return LinkID::UNSPECIFIED;
+	}
+
+	const LinkID link = bc->establishLink( ep, linkid );
 
 	CommunicationListener* receiver = communicationListeners.get( service );
@@ -260,5 +286,5 @@
 seqnum_t BaseOverlay::sendMessage(const Message* message, const LinkID& link ){
 
-	logging_debug( "baseoverlay is sending message on link " << link.toString() );
+	logging_debug( "baseoverlay is sending data message on link " << link.toString() );
 
 	LinkMapping::iterator i = linkMapping.find( link );
@@ -268,5 +294,6 @@
 	}
 
-	OverlayMsg overmsg( OverlayMsg::OverlayMessageTypeData, i->second.service, nodeId );
+	OverlayMsg overmsg(
+		OverlayMsg::OverlayMessageTypeData,	i->second.service, nodeId );
 	overmsg.encapsulate( const_cast<Message*>(message) );
 
@@ -342,4 +369,5 @@
 	return overlayInterface->resolveNode( node );
 }
+
 
 bool BaseOverlay::bind(CommunicationListener* listener, const ServiceID& sid){
@@ -567,8 +595,12 @@
 }
 
+
 bool BaseOverlay::receiveMessage(const Message* message,
-	const LinkID& link, const NodeID& /*the nodeid is invalid in this case! removed var to prevent errors*/ ){
-
-	OverlayMsg* overlayMsg = ((Message*)message)->decapsulate<OverlayMsg>();
+	const LinkID& link, const NodeID&
+	/*the nodeid is invalid in this case! removed var to prevent errors*/ ){
+
+	// decapsulate overlay message
+	logging_debug( "go msg " << message->toString());
+	OverlayMsg* overlayMsg = const_cast<Message*>(message)->decapsulate<OverlayMsg>();
 	if( overlayMsg == NULL ) return false;
 
@@ -577,12 +609,9 @@
 	if( item != linkMapping.end() ) item->second.markused();
 
-	//
-	// handle user date that we forward to the
-	// appropriate service using the service id
-	// in the message. as we don't know the class
-	// of message that the service handles, we
-	// forward it as a pure Message*
-	//
-
+	/* ************************************************************************
+	/* handle user date that we forward to the appropriate service using the
+	 * service id in the message. as we don't know the class of message that
+	 * the service handles, we forward it as a pure Message
+	 */
 	if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeData) ) {
 
@@ -601,8 +630,7 @@
 	} // if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeData) )
 
-	//
-	// handle spovnet instance join requests
-	//
-
+	/* ************************************************************************
+	/* Handle spovnet instance join requests
+	 */
 	else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeJoinRequest) &&
 						state == BaseOverlayStateInitiator){
@@ -614,9 +642,6 @@
 					 joinReq->getSpoVNetID().toString() );
 
-		//
-		// make sure that the node actually wants to join
-		// the correct spovnet id that we administrate
-		//
-
+		/* make sure that the node actually wants to join
+		 * the correct spovnet id that we administrate */
 		if( joinReq->getSpoVNetID() != spovnetId ){
 			logging_error( "received join request for spovnet we don't handle " <<
@@ -641,10 +666,6 @@
 		joiningNodes.push_back( overlayMsg->getSourceNode() );
 
-		//
-		// send back our spovnetid, default overlay parameters,
-		// join allow result, and ourself as the endpoint
-		// to bootstrap the overlay against
-		//
-
+		// send back our spovnetid, default overlay parameters, join allow
+		// result, and ourself as the end-point to bootstrap the overlay against
 		OverlayMsg retmsg( OverlayMsg::OverlayMessageTypeJoinReply, nodeId );
 		JoinReply replyMsg( spovnetId, OverlayParameterSet::DEFAULT,
@@ -656,23 +677,21 @@
 		return true;
 
-	} // else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeJoinRequest) && state == BaseOverlayStateInitiator)
-
-	//
-	// handle replies to spovnet instance join requests
-	//
-
+	} // else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeJoinRequest)
+	  //          && state == BaseOverlayStateInitiator)
+
+	/* ************************************************************************
+	 * handle replies to spovnet instance join requests
+	 */
 	else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeJoinReply) &&
 						state == BaseOverlayStateJoinInitiated){
 
-		logging_debug( "baseoverlay received message of type OverlayMessageTypeJoinReply" );
+		logging_debug(
+			"baseoverlay received message of type OverlayMessageTypeJoinReply");
 
 		JoinReply* replyMsg = overlayMsg->decapsulate<JoinReply>();
 		logging_info( "received spovnet join reply" );
 
-		//
-		// make sure that we actually wanted to get
-		// into the spovnet whose id is in the message
-		//
-
+		// ensure that we actually wanted to get into the spovnet whose id is
+		// in the message
 		if( replyMsg->getSpoVNetID() != spovnetId ){
 			logging_error( "received spovnet join reply for spovnet " <<
@@ -681,15 +700,10 @@
 					spovnetId.toString() );
 
-			// state does not change here, maybe
-			// the reply does come in later
+			// state does not change here, maybe the reply does come in later
 			return false;
 		}
 
-		//
-		// if we did not get access to the spovnet
-		// notify of the failure and
+		// if we did not get access to the spovnet notify of the failure and
 		// close the link to the initiator
-		//
-
 		if( ! replyMsg->getJoinAllowed() ){
 
@@ -708,13 +722,11 @@
 		}
 
-		logging_info( "join request has been accepted for spovnet " << spovnetId.toString() );
-
-		//
-		// if we did get access to the spovnet
-		// we try to create the overlay structure
-		// as given in the reply message
-		//
-
-		overlayInterface = OverlayFactory::create( *this, replyMsg->getParam(), nodeId, this );
+		logging_info( "join request has been accepted for spovnet " <<
+				spovnetId.toString() );
+
+		// if we did get access to the spovnet we try to create the overlay
+		// structure as given in the reply message
+		overlayInterface = OverlayFactory::create( *this,
+				replyMsg->getParam(), nodeId, this );
 
 		if( overlayInterface == NULL ){
@@ -726,19 +738,14 @@
 
 			// inform all registered services of the event
-			BOOST_FOREACH( NodeListener* i, nodeListeners ){
+			BOOST_FOREACH( NodeListener* i, nodeListeners )
 				i->onJoinFailed( spovnetId );
-			}
 
 			return true;
 		}
 
-		//
-		// now start the join process for the overlay.
-		// the join process for the spovnet baseoverlay
-		// is now complete. we use the endpoint for
-		// overlay structure bootstrapping that the
-		// initiator provided in his reply message
-		//
-
+		/* now start the join process for the overlay. the join process for the
+		 * spovnet baseoverlay is now complete. we use the endpoint for overlay
+		 * structure bootstrapping that the initiator provided in his reply
+		 * message */
 		state = BaseOverlayStateCompleted;
 		ovl.visChangeNodeColor( ovlId, nodeId, OvlVis::NODE_COLORS_GREEN);
@@ -757,22 +764,19 @@
 
 
-	//
-	// handle update messages for link establishment
-	//
-
+	/* ************************************************************************
+     * handle update messages for link establishment
+     */
 	else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeUpdate) ){
 
-		logging_debug( "baseoverlay received message of type OverlayMessageTypeUpdate" );
+		logging_debug(
+			"baseoverlay received message of type OverlayMessageTypeUpdate"
+		);
 
 		const NodeID& sourcenode = overlayMsg->getSourceNode();
 		const ServiceID& service = overlayMsg->getService();
 
-		//
-		// we should have a linkmapping for the link, otherwise
-		// we ignore update messages
-		//
-
+		// linkmapping for the link available? no-> ignore
 		LinkMapping::iterator i = linkMapping.find( link );
-		if( i == linkMapping.end() ){
+		if( i == linkMapping.end() ) {
 			logging_warn( "received overlay update message for link " <<
 					link.toString() << " for which we have no mapping" );
@@ -780,17 +784,12 @@
 		}
 
-		//
 		// update our link mapping information for this link
-		//
-
-		bool changed = ( i->second.node != sourcenode ) || ( i->second.service != service );
-
+		bool changed =
+			( i->second.node != sourcenode ) ||
+			( i->second.service != service );
 		i->second.node = sourcenode;
 		i->second.service = service;
 
-		//
 		// if our link information changed, we send out an update, too
-		//
-
 		if( changed ){
 			OverlayMsg overMsg( OverlayMsg::OverlayMessageTypeUpdate, i->second.service, nodeId );
@@ -798,9 +797,6 @@
 		}
 
-		//
 		// set the correct listener service for the linkitem
 		// now we can tell the registered service of the linkup event
-		//
-
 		if( !communicationListeners.contains( service ) ){
 			logging_warn( "linkup event for service that has not been registered" );
@@ -810,5 +806,6 @@
 		CommunicationListener* iface = communicationListeners.get( service );
 		if( iface == NULL || iface == &CommunicationListener::DEFAULT ){
-			logging_warn( "linkup event for service that has been registered with a NULL interface" );
+			logging_warn( "linkup event for service that has been registered "
+				"with a NULL interface" );
 			return true;
 		}
@@ -817,8 +814,5 @@
 		i->second.markused();
 
-		//
 		// ask the service whether it wants to accept this link
-		//
-
 		if( iface->onLinkRequest(sourcenode) ){
 
@@ -838,21 +832,17 @@
 	} // else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeUpdate) )
 
-	//
-	// bye messages to say goodbye
-	//
-
-	else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeBye)){
-
-		logging_debug( "baseoverlay received message of type OverlayMessageTypeBye" );
-
-		logging_debug( "received bye message from " <<
+	/* ************************************************************************
+	 * handle bye messages
+	 */
+	else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeBye) ) {
+
+		logging_debug( "BaseOverlay received message of type OverlayMessageTypeBye" );
+		logging_debug( "Received bye message from " <<
 				overlayMsg->getSourceNode().toString() );
 
-		//
-		// if we are the initiator and receive a bye from a node
-		// the node just left. if we are a node and receive a bye
-		// from the initiator, we have to close, too.
-		//
-
+		/* if we are the initiator and receive a bye from a node
+		 * the node just left. if we are a node and receive a bye
+		 * from the initiator, we have to close, too.
+		 */
 		if( overlayMsg->getSourceNode() == spovnetInitiator ){
 
@@ -869,10 +859,8 @@
 
 		} else {
-
-			// a node that said goodbye and we are the initiator
-			// don't have to do much here, as the node also
-			// will go out of the overlay structure
+			// a node that said goodbye and we are the initiator don't have to
+			// do much here, as the node also will go out of the overlay
+			// structure
 			logging_info( "node left " << overlayMsg->getSourceNode() );
-
 		}
 
@@ -881,8 +869,48 @@
 	} // else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeBye))
 
-	//
-	// something wrong ...
-	//
-
+	/* ************************************************************************
+	 * handle link request forwarded through the overlay
+	 */
+	else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeLinkRequest)) {
+		LinkRequest* linkReq = overlayMsg->decapsulate<LinkRequest>();
+		const ServiceID& service = overlayMsg->getService();
+		if (linkReq->isReply()) {
+
+			// find link
+			PendingLinkMap::iterator i = pendingLinks.find( linkReq->getNonce() );
+			if ( i == pendingLinks.end() ) {
+				logging_error( "Nonce not found in link request" );
+				return true;
+			}
+
+			// debug message
+			logging_debug( "LinkRequest reply received. Establishing link "
+				<< i->second << " to " << (linkReq->getEndpoint()->toString())
+				<< " for service " << service.toString()
+				<< " with nonce " << linkReq->getNonce()
+			);
+
+			// establishing link
+			bc->establishLink( *linkReq->getEndpoint(), i->second );
+		} else {
+			OverlayMsg overlay_msg( OverlayMsg::OverlayMessageTypeLinkRequest, service, nodeId );
+			LinkRequest link_request_msg(
+					linkReq->getNonce(), &bc->getEndpointDescriptor(), true );
+			overlay_msg.encapsulate( &link_request_msg );
+
+			// debug message
+			logging_debug( "Sending LinkRequest reply for link with nonce " <<
+					linkReq->getNonce()	);
+
+			// route message back over overlay
+			overlayInterface->routeMessage(
+				overlayMsg->getSourceNode(), &overlay_msg
+			);
+		}
+	} // if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeLinkRequest))
+
+	/* ************************************************************************
+	 * unknown message type ... error!
+	 */
 	else {
 
@@ -1008,5 +1036,5 @@
 	}
 
-	BOOST_FOREACH( const LinkID lnk, oldlinks ){
+	BOOST_FOREACH( const LinkID lnk, oldlinks ) {
 		logging_debug( "auto-link " << lnk.toString() << " timed out and is getting dropped" );
 		dropLink( lnk );
Index: /source/ariba/overlay/BaseOverlay.h
===================================================================
--- /source/ariba/overlay/BaseOverlay.h	(revision 3683)
+++ /source/ariba/overlay/BaseOverlay.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef BASEOVERLAY_H_
@@ -62,16 +62,13 @@
 #include "ariba/overlay/modules/OverlayFactory.h"
 #include "ariba/overlay/modules/OverlayStructureEvents.h"
-#include "ariba/overlay/messages/OverlayMsg.h"
-#include "ariba/overlay/messages/JoinRequest.h"
-#include "ariba/overlay/messages/JoinReply.h"
-
-// forward declerations
+
+// forward declarations
 namespace ariba {
-	class NodeListener;
-	class CommunicationListener;
-	class SideportListener;
-	namespace utility {
-		class OvlVis;
-	}
+class NodeListener;
+class CommunicationListener;
+class SideportListener;
+namespace utility {
+class OvlVis;
+}
 }
 
@@ -87,15 +84,10 @@
 using ariba::CommunicationListener;
 
+// communication
 using ariba::communication::EndpointDescriptor;
 using ariba::communication::BaseCommunication;
 using ariba::communication::CommunicationEvents;
 
-using ariba::overlay::OverlayMsg;
-using ariba::overlay::JoinRequest;
-using ariba::overlay::JoinReply;
-using ariba::overlay::OverlayInterface;
-using ariba::overlay::OverlayFactory;
-using ariba::overlay::OverlayStructureEvents;
-
+// utilities
 using ariba::utility::NodeID;
 using ariba::utility::SpoVNetID;
@@ -118,12 +110,15 @@
 namespace overlay {
 
-class BaseOverlay :
-	public MessageReceiver,
-	public CommunicationEvents,
-	public OverlayStructureEvents,
-	protected Timer {
+class BaseOverlay: public MessageReceiver, public CommunicationEvents,
+	public OverlayStructureEvents, protected Timer {
+
+private:
+	friend class OneHop;
+	friend class Chord;
 
 	use_logging_h( BaseOverlay );
+
 public:
+
 	/**
 	 * Constructs an empty non-functional base overlay instance
@@ -139,5 +134,5 @@
 	 * Starts the Base Overlay instance
 	 */
-	void start( BaseCommunication& _basecomm, const NodeID& _nodeid );
+	void start(BaseCommunication& _basecomm, const NodeID& _nodeid);
 
 	/**
@@ -152,27 +147,27 @@
 	 * @param node Destination node id
 	 * @param service Service to connect to
-	 */
-	const LinkID establishLink( const NodeID& node, const ServiceID& service );
+	 * @param linkid Link identifier to be used with this link
+	 */
+	const LinkID establishLink(const NodeID& node, const ServiceID& service,
+			const LinkID& linkid = LinkID::UNSPECIFIED);
 
 	/**
 	 * Starts a link establishment procedure to the specified
+	 *
 	 * endpoint and to the specified service
 	 */
-	const LinkID establishLink( const EndpointDescriptor& ep, const ServiceID& service );
-
-	/**
-	 * TODO
-	 */
-	void  dropLink( const LinkID& link );
-
-	/**
-	 * TODO
-	 */
-	seqnum_t sendMessage( const Message* message, const LinkID& link );
-
-	/**
-	 * TODO
-	 */
-	seqnum_t sendMessage( const Message* message, const NodeID& node, const ServiceID& service );
+	const LinkID establishLink(const EndpointDescriptor& ep,
+			const ServiceID& service, const LinkID& linkid =
+					LinkID::UNSPECIFIED);
+
+	/// drops a link
+	void dropLink(const LinkID& link);
+
+	/// sends a message over an existing link
+	seqnum_t sendMessage(const Message* message, const LinkID& link);
+
+	/// sends a message to a node and a specific service
+	seqnum_t sendMessage(const Message* message, const NodeID& node,
+			const ServiceID& service);
 
 	/**
@@ -180,10 +175,5 @@
 	 * Depending on the structure of the overlay, this can be very different.
 	 */
-	void broadcastMessage( Message* message, const ServiceID& service );
-
-	/**
-	 * Get a list of overlay neighboring nodes.
-	 */
-	vector<NodeID> getOverlayNeighbors() const;
+	void broadcastMessage(Message* message, const ServiceID& service);
 
 	/**
@@ -193,39 +183,40 @@
 	 * @return The end-point descriptor of the link's end-point
 	 */
-	const EndpointDescriptor& getEndpointDescriptor( const LinkID& link = LinkID::UNSPECIFIED ) const;
-
-	/**
-	 * TODO
-	 */
-	const EndpointDescriptor& getEndpointDescriptor( const NodeID& node ) const;
-
-	/**
-	 * TODO
-	 */
+	const EndpointDescriptor& getEndpointDescriptor(const LinkID& link =
+			LinkID::UNSPECIFIED) const;
+
+	/**
+	 * Get a list of overlay neighbors.
+	 *
+	 * @return A list of overlay neighbors.
+	 */
+	vector<NodeID> getOverlayNeighbors() const;
+
+	/**
+	 * Returns a end-endpoint descriptor of a overlay neighbor.
+	 * If the node is not known -- an unspecified endpoint descriptor is
+	 * returned.
+	 *
+	 * @param node The node identifer of a overlay neighbor.
+	 * @return The end-point descriptor of the node or unspecified.
+	 */
+	const EndpointDescriptor& getEndpointDescriptor(const NodeID& node) const;
+
+	// TODO: Doc
 	bool bind(CommunicationListener* listener, const ServiceID& sid);
 
-	/**
-	 * TODO
-	 */
+	// TODO: Doc
 	bool unbind(CommunicationListener* listener, const ServiceID& sid);
 
-	/**
-	 * TODO
-	 */
+	// TODO: Doc
 	bool bind(NodeListener* listener);
 
-	/**
-	 * TODO
-	 */
+	// TODO: Doc
 	bool unbind(NodeListener* listener);
 
-	/**
-	 * TODO
-	 */
+	// TODO: Doc
 	bool registerSidePort(SideportListener* _sideport);
 
-	/**
-	 * TODO
-	 */
+	// TODO: Doc
 	bool unregisterSidePort(SideportListener* _sideport);
 
@@ -236,5 +227,5 @@
 	 * @return The NodeID of the link
 	 */
-	const NodeID& getNodeID( const LinkID& lid = LinkID::UNSPECIFIED ) const ;
+	const NodeID& getNodeID(const LinkID& lid = LinkID::UNSPECIFIED) const;
 
 	/**
@@ -245,23 +236,27 @@
 	 * @return a vector that contains all the link ids requested
 	 */
-	vector<LinkID> getLinkIDs( const NodeID& nid = NodeID::UNSPECIFIED ) const;
-
-	/**
-	 * TODO
-	 */
-	void joinSpoVNet( const SpoVNetID& id, const EndpointDescriptor& bootstrapEp );
-
-	/**
-	 * TODO
-	 */
-	void createSpoVNet(
-		const SpoVNetID& id,
-		const OverlayParameterSet& param = OverlayParameterSet::DEFAULT,
-		const SecurityParameterSet& sec  = SecurityParameterSet::DEFAULT,
-		const QoSParameterSet& qos = QoSParameterSet::DEFAULT
-	);
-
-	/**
-	 * TODO
+	vector<LinkID> getLinkIDs(const NodeID& nid = NodeID::UNSPECIFIED) const;
+
+	/**
+	 * Join a existing sponaneous virtual network (spovnet).
+	 *
+	 * @param id A spovnet identifier
+	 * @param boot A bootstrap node
+	 */
+	void joinSpoVNet(const SpoVNetID& id, const EndpointDescriptor& boot );
+
+	/**
+	 * Initiates a new spontaneous virtual network.
+	 * This makes this BaseOverlay to the SpoVNet-Initiator.
+	 *
+	 * @param id The spovnet identifier
+	 */
+	void createSpoVNet(const SpoVNetID& id, const OverlayParameterSet& param =
+			OverlayParameterSet::DEFAULT, const SecurityParameterSet& sec =
+			SecurityParameterSet::DEFAULT, const QoSParameterSet& qos =
+			QoSParameterSet::DEFAULT);
+
+	/**
+	 * Let the node leave the SpoVNet.
 	 */
 	void leaveSpoVNet();
@@ -272,57 +267,69 @@
 	 * @see ariba::communication::CommunicationEvents.h
 	 */
-	virtual void onLinkUp( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
-
-	/**
-	 * @see ariba::communication::CommunicationEvents.h
-	 */
-	virtual void onLinkDown( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
-
-	/**
-	 * @see ariba::communication::CommunicationEvents.h
-	 */
-	virtual void onLinkChanged( const LinkID& id, const NetworkLocator* oldlocal, const NetworkLocator* newlocal, const NetworkLocator* oldremote, const NetworkLocator* newremote );
-
-	/**
-	 * @see ariba::communication::CommunicationEvents.h
-	 */
-	virtual void onLinkFail( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
-
-	/**
-	 * @see ariba::communication::CommunicationEvents.h
-	 */
-	virtual void onLinkQoSChanged( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote, const QoSParameterSet& qos );
-
-	/**
-	 * @see ariba::communication::CommunicationEvents.h
-	 */
-	virtual bool onLinkRequest( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
+	virtual void onLinkUp(const LinkID& id, const NetworkLocator* local,
+			const NetworkLocator* remote);
+
+	/**
+	 * @see ariba::communication::CommunicationEvents.h
+	 */
+	virtual void onLinkDown(const LinkID& id, const NetworkLocator* local,
+			const NetworkLocator* remote);
+
+	/**
+	 * @see ariba::communication::CommunicationEvents.h
+	 */
+	virtual void onLinkChanged(const LinkID& id,
+			const NetworkLocator* oldlocal, const NetworkLocator* newlocal,
+			const NetworkLocator* oldremote, const NetworkLocator* newremote);
+
+	/**
+	 * @see ariba::communication::CommunicationEvents.h
+	 */
+	virtual void onLinkFail(const LinkID& id, const NetworkLocator* local,
+			const NetworkLocator* remote);
+
+	/**
+	 * @see ariba::communication::CommunicationEvents.h
+	 */
+	virtual void onLinkQoSChanged(const LinkID& id,
+			const NetworkLocator* local, const NetworkLocator* remote,
+			const QoSParameterSet& qos);
+
+	/**
+	 * @see ariba::communication::CommunicationEvents.h
+	 */
+	virtual bool onLinkRequest(const LinkID& id, const NetworkLocator* local,
+			const NetworkLocator* remote);
 
 	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+	/**
+	 * Processes a received message.
+	 *
+	 * Beware: nodeid is not valid in this case! (since this class implements
+	 * nodeid's in the first place *g*)
+	 */
+	virtual bool receiveMessage(
+		const Message* message, const LinkID& link,	const NodeID&);
+
 	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-	/**
-	 * TODO
-	 */
-	virtual bool receiveMessage( const Message* message, const LinkID& link, const NodeID& ); // nodeid is not valid in this case!
-
-	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-	/**
-	 * see OverlayStructureEvents.h, called from specific OverlayInterface class
-	 */
-	virtual void incomingRouteMessage( Message* msg );
-
-	/**
-	 * see OverlayStructureEvents.h, called from specific OverlayInterface class
-	 */
-	virtual void onNodeJoin( const NodeID& node );
-
-
-	/**
-	 * TODO, for timer events
+
+	/**
+	 * This method is called, when a routed message arrives from the
+	 * overlay.
+	 *
+	 * @see OverlayStructureEvents.h
+	 */
+	virtual void incomingRouteMessage(Message* msg);
+
+	/**
+	 * This method is called, when a new node joined the network
+	 *
+	 * @see OverlayStructureEvents.h
+	 */
+	virtual void onNodeJoin(const NodeID& node);
+
+	/**
+	 * Timer Event method
 	 */
 	virtual void eventFunction();
@@ -382,8 +389,8 @@
 	 */
 	typedef enum _BaseOverlayState {
-		BaseOverlayStateInvalid        = 0,
-		BaseOverlayStateInitiator      = 1,
-		BaseOverlayStateJoinInitiated  = 2,
-		BaseOverlayStateCompleted      = 3,
+		BaseOverlayStateInvalid = 0,
+		BaseOverlayStateInitiator = 1,
+		BaseOverlayStateJoinInitiated = 2,
+		BaseOverlayStateCompleted = 3,
 	} BaseOverlayState;
 
@@ -403,5 +410,5 @@
 	NodeID min, max;
 	NodeID succ, pred;
-	void updateOvlVis( const NodeID& node );
+	void updateOvlVis(const NodeID& node);
 
 	/**
@@ -412,14 +419,15 @@
 		static const LinkItem UNSPECIFIED;
 
-		LinkItem()
-			: link(LinkID::UNSPECIFIED), node(NodeID::UNSPECIFIED),
-				service(ServiceID::UNSPECIFIED), interface(&CommunicationListener::DEFAULT),
-				autolink(false), lastuse(0){
+		LinkItem() :
+			link(LinkID::UNSPECIFIED), node(NodeID::UNSPECIFIED), service(
+					ServiceID::UNSPECIFIED), interface(
+					&CommunicationListener::DEFAULT), autolink(false), lastuse(
+					0) {
 		}
 
-		LinkItem( const LinkID& _link, const NodeID& _node,
-				const ServiceID& _service, CommunicationListener* _interface )
-			: link( _link ), node( _node ), service( _service ), interface( _interface ),
-				autolink( false ), lastuse( time(NULL) ) {
+		LinkItem(const LinkID& _link, const NodeID& _node,
+				const ServiceID& _service, CommunicationListener* _interface) :
+			link(_link), node(_node), service(_service), interface(_interface),
+					autolink(false), lastuse(time(NULL)) {
 
 			assert( _interface != NULL );
@@ -434,6 +442,5 @@
 
 		// information needed for auto links
-
-		void markused(){
+		void markused() {
 			lastuse = time(NULL);
 		}
@@ -444,7 +451,10 @@
 
 	typedef map<const LinkID, LinkItem> LinkMapping;
-	typedef pair<const LinkID,LinkItem> LinkPair;
+	typedef pair<const LinkID, LinkItem> LinkPair;
 	LinkMapping linkMapping;
 
+	// map of a link request map a nonce to a LinkID
+	typedef map<const uint32_t, LinkID> PendingLinkMap;
+	PendingLinkMap pendingLinks;
 
 	/**
@@ -457,5 +467,6 @@
 };
 
-}} // namespace ariba, overlay
+}
+} // namespace ariba, overlay
 
 #endif /*BASEOVERLAY_H_*/
Index: /source/ariba/overlay/messages/JoinReply.cpp
===================================================================
--- /source/ariba/overlay/messages/JoinReply.cpp	(revision 3683)
+++ /source/ariba/overlay/messages/JoinReply.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "JoinReply.h"
Index: /source/ariba/overlay/messages/JoinReply.h
===================================================================
--- /source/ariba/overlay/messages/JoinReply.h	(revision 3683)
+++ /source/ariba/overlay/messages/JoinReply.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef JOIN_REPLY_H__
Index: /source/ariba/overlay/messages/JoinRequest.cpp
===================================================================
--- /source/ariba/overlay/messages/JoinRequest.cpp	(revision 3683)
+++ /source/ariba/overlay/messages/JoinRequest.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "JoinRequest.h"
Index: /source/ariba/overlay/messages/JoinRequest.h
===================================================================
--- /source/ariba/overlay/messages/JoinRequest.h	(revision 3683)
+++ /source/ariba/overlay/messages/JoinRequest.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef JOIN_REQUEST_H__
Index: /source/ariba/overlay/messages/LinkRequest.cpp
===================================================================
--- /source/ariba/overlay/messages/LinkRequest.cpp	(revision 3690)
+++ /source/ariba/overlay/messages/LinkRequest.cpp	(revision 3690)
@@ -0,0 +1,20 @@
+
+#include "LinkRequest.h"
+
+namespace ariba {
+namespace overlay {
+
+vsznDefault(LinkRequest);
+
+LinkRequest::LinkRequest() {
+
+}
+
+LinkRequest::LinkRequest( uint32_t nonce, const EndpointDescriptor* endpoint, bool reply ) :
+	flags(reply&1), nonce(nonce), endpoint(endpoint) {
+}
+
+LinkRequest::~LinkRequest() {
+}
+
+}} // ariba::overlay
Index: /source/ariba/overlay/messages/LinkRequest.h
===================================================================
--- /source/ariba/overlay/messages/LinkRequest.h	(revision 3690)
+++ /source/ariba/overlay/messages/LinkRequest.h	(revision 3690)
@@ -0,0 +1,58 @@
+#ifndef ARIBA_OVERLAY_LINKREQUEST_H_
+#define ARIBA_OVERLAY_LINKREQUEST_H_
+
+#include "ariba/utility/messages.h"
+#include "ariba/utility/serialization.h"
+#include "ariba/communication/EndpointDescriptor.h"
+
+using ariba::communication::EndpointDescriptor;
+
+namespace ariba {
+namespace overlay {
+
+using_serialization;
+
+using ariba::utility::Message;
+
+/**
+ * This message is sent to another overlay node to request a new link.
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class LinkRequest : public Message {
+	VSERIALIZEABLE;
+private:
+	bool free_endpoint_;
+	uint8_t flags;
+	uint32_t nonce;
+	const EndpointDescriptor* endpoint;
+
+public:
+	LinkRequest();
+
+	LinkRequest( uint32_t nonce, const EndpointDescriptor* endpoint,
+			bool reply = false );
+
+	virtual ~LinkRequest();
+
+	const EndpointDescriptor* getEndpoint() const {
+		return endpoint;
+	}
+
+	bool isReply() const {
+		return flags & 1;
+	}
+
+	uint32_t getNonce() const {
+		return nonce;
+	}
+};
+
+}} // ariba::overlay
+
+sznBeginDefault( ariba::overlay::LinkRequest, X ) {
+	if (X.isDeserializer()) endpoint = new EndpointDescriptor();
+	X && flags && nonce && reinterpret_cast<VSerializeable*>(const_cast<EndpointDescriptor*>(endpoint));
+} sznEnd();
+
+#endif /* ARIBA_OVERLAY_LINKREQUEST_H_ */
Index: /source/ariba/overlay/messages/OverlayMsg.cpp
===================================================================
--- /source/ariba/overlay/messages/OverlayMsg.cpp	(revision 3683)
+++ /source/ariba/overlay/messages/OverlayMsg.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OverlayMsg.h"
Index: /source/ariba/overlay/messages/OverlayMsg.h
===================================================================
--- /source/ariba/overlay/messages/OverlayMsg.h	(revision 3683)
+++ /source/ariba/overlay/messages/OverlayMsg.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef OVERLAY_MSG_H__
@@ -68,4 +68,5 @@
 		OverlayMessageTypeUpdate      = 4, // update message for link association
 		OverlayMessageTypeBye         = 5, // spovnet leave (no encapsulated messages)
+		OverlayMessageTypeLinkRequest = 6, // link request (sent over the overlay)
 	} OverlayMessageType;
 
Index: /source/ariba/overlay/modules/OverlayFactory.cpp
===================================================================
--- /source/ariba/overlay/modules/OverlayFactory.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/OverlayFactory.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,7 +35,11 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OverlayFactory.h"
+
+// structured overlays
+#include "chord/Chord.h"
+#include "onehop/OneHop.h"
 
 namespace ariba {
@@ -53,5 +57,5 @@
 
 		case OverlayParameterSet::OverlayStructureChord:
-			return NULL;
+			return new Chord( baseoverlay, nodeid, routeReceiver );
 
 		case OverlayParameterSet::OverlayStructureKademlia:
Index: /source/ariba/overlay/modules/OverlayFactory.h
===================================================================
--- /source/ariba/overlay/modules/OverlayFactory.h	(revision 3683)
+++ /source/ariba/overlay/modules/OverlayFactory.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __OVERLAY_FACTORY_H
@@ -41,10 +41,8 @@
 
 #include "ariba/utility/types/OverlayParameterSet.h"
-#include "ariba/overlay/modules/OverlayInterface.h"
-#include "ariba/overlay/modules/onehop/OneHop.h"
+
+#include "OverlayInterface.h"
 
 using ariba::utility::OverlayParameterSet;
-using ariba::overlay::OverlayInterface;
-using ariba::overlay::OneHop;
 
 namespace ariba {
Index: /source/ariba/overlay/modules/OverlayInterface.cpp
===================================================================
--- /source/ariba/overlay/modules/OverlayInterface.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/OverlayInterface.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,48 +35,48 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OverlayInterface.h"
 #include "ariba/overlay/BaseOverlay.h"
 
+// namespace ariba::overlay
 namespace ariba {
 namespace overlay {
 
-ServiceID OverlayInterface::OVERLAY_SERVICE_ID (0);
+ServiceID OverlayInterface::OVERLAY_SERVICE_ID(0);
 
-OverlayInterface::OverlayInterface(
-	BaseOverlay& _baseoverlay,
-	const NodeID& _nodeid,
-	OverlayStructureEvents* _eventsReceiver )
-	: 	baseoverlay( _baseoverlay ),
-		nodeid( _nodeid ),
-		eventsReceiver( _eventsReceiver ) {
+OverlayInterface::OverlayInterface(BaseOverlay& _baseoverlay,
+		const NodeID& _nodeid, OverlayStructureEvents* _eventsReceiver) :
+	baseoverlay(_baseoverlay), nodeid(_nodeid), eventsReceiver(_eventsReceiver) {
 
-	_baseoverlay.bind( this, OVERLAY_SERVICE_ID );
+	_baseoverlay.bind(this, OVERLAY_SERVICE_ID);
 }
 
-OverlayInterface::~OverlayInterface(){
-	baseoverlay.unbind( this, OVERLAY_SERVICE_ID );
+OverlayInterface::~OverlayInterface() {
+	baseoverlay.unbind(this, OVERLAY_SERVICE_ID);
 }
 
-void OverlayInterface::onLinkUp(const LinkID& lnk, const NodeID& remote){
+void OverlayInterface::onLinkUp(const LinkID& lnk, const NodeID& remote) {
 }
 
-void OverlayInterface::onLinkDown(const LinkID& lnk, const NodeID& remote){
+void OverlayInterface::onLinkDown(const LinkID& lnk, const NodeID& remote) {
 }
 
-void OverlayInterface::onLinkChanged(const LinkID& lnk, const NodeID& remote){
+void OverlayInterface::onLinkChanged(const LinkID& lnk, const NodeID& remote) {
 }
 
-void OverlayInterface::onLinkFail(const LinkID& lnk, const NodeID& remote){
+void OverlayInterface::onLinkFail(const LinkID& lnk, const NodeID& remote) {
 }
 
-void OverlayInterface::onLinkQoSChanged(const LinkID& lnk, const NodeID& remote, const LinkProperties& prop){
+void OverlayInterface::onLinkQoSChanged(const LinkID& lnk,
+		const NodeID& remote, const LinkProperties& prop) {
 }
 
-bool OverlayInterface::onLinkRequest(const NodeID& remote, const DataMessage& msg){
+bool OverlayInterface::onLinkRequest(const NodeID& remote,
+		const DataMessage& msg) {
 }
 
-void OverlayInterface::onMessage(const DataMessage& msg, const NodeID& remote, const LinkID& lnk){
+void OverlayInterface::onMessage(const DataMessage& msg, const NodeID& remote,
+		const LinkID& lnk) {
 }
 
Index: /source/ariba/overlay/modules/OverlayInterface.h
===================================================================
--- /source/ariba/overlay/modules/OverlayInterface.h	(revision 3683)
+++ /source/ariba/overlay/modules/OverlayInterface.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __OVERLAY_INTERFACE_H
@@ -57,41 +57,113 @@
 class BaseOverlay;
 
-class OverlayInterface : public CommunicationListener {
+/**
+ * This class declares an interface for an structured overlay.
+ */
+class OverlayInterface: public CommunicationListener {
 	friend class BaseOverlay;
+
 public:
+	/**
+	 * A node list
+	 */
+	typedef vector<NodeID> NodeList;
+
+	/**
+	 * Constructs a new overlay.
+	 */
 	OverlayInterface(
-		BaseOverlay& _baseoverlay,
-		const NodeID& _nodeid,
-		OverlayStructureEvents* _eventsReceiver
-	);
+			BaseOverlay& _baseoverlay,
+			const NodeID& _nodeid,
+			OverlayStructureEvents* _eventsReceiver );
 
+	/**
+	 * Destrcuts the overlay.
+	 */
 	virtual ~OverlayInterface();
 
-	typedef vector<NodeID> NodeList;
+	/**
+	 * Creates the overlay.
+	 */
+	virtual void createOverlay() = 0;
 
-	virtual void createOverlay() = 0;
+	/**
+	 * Destroys the overlay.
+	 */
 	virtual void deleteOverlay() = 0;
 
-	virtual void joinOverlay( const EndpointDescriptor& bootstrapEp = EndpointDescriptor::UNSPECIFIED) = 0;
+	/**
+	 * Joins the overlay. Starts integration and stabilization of the overlay
+	 * Node.
+	 *
+	 * @param bootstrap The bootstrap end-point descriptor or the default
+	 *    end-point, if this node is the initiator
+	 */
+	virtual void joinOverlay(const EndpointDescriptor& bootstrap =
+		EndpointDescriptor::UNSPECIFIED ) = 0;
+
+	/**
+	 * Leaves the overlay gracefully.
+	 */
 	virtual void leaveOverlay() = 0;
 
-	virtual const EndpointDescriptor& resolveNode( const NodeID& node ) = 0;
-	virtual void routeMessage( const NodeID& destnode, Message* msg ) = 0;
+	/**
+	 * Resolves a overlay neighbor.
+	 *
+	 * @param node The node to resolve
+	 * @return Endpoint descriptor of local neighbor or UNSPECIFIED
+	 */
+	virtual const EndpointDescriptor& resolveNode(const NodeID& node) = 0;
 
+	/**
+	 * Routes a message to a given node by using overlay routing.
+	 *
+	 * @param destnode The destination node.
+	 * @param msg The message to be routed.
+	 */
+	virtual void routeMessage(const NodeID& destnode, Message* msg) = 0;
+
+	/**
+	 * Returns the nodes known to this overlay.
+	 *
+	 * Usually this are the direct neighbors in the overlay structure.
+	 * For instance, Chord would return his predecessor, successor and finger
+	 * nodes. On the other hand OneHop would likely return all participating
+	 * nodes in the overlay.
+	 *
+	 * @return The list of all known nodes
+	 */
 	virtual NodeList getKnownNodes() const = 0;
 
-	// functions from CommunicationListener that we _can_ use as overlay
+	//--- functions from CommunicationListener that we _can_ use as overlay ---
+
+	/// @see CommunicationListener
 	virtual void onLinkUp(const LinkID& lnk, const NodeID& remote);
+	/// @see CommunicationListener
 	virtual void onLinkDown(const LinkID& lnk, const NodeID& remote);
+	/// @see CommunicationListener
 	virtual void onLinkChanged(const LinkID& lnk, const NodeID& remote);
+	/// @see CommunicationListener
 	virtual void onLinkFail(const LinkID& lnk, const NodeID& remote);
-	virtual void onLinkQoSChanged(const LinkID& lnk, const NodeID& remote, const LinkProperties& prop);
+	/// @see CommunicationListener
+	virtual void onLinkQoSChanged(const LinkID& lnk, const NodeID& remote,
+			const LinkProperties& prop);
+	/// @see CommunicationListener
 	virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg);
-	virtual void onMessage(const DataMessage& msg, const NodeID& remote, const LinkID& lnk = LinkID::UNSPECIFIED);
+	/// @see CommunicationListener
+	virtual void onMessage(const DataMessage& msg, const NodeID& remote,
+			const LinkID& lnk = LinkID::UNSPECIFIED);
 
 protected:
+
+	/// Reference to an active base overlay
 	BaseOverlay& baseoverlay;
+
+	/// The node identifier to use with this overlay
 	const NodeID& nodeid;
+
+	/// The listener used to inform about overlay structure changes
 	OverlayStructureEvents* eventsReceiver;
+
+	/// The service identifer of this overlay
 	static ServiceID OVERLAY_SERVICE_ID;
 };
Index: /source/ariba/overlay/modules/OverlayStructureEvents.cpp
===================================================================
--- /source/ariba/overlay/modules/OverlayStructureEvents.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/OverlayStructureEvents.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 #include "OverlayStructureEvents.h"
 
Index: /source/ariba/overlay/modules/OverlayStructureEvents.h
===================================================================
--- /source/ariba/overlay/modules/OverlayStructureEvents.h	(revision 3683)
+++ /source/ariba/overlay/modules/OverlayStructureEvents.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __OVERLAY_STRUCTURE_EVENTS_H
@@ -55,4 +55,5 @@
 	friend class ariba::overlay::OverlayInterface;
 	friend class ariba::overlay::OneHop;
+
 public:
 	OverlayStructureEvents();
Index: /source/ariba/overlay/modules/chord/Chord.cpp
===================================================================
--- /source/ariba/overlay/modules/chord/Chord.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/chord/Chord.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,23 +35,67 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
+
+#include "ariba/overlay/BaseOverlay.h"
 
 #include "Chord.h"
+#include "messages/ChordMessage.h"
+#include "messages/Discovery.h"
+
+#include "detail/chord_routing_table.hpp"
 
 namespace ariba {
 namespace overlay {
 
-use_logging_cpp( OneHop );
+typedef chord_routing_table::item route_item;
+use_logging_cpp( Chord )
+;
 
 Chord::Chord(BaseOverlay& _baseoverlay, const NodeID& _nodeid,
 		OverlayStructureEvents* _eventsReceiver) :
-	OverlayInterface( _baseoverlay, _nodeid, _eventsReceiver ) {
+	OverlayInterface(_baseoverlay, _nodeid, _eventsReceiver) {
+
+	// create routing table
+	this->table = new chord_routing_table(_nodeid, 2);
+	orphan_removal_counter = 0;
+	stabilize_counter = 0;
+	stabilize_finger = 0;
+	bootstrapLink = LinkID::UNSPECIFIED;
 }
 
 Chord::~Chord() {
+
+	// delete routing table
+	delete table;
+}
+
+// helper: sets up a link using the base overlay
+LinkID Chord::setup(const EndpointDescriptor& endp) {
+
+	logging_debug("request to setup link to " << endp.toString() );
+	// establish link via base overlay
+	return baseoverlay.establishLink(endp, OverlayInterface::OVERLAY_SERVICE_ID);
+}
+
+// helper: sends a message using the "base overlay"
+seqnum_t Chord::send(Message* msg, const LinkID& link) {
+	return baseoverlay.sendMessage(msg, link);
+}
+
+void Chord::send_discovery_to(const NodeID& destination, int ttl) {
+	logging_debug("Initiating discovery of " << destination.toString() );
+	Message msg;
+	ChordMessage cmsg(ChordMessage::discovery, nodeid, destination);
+	Discovery dmsg;
+	dmsg.setSourceEndpoint(&baseoverlay.getEndpointDescriptor());
+	dmsg.setFollowType(Discovery::normal);
+	dmsg.setTTL((uint8_t) ttl);
+	cmsg.encapsulate(&dmsg);
+	msg.encapsulate(&cmsg);
+	logging_debug("" << (int)cmsg.getType());
+	this->onMessage(&msg, NodeID::UNSPECIFIED, LinkID::UNSPECIFIED);
 }
 
 void Chord::createOverlay() {
-
 }
 
@@ -60,26 +104,240 @@
 }
 
-void Chord::joinOverlay(
-	const EndpointDescriptor& bootstrapEp = EndpointDescriptor::UNSPECIFIED
-) {
-
+void Chord::joinOverlay(const EndpointDescriptor& boot) {
+	logging_info( "joining Chord overlay structure through end-point " <<
+			(boot == EndpointDescriptor::UNSPECIFIED ?
+					"local" : boot.toString()) );
+
+	// initiator? no->setup first link
+	if (!(boot == EndpointDescriptor::UNSPECIFIED)) bootstrapLink = setup(boot);
+
+	// timer for stabilization management
+	Timer::setInterval(2500);
+	Timer::start();
 }
 
 void Chord::leaveOverlay() {
-
-}
-
-const EndpointDescriptor& Chord::resolveNode( const NodeID& node ) {
-
-}
-
-void Chord::routeMessage( const NodeID& destnode, Message* msg ) {
-
-}
-
-NodeList Chord::getKnownNodes() const {
-
-}
-
-
-}} // namespace ariba, overlay
+	Timer::stop();
+	for (size_t i = 0; i < table->size(); i++) {
+		route_item* it = (*table)[i];
+		ChordMessage msg(ChordMessage::leave, nodeid, it->id);
+		send(&msg,it->info);
+	}
+}
+
+const EndpointDescriptor& Chord::resolveNode(const NodeID& node) {
+	const route_item* item = table->get(node);
+	if (item == NULL || item->info.isUnspecified()) return EndpointDescriptor::UNSPECIFIED;
+	return baseoverlay.getEndpointDescriptor(item->info);
+}
+
+void Chord::routeMessage(const NodeID& destnode, Message* msg) {
+	// get next hop
+	const route_item* item = table->get_next_hop(destnode);
+
+	// message for this node? yes-> delegate to base overlay
+	if (item->id == nodeid) baseoverlay.incomingRouteMessage(msg);
+	else { // no-> send to next hop
+		ChordMessage cmsg(ChordMessage::route, nodeid, destnode);
+		cmsg.encapsulate(msg);
+		send(&cmsg, item->info);
+	}
+}
+
+OverlayInterface::NodeList Chord::getKnownNodes() const {
+	OverlayInterface::NodeList nodelist;
+	for (size_t i = 0; i < table->size(); i++)
+		if ((*table)[i]->ref_count != 0) nodelist.push_back((*table)[i]->id);
+	return nodelist;
+}
+
+/// @see CommunicationListener.h
+/// @see OverlayInterface.h
+void Chord::onLinkUp(const LinkID& lnk, const NodeID& remote) {
+	logging_debug("link_up: link=" << lnk.toString() << " remote=" <<
+			remote.toString() );
+	route_item* item = table->insert(remote);
+
+	if (!bootstrapLink.isUnspecified() && lnk == bootstrapLink) {
+		send_discovery_to(nodeid);
+		bootstrapLink = LinkID::UNSPECIFIED;
+	}
+
+	// item added to routing table?
+	if (item != NULL) { // yes-> add to routing table
+		logging_debug("new routing neighbor: " << remote.toString() );
+		item->info = lnk;
+	} else { // no-> add orphan entry to routing table
+		logging_debug("new orphan: " << remote.toString() );
+		table->insert_orphan(remote)->info = lnk;
+	}
+}
+
+/// @see CommunicationListener.h or @see OverlayInterface.h
+void Chord::onLinkDown(const LinkID& lnk, const NodeID& remote) {
+	logging_debug("link_down: link=" << lnk.toString() << " remote=" <<
+			remote.toString() );
+
+	// remove link from routing table
+	table->remove(remote);
+}
+
+/// @see CommunicationListener.h
+/// @see OverlayInterface.h
+void Chord::onMessage(const DataMessage& msg, const NodeID& remote,
+		const LinkID& link) {
+
+	// decode message
+	typedef ChordMessage M;
+	M* m = msg.getMessage()->convert<ChordMessage> ();
+	if (m == NULL) return;
+
+	logging_debug("onMessage: type=" << (int)m->getType() );
+
+	// handle messages
+	switch (m->getType()) {
+
+	// invalid message
+	case M::invalid:
+		break;
+
+		// route message with payload
+	case M::route: {
+		// find next hop
+		const route_item* item = table->get_next_hop(m->getDestination());
+
+		// next hop == myself?
+		if (m->getDestination() == nodeid) { // yes-> route to base overlay
+			logging_debug("send message to baseoverlay");
+			baseoverlay.incomingRouteMessage(m);
+		}
+		// no-> route to next hop
+		else {
+			logging_debug("route chord message to " << item->id.toString() );
+			send(m, item->info);
+		}
+		break;
+	}
+
+		// discovery request
+	case M::discovery: {
+		// decapsulate message
+		Discovery* dmsg = m->decapsulate<Discovery> ();
+		logging_debug("received discovery message with"
+				<< " dest=" << m->getDestination().toString()
+				<< " ttl=" << (int)dmsg->getTTL()
+				<< " type=" << (int)dmsg->getFollowType()
+		);
+
+		// check if source node can be added to routing table and setup link
+		if (m->getSource() != nodeid && table->is_insertable(m->getSource())) setup(
+				*dmsg->getSourceEndpoint());
+
+		// delegate discovery message
+		switch (dmsg->getFollowType()) {
+
+		// normal: route discovery message like every other message
+		case Discovery::normal:
+			// closest node? yes-> split to follow successor and predecessor
+			if (table->is_closest_to(m->getDestination())) {
+
+				if (table->get_successor() != NULL) {
+					// send successor message
+					ChordMessage cmsg_s(*m);
+					Discovery dmsg_s(*dmsg);
+					dmsg_s.setFollowType(Discovery::successor);
+					cmsg_s.encapsulate(&dmsg_s);
+					route_item* succ_item = table->get(*table->get_successor());
+					logging_debug("split: routing discovery message to successor "
+							<< succ_item->id.toString() );
+					send(&cmsg_s, succ_item->info);
+				}
+
+				// send predecessor message
+				if (table->get_predesessor() != NULL) {
+					ChordMessage cmsg_p(*m);
+					Discovery dmsg_p(*dmsg);
+					dmsg_p.setFollowType(Discovery::predecessor);
+					cmsg_p.encapsulate(&dmsg_p);
+					route_item* pred_item = table->get(
+							*table->get_predesessor());
+					logging_debug("split: routing discovery message to predecessor "
+							<< pred_item->id.toString() );
+					send(&cmsg_p, pred_item->info);
+				}
+			}
+			// no-> route message
+			else {
+				// find next hop
+				const route_item* item = table->get_next_hop(
+						m->getDestination());
+				if (item->id == nodeid) break;
+				logging_debug("routing discovery message to " <<
+						item->id.toString() );
+				send(m, item->info);
+			}
+			break;
+
+			// successor mode: follow the successor until TTL is zero
+		case Discovery::successor:
+		case Discovery::predecessor: {
+			// time to live ended? yes-> stop routing
+			if (dmsg->getTTL() == 0) break;
+
+			// decrease time-to-live
+			dmsg->setTTL(dmsg->getTTL() - 1);
+
+			const route_item* item;
+			if (dmsg->getFollowType() == Discovery::successor) item
+					= table->get(*table->get_successor());
+			else item = table->get(*table->get_predesessor());
+			logging_debug("routing discovery message to succ/pred "
+					<< item->id.toString() );
+			ChordMessage cmsg(*m);
+			cmsg.encapsulate(dmsg);
+			send(&cmsg, item->info);
+			break;
+		}
+		}
+		break;
+	}
+
+		// leave
+	case M::leave: {
+		baseoverlay.dropLink(link);
+		break;
+	}
+	}
+}
+
+void Chord::eventFunction() {
+	stabilize_counter++;
+	if (stabilize_counter == 3) {
+		stabilize_counter = 0;
+		stabilize_finger = ((stabilize_finger+1) % table->get_finger_table_size() );
+		logging_debug("sending discovery message to my neighbors");
+		send_discovery_to(nodeid);
+		send_discovery_to(
+			table->get_finger_table(stabilize_finger).get_compare().get_center()
+		);
+		orphan_removal_counter++;
+		if (orphan_removal_counter == 2) {
+			orphan_removal_counter = 0;
+			for (size_t i = 0; i < table->size(); i++) {
+				route_item* it = (*table)[i];
+				if (it->ref_count == 0) {
+					baseoverlay.dropLink(it->info);
+					logging_debug("dropping orphaned link " << it->info.toString() << " to " << it->id.toString());
+				}
+			}
+		}
+	}
+	logging_debug("--- chord routing information ----------------------------------");
+	logging_debug("predecessor: " << (table->get_predesessor()==NULL? "<none>" : table->get_predesessor()->toString()) );
+	logging_debug("node_id    : " << nodeid.toString() );
+	logging_debug("successor  : " << (table->get_successor()==NULL? "<none>" : table->get_successor()->toString()));
+	logging_debug("----------------------------------------------------------------");
+}
+
+}
+} // namespace ariba, overlay
Index: /source/ariba/overlay/modules/chord/Chord.h
===================================================================
--- /source/ariba/overlay/modules/chord/Chord.h	(revision 3683)
+++ /source/ariba/overlay/modules/chord/Chord.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,42 +35,96 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef CHORD_H_
 #define CHORD_H_
 
+#include "ariba/utility/system/Timer.h"
 #include "ariba/utility/logging/Logging.h"
 #include "ariba/communication/EndpointDescriptor.h"
+#include "../OverlayInterface.h"
+#include <vector>
+
+class chord_routing_table;
 
 namespace ariba {
 namespace overlay {
 
-using ariba::overlay::OverlayInterface;
 using ariba::communication::EndpointDescriptor;
+using ariba::utility::Timer;
 
-class Chord : public OverlayInterface {
+using namespace std;
+
+/**
+ * This class implements a structured overlay inspired by chord.
+ * It differs to the original form of chord in the following manner:
+ *
+ * (1) The graph is bidirectional
+ * (2) Stabilization is done in a reactive manner
+ *
+ * It therefore can be considered as a kind of Chorded-Kademlia :)
+ *
+ * The resulting overlay graph has a diameter of O(log N).
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class Chord : public OverlayInterface, protected Timer {
 	use_logging_h( Chord );
 private:
+	chord_routing_table* table;
+	int orphan_removal_counter;
+	int stabilize_counter;
+	int stabilize_finger;
+	LinkID bootstrapLink;
+
+	// helper: sets up a link using the "base overlay"
+	LinkID setup( const EndpointDescriptor& endp );
+
+	// helper: sends a message using the "base overlay"
+	seqnum_t send( Message* msg, const LinkID& link );
+
+	// stabilization: sends a discovery message to the specified neighborhood
+	void send_discovery_to( const NodeID& destination, int ttl = 4 );
 
 public:
 	Chord(BaseOverlay& _baseoverlay, const NodeID& _nodeid,
 			OverlayStructureEvents* _eventsReceiver);
-	~Chord();
+	virtual ~Chord();
 
-	void createOverlay();
+	/// @see OverlayInterface.h
+	virtual void createOverlay();
 
-	void deleteOverlay();
+	/// @see OverlayInterface.h
+	virtual void deleteOverlay();
 
-	void joinOverlay(
-		const EndpointDescriptor& bootstrapEp = EndpointDescriptor::UNSPECIFIED
+	/// @see OverlayInterface.h
+	virtual void joinOverlay(
+		const EndpointDescriptor& boot = EndpointDescriptor::UNSPECIFIED
 	);
 
-	void leaveOverlay();
+	/// @see OverlayInterface.h
+	virtual void leaveOverlay();
 
-	const EndpointDescriptor& resolveNode( const NodeID& node );
+	/// @see OverlayInterface.h
+	virtual const EndpointDescriptor& resolveNode( const NodeID& node );
 
-	void routeMessage( const NodeID& destnode, Message* msg );
+	/// @see OverlayInterface.h
+	virtual void routeMessage( const NodeID& destnode, Message* msg );
 
-	NodeList getKnownNodes() const;
+	/// @see OverlayInterface.h
+	virtual NodeList getKnownNodes() const;
+
+	/// @see CommunicationListener.h or @see OverlayInterface.h
+	virtual void onLinkUp(const LinkID& lnk, const NodeID& remote);
+
+	/// @see CommunicationListener.h or @see OverlayInterface.h
+	virtual void onLinkDown(const LinkID& lnk, const NodeID& remote);
+
+	/// @see CommunicationListener.h or @see OverlayInterface.h
+	virtual void onMessage(const DataMessage& msg, const NodeID& remote,
+			const LinkID& lnk = LinkID::UNSPECIFIED);
+
+	/// @see Timer.h
+	virtual void eventFunction();
 };
 
Index: /source/ariba/overlay/modules/chord/detail/chord_routing_table.hpp
===================================================================
--- /source/ariba/overlay/modules/chord/detail/chord_routing_table.hpp	(revision 3690)
+++ /source/ariba/overlay/modules/chord/detail/chord_routing_table.hpp	(revision 3690)
@@ -0,0 +1,329 @@
+// [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 CHORD_ROUTING_TABLE_HPP_
+#define CHORD_ROUTING_TABLE_HPP_
+
+#include <vector>
+#include <iostream>
+
+#include <boost/foreach.hpp>
+
+#include "distances.hpp"
+#include "comparators.hpp"
+#include "minimizer_table.hpp"
+
+#include "ariba/Identifiers.h"
+
+using namespace ariba;
+
+using namespace distances;
+using namespace comparators;
+using namespace std;
+
+// placeholders for route info and nodeid type
+typedef ariba::NodeID nodeid_t;
+typedef ariba::LinkID routeinfo_t;
+
+/**
+ * Implementation of a chord routing table.
+*
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class chord_routing_table {
+private:
+	typedef chord_routing_table self;
+	typedef distance_compare<nodeid_t&, nodeid_t, ring_succ_distance>
+			succ_compare_type;
+	typedef distance_compare<nodeid_t&, nodeid_t, ring_pred_distance>
+			pred_compare_type;
+	typedef distance_compare<nodeid_t, nodeid_t, ring_distance>
+			finger_compare_type;
+
+public:
+	typedef minimizer_table<nodeid_t, succ_compare_type, self> succ_table;
+	typedef minimizer_table<nodeid_t, pred_compare_type, self> pred_table;
+	typedef minimizer_table<nodeid_t, finger_compare_type, self> finger_table;
+
+	// a routing table entry
+	class item {
+	public:
+		uint8_t ref_count;
+		nodeid_t id;
+		routeinfo_t info;
+	};
+	typedef vector<item> route_table;
+
+
+private:
+	// maximum number of fingers
+	static const int max_fingers = 32;
+
+	// the own node id
+	nodeid_t id;
+
+	// successor and predecessor tables
+	succ_table succ;
+	pred_table pred;
+	finger_table* finger[max_fingers*2];
+
+	// main routing table
+	route_table table;
+
+	// some internal flags
+	item* item_added;
+	item item_removed;
+	bool item_removed_flag;
+	bool simulate;
+
+	// finds an item inside the routing table
+	item* find_item(const nodeid_t& id) {
+		BOOST_FOREACH( item& i, table )
+			if ( i.id == id ) return &i;
+		return NULL;
+	}
+
+	/// Adds a item to the routing table
+	item* add_item( const nodeid_t& id ) {
+		item i;
+		i.id = id;
+		i.ref_count = 1;
+		table.push_back(i);
+		item_added = &table.back();
+		return item_added;
+	}
+
+	/// Removes an item from the routing table
+	bool remove_item( const nodeid_t& id ) {
+		for (route_table::iterator i = table.begin(); i!=table.end(); i++) {
+			if ( (*i).id == id ) {
+				(*i).ref_count--;
+				if ((*i).ref_count == 0) {
+					item_removed = *i;
+					item_removed_flag = true;
+					return true;
+				}
+				break;
+			}
+		}
+		return false;
+	}
+
+public:
+
+	// handles events from minimizers
+	template<class Table>
+	void on_table( table_listener::type_ type, const Table& tab, typename Table::iterator pos ) {
+		switch (type) {
+		case table_listener::insert: {
+			item* i = find_item( *pos );
+			if (i == NULL) i = add_item( *pos ); else i->ref_count++;
+			break;
+		}
+		case table_listener::remove: {
+			remove_item(*pos);
+			break;
+		}
+		case table_listener::update:
+			break;
+		}
+	}
+
+
+public:
+	/// constructs the reactive chord routing table
+	explicit chord_routing_table( const nodeid_t& id, int redundancy = 2 ) :
+		id(id),	succ( redundancy, succ_compare_type(this->id), *this ),
+		pred( redundancy, pred_compare_type(this->id), *this ) {
+
+		// create finger tables
+		nodeid_t nid = Identifier(2);
+		for (size_t i=0; i<max_fingers; i++) {
+			finger[i*2+0] =
+				new finger_table( redundancy,
+						finger_compare_type(this->id - nid), *this);
+			finger[i*2+1] =
+				new finger_table( redundancy,
+						finger_compare_type(this->id + nid), *this);
+			nid = nid << 1;
+		}
+	}
+
+	/// check whether a node could fit the routing table
+	bool is_insertable( const nodeid_t& value ) {
+		if (find_item(value)!=NULL) return false;
+		bool is_insertable_ = false;
+		is_insertable_ |= succ.insertable(value);
+		is_insertable_ |= pred.insertable(value);
+		for (size_t i=0; i<max_fingers*2; i++)
+			is_insertable_ |= finger[i]->insertable(value);
+		return is_insertable_;
+	}
+
+	/// searches an item
+	item* get( const nodeid_t& value ) {
+		return find_item(value);
+	}
+
+	inline item* operator[] ( size_t index ) {
+		return &table[index];
+	}
+
+	inline size_t size() const {
+		return table.size();
+	}
+
+	/// adds a node
+	item* insert( const nodeid_t& value ) {
+		if (value==id) return NULL;
+		item_added = NULL;
+		item_removed_flag = false;
+		succ.insert(value);
+		pred.insert(value);
+		for (size_t i=0; i<max_fingers*2; i++) finger[i]->insert(value);
+		return item_added;
+	}
+
+	/// adds an orphan
+	item* insert_orphan( const nodeid_t& value ) {
+		item* it = find_item(value);
+		if (it!=NULL) return it;
+		item i;
+		i.id = id;
+		i.ref_count = 0;
+		table.push_back(i);
+		return &table.back();
+	}
+
+	/// removes an node
+	const item* remove( const nodeid_t& value ) {
+		item_removed_flag = false;
+		succ.remove(value);
+		pred.remove(value);
+		for (size_t i=0; i<max_fingers*2; i++) finger[i]->remove(value);
+		if (!item_removed_flag) remove_orphan(value);
+		return item_removed_flag ? &item_removed : NULL;
+	}
+
+	/// removes an orphan
+	item* remove_orphan( const nodeid_t& value ) {
+		item_removed_flag = false;
+		remove_item(value);
+		return item_removed_flag ? &item_removed : NULL;
+	}
+
+	/// returns the next hop
+	const item* get_next_hop( const nodeid_t& value ) {
+		ring_distance distance;
+		item* best_item = NULL;
+		for (size_t i=0; i<table.size(); i++) {
+			item* curr = &table[i];
+			// not not include orphans into routing!
+			if (curr->ref_count==0) continue;
+
+			// check if we found a better item
+			if (best_item==NULL) {
+				best_item = curr;
+				continue;
+			} else {
+				if (distance(value, curr->id)<distance(value, best_item->id))
+					best_item = curr;
+			}
+		}
+		return best_item;
+	}
+
+	const nodeid_t* get_successor() {
+		if (succ.size()==NULL) return NULL;
+		return &succ.front();
+	}
+
+	const nodeid_t* get_predesessor() {
+		if (pred.size()==NULL) return NULL;
+		return &pred.front();
+	}
+
+
+	bool is_closest_to( const nodeid_t& value ) {
+		ring_distance distance;
+		nodeid_t delta = distance(value, id);
+		if (get_successor() != NULL &&
+				delta > distance(value, *get_successor() ) ) return false;
+		if (get_predesessor() != NULL &&
+				delta > distance(value, *get_predesessor() ) ) return false;
+		return true;
+	}
+
+	/// returns the whole routing table
+	vector<item>& get_table() {
+		return table;
+	}
+
+	/// returns the last removed item
+	const item* get_removed_item() const {
+		return item_removed_flag ? &item_removed : NULL;
+	}
+
+	/// return successor table
+	const succ_table& get_succ_table() const {
+		return succ;
+	}
+
+	/// return predecessor table
+	const pred_table& get_pred_table() const {
+		return pred;
+	}
+
+	/// return finger table
+	finger_table& get_finger_table( size_t index ) {
+		return *finger[index];
+	}
+
+	/// return number of finger tables
+	size_t get_finger_table_size() const {
+		return max_fingers*2;
+	}
+};
+
+/// output routing table
+std::ostream& operator<<(std::ostream& s, const chord_routing_table& t) {
+	s << "[pred=" << t.get_pred_table() << " succ=" << t.get_succ_table()
+			<< "]";
+	return s;
+}
+
+#endif /* CHORD_ROUTING_TABLE_HPP_ */
Index: /source/ariba/overlay/modules/chord/detail/comparators.hpp
===================================================================
--- /source/ariba/overlay/modules/chord/detail/comparators.hpp	(revision 3690)
+++ /source/ariba/overlay/modules/chord/detail/comparators.hpp	(revision 3690)
@@ -0,0 +1,86 @@
+// [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 COMPARATORS_HPP_
+#define COMPARATORS_HPP_
+
+/**
+ * TODO: Doc
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+#include "distances.hpp"
+
+namespace comparators {
+
+using namespace distances;
+
+/// default compare operation
+struct default_compare {
+	template<typename T>
+	int operator ()(const T& x, const T& y) {
+		return x == y ? 0 : (x < y ? -1 : 1);
+	}
+};
+
+/// compares distances to a given center point
+template<class CenterType, class T, class Distance = default_distance,
+		class Compare = default_compare>
+class distance_compare {
+private:
+	CenterType center;
+	Distance distance;
+	Compare compare;
+
+public:
+	explicit distance_compare(CenterType center,
+			Distance distance = Distance(), Compare compare = Compare()) :
+		center(center), distance(distance), compare(compare) {
+	}
+
+	const CenterType get_center() const {
+		return center;
+	}
+
+	int operator ()(const T& x, const T& y) {
+		return compare(distance(center, x), distance(center, y));
+	}
+};
+
+}
+
+#endif /* COMPARATORS_HPP_ */
Index: /source/ariba/overlay/modules/chord/detail/distances.hpp
===================================================================
--- /source/ariba/overlay/modules/chord/detail/distances.hpp	(revision 3690)
+++ /source/ariba/overlay/modules/chord/detail/distances.hpp	(revision 3690)
@@ -0,0 +1,109 @@
+// [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 DISTANCES_HPP_
+#define DISTANCES_HPP_
+
+/**
+ * TODO: Doc
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+namespace distances {
+
+/// returns the maximum value of a type
+template<class T>
+T max_value() {
+	return ~(T)0;
+}
+
+/// returns the maximum value of a type
+template<class T>
+T min_value() {
+	return 0;
+}
+
+/// euclidean distance between two points (metric)
+struct default_distance {
+	template<typename T>
+	T operator ()(const T& x, const T& y) {
+		return abs(x - y);
+	}
+};
+
+/// xor distance (metric)
+struct xor_distance {
+	template<typename T>
+	T operator()(const T& x, const T& y) {
+		return x ^ y;
+	}
+};
+
+/// distance between two points on a ring (metric)
+struct ring_distance {
+	template<typename T>
+	T operator()(const T& x, const T& y) {
+		const T m = max_value<T>();
+		T d_nor = (x >= y) ? (x-y) : (y-x);
+		T d_inv = m - d_nor;
+		return d_nor < d_inv ? d_nor : d_inv;
+	}
+};
+
+/// distance from x to a predecessor y on a ring (not a metric!)
+struct ring_pred_distance {
+	template<typename T>
+	T operator ()(const T& x, const T& y) {
+		const T m = max_value<T>();
+		if (x >= y) return x - y;
+		else return m - y + x;
+	}
+};
+
+/// distance from x to a successor y on a ring (not a metric!)
+struct ring_succ_distance {
+	template<typename T>
+	T operator ()(const T& y, const T& x) {
+		const T m = max_value<T>();
+		if (x >= y) return x - y;
+		else return m - y + x;
+	}
+};
+
+}
+
+#endif /* DISTANCES_HPP_ */
Index: /source/ariba/overlay/modules/chord/detail/minimizer_table.hpp
===================================================================
--- /source/ariba/overlay/modules/chord/detail/minimizer_table.hpp	(revision 3690)
+++ /source/ariba/overlay/modules/chord/detail/minimizer_table.hpp	(revision 3690)
@@ -0,0 +1,163 @@
+// [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 MINIMIZER_TABLE_HPP_
+#define MINIMIZER_TABLE_HPP_
+
+#include <vector>
+#include <iostream>
+#include "table_listener.hpp"
+
+using std::vector;
+using std::ostream;
+
+/**
+ * TODO: Doc
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+template<class Value, class Comparator, typename Listener = table_listener>
+class minimizer_table: public vector<Value> {
+private:
+	// define table type
+	typedef vector<Value> super;
+
+	// members
+	size_t max_size;
+	Comparator compare;
+
+	// listener
+	Listener& listener;
+
+public:
+
+	/// delegates from vector<Value>
+	typedef	typename super::iterator iterator;
+
+	/// delegates from vector<Value>
+	typedef typename super::const_iterator const_iterator;
+
+	/// explicitly construct a minimizer table
+	explicit minimizer_table(size_t max_size, Comparator compare = Comparator(),
+			Listener& listener = Listener::DEFAULT) :
+			super(), max_size(max_size), compare(compare), listener(listener) {
+	}
+
+	/// returns true, if the value would fit into the table
+	bool insertable( const Value& value ) {
+		return insert(value,true) != super::end();
+	}
+
+	/// inserts a value into an ordered list
+	iterator insert(const Value& value, bool simulate = false ) {
+		iterator iter = super::end();
+
+		// table empty? -> just add entry
+		if (super::size() == 0) {
+			if (!simulate) super::push_back(value);
+			iter = super::end()-1;
+			if (!simulate) listener.on_table( table_listener::insert, *this, iter );
+		} else
+
+		// add at correct position
+		for (iterator i = super::begin(); i != super::end(); i++) {
+			int cmp = compare(value, *i);
+			if (cmp < 0) {
+				if (!simulate) {
+					iter = super::insert(i, value);
+				} else
+					iter = i;
+				if (!simulate)
+					listener.on_table( table_listener::insert, *this, iter );
+				break;
+			} else
+			if (cmp == 0) return iter;
+		}
+
+		// no item smaller than item and table not full? -> append
+		if (iter == super::end() && super::size() != max_size) {
+			if (!simulate)
+			super::push_back(value);
+			iter = super::end()-1;
+			if (!simulate) listener.on_table( table_listener::insert, *this, iter );
+
+		} else
+
+		// drop entries
+		if (super::size() > max_size) {
+			if (!simulate) {
+				listener.on_table( table_listener::remove, *this, super::end()-1 );
+				super::pop_back();
+			}
+		}
+		return iter;
+	}
+
+	/// remove value from ordered list
+	bool remove(const Value& value) {
+		for (iterator i = super::begin(); i != super::end(); i++)
+		if (*i == value) {
+			super::erase(i);
+			return true;
+		}
+		return false;
+	}
+
+	/// check whether this list contains a specific value
+	bool contains(const Value& value) const {
+		for (const_iterator i = super::begin(); i != super::end(); i++)
+		if (*i == value) return true;
+		return false;
+	}
+
+	Comparator& get_compare() {
+		return compare;
+	}
+};
+
+/// prints a list of items
+template<class V, class C, class L>
+std::ostream& operator<<(std::ostream& s, const minimizer_table<V, C, L>& v) {
+	typedef minimizer_table<V, C, L> t;
+	for (typename t::const_iterator i = v.begin(); i != v.end(); i++) {
+		if (i != v.begin()) s << ",";
+		s << *i;
+	}
+	return s;
+}
+
+#endif /* MINIMIZER_TABLE_HPP_ */
Index: /source/ariba/overlay/modules/chord/detail/table_listener.hpp
===================================================================
--- /source/ariba/overlay/modules/chord/detail/table_listener.hpp	(revision 3690)
+++ /source/ariba/overlay/modules/chord/detail/table_listener.hpp	(revision 3690)
@@ -0,0 +1,75 @@
+// [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 TABLE_LISTENER_HPP_
+#define TABLE_LISTENER_HPP_
+
+#include<iostream>
+
+using namespace std;
+
+/// a table listener prototype
+/**
+ * TODO: Doc
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class table_listener {
+public:
+	/// default listener
+	static table_listener DEFAULT;
+
+	/// event types
+	enum type_ { insert, remove, update };
+
+	/// event function
+	template<class Table>
+	void on_table(type_ type, const Table& tab, typename Table::iterator pos ) {
+		cout << "on_table: ";
+		switch (type) {
+		case insert: cout << "insert"; break;
+		case remove: cout << "remove"; break;
+		case update: cout << "update"; break;
+		}
+		cout << "= " << *pos << endl;
+	}
+};
+
+table_listener table_listener::DEFAULT;
+
+#endif /* TABLE_LISTENER_HPP_ */
Index: /source/ariba/overlay/modules/chord/messages/ChordMessage.cpp
===================================================================
--- /source/ariba/overlay/modules/chord/messages/ChordMessage.cpp	(revision 3690)
+++ /source/ariba/overlay/modules/chord/messages/ChordMessage.cpp	(revision 3690)
@@ -0,0 +1,49 @@
+// [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 "ChordMessage.h"
+
+namespace ariba {
+namespace overlay {
+
+vsznDefault( ChordMessage );
+
+ChordMessage::~ChordMessage(){
+}
+
+}} // ariba::overlay
Index: /source/ariba/overlay/modules/chord/messages/ChordMessage.h
===================================================================
--- /source/ariba/overlay/modules/chord/messages/ChordMessage.h	(revision 3690)
+++ /source/ariba/overlay/modules/chord/messages/ChordMessage.h	(revision 3690)
@@ -0,0 +1,110 @@
+// [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 __CHORD_MESSAGE_H
+#define __CHORD_MESSAGE_H
+
+#include "ariba/utility/messages.h"
+#include "ariba/utility/serialization.h"
+#include "ariba/Identifiers.h"
+
+using ariba::utility::Message;
+
+namespace ariba {
+namespace overlay {
+
+using_serialization
+;
+
+class ChordMessage: public Message { VSERIALIZEABLE
+public:
+	enum type_ {
+		invalid = 0, ///< invalid message
+		route = 1, ///< route message with payload
+		discovery = 2, ///< discover neighbors of a destination node
+		leave = 3, ///< leave message
+	};
+
+	inline ChordMessage( const ChordMessage& msg ) {
+		this->type = msg.type;
+		this->hop_count = msg.hop_count;
+		this->source = msg.source;
+		this->destination = msg.destination;
+	}
+
+	inline explicit ChordMessage(type_ type = invalid,
+			const NodeID& source = NodeID::UNSPECIFIED,
+			const NodeID& destination = NodeID::UNSPECIFIED) :
+		type((uint8_t) type), source(source), destination(destination) {
+	}
+
+	virtual ~ChordMessage();
+
+	inline uint8_t getHopCount() const {
+		return hop_count;
+	}
+
+	inline void setHopCount( uint8_t hop_count ) {
+		this->hop_count = hop_count;
+	}
+
+	inline type_ getType() const {
+		return (type_) this->type;
+	}
+
+	const NodeID& getSource() const {
+		return source;
+	}
+
+	inline const NodeID& getDestination() const {
+		return destination;
+	}
+
+private:
+	uint8_t type;
+	uint8_t hop_count;
+	NodeID source, destination;
+};
+
+}} // ariba::overlay
+
+sznBeginDefault( ariba::overlay::ChordMessage, X ){
+	X && type && hop_count && &source && &destination && Payload();
+}sznEnd();
+
+#endif // __CHORD_MESSAGE_H
Index: /source/ariba/overlay/modules/chord/messages/Discovery.cpp
===================================================================
--- /source/ariba/overlay/modules/chord/messages/Discovery.cpp	(revision 3690)
+++ /source/ariba/overlay/modules/chord/messages/Discovery.cpp	(revision 3690)
@@ -0,0 +1,52 @@
+// [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 "Discovery.h"
+
+namespace ariba {
+namespace overlay {
+
+vsznDefault(Discovery);
+
+Discovery::Discovery(){
+}
+
+Discovery::~Discovery(){
+}
+
+}} // ariba::overlay
Index: /source/ariba/overlay/modules/chord/messages/Discovery.h
===================================================================
--- /source/ariba/overlay/modules/chord/messages/Discovery.h	(revision 3690)
+++ /source/ariba/overlay/modules/chord/messages/Discovery.h	(revision 3690)
@@ -0,0 +1,140 @@
+// [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 DISCOVERY_H__
+#define DISCOVERY_H__
+
+#include <vector>
+#include "ariba/utility/messages.h"
+#include "ariba/utility/serialization.h"
+#include "ariba/utility/types/NodeID.h"
+#include "ariba/communication/EndpointDescriptor.h"
+
+using std::pair;
+using std::make_pair;
+using std::vector;
+using ariba::utility::Message;
+using ariba::utility::NodeID;
+using ariba::communication::EndpointDescriptor;
+
+namespace ariba {
+namespace overlay {
+
+using_serialization;
+
+class Discovery : public Message {
+	VSERIALIZEABLE;
+public:
+	enum follow_type_ {
+		normal = 0,
+		successor = 1,
+		predecessor = 2
+	};
+
+	Discovery( const Discovery& msg ) {
+		this->follow_type = msg.follow_type;
+		this->ttl = msg.ttl;
+		this->source_endpoint = new EndpointDescriptor( *msg.source_endpoint );
+	}
+	explicit Discovery();
+	virtual ~Discovery();
+/*
+	typedef pair<NodeID,EndpointDescriptor*> NodeEndpoint;
+	typedef vector<NodeEndpoint> NodeEndpointList;
+
+	void add(const NodeID& node, EndpointDescriptor* endp);
+
+	const NodeEndpointList& getList();
+*/
+
+	EndpointDescriptor* getSourceEndpoint() const {
+		return source_endpoint;
+	}
+
+	void setSourceEndpoint( const EndpointDescriptor* endpoint ) {
+		source_endpoint = const_cast<EndpointDescriptor*>(endpoint);
+	}
+
+	inline uint8_t getTTL() const {
+		return ttl;
+	}
+
+	inline void setTTL( uint8_t ttl ) {
+		this->ttl = ttl;
+	}
+
+	inline follow_type_ getFollowType() const {
+		return (follow_type_)follow_type;
+	}
+
+	inline void setFollowType( follow_type_ type ) {
+		follow_type = (uint8_t)type;
+	}
+
+private:
+	uint8_t follow_type;
+	uint8_t ttl;
+	EndpointDescriptor* source_endpoint;
+//	NodeEndpointList descriptors;
+};
+
+}} // ariba::overlay
+
+sznBeginDefault( ariba::overlay::Discovery, X ) {
+
+	/// serialize follow-type and time-to-live
+	X && follow_type && ttl;
+
+	// serialize end-point
+	X && VO(source_endpoint);
+/*
+	// serialize length of descriptor list
+	uint16_t len = descriptors.size();
+	X && len;
+	if (X.isDeserializer()) descriptors.resize(len);
+
+	// serialize descriptors
+	for (int i=0; i<len; i++)
+		X && &descriptors[i].first && VO(descriptors[i].second);
+
+	// serialize payload
+	X && Payload();
+*/
+} sznEnd();
+
+#endif // DISCOVERY_H__
Index: /source/ariba/overlay/modules/onehop/OneHop.cpp
===================================================================
--- /source/ariba/overlay/modules/onehop/OneHop.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/OneHop.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,8 +35,12 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OneHop.h"
 #include "ariba/overlay/BaseOverlay.h"
+
+#include "ariba/overlay/modules/onehop/messages/OneHopMessage.h"
+#include "ariba/overlay/modules/onehop/messages/NodeListingRequest.h"
+#include "ariba/overlay/modules/onehop/messages/NodeListingReply.h"
 
 namespace ariba {
@@ -84,13 +88,13 @@
 		return;
 	}
-
-	baseoverlay.sendMessage( msg, i->second );
-}
-
-void OneHop::createOverlay(){
-
+	OneHopMessage onehopRoute( OneHopMessage::OneHopMessageTypeRoute );
+	onehopRoute.encapsulate(msg);
+
+	baseoverlay.sendMessage( &onehopRoute, i->second );
+}
+
+void OneHop::createOverlay() {
 	// don't need to bootstrap against ourselfs.
 	// the create and join process is completed now.
-
 	logging_info( "creating onehop overlay structure" );
 	state = OneHopStateCompleted;
@@ -119,5 +123,5 @@
 void OneHop::joinOverlay(const EndpointDescriptor& bootstrapEp){
 
-	logging_info( "joining onehop overlay structure through endpoint " <<
+	logging_info( "joining onehop overlay structure through end-point " <<
 			(bootstrapEp == EndpointDescriptor::UNSPECIFIED ?
 					"local" : bootstrapEp.toString()) );
@@ -133,8 +137,5 @@
 
 		state = OneHopStateCompleted;
-
-
 	} else {
-
 		bootstrapLink = baseoverlay.establishLink( bootstrapEp,
 					OverlayInterface::OVERLAY_SERVICE_ID );
@@ -175,8 +176,5 @@
 	if( state == OneHopStateInvalid ) return;
 
-	//
 	// node went down, remove from overlay mapping
-	//
-
 	logging_debug( "node " << remote.toString() << " left overlay structure" );
 
@@ -223,5 +221,5 @@
 	//
 
-	if( onemsg->isType( OneHopMessage::OneHopMessageTypeListingRequest) ){
+	if( onemsg->isType( OneHopMessage::OneHopMessageTypeListingRequest ) ){
 
 		NodeListingRequest* request = onemsg->decapsulate<NodeListingRequest>();
@@ -316,4 +314,10 @@
 	} // if( reply != NULL )
 
+	if( onemsg->isType( OneHopMessage::OneHopMessageTypeRoute) ){
+		logging_debug( "Route message arrived at destination node -> delegate to BaseOverlay" );
+		baseoverlay.incomingRouteMessage( onemsg );
+	}
+
+
 }
 
Index: /source/ariba/overlay/modules/onehop/OneHop.h
===================================================================
--- /source/ariba/overlay/modules/onehop/OneHop.h	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/OneHop.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef _ONE_HOP_H
@@ -42,77 +42,68 @@
 #include <map>
 #include "ariba/overlay/modules/OverlayInterface.h"
-#include "ariba/overlay/modules/onehop/messages/OneHopMessage.h"
-#include "ariba/overlay/modules/onehop/messages/NodeListingRequest.h"
-#include "ariba/overlay/modules/onehop/messages/NodeListingReply.h"
 #include "ariba/utility/logging/Logging.h"
 
 using std::map;
-using ariba::overlay::OverlayInterface;
-using ariba::overlay::OneHopMessage;
-using ariba::overlay::NodeListingRequest;
-using ariba::overlay::NodeListingReply;
 
 namespace ariba {
 namespace overlay {
 
-class OneHop : public OverlayInterface {
+class OneHop: public OverlayInterface {
 	use_logging_h( OneHop );
 public:
-	OneHop(
-		BaseOverlay& _overlay,
-		const NodeID& _nodeid,
-		OverlayStructureEvents* _eventsReceiver
-	);
+	OneHop(BaseOverlay& _overlay, const NodeID& _nodeid,
+			OverlayStructureEvents* _eventsReceiver);
 
 	virtual ~OneHop();
 
 protected:
+	/// @see OverlayInterface.h
+	virtual void createOverlay();
 
-	//
-	// OverlayInterface.h
-	//
-
-	virtual void createOverlay();
+	/// @see OverlayInterface.h
 	virtual void deleteOverlay();
 
-	virtual void joinOverlay(const EndpointDescriptor& bootstrapEp = EndpointDescriptor::UNSPECIFIED);
+	/// @see OverlayInterface.h
+	virtual void joinOverlay(const EndpointDescriptor& boot =
+			EndpointDescriptor::UNSPECIFIED);
+
+	/// @see OverlayInterface.h
 	virtual void leaveOverlay();
 
-	virtual const EndpointDescriptor& resolveNode( const NodeID& node );
-	virtual void routeMessage( const NodeID& destnode, Message* msg );
+	/// @see OverlayInterface.h
+	virtual const EndpointDescriptor& resolveNode(const NodeID& node);
 
+	/// @see OverlayInterface.h
+	virtual void routeMessage(const NodeID& destnode, Message* msg);
+
+	/// @see OverlayInterface.h
 	virtual NodeList getKnownNodes() const;
 
-	//
-	// see CommunicationListener.h or OverlayInterface.h
-	//
+	/// @see CommunicationListener.h or @see OverlayInterface.h
+	virtual void onLinkUp(const LinkID& lnk, const NodeID& remote);
 
-	virtual void onLinkUp(const LinkID& lnk, const NodeID& remote);
+	/// @see CommunicationListener.h or @see OverlayInterface.h
 	virtual void onLinkDown(const LinkID& lnk, const NodeID& remote);
-	virtual void onMessage(const DataMessage& msg, const NodeID& remote, const LinkID& lnk = LinkID::UNSPECIFIED);
+
+	/// @see CommunicationListener.h or @see OverlayInterface.h
+	virtual void onMessage(const DataMessage& msg, const NodeID& remote,
+			const LinkID& lnk = LinkID::UNSPECIFIED);
 
 private:
-
-	/**
-	 * The other nodes in the overlay
-	 */
-	typedef map<const NodeID,const LinkID> OverlayNodeMapping;
+	/// The other nodes in the overlay
+	typedef map<const NodeID, const LinkID> OverlayNodeMapping;
 	OverlayNodeMapping overlayNodes;
 
-	/**
-	 * The current state of the overlay
-	 */
+	/// The current state of the overlay
 	typedef enum _OneHopState {
-		OneHopStateInvalid                = 0,
-		OneHopStateJoinInitiated          = 1,
-		OneHopStateJoinListingRequested   = 2,
-		OneHopStateCompleted              = 3,
+		OneHopStateInvalid = 0,
+		OneHopStateJoinInitiated = 1,
+		OneHopStateJoinListingRequested = 2,
+		OneHopStateCompleted = 3,
 	} OneHopState;
 
 	OneHopState state;
-
 	uint16_t pendingLinks;
 	LinkID bootstrapLink;
-
 };
 
Index: /source/ariba/overlay/modules/onehop/messages/NodeListingReply.cpp
===================================================================
--- /source/ariba/overlay/modules/onehop/messages/NodeListingReply.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/messages/NodeListingReply.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NodeListingReply.h"
Index: /source/ariba/overlay/modules/onehop/messages/NodeListingReply.h
===================================================================
--- /source/ariba/overlay/modules/onehop/messages/NodeListingReply.h	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/messages/NodeListingReply.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef NODE_LISTING_REPLY_H__
@@ -77,13 +77,9 @@
 
 sznBeginDefault( ariba::overlay::NodeListingReply, X ) {
-	uint16_t len = X.isSerializer() ? descriptors.size() : 0;
+	uint16_t len = descriptors.size();
 	X && len;
-	if (X.isDeserializer()) {
-		descriptors.resize(len);
-	}
-	for (int i=0; i<len; i++) {
-		if (X.isDeserializer()) descriptors[i].second = new EndpointDescriptor();
-		X && &descriptors[i].first && reinterpret_cast<VSerializeable*>(descriptors[i].second);
-	}
+	if (X.isDeserializer())	descriptors.resize(len);
+	for (int i=0; i<len; i++)
+		X && &descriptors[i].first && VO(descriptors[i].second);
 } sznEnd();
 
Index: /source/ariba/overlay/modules/onehop/messages/NodeListingRequest.cpp
===================================================================
--- /source/ariba/overlay/modules/onehop/messages/NodeListingRequest.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/messages/NodeListingRequest.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NodeListingRequest.h"
Index: /source/ariba/overlay/modules/onehop/messages/NodeListingRequest.h
===================================================================
--- /source/ariba/overlay/modules/onehop/messages/NodeListingRequest.h	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/messages/NodeListingRequest.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef NODE_LISTING_REQUEST_H__
Index: /source/ariba/overlay/modules/onehop/messages/OneHopMessage.cpp
===================================================================
--- /source/ariba/overlay/modules/onehop/messages/OneHopMessage.cpp	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/messages/OneHopMessage.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OneHopMessage.h"
Index: /source/ariba/overlay/modules/onehop/messages/OneHopMessage.h
===================================================================
--- /source/ariba/overlay/modules/onehop/messages/OneHopMessage.h	(revision 3683)
+++ /source/ariba/overlay/modules/onehop/messages/OneHopMessage.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __ONE_HOP_MESSAGE_H
@@ -57,4 +57,5 @@
 		OneHopMessageTypeListingRequest = 1,
 		OneHopMessageTypeListingReply   = 2,
+		OneHopMessageTypeRoute	        = 3,
 	} OneHopMessageType;
 
Index: /source/ariba/utility/configuration/ConfigFile.cpp
===================================================================
--- /source/ariba/utility/configuration/ConfigFile.cpp	(revision 3683)
+++ /source/ariba/utility/configuration/ConfigFile.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // ConfigFile.h
 // Class for reading named values from configuration files
@@ -23,5 +23,5 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 // IN THE SOFTWARE.
-// [Licence]
+// [License]
 
 #include "ConfigFile.h"
Index: /source/ariba/utility/configuration/ConfigFile.h
===================================================================
--- /source/ariba/utility/configuration/ConfigFile.h	(revision 3683)
+++ /source/ariba/utility/configuration/ConfigFile.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // ConfigFile.h
 // Class for reading named values from configuration files
@@ -23,5 +23,5 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 // IN THE SOFTWARE.
-// [Licence]
+// [License]
 
 
Index: /source/ariba/utility/configuration/Configuration.cpp
===================================================================
--- /source/ariba/utility/configuration/Configuration.cpp	(revision 3683)
+++ /source/ariba/utility/configuration/Configuration.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Configuration.h"
Index: /source/ariba/utility/configuration/Configuration.h
===================================================================
--- /source/ariba/utility/configuration/Configuration.h	(revision 3683)
+++ /source/ariba/utility/configuration/Configuration.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __CONFIGURATION_H
Index: /source/ariba/utility/internal/Utilities.hpp
===================================================================
--- /source/ariba/utility/internal/Utilities.hpp	(revision 3683)
+++ /source/ariba/utility/internal/Utilities.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef UTILITIES_HPP_
@@ -60,6 +60,6 @@
 /* check whether X is a signed integer */
 #define if_int(X) \
-	typename boost::enable_if<boost::is_integral<X>,int>::type __i##X = 0,\
-	typename boost::enable_if<boost::is_signed<X>,int>::type __s##X = 0
+	typename boost::enable_if<boost::is_integral<X>,void*>::type __i##X = NULL,\
+	typename boost::enable_if<boost::is_signed<X>,void*>::type __s##X = NULL
 
 /* signature conversion */
@@ -74,3 +74,4 @@
 CONVERT_SIGN( uint32_t, int32_t );
 CONVERT_SIGN( uint64_t, int64_t );
+
 #endif /* UTILITIES_HPP_ */
Index: /source/ariba/utility/logging/Logging.h
===================================================================
--- /source/ariba/utility/logging/Logging.h	(revision 3683)
+++ /source/ariba/utility/logging/Logging.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef LOGGING_H__
Index: /source/ariba/utility/measurement/PathloadMeasurement.cpp
===================================================================
--- /source/ariba/utility/measurement/PathloadMeasurement.cpp	(revision 3683)
+++ /source/ariba/utility/measurement/PathloadMeasurement.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "PathloadMeasurement.h"
Index: /source/ariba/utility/measurement/PathloadMeasurement.h
===================================================================
--- /source/ariba/utility/measurement/PathloadMeasurement.h	(revision 3683)
+++ /source/ariba/utility/measurement/PathloadMeasurement.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __PATHLOAD_MEASUREMENT_H
Index: /source/ariba/utility/messages.h
===================================================================
--- /source/ariba/utility/messages.h	(revision 3683)
+++ /source/ariba/utility/messages.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MESSAGES_H_
Index: /source/ariba/utility/messages/Message.cpp
===================================================================
--- /source/ariba/utility/messages/Message.cpp	(revision 3683)
+++ /source/ariba/utility/messages/Message.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Message.h"
Index: /source/ariba/utility/messages/Message.h
===================================================================
--- /source/ariba/utility/messages/Message.h	(revision 3683)
+++ /source/ariba/utility/messages/Message.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MESSAGE_H_
@@ -236,15 +236,15 @@
 		return NULL;
 	}
-	
+
 	/**
 	 * The same as decapsulate, but this function
 	 * is used in the samples to make the semantics easier
-	 * to understand. The semantics is shown to be: you get 
-	 * a message and convert it to your type. Not as: you 
+	 * to understand. The semantics is shown to be: you get
+	 * a message and convert it to your type. Not as: you
 	 * get a message and have to extract your message from it.
-	 */  
+	 */
 	template<class T>
 	inline T* convert() {
-		return decapsulate<T>();	
+		return decapsulate<T>();
 	}
 
Index: /source/ariba/utility/messages/MessageControlInfo.cpp
===================================================================
--- /source/ariba/utility/messages/MessageControlInfo.cpp	(revision 3683)
+++ /source/ariba/utility/messages/MessageControlInfo.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "MessageControlInfo.h"
Index: /source/ariba/utility/messages/MessageControlInfo.h
===================================================================
--- /source/ariba/utility/messages/MessageControlInfo.h	(revision 3683)
+++ /source/ariba/utility/messages/MessageControlInfo.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MESSAGECONTROLINFO_H_
Index: /source/ariba/utility/messages/MessageProvider.cpp
===================================================================
--- /source/ariba/utility/messages/MessageProvider.cpp	(revision 3683)
+++ /source/ariba/utility/messages/MessageProvider.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "MessageProvider.h"
Index: /source/ariba/utility/messages/MessageProvider.h
===================================================================
--- /source/ariba/utility/messages/MessageProvider.h	(revision 3683)
+++ /source/ariba/utility/messages/MessageProvider.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MESSAGEPROVIDER_H_
Index: /source/ariba/utility/messages/MessageReceiver.cpp
===================================================================
--- /source/ariba/utility/messages/MessageReceiver.cpp	(revision 3683)
+++ /source/ariba/utility/messages/MessageReceiver.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "MessageReceiver.h"
Index: /source/ariba/utility/messages/MessageReceiver.h
===================================================================
--- /source/ariba/utility/messages/MessageReceiver.h	(revision 3683)
+++ /source/ariba/utility/messages/MessageReceiver.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MESSAGERECEIVER_H__
Index: /source/ariba/utility/messages/MessageSender.cpp
===================================================================
--- /source/ariba/utility/messages/MessageSender.cpp	(revision 3683)
+++ /source/ariba/utility/messages/MessageSender.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "MessageSender.h"
Index: /source/ariba/utility/messages/MessageSender.h
===================================================================
--- /source/ariba/utility/messages/MessageSender.h	(revision 3683)
+++ /source/ariba/utility/messages/MessageSender.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MESSAGESENDER_H_
Index: /source/ariba/utility/messages/MessageUtilities.h
===================================================================
--- /source/ariba/utility/messages/MessageUtilities.h	(revision 3683)
+++ /source/ariba/utility/messages/MessageUtilities.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef MESSAGEUTILITIES_H_
Index: /source/ariba/utility/messages/TextMessage.cpp
===================================================================
--- /source/ariba/utility/messages/TextMessage.cpp	(revision 3683)
+++ /source/ariba/utility/messages/TextMessage.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "TextMessage.h"
Index: /source/ariba/utility/messages/TextMessage.h
===================================================================
--- /source/ariba/utility/messages/TextMessage.h	(revision 3683)
+++ /source/ariba/utility/messages/TextMessage.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef TEXTMESSAGE_H_
Index: /source/ariba/utility/messages/_namespace.h
===================================================================
--- /source/ariba/utility/messages/_namespace.h	(revision 3683)
+++ /source/ariba/utility/messages/_namespace.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #undef NAMESPACE_BEGIN
Index: /source/ariba/utility/misc/Demultiplexer.hpp
===================================================================
--- /source/ariba/utility/misc/Demultiplexer.hpp	(revision 3683)
+++ /source/ariba/utility/misc/Demultiplexer.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef DEMULTIPLEXER_H__
Index: /source/ariba/utility/misc/Helper.cpp
===================================================================
--- /source/ariba/utility/misc/Helper.cpp	(revision 3683)
+++ /source/ariba/utility/misc/Helper.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Helper.h"
Index: /source/ariba/utility/misc/Helper.h
===================================================================
--- /source/ariba/utility/misc/Helper.h	(revision 3683)
+++ /source/ariba/utility/misc/Helper.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __HELPER_H
Index: /source/ariba/utility/misc/KeyMapping.hpp
===================================================================
--- /source/ariba/utility/misc/KeyMapping.hpp	(revision 3683)
+++ /source/ariba/utility/misc/KeyMapping.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef KEY_MAPPING_H__
Index: /source/ariba/utility/misc/OvlVis.cpp
===================================================================
--- /source/ariba/utility/misc/OvlVis.cpp	(revision 3683)
+++ /source/ariba/utility/misc/OvlVis.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OvlVis.h"
Index: /source/ariba/utility/misc/OvlVis.h
===================================================================
--- /source/ariba/utility/misc/OvlVis.h	(revision 3683)
+++ /source/ariba/utility/misc/OvlVis.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef OVLVIS_H__
Index: /source/ariba/utility/misc/sha1.cpp
===================================================================
--- /source/ariba/utility/misc/sha1.cpp	(revision 3683)
+++ /source/ariba/utility/misc/sha1.cpp	(revision 3690)
@@ -1,6 +1,6 @@
-// [licence]
+// [License]
 // 100% free public domain implementation of the SHA-1 algorithm
 // by Dominik Reichl <dominik.reichl@t-online.de>
-// [licence]
+// [License]
 /*
       Version 1.5 - 2005-01-01
Index: /source/ariba/utility/misc/sha1.h
===================================================================
--- /source/ariba/utility/misc/sha1.h	(revision 3683)
+++ /source/ariba/utility/misc/sha1.h	(revision 3690)
@@ -1,6 +1,6 @@
-// [licence]
+// [License]
 // 100% free public domain implementation of the SHA-1 algorithm
 // by Dominik Reichl <dominik.reichl@t-online.de>
-// [licence]
+// [License]
 /*
         Version 1.5 - 2005-01-01
Index: /source/ariba/utility/serialization.h
===================================================================
--- /source/ariba/utility/serialization.h	(revision 3683)
+++ /source/ariba/utility/serialization.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SERIALIZATION_H_
Index: /source/ariba/utility/serialization/Data.hpp
===================================================================
--- /source/ariba/utility/serialization/Data.hpp	(revision 3683)
+++ /source/ariba/utility/serialization/Data.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef DATA_HPP_
Index: /source/ariba/utility/serialization/DataStream.hpp
===================================================================
--- /source/ariba/utility/serialization/DataStream.hpp	(revision 3683)
+++ /source/ariba/utility/serialization/DataStream.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef DATASTREAM_HPP_
@@ -42,4 +42,6 @@
 //== Library includes ==
 #include <boost/cstdint.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+
 #include <iostream>
 #include <vector>
@@ -153,4 +155,22 @@
 	template<typename X>
 	finline void remove(X& obj, if_uint(X)) {
+		if (!isMeasure()) bits[index].get(obj);
+		index += sizeof(X) * 8;
+	}
+
+	/* support signed ints */
+	template<typename X>
+	finline void add(X& sobj, if_int(X)) {
+		typedef typename boost::make_unsigned<X>::type UX;
+		UX& obj = *((UX*)&sobj);
+		if (!isMeasure())
+		bitcpy( sobj, 0, bits.getBuffer(), index);
+		index += sizeof(X) * 8;
+	}
+
+	template<typename X>
+	finline void remove(X& sobj, if_int(X)) {
+		typedef typename boost::make_unsigned<X>::type UX;
+		UX& obj = *((UX*)&sobj);
 		if (!isMeasure()) bits[index].get(obj);
 		index += sizeof(X) * 8;
Index: /source/ariba/utility/serialization/DataUtilities.hpp
===================================================================
--- /source/ariba/utility/serialization/DataUtilities.hpp	(revision 3683)
+++ /source/ariba/utility/serialization/DataUtilities.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 /* This file implements some common bit operations for unsigned integer types
Index: /source/ariba/utility/serialization/Serialization.cpp
===================================================================
--- /source/ariba/utility/serialization/Serialization.cpp	(revision 3683)
+++ /source/ariba/utility/serialization/Serialization.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Serialization.hpp"
Index: /source/ariba/utility/serialization/Serialization.hpp
===================================================================
--- /source/ariba/utility/serialization/Serialization.hpp	(revision 3683)
+++ /source/ariba/utility/serialization/Serialization.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SERIALIZATION_HPP_
Index: /source/ariba/utility/serialization/TestSerialization.cpp
===================================================================
--- /source/ariba/utility/serialization/TestSerialization.cpp	(revision 3683)
+++ /source/ariba/utility/serialization/TestSerialization.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Data.hpp"
Index: /source/ariba/utility/system/BlockingMethod.cpp
===================================================================
--- /source/ariba/utility/system/BlockingMethod.cpp	(revision 3683)
+++ /source/ariba/utility/system/BlockingMethod.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "BlockingMethod.h"
Index: /source/ariba/utility/system/BlockingMethod.h
===================================================================
--- /source/ariba/utility/system/BlockingMethod.h	(revision 3683)
+++ /source/ariba/utility/system/BlockingMethod.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef BLOCKING_METHOD_H__
Index: /source/ariba/utility/system/StartupInterface.h
===================================================================
--- /source/ariba/utility/system/StartupInterface.h	(revision 3683)
+++ /source/ariba/utility/system/StartupInterface.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __STARTUP_INTERFACE_H
Index: /source/ariba/utility/system/StartupWrapper.cpp
===================================================================
--- /source/ariba/utility/system/StartupWrapper.cpp	(revision 3683)
+++ /source/ariba/utility/system/StartupWrapper.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "StartupWrapper.h"
Index: /source/ariba/utility/system/StartupWrapper.h
===================================================================
--- /source/ariba/utility/system/StartupWrapper.h	(revision 3683)
+++ /source/ariba/utility/system/StartupWrapper.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __STARTUP_WRAPPER_H
Index: /source/ariba/utility/system/SystemEvent.cpp
===================================================================
--- /source/ariba/utility/system/SystemEvent.cpp	(revision 3683)
+++ /source/ariba/utility/system/SystemEvent.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "SystemEvent.h"
Index: /source/ariba/utility/system/SystemEvent.h
===================================================================
--- /source/ariba/utility/system/SystemEvent.h	(revision 3683)
+++ /source/ariba/utility/system/SystemEvent.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SYSTEMEVENT_H_
Index: /source/ariba/utility/system/SystemEventListener.cpp
===================================================================
--- /source/ariba/utility/system/SystemEventListener.cpp	(revision 3683)
+++ /source/ariba/utility/system/SystemEventListener.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "SystemEventListener.h"
Index: /source/ariba/utility/system/SystemEventListener.h
===================================================================
--- /source/ariba/utility/system/SystemEventListener.h	(revision 3683)
+++ /source/ariba/utility/system/SystemEventListener.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SYSTEMEVENTLISTENER_H_
Index: /source/ariba/utility/system/SystemEventType.cpp
===================================================================
--- /source/ariba/utility/system/SystemEventType.cpp	(revision 3683)
+++ /source/ariba/utility/system/SystemEventType.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "SystemEventType.h"
Index: /source/ariba/utility/system/SystemEventType.h
===================================================================
--- /source/ariba/utility/system/SystemEventType.h	(revision 3683)
+++ /source/ariba/utility/system/SystemEventType.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SYSTEMEVENTTYPE_H_
Index: /source/ariba/utility/system/SystemQueue.cpp
===================================================================
--- /source/ariba/utility/system/SystemQueue.cpp	(revision 3683)
+++ /source/ariba/utility/system/SystemQueue.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
Index: /source/ariba/utility/system/SystemQueue.h
===================================================================
--- /source/ariba/utility/system/SystemQueue.h	(revision 3683)
+++ /source/ariba/utility/system/SystemQueue.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SYSTEMQUEUE_H_
Index: /source/ariba/utility/system/Timer.cpp
===================================================================
--- /source/ariba/utility/system/Timer.cpp	(revision 3683)
+++ /source/ariba/utility/system/Timer.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Timer.h"
Index: /source/ariba/utility/system/Timer.h
===================================================================
--- /source/ariba/utility/system/Timer.h	(revision 3683)
+++ /source/ariba/utility/system/Timer.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __TIMER_H
Index: /source/ariba/utility/types.h
===================================================================
--- /source/ariba/utility/types.h	(revision 3683)
+++ /source/ariba/utility/types.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef TYPES_H_
Index: /source/ariba/utility/types/Address.cpp
===================================================================
--- /source/ariba/utility/types/Address.cpp	(revision 3683)
+++ /source/ariba/utility/types/Address.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Address.h"
Index: /source/ariba/utility/types/Address.h
===================================================================
--- /source/ariba/utility/types/Address.h	(revision 3683)
+++ /source/ariba/utility/types/Address.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef ADDRESS_H_
Index: /source/ariba/utility/types/Data.hpp
===================================================================
--- /source/ariba/utility/types/Data.hpp	(revision 3683)
+++ /source/ariba/utility/types/Data.hpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "../serialization/Data.hpp"
Index: /source/ariba/utility/types/Identifier.cpp
===================================================================
--- /source/ariba/utility/types/Identifier.cpp	(revision 3683)
+++ /source/ariba/utility/types/Identifier.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Identifier.h"
Index: /source/ariba/utility/types/Identifier.h
===================================================================
--- /source/ariba/utility/types/Identifier.h	(revision 3683)
+++ /source/ariba/utility/types/Identifier.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef IDENTIFIER_H_
Index: /source/ariba/utility/types/LinkID.cpp
===================================================================
--- /source/ariba/utility/types/LinkID.cpp	(revision 3683)
+++ /source/ariba/utility/types/LinkID.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "LinkID.h"
Index: /source/ariba/utility/types/LinkID.h
===================================================================
--- /source/ariba/utility/types/LinkID.h	(revision 3683)
+++ /source/ariba/utility/types/LinkID.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef LINKID_H_
Index: /source/ariba/utility/types/Locator.cpp
===================================================================
--- /source/ariba/utility/types/Locator.cpp	(revision 3683)
+++ /source/ariba/utility/types/Locator.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "Locator.h"
Index: /source/ariba/utility/types/Locator.h
===================================================================
--- /source/ariba/utility/types/Locator.h	(revision 3683)
+++ /source/ariba/utility/types/Locator.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef LOCATOR_H_
Index: /source/ariba/utility/types/NodeID.cpp
===================================================================
--- /source/ariba/utility/types/NodeID.cpp	(revision 3683)
+++ /source/ariba/utility/types/NodeID.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "NodeID.h"
Index: /source/ariba/utility/types/NodeID.h
===================================================================
--- /source/ariba/utility/types/NodeID.h	(revision 3683)
+++ /source/ariba/utility/types/NodeID.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef __NODEID_H
Index: /source/ariba/utility/types/OverlayParameterSet.cpp
===================================================================
--- /source/ariba/utility/types/OverlayParameterSet.cpp	(revision 3683)
+++ /source/ariba/utility/types/OverlayParameterSet.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "OverlayParameterSet.h"
Index: /source/ariba/utility/types/OverlayParameterSet.h
===================================================================
--- /source/ariba/utility/types/OverlayParameterSet.h	(revision 3683)
+++ /source/ariba/utility/types/OverlayParameterSet.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef OVERLAYPARAMETERSET_H_
@@ -53,10 +53,10 @@
 
 	typedef enum _OverlayStructure {
-		OverlayStructureOneHop   = 1,
-		OverlayStructureChord    = 2,
-		OverlayStructureKademlia = 3,
+		OverlayStructureOneHop   = 0,
+		OverlayStructureChord    = 1,
+		OverlayStructureKademlia = 2,
 	} OverlayStructure;
 
-	OverlayParameterSet(OverlayStructure _structure = OverlayStructureOneHop);
+	OverlayParameterSet(OverlayStructure _structure = OverlayStructureChord);
 	virtual ~OverlayParameterSet();
 
Index: /source/ariba/utility/types/QoSParameterSet.cpp
===================================================================
--- /source/ariba/utility/types/QoSParameterSet.cpp	(revision 3683)
+++ /source/ariba/utility/types/QoSParameterSet.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "QoSParameterSet.h"
Index: /source/ariba/utility/types/QoSParameterSet.h
===================================================================
--- /source/ariba/utility/types/QoSParameterSet.h	(revision 3683)
+++ /source/ariba/utility/types/QoSParameterSet.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef QOS_PARAMETER_SET_H__
Index: /source/ariba/utility/types/SecurityParameterSet.cpp
===================================================================
--- /source/ariba/utility/types/SecurityParameterSet.cpp	(revision 3683)
+++ /source/ariba/utility/types/SecurityParameterSet.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "SecurityParameterSet.h"
Index: /source/ariba/utility/types/SecurityParameterSet.h
===================================================================
--- /source/ariba/utility/types/SecurityParameterSet.h	(revision 3683)
+++ /source/ariba/utility/types/SecurityParameterSet.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SECURITY_PARAMETER_SET_H
Index: /source/ariba/utility/types/ServiceID.cpp
===================================================================
--- /source/ariba/utility/types/ServiceID.cpp	(revision 3683)
+++ /source/ariba/utility/types/ServiceID.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "ServiceID.h"
Index: /source/ariba/utility/types/ServiceID.h
===================================================================
--- /source/ariba/utility/types/ServiceID.h	(revision 3683)
+++ /source/ariba/utility/types/ServiceID.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SERVICEID_H_
Index: /source/ariba/utility/types/SpoVNetID.cpp
===================================================================
--- /source/ariba/utility/types/SpoVNetID.cpp	(revision 3683)
+++ /source/ariba/utility/types/SpoVNetID.cpp	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #include "SpoVNetID.h"
Index: /source/ariba/utility/types/SpoVNetID.h
===================================================================
--- /source/ariba/utility/types/SpoVNetID.h	(revision 3683)
+++ /source/ariba/utility/types/SpoVNetID.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #ifndef SPOVNETID_H_
Index: /source/ariba/utility/types/_namespace.h
===================================================================
--- /source/ariba/utility/types/_namespace.h	(revision 3683)
+++ /source/ariba/utility/types/_namespace.h	(revision 3690)
@@ -1,3 +1,3 @@
-// [Licence]
+// [License]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [Licence]
+// [License]
 
 #undef NAMESPACE_BEGIN
