Index: source/ariba/overlay/modules/OverlayInterface.h
===================================================================
--- source/ariba/overlay/modules/OverlayInterface.h	(revision 8620)
+++ source/ariba/overlay/modules/OverlayInterface.h	(revision 10572)
@@ -145,4 +145,12 @@
 	 */
 	virtual const LinkID& getNextLinkId( const NodeID& id ) const = 0;
+	
+	/**
+	 * Returns the NodeID of the next hop a route message would take.
+	 * 
+	 * @param id The destination node id
+	 * @return The node id of the next hop
+	 */
+	virtual const NodeID& getNextNodeId( const NodeID& id ) const;
 
 	//--- functions from CommunicationListener that we _can_ use as overlay ---
Index: source/ariba/overlay/modules/chord/Chord.cpp
===================================================================
--- source/ariba/overlay/modules/chord/Chord.cpp	(revision 8620)
+++ source/ariba/overlay/modules/chord/Chord.cpp	(revision 10572)
@@ -201,4 +201,17 @@
 }
 
+/// @see OverlayInterface.h
+const NodeID& Chord::getNextNodeId( const NodeID& id ) const {
+	// get next hop
+	const route_item* item = table->get_next_hop(id);
+	
+	// return unspecified if no next hop could be found
+	if (item == NULL) {
+		return NodeID::UNSPECIFIED;
+	}
+	
+	return item->id;
+}
+
 OverlayInterface::NodeList Chord::getKnownNodes(bool deep) const {
 	OverlayInterface::NodeList nodelist;
Index: source/ariba/overlay/modules/chord/Chord.h
===================================================================
--- source/ariba/overlay/modules/chord/Chord.h	(revision 8620)
+++ source/ariba/overlay/modules/chord/Chord.h	(revision 10572)
@@ -104,4 +104,7 @@
 	/// @see OverlayInterface.h
 	virtual const LinkID& getNextLinkId( const NodeID& id ) const;
+	
+	/// @see OverlayInterface.h
+	virtual const NodeID& getNextNodeId( const NodeID& id ) const;
 
 	/// @see OverlayInterface.h
Index: source/ariba/overlay/modules/onehop/OneHop.cpp
===================================================================
--- source/ariba/overlay/modules/onehop/OneHop.cpp	(revision 8620)
+++ source/ariba/overlay/modules/onehop/OneHop.cpp	(revision 10572)
@@ -122,4 +122,16 @@
 }
 
+/// @see OverlayInterface.h
+const NodeID& OneHop::getNextNodeId( const NodeID& id ) const {
+	OverlayNodeMapping::const_iterator i = overlayNodes.find( id );
+	
+	// FIXME: in case the NodeID is not known we should return the nearest node
+	if (i == overlayNodes.end()) {
+		return NodeID::UNSPECIFIED;
+	}
+	
+	return i->first;
+}
+
 void OneHop::createOverlay() {
 	// don't need to bootstrap against ourselfs.
Index: source/ariba/overlay/modules/onehop/OneHop.h
===================================================================
--- source/ariba/overlay/modules/onehop/OneHop.h	(revision 8620)
+++ source/ariba/overlay/modules/onehop/OneHop.h	(revision 10572)
@@ -85,4 +85,7 @@
 	/// @see OverlayInterface.h
 	virtual const LinkID& getNextLinkId( const NodeID& id ) const;
+	
+	/// @see OverlayInterface.h
+	virtual const NodeID& getNextNodeId( const NodeID& id ) const;
 
 	/// @see OverlayInterface.h
