Index: source/services/ariba_dht/Dht.cpp
===================================================================
--- source/services/ariba_dht/Dht.cpp	(revision 10700)
+++ source/services/ariba_dht/Dht.cpp	(revision 12060)
@@ -48,5 +48,5 @@
 void Dht::get(const std::string& key)
 {
-	DhtMessage msg(DhtMessage::DhtGet, key);
+	DhtMessage msg(DhtMessage::DhtGet, key, node->getNodeId());
 	
 	handle_dht_message(msg, NodeID::UNSPECIFIED);
@@ -155,5 +155,5 @@
             case DhtMessage::DhtGet:
             {
-                answer_dht_request(message.getKey(), source);
+                answer_dht_request(message.getKey(), message.getSourceNode());
 
                 break;
@@ -167,5 +167,5 @@
                 		message.getValues(),
                 		message.getTTL());
-                answer_dht_request(message.getKey(), source);
+                answer_dht_request(message.getKey(), message.getSourceNode());
                 
                 break;
Index: source/services/ariba_dht/Dht.h
===================================================================
--- source/services/ariba_dht/Dht.h	(revision 10700)
+++ source/services/ariba_dht/Dht.h	(revision 12060)
@@ -24,4 +24,8 @@
 using ariba::utility::SystemEventType;
 using ariba::utility::SystemEventListener;
+
+using ariba::utility::NodeID;
+using ariba::utility::LinkID;
+
 
 // Forward declarations to avoid adding messages/*.h to the public interface
Index: source/services/ariba_dht/messages/DhtMessage.cpp
===================================================================
--- source/services/ariba_dht/messages/DhtMessage.cpp	(revision 10700)
+++ source/services/ariba_dht/messages/DhtMessage.cpp	(revision 12060)
@@ -10,29 +10,34 @@
 DhtMessage::DhtMessage() :
 	ttl( 0 ),
-	replace( false )
+	replace( false ),
+	sourceNode(NodeID::UNSPECIFIED)
 {}
 
-DhtMessage::DhtMessage( DhtMessageType type, const std::string& key ) :
+DhtMessage::DhtMessage( DhtMessageType type, const std::string& key, const NodeID& sourceNodeID ) :
 	type( static_cast<uint8_t>(type) ),
 	ttl( 0 ),
 	replace( false ),
-	key( key )
+	key( key ),
+	sourceNode(sourceNodeID)
+
 {}
 
 DhtMessage::DhtMessage( DhtMessageType type, const std::string& key,
-		const std::string& value, uint16_t ttl ) :
+		const std::string& value, uint16_t ttl, const NodeID& sourceNodeID ) :
 	type( static_cast<uint8_t>(type) ),
 	ttl( ttl ),
 	replace( false ),
 	key( key ),
-	values(1, value)
+	values(1, value),
+	sourceNode(sourceNodeID)
 {}
 
 DhtMessage::DhtMessage( DhtMessageType type, const std::string& key,
-		const vector<string>& values, uint16_t ttl ) :
+		const vector<string>& values, uint16_t ttl, const NodeID& sourceNodeID ) :
 	type( static_cast<uint8_t>(type) ),
 	ttl( ttl ),
 	replace( false ),
-	key( key )
+	key( key ),
+	sourceNode(sourceNodeID)
 {
 	// preallocate enough room so we don't need to copy a lot
@@ -46,3 +51,59 @@
 }
 
+string DhtMessage::DhtMessageTypeToString(DhtMessageType type) {
+	string temp;
+	switch (type)
+	{
+		case DhtMessage::DhtInvalid:
+		{
+			temp = "DhtInvalid";
+			break;
+		}
+
+		case DhtMessage::DhtGet:
+		{
+			temp = "DhtGet";
+			break;
+		}
+
+		case DhtMessage::DhtPut:
+		{
+			temp = "DhtPut";
+			break;
+		}
+
+		case DhtMessage::DhtPutAndGet:
+		{
+			temp = "DhtPutAndGet";
+			break;
+		}
+
+		case DhtMessage::DhtRemove:
+		{
+			temp = "DhtRemove";
+			break;
+		}
+
+		case DhtMessage::DhtRepublish:
+		{
+			temp = "DhtRepublish";
+			break;
+		}
+
+		case DhtMessage::DhtAnswer:
+		{
+			temp =  "DhtAnswer";
+			break;
+		}
+
+		case DhtMessage::DhtReplica:
+		{
+			temp = "DhtReplica";
+			break;
+		}
+	}
+
+	return temp;
+}
+
 }}
Index: source/services/ariba_dht/messages/DhtMessage.h
===================================================================
--- source/services/ariba_dht/messages/DhtMessage.h	(revision 10700)
+++ source/services/ariba_dht/messages/DhtMessage.h	(revision 12060)
@@ -3,4 +3,5 @@
 
 #include "ariba/utility/messages.h"
+#include "ariba/utility/types/NodeID.h"
 #include "ariba/utility/serialization.h"
 #include "ariba/Name.h"
@@ -10,4 +11,5 @@
 
 using ariba::utility::Message;
+using ariba::utility::NodeID;
 using_serialization;
 
@@ -21,14 +23,15 @@
 		DhtRemove = 4,
 		DhtRepublish = 5,
-		DhtAnswer = 8
+		DhtAnswer = 8,
+		DhtReplica = 9
 	} DhtMessageType;
 	
 	DhtMessage();
-	DhtMessage( DhtMessageType type, const std::string& key );
+	DhtMessage( DhtMessageType type, const std::string& key, const NodeID& sourceNodeID = NodeID::UNSPECIFIED);
 	DhtMessage( DhtMessageType type, const std::string& key,
-			const std::string& value, uint16_t ttl = 0 );
+			const std::string& value, uint16_t ttl = 0, const NodeID& sourceNodeID = NodeID::UNSPECIFIED );
 	
 	DhtMessage( DhtMessageType type, const std::string& key,
-			const vector<std::string>& values, uint16_t ttl = 0 );
+			const vector<std::string>& values, uint16_t ttl = 0, const NodeID& sourceNodeID = NodeID::UNSPECIFIED );
 	
 	virtual ~DhtMessage();
@@ -77,10 +80,15 @@
 	}
 
+	NodeID getSourceNode() const {
+		return sourceNode;
+	}
+
 	bool doReplace() const {
 		return replace;
 	}
 
+	static string DhtMessageTypeToString(DhtMessageType type);
 
-private:
+protected:
 	uint8_t type;
 	uint16_t ttl;
@@ -88,4 +96,7 @@
 	std::string key;
 	vector<std::string> values;
+	NodeID sourceNode;
+
+private:
 };
 
@@ -100,4 +111,6 @@
 	// key serialization
 	X && T(key);
+
+	X && &sourceNode;
 
 	// store number of values
