Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 3071)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 3374)
@@ -42,4 +42,5 @@
 #include "ariba/NodeListener.h"
 #include "ariba/CommunicationListener.h"
+#include "ariba/SideportListener.h"
 
 namespace ariba {
@@ -49,7 +50,7 @@
 
 BaseOverlay::BaseOverlay()
-	: bc(NULL), overlayInterface(NULL),
-		nodeId(NodeID::UNSPECIFIED), spovnetId(SpoVNetID::UNSPECIFIED),
-		initiatorLink(LinkID::UNSPECIFIED), state(BaseOverlayStateInvalid){
+	: bc(NULL), overlayInterface(NULL), nodeId(NodeID::UNSPECIFIED),
+		spovnetId(SpoVNetID::UNSPECIFIED), initiatorLink(LinkID::UNSPECIFIED),
+		state(BaseOverlayStateInvalid), sideport(&SideportListener::DEFAULT){
 }
 
@@ -230,4 +231,6 @@
 
 	CommunicationListener* receiver = communicationListeners.get( service );
+	assert( receiver != NULL );
+
 	LinkItem item (link, NodeID::UNSPECIFIED, service, receiver);
 	linkMapping.insert( make_pair(link, item) );
@@ -251,6 +254,6 @@
 	bc->dropLink( link );
 
-	if( item.interface != NULL )
-		item.interface->onLinkDown( link, item.node );
+	item.interface->onLinkDown( link, item.node );
+	sideport->onLinkDown(link, this->nodeId, item.node, this->spovnetId );
 }
 
@@ -352,4 +355,13 @@
 	communicationListeners.registerItem( listener, sid );
 	return true;
+}
+
+bool BaseOverlay::registerSidePort(SideportListener* _sideport){
+	sideport = _sideport;
+	_sideport->configure( this );
+}
+
+bool BaseOverlay::unregisterSidePort(SideportListener* _sideport){
+	sideport = &SideportListener::DEFAULT;
 }
 
@@ -442,5 +454,5 @@
 	if( i == linkMapping.end() ){
 
-		LinkItem item (id, NodeID::UNSPECIFIED, ServiceID::UNSPECIFIED, NULL );
+		LinkItem item (id, NodeID::UNSPECIFIED, ServiceID::UNSPECIFIED, &CommunicationListener::DEFAULT );
 		linkMapping.insert( make_pair(id, item) );
 
@@ -487,6 +499,6 @@
 	}
 
-	if( i->second.interface != NULL )
-		i->second.interface->onLinkDown( id, i->second.node );
+	i->second.interface->onLinkDown( id, i->second.node );
+	sideport->onLinkDown( id, this->nodeId, i->second.node, this->spovnetId );
 
 	linkMapping.erase( i );
@@ -504,8 +516,8 @@
 	if( i == linkMapping.end() ) return;
 
-	if( i->second.interface != NULL ){
-		i->second.interface->onLinkChanged( id, i->second.node );
-		// call onLinkQoSChanged?
-	}
+	i->second.interface->onLinkChanged( id, i->second.node );
+	sideport->onLinkChanged( id, this->nodeId, i->second.node, this->spovnetId );
+
+	// TODO call onLinkQoSChanged?
 
 	i->second.markused();
@@ -523,6 +535,6 @@
 	if( i == linkMapping.end() ) return;
 
-	if( i->second.interface != NULL )
-		i->second.interface->onLinkFail( id, i->second.node );
+	i->second.interface->onLinkFail( id, i->second.node );
+	sideport->onLinkFail( id, this->nodeId, i->second.node, this->spovnetId );
 
 	i->second.markused();
@@ -541,7 +553,5 @@
 
 	// TODO: convert QoSParameterSet to the LinkProperties properties
-	if( i->second.interface != NULL ){
-		// TODO: currently not in the interface: i->second.interface->onLinkQoSChanged( id, i->second.node, LinkProperties::DEFAULT );
-	}
+	// TODO: currently not in the interface: i->second.interface->onLinkQoSChanged( id, i->second.node, LinkProperties::DEFAULT );
 
 	i->second.markused();
@@ -799,5 +809,5 @@
 
 		CommunicationListener* iface = communicationListeners.get( service );
-		if( iface == NULL ){
+		if( iface == NULL || iface == &CommunicationListener::DEFAULT ){
 			logging_warn( "linkup event for service that has been registered with a NULL interface" );
 			return true;
@@ -812,8 +822,12 @@
 
 		if( iface->onLinkRequest(sourcenode) ){
+
+			// call the notification functions
 			iface->onLinkUp( link, sourcenode );
+			sideport->onLinkUp( link, nodeId, sourcenode, this->spovnetId );
+
 		} else {
 			// prevent onLinkDown calls to the service
-			i->second.interface = NULL;
+			i->second.interface = &CommunicationListener::DEFAULT;
 			// drop the link
 			dropLink( link );
@@ -950,4 +964,17 @@
 }
 
+vector<LinkID> BaseOverlay::getLinkIDs( const NodeID& nid ) const {
+
+	vector<LinkID> linkvector;
+
+	BOOST_FOREACH( LinkPair item, linkMapping ){
+		if( item.second.node == nid || nid == NodeID::UNSPECIFIED ){
+			linkvector.push_back( item.second.link );
+		}
+	}
+
+	return linkvector;
+}
+
 void BaseOverlay::incomingRouteMessage(Message* msg){
 	// gets handled as normal data message
Index: source/ariba/overlay/BaseOverlay.h
===================================================================
--- source/ariba/overlay/BaseOverlay.h	(revision 3071)
+++ source/ariba/overlay/BaseOverlay.h	(revision 3374)
@@ -70,4 +70,5 @@
 	class NodeListener;
 	class CommunicationListener;
+	class SideportListener;
 	namespace utility {
 		class OvlVis;
@@ -220,4 +221,14 @@
 
 	/**
+	 * TODO
+	 */
+	bool registerSidePort(SideportListener* _sideport);
+
+	/**
+	 * TODO
+	 */
+	bool unregisterSidePort(SideportListener* _sideport);
+
+	/**
 	 * Returns the own nodeID or the NodeID of the specified link
 	 *
@@ -226,4 +237,13 @@
 	 */
 	const NodeID& getNodeID( const LinkID& lid = LinkID::UNSPECIFIED ) const ;
+
+	/**
+	 * Return all Links for the specified remote nodeid, or all links when
+	 * the node id given is set to unspecified
+	 *
+	 * @param nid The node id to request links for, or unspecified for all links
+	 * @return a vector that contains all the link ids requested
+	 */
+	vector<LinkID> getLinkIDs( const NodeID& nid = NodeID::UNSPECIFIED ) const;
 
 	/**
@@ -342,4 +362,9 @@
 
 	/**
+	 * TODO
+	 */
+	SideportListener* sideport;
+
+	/**
 	 * The abstract overlay interface that implements
 	 * the overlay specific functionality.
@@ -387,8 +412,16 @@
 		static const LinkItem UNSPECIFIED;
 
+		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) ) {
+
+			assert( _interface != NULL );
 		}
 
