Index: /source/ariba/Makefile.am
===================================================================
--- /source/ariba/Makefile.am	(revision 2392)
+++ /source/ariba/Makefile.am	(revision 2393)
@@ -53,4 +53,5 @@
   tidy/LinkProperties.h \
   tidy/TidyMessage.h \
+  tidy/DataMessage.h \
   tidy/Module.h \
   tidy/Name.h \
@@ -71,4 +72,6 @@
   tidy/TidyMessage.cpp \
   tidy/TidyMessage.h \
+  tidy/DataMessage.cpp \
+  tidy/DataMessage.h \
   tidy/Module.cpp \
   tidy/Module.h \
Index: /source/ariba/tidy/DataMessage.cpp
===================================================================
--- /source/ariba/tidy/DataMessage.cpp	(revision 2393)
+++ /source/ariba/tidy/DataMessage.cpp	(revision 2393)
@@ -0,0 +1,9 @@
+
+#include "DataMessage.h"
+
+namespace ariba {
+
+const DataMessage DataMessage::UNSPECIFIED;
+
+} // namespace ariba
+
Index: /source/ariba/tidy/DataMessage.h
===================================================================
--- /source/ariba/tidy/DataMessage.h	(revision 2393)
+++ /source/ariba/tidy/DataMessage.h	(revision 2393)
@@ -0,0 +1,89 @@
+#ifndef DATAMESSAGE_H_
+#define DATAMESSAGE_H_
+
+#define USE_MESSAGE_UTILITY
+
+#include <memory>
+#include <inttypes.h>
+
+// use message utility
+#ifdef USE_MESSAGE_UTILITY
+  #include "ariba/utility/messages.h"
+  namespace ariba {
+    typedef utility::Message Message;
+  }
+#endif
+
+namespace ariba {
+
+// define sequence number type
+typedef uint16_t seqnum_t;
+
+/**
+ * This class wraps different representations of a message. In its current
+ * version is allows to specify binary data (as void*) with a size specifying
+ * the number of bytes of data or an message object that can be
+ * serialized if necessary. The main idea is, that simulation environments
+ * do not necessarily need to serialize messages.
+ *
+ * For performance reasons methods of this class are inlined where possible!
+ *
+ * @author Sebastian Mies <mies@tm.uka.de>
+ */
+class DataMessage {
+private:
+	void* data;
+	size_t size;
+public:
+	static const DataMessage UNSPECIFIED;
+
+	inline DataMessage() {
+		this->data = NULL;
+		this->size = 0;
+	}
+
+	inline DataMessage( const void* data, const size_t size ) {
+		this->data = const_cast<void*>(data);
+		this->size = size;
+	}
+
+#ifdef USE_MESSAGE_UTILITY
+	inline DataMessage( const Message* message ) {
+		this->data = (void*)const_cast<Message*>(message);
+		this->size = ~0;
+	}
+
+	inline Message* getMessage() const {
+		return (Message*)data;
+	}
+
+	inline operator Message* () const {
+		return (Message*)data;
+	}
+#endif
+
+	inline bool isMessage() const {
+		return size >= 0;
+	}
+
+	inline bool isData() const {
+		return size == ~0;
+	}
+
+	inline void* getData() const {
+		return data;
+	}
+
+	inline size_t getSize() const {
+		return size;
+	}
+
+	inline bool isUnspecified() const {
+		return data == NULL;
+	}
+};
+} // namespace ariba
+
+
+
+#endif /* DATAMESSAGE_H_ */
Index: /source/ariba/tidy/Node.cpp
===================================================================
--- /source/ariba/tidy/Node.cpp	(revision 2392)
+++ /source/ariba/tidy/Node.cpp	(revision 2393)
@@ -178,5 +178,5 @@
 
 LinkID Node::establishLink(const NodeID& nid, const ServiceID& sid,
-		const LinkProperties& req, const Message* msg) {
+		const LinkProperties& req, const DataMessage& msg) {
 	return context->getOverlay().establishLink(nid, sid);
 }
@@ -186,11 +186,11 @@
 }
 
-seqnum_t Node::sendMessage(Message* msg, const NodeID& nid,
+seqnum_t Node::sendMessage(const DataMessage& msg, const NodeID& nid,
 		const ServiceID& sid, const LinkProperties& req) {
-	return context->getOverlay().sendMessage(msg, nid, sid);
-}
-
-seqnum_t Node::sendMessage(Message* msg, const LinkID& lnk) {
-	return context->getOverlay().sendMessage(msg, lnk);
+	return context->getOverlay().sendMessage((Message*)msg, nid, sid);
+}
+
+seqnum_t Node::sendMessage(const DataMessage& msg, const LinkID& lnk) {
+	return context->getOverlay().sendMessage((Message*)msg, lnk);
 }
 
Index: /source/ariba/tidy/Node.h
===================================================================
--- /source/ariba/tidy/Node.h	(revision 2392)
+++ /source/ariba/tidy/Node.h	(revision 2393)
@@ -53,5 +53,5 @@
 #include "AribaModule.h"
 #include "TidyCommunicationListener.h"
-#include "TidyMessage.h"
+#include "DataMessage.h"
 
 namespace ariba {
@@ -197,5 +197,5 @@
 	LinkID establishLink(const NodeID& nid, const ServiceID& sid,
 			const LinkProperties& req = LinkProperties::DEFAULT,
-			const Message* msg = NULL);
+			const DataMessage& msg = DataMessage::UNSPECIFIED);
 
 	/**
@@ -223,5 +223,5 @@
 	 * @return A sequence number
 	 */
-	seqnum_t sendMessage(Message* msg, const NodeID& nid, const ServiceID& sid,
+	seqnum_t sendMessage(const DataMessage& msg, const NodeID& nid, const ServiceID& sid,
 			const LinkProperties& req = LinkProperties::DEFAULT);
 
@@ -234,5 +234,5 @@
 	 * @param lnk The link to be used for sending the message
 	 */
-	seqnum_t sendMessage(Message* msg, const LinkID& lnk);
+	seqnum_t sendMessage(const DataMessage& msg, const LinkID& lnk);
 
 	// --- communication listeners ---
Index: /source/ariba/tidy/TidyCommunicationListener.cpp
===================================================================
--- /source/ariba/tidy/TidyCommunicationListener.cpp	(revision 2392)
+++ /source/ariba/tidy/TidyCommunicationListener.cpp	(revision 2393)
@@ -71,15 +71,17 @@
 
 // dummy
-bool CommunicationListener::onLinkRequest(const NodeID& remote, Message* msg) {
+bool CommunicationListener::onLinkRequest(const NodeID& remote,
+		const DataMessage& msg) {
 	return false;
 }
 
 // dummy
-void CommunicationListener::onMessage(Message* msg, const NodeID& remote,
-		const LinkID& lnk) {
+void CommunicationListener::onMessage(const DataMessage& msg,
+		const NodeID& remote, const LinkID& lnk) {
 }
 
 // dummy
-void CommunicationListener::onMessageSent(seqnum_t seq_num, bool failed, Message* msg) {
+void CommunicationListener::onMessageSent(seqnum_t seq_num, bool failed,
+		const DataMessage& msg) {
 }
 
Index: /source/ariba/tidy/TidyCommunicationListener.h
===================================================================
--- /source/ariba/tidy/TidyCommunicationListener.h	(revision 2392)
+++ /source/ariba/tidy/TidyCommunicationListener.h	(revision 2393)
@@ -49,4 +49,5 @@
 #include "Identifiers.h"
 #include "LinkProperties.h"
+#include "DataMessage.h"
 
 namespace ariba {
@@ -77,12 +78,13 @@
 	// --- service specific events ---
 
-	virtual bool onLinkRequest(const NodeID& remote, Message* msg);
+	virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg);
 
 	// --- general receive method ---
 
-	virtual void onMessage(Message* msg, const NodeID& remote,
+	virtual void onMessage(const DataMessage& msg, const NodeID& remote,
 			const LinkID& lnk = LinkID::UNSPECIFIED);
 
-	virtual void onMessageSent(seqnum_t seq_num, bool failed, Message* msg = NULL);
+	virtual void onMessageSent(seqnum_t seq_num, bool failed,
+			const DataMessage& msg = DataMessage::UNSPECIFIED);
 
 	// --- dht functionality ---
Index: /source/ariba/tidy/ariba.h
===================================================================
--- /source/ariba/tidy/ariba.h	(revision 2392)
+++ /source/ariba/tidy/ariba.h	(revision 2393)
@@ -47,5 +47,5 @@
 #include "AribaModule.h"
 #include "LinkProperties.h"
-#include "TidyMessage.h"
+#include "DataMessage.h"
 #include "TidyCommunicationListener.h"
 #include "Name.h"
