Index: doc/dbg_interactive.py.sample
===================================================================
--- doc/dbg_interactive.py.sample	(revision 979)
+++ doc/dbg_interactive.py.sample	(revision 1078)
@@ -364,5 +364,4 @@
 a_msg = msg()
 a_msg.dump()
-a_msg.log(FD_MSG_LOG_DROPPED, "Check libfdproto for more details. Configure with fd_msg_log_config.")
 del a_msg
 
Index: extensions/app_diameap/diameap_eap.c
===================================================================
--- extensions/app_diameap/diameap_eap.c	(revision 1075)
+++ extensions/app_diameap/diameap_eap.c	(revision 1052)
@@ -373,5 +373,5 @@
 		case EAP_INTEGRITY_CHECK:
 			if ((*eap_sm->selectedMethod->eap_method_check)(eap_sm,
-					&eap_i->aaaEapRespData) == FALSE)
+					eap_i->aaaEapRespData) == FALSE)
 			{
 				TRACE_DEBUG(INFO,"%s[EAP Protocol] Invalid EAP packet received {Type=%d, Vendor=%d}. Integrity check failed (non fatal error).",DIAMEAP_EXTENSION,eap_sm->currentMethod,eap_sm->currentVendor);
@@ -434,5 +434,5 @@
 			}
 			if ((*eap_sm->selectedMethod->eap_method_process)(eap_sm,
-					&eap_i->aaaEapRespData))
+					eap_i->aaaEapRespData))
 			{
 				TRACE_DEBUG(INFO,"%s[EAP Protocol] [%s plugin] Authentication process failed.",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname);
Index: extensions/app_diameap/diameap_plugins.c
===================================================================
--- extensions/app_diameap/diameap_plugins.c	(revision 1075)
+++ extensions/app_diameap/diameap_plugins.c	(revision 1052)
@@ -263,5 +263,5 @@
 		{
 			plugin->eap_method_check = (boolean(*)(struct eap_state_machine *,
-					struct eap_packet*)) dlsym(plugin->handler,
+					struct eap_packet)) dlsym(plugin->handler,
 					registerplugin->check);
 			if (plugin->eap_method_check == NULL)
@@ -285,5 +285,5 @@
 		{
 			plugin->eap_method_process = (int(*)(struct eap_state_machine *,
-					struct eap_packet*)) dlsym(plugin->handler,
+					struct eap_packet)) dlsym(plugin->handler,
 					registerplugin->process);
 			if (plugin->eap_method_process == NULL)
Index: extensions/app_diameap/libdiameap.h
===================================================================
--- extensions/app_diameap/libdiameap.h	(revision 1075)
+++ extensions/app_diameap/libdiameap.h	(revision 610)
@@ -110,7 +110,7 @@
 	int (*eap_method_getTimeout)(struct eap_state_machine *smd, int * timeout); /* address of the eap_method_getTimeout method */
 	boolean (*eap_method_check)(struct eap_state_machine *smd,
-			struct eap_packet * eapRespData); /* address of the eap_method_check method */
+			struct eap_packet eapRespData); /* address of the eap_method_check method */
 	int (*eap_method_process)(struct eap_state_machine *smd,
-			struct eap_packet * eapRespData); /* address of the eap_method_process method */
+			struct eap_packet eapRespData); /* address of the eap_method_process method */
 	boolean (*eap_method_isDone)(struct eap_state_machine *smd); /* address of the eap_method_isDone method */
 	int (*eap_method_getKey)(struct eap_state_machine *smd, u8 ** msk,int *msklength, 
Index: extensions/dbg_interactive/messages.i
===================================================================
--- extensions/dbg_interactive/messages.i	(revision 1014)
+++ extensions/dbg_interactive/messages.i	(revision 1078)
@@ -297,9 +297,4 @@
 	}
 	
-	/* Log to file (depending on config)  */
-	void log ( enum fd_msg_log_cause cause, char * message ) {
-		fd_msg_log( cause, $self, message );
-	}
-	
 	/* Model */
 	struct dict_object * model() {
Index: extensions/dbg_interactive/queues.i
===================================================================
--- extensions/dbg_interactive/queues.i	(revision 1071)
+++ extensions/dbg_interactive/queues.i	(revision 1060)
@@ -66,5 +66,10 @@
 	/* Get the length of the queue (nb elements) */
 	int length() {
-		return fd_fifo_length ( $self ) ;
+		int l;
+		int ret = fd_fifo_length ( $self, &l, NULL );
+		if (ret != 0) {
+			DI_ERROR(ret, NULL, NULL);
+		}
+		return l;
 	}
 
Index: extensions/dbg_monitor/dbg_monitor.c
===================================================================
--- extensions/dbg_monitor/dbg_monitor.c	(revision 1075)
+++ extensions/dbg_monitor/dbg_monitor.c	(revision 974)
@@ -50,26 +50,4 @@
 EXTENSION_ENTRY("dbg_monitor", monitor_main);
 
-
-
-/* Display information about a queue */
-static void display_info(char * queue_desc, char * peer, int current_count, int limit_count, int highest_count, long long total_count,
-			struct timespec * total, struct timespec * blocking, struct timespec * last)
-{
-	long long ms = (total->tv_sec * 1000000) + (total->tv_nsec / 1000);
-	long double throughput = (long double)total_count * 1000000;
-	throughput /= ms;
-	if (peer) {
-		TRACE_DEBUG(INFO, "'%s'@'%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%.2LFitems/s), blocked:%ld.%06lds, last processing:%ld.%06lds",
-			queue_desc, peer, current_count, limit_count, highest_count,
-			total_count, total->tv_sec, total->tv_nsec, throughput,
-			blocking->tv_sec, blocking->tv_nsec, last->tv_sec, last->tv_nsec);
-	} else {
-		TRACE_DEBUG(INFO, "Global '%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%.2LFitems/s), blocked:%ld.%06lds, last processing:%ld.%06lds",
-			queue_desc, current_count, limit_count, highest_count,
-			total_count, total->tv_sec, total->tv_nsec, throughput,
-			blocking->tv_sec, blocking->tv_nsec, last->tv_sec, last->tv_nsec);
-	}
-}
-
 /* Thread to display periodical debug information */
 static pthread_t thr;
@@ -81,9 +59,4 @@
 	/* Loop */
 	while (1) {
-		int current_count, limit_count, highest_count;
-		long long total_count;
-		struct timespec total, blocking, last;
-		struct fd_list * li;
-	
 		#ifdef DEBUG
 		for (i++; i % 30; i++) {
@@ -92,38 +65,10 @@
 		}
 		#else /* DEBUG */
-		sleep(3599); /* 1 hour */
+		sleep(3600); /* 1 hour */
 		#endif /* DEBUG */
-		TRACE_DEBUG(INFO, "[dbg_monitor] Dumping queues statistics");
-		
-		CHECK_FCT_DO( fd_stat_getstats(STAT_G_LOCAL, NULL, &current_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), );
-		display_info("Local delivery", NULL, current_count, limit_count, highest_count, total_count, &total, &blocking, &last);
-		
-		CHECK_FCT_DO( fd_stat_getstats(STAT_G_INCOMING, NULL, &current_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), );
-		display_info("Total received", NULL, current_count, limit_count, highest_count, total_count, &total, &blocking, &last);
-		
-		CHECK_FCT_DO( fd_stat_getstats(STAT_G_OUTGOING, NULL, &current_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), );
-		display_info("Total sending", NULL, current_count, limit_count, highest_count, total_count, &total, &blocking, &last);
-		
-		
-		CHECK_FCT_DO( pthread_rwlock_rdlock(&fd_g_peers_rw), /* continue */ );
-
-		for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) {
-			struct peer_hdr * p = (struct peer_hdr *)li->o;
-			
-			fd_peer_dump(p, NONE);
-			
-			CHECK_FCT_DO( fd_stat_getstats(STAT_P_PSM, p, &current_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), );
-			display_info("Events, incl. recept", p->info.pi_diamid, current_count, limit_count, highest_count, total_count, &total, &blocking, &last);
-			
-			CHECK_FCT_DO( fd_stat_getstats(STAT_P_TOSEND, p, &current_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), );
-			display_info("Outgoing", p->info.pi_diamid, current_count, limit_count, highest_count, total_count, &total, &blocking, &last);
-			
-		}
-
-		CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ );
-
-		
-		
+		fd_log_debug("[dbg_monitor] Dumping current information");
+		CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_QUEUES, 0, NULL), /* continue */);
 		CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_SERV, 0, NULL), /* continue */);
+		CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_PEERS, 0, NULL), /* continue */);
 		sleep(1);
 	}
Index: freeDiameterd/main.c
===================================================================
--- freeDiameterd/main.c	(revision 931)
+++ freeDiameterd/main.c	(revision 1078)
@@ -49,5 +49,4 @@
 static char *conffile = NULL;
 static int gnutls_debug = 0;
-static int fd_msg_log_enabled = 0; /* all logs disabled by default, this field is a bitfield of enabled FD_MSG_LOG_* */
 
 /* gnutls debug */
@@ -88,23 +87,4 @@
 	}
 	
-	/* set messages logging */
-	if (fd_msg_log_enabled) {
-		if (fd_msg_log_enabled & (1 << FD_MSG_LOG_DROPPED)) {
-			CHECK_FCT( fd_msg_log_config(FD_MSG_LOG_DROPPED, FD_MSG_LOGTO_DEBUGONLY, NULL) );
-		}
-		if (fd_msg_log_enabled & (1 << FD_MSG_LOG_RECEIVED)) {
-			CHECK_FCT( fd_msg_log_config(FD_MSG_LOG_RECEIVED, FD_MSG_LOGTO_DEBUGONLY, NULL) );
-		}
-		if (fd_msg_log_enabled & (1 << FD_MSG_LOG_SENT)) {
-			CHECK_FCT( fd_msg_log_config(FD_MSG_LOG_SENT, FD_MSG_LOGTO_DEBUGONLY, NULL) );
-		}
-		if (fd_msg_log_enabled & (1 << FD_MSG_LOG_NODELIVER)) {
-			CHECK_FCT( fd_msg_log_config(FD_MSG_LOG_NODELIVER, FD_MSG_LOGTO_DEBUGONLY, NULL) );
-		}
-		if (fd_msg_log_enabled & (1 << FD_MSG_LOG_TIMING)) {
-			CHECK_FCT( fd_msg_log_config(FD_MSG_LOG_TIMING, FD_MSG_LOGTO_DEBUGONLY, NULL) );
-		}
-	}
-		
 	/* Allow SIGINT and SIGTERM from this point to terminate the application */
 	CHECK_POSIX( pthread_create(&signals_thr, NULL, catch_signals, NULL) );
@@ -169,7 +149,5 @@
   		"  -V, --version          Print version and exit\n"
   		"  -c, --config=filename  Read configuration from this file instead of the \n"
-		"                           default location (" DEFAULT_CONF_PATH "/" FD_DEFAULT_CONF_FILENAME ").\n"
-		"  -M, --enable_msg_log=( DROPPED | RECEIVED | SENT | NODELIVER | TIMING )\n"
-		"                         Enable logging of these messages in the output.\n");
+		"                           default location (" DEFAULT_CONF_PATH "/" FD_DEFAULT_CONF_FILENAME ").\n");
  	printf( "\nDebug:\n"
   		"  These options are mostly useful for developers\n"
@@ -197,5 +175,4 @@
 		{ "dbg_file",	required_argument, 	NULL, 'F' },
 		{ "dbg_gnutls",	required_argument, 	NULL, 'g' },
-		{ "enable_msg_log",	optional_argument, 	NULL, 'M' },
 		{ NULL,		0, 			NULL, 0 }
 	};
@@ -232,28 +209,4 @@
 				break;
 				
-			case 'M':	/* disable logging of these messages */
-				if (optarg) {
-					if (!strcmp(optarg, "DROPPED")) {
-						fd_msg_log_enabled |= 1 << FD_MSG_LOG_DROPPED;
-					} else
-					if (!strcmp(optarg, "RECEIVED")) {
-						fd_msg_log_enabled |= 1 << FD_MSG_LOG_RECEIVED;
-					} else
-					if (!strcmp(optarg, "SENT")) {
-						fd_msg_log_enabled |= 1 << FD_MSG_LOG_SENT;
-					} else
-					if (!strcmp(optarg, "NODELIVER")) {
-						fd_msg_log_enabled |= 1 << FD_MSG_LOG_NODELIVER;
-					} else
-					if (!strcmp(optarg, "TIMING")) {
-						fd_msg_log_enabled |= 1 << FD_MSG_LOG_TIMING;
-					} else {
-						main_help();
-						exit(0);
-					}
-				} else {
-					fd_msg_log_enabled = -1; /* all logs enabled */
-				}
-
 			case 'd':	/* Increase verbosity of debug messages.  */
 				fd_g_debug_lvl++;
Index: include/freeDiameter/libfdcore.h
===================================================================
--- include/freeDiameter/libfdcore.h	(revision 1077)
+++ include/freeDiameter/libfdcore.h	(revision 1069)
@@ -861,6 +861,6 @@
 /*============================================================*/
 
-/* These functions allow an extension to collect state information about the
- * framework, as well as being hooked at some key checkpoints in the processing
+/* These functions allows an extension to collect state information about the
+ * framework state, as well as hooks at some key checkpoints in the processing
  * for logging / statistics purpose.
  */
@@ -1097,6 +1097,6 @@
  *  stat	  : Which queue is being queried
  *  peer	  : (depending on the stat parameter) which peer is being queried
- *  current_count : (out) The number of items in the queue currently
- *  limit_count   : (out) The max number of items the queue accepts before becoming blocking -- 0 means no max.
+ *  len	  	  : (out) The number of items in the queue currently
+ *  max	  	  : (out) The max number of items the queue accepts before becoming blocking -- 0 means no max.
  *  highest_count : (out) The highest count the queue has reached since startup
  *  total_count	  : (out) Total number of items that this queue has processed (always growing, use deltas for monitoring)
@@ -1114,5 +1114,5 @@
  */
 int fd_stat_getstats(enum fd_stat_type stat, struct peer_hdr * peer, 
-			int * current_count, int * limit_count, int * highest_count, long long * total_count,
+			int * len, int * max, int * highest_count, long long * total_count, 
 			struct timespec * total, struct timespec * blocking, struct timespec * last);
 
Index: include/freeDiameter/libfdproto.h
===================================================================
--- include/freeDiameter/libfdproto.h	(revision 1071)
+++ include/freeDiameter/libfdproto.h	(revision 1078)
@@ -2340,41 +2340,20 @@
 void fd_msg_dump_walk ( int level, msg_or_avp *obj );
 void fd_msg_dump_one  ( int level, msg_or_avp *obj );
-/* Dump full message to log */
-void fd_msg_dump_full ( int level, struct dictionary *dict, const char *prefix, msg_or_avp *obj );
-
-/*
- * FUNCTION:	fd_msg_log
- *
- * PARAMETERS:
- *  cause	 : Context for calling this function. This allows the log facility to be configured precisely.
- *  msg		 : The message to log.
- *  prefix_format: Printf-style format message that is printed ahead of the message. Might be reason for drop or so.
- *
- * DESCRIPTION: 
- *   This function is called when a Diameter message reaches some particular points in the fD framework.
- * The actual effect is configurable: log in a separate file, dump in the debug log, etc.
- *
- * RETURN VALUE:
- *   -
- */
-enum fd_msg_log_cause {
-	FD_MSG_LOG_DROPPED = 1,  /* message has been dropped by the framework */ 
-	FD_MSG_LOG_RECEIVED,     /* message received from the network */ 
-	FD_MSG_LOG_SENT,         /* message sent to another peer */ 
-	FD_MSG_LOG_NODELIVER,    /* message could not be delivered to any peer */
-	FD_MSG_LOG_TIMING	 /* profiling messages */
-};
-#define FD_MSG_LOG_MAX FD_MSG_LOG_TIMING
-void fd_msg_log( enum fd_msg_log_cause cause, struct msg * msg, const char * prefix_format, ... ) _ATTRIBUTE_PRINTFLIKE_(3,4);
-
-/* configure the msg_log facility */
-enum fd_msg_log_method {
-	FD_MSG_LOGTO_NONE = 0, /* The message is not dumped. This is the default. */
-	FD_MSG_LOGTO_DEBUGONLY, /* Simply log the message with other debug information, at the INFO level. */
-	FD_MSG_LOGTO_FILE,    /* Messages are dumped in a single file, defined in arg */
-	FD_MSG_LOGTO_DIR    /* Messages are dumped in different files within one directory defined in arg. */
-};
-int fd_msg_log_config(enum fd_msg_log_cause cause, enum fd_msg_log_method method, const char * arg);
-void fd_msg_log_init(struct dictionary *dict);
+
+/* Helper functions to get a dump of an object in the logs. Several formats are available.
+ *  buf   : a buffer that can be reallocated if needed. *buf==NULL is also accepted for first allocation
+ *  buflen: the length of the buffer buf.
+ *  dict  : optional, the dictionary to use for resolving objects, if force_parsing != 0
+ *  obj   : the message or AVP to dump.
+ *
+ * After use, the buf pointer should be freed.
+ */
+/* one-line dump with only short information */
+void fd_msg_dump_summary( char ** buf, size_t buflen, struct dictionary *dict, msg_or_avp *obj, int force_parsing);
+/* one-line dump with all the contents of the message */
+void fd_msg_dump_full( char ** buf, size_t buflen, struct dictionary *dict, msg_or_avp *obj, int force_parsing);
+/* multi-line human-readable dump similar to wireshark output */
+void fd_msg_dump_treeview( char ** buf, size_t buflen, struct dictionary *dict, msg_or_avp *obj, int force_parsing);
+
 
 /*********************************************/
@@ -2528,26 +2507,4 @@
 int fd_msg_source_set( struct msg * msg, DiamId_t diamid, size_t diamidlen, int add_rr, struct dictionary * dict );
 int fd_msg_source_get( struct msg * msg, DiamId_t *diamid, size_t * diamidlen );
-
-/*
- * FUNCTION:	fd_msg_ts_*
- *
- * PARAMETERS:
- *  msg		: A msg object.
- *  ts		: A struct timespec pointer, indexed on CLOCK_REALTIME
- *
- * DESCRIPTION: 
- *   Associate or retrieve timestamps meaningful for the message.
- *  A timestamp with a value of { 0, 0 } means: not set.
- *
- * RETURN VALUE:
- *  0      	: Operation complete.
- *  !0      	: an error occurred.
- */
-/* when msg was received from network */
-int fd_msg_ts_set_recv( struct msg * msg, struct timespec * ts );
-int fd_msg_ts_get_recv( struct msg * msg, struct timespec * ts );
-int fd_msg_ts_set_sent( struct msg * msg, struct timespec * ts );
-int fd_msg_ts_get_sent( struct msg * msg, struct timespec * ts );
-
 
 /*
@@ -3032,15 +2989,30 @@
 
 /*
+ * FUNCTION:	fd_fifo_length
+ *
+ * PARAMETERS:
+ *  queue	: The queue from which to retrieve the number of elements.
+ *  length	: Upon success, the current number of elements in the queue is stored here.
+ *  max		: the maximum number of elements as specified during creation. Can be NULL.
+ *
+ * DESCRIPTION: 
+ *  Retrieve the number of elements in a queue.
+ *
+ * RETURN VALUE:
+ *  0		: The length of the queue has been written.
+ *  EINVAL 	: A parameter is invalid.
+ */
+int fd_fifo_length ( struct fifo * queue, int * length, int * max);
+int fd_fifo_length_noerr ( struct fifo * queue ); /* no error checking version */
+
+/*
  * FUNCTION:	fd_fifo_getstats
  *
  * PARAMETERS:
- *  queue	  : The queue from which to retrieve the information.
- *  current_count : How many items in the queue at the time of execution. This changes each time an item is pushed or poped.
- *  limit_count   : The maximum number of items allowed in this queue. This is specified during queue creation.
- *  highest_count : The maximum number of items this queue has contained. This enables to see if limit_count count was reached.
- *  total_count   : the total number of items that went through the queue (already pop'd). Always increasing.
- *  total	  : Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring)
- *  blocking      : Cumulated time threads trying to post new items were blocked (queue full).
- *  last          : For the last element retrieved from the queue, how long it take between posting (including blocking) and poping
+ *  queue	: The queue from which to retrieve the timings information.
+ *  items       : the total number of items that went through the queue (already pop'd). Always increasing.
+ *  total	: Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring)
+ *  blocking    : Cumulated time threads trying to post new items were blocked (queue full).
+ *  last        : For the last element retrieved from the queue, how long it take between posting (including blocking) and poping
  *  
  * DESCRIPTION: 
@@ -3051,20 +3023,6 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_fifo_getstats( struct fifo * queue, int * current_count, int * limit_count, int * highest_count, long long * total_count, 
-				           struct timespec * total, struct timespec * blocking, struct timespec * last);
-
-/*
- * FUNCTION:	fd_fifo_length
- *
- * PARAMETERS:
- *  queue	: The queue from which to retrieve the number of elements.
- *
- * DESCRIPTION: 
- *  Retrieve the number of elements in a queue, without error checking.
- *
- * RETURN VALUE:
- *  The number of items currently queued.
- */
-int fd_fifo_length ( struct fifo * queue );
+int fd_fifo_getstats( struct fifo * queue, long long *items, struct timespec * total, struct timespec * blocking, struct timespec * last);
+
 
 /*
Index: libfdcore/CMakeLists.txt
===================================================================
--- libfdcore/CMakeLists.txt	(revision 1077)
+++ libfdcore/CMakeLists.txt	(revision 668)
@@ -18,6 +18,4 @@
 	events.c
 	extensions.c
-	fifo_stats.c
-	hooks.c
 	dict_base_proto.c
 	messages.c
Index: libfdcore/cnxctx.c
===================================================================
--- libfdcore/cnxctx.c	(revision 1029)
+++ libfdcore/cnxctx.c	(revision 1078)
@@ -644,6 +644,4 @@
 	}
 	
-	CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &conn->cc_tls_para.recvon), /* continue */ );
-	
 	return ret;
 }
@@ -701,5 +699,4 @@
 		ssize_t ret = 0;
 		size_t	received = 0;
-		struct timespec recv_on;
 
 		do {
@@ -738,8 +735,4 @@
 			received += ret;
 		}
-		
-		/* Piggy-tail the timestamp of reception */
-		CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &recv_on), /* continue */ );
-		memcpy(newmsg + length, &recv_on, sizeof(struct timespec));
 		
 		/* We have received a complete message, pass it to the daemon */
@@ -930,11 +923,8 @@
 int fd_tls_rcvthr_core(struct cnxctx * conn, gnutls_session_t session)
 {
-	struct timespec * rcv_on = &conn->cc_tls_para.recvon;
-	
 #ifndef DISABLE_SCTP
 	void * ptr = gnutls_transport_get_ptr(session);
 	if (ptr != conn) {
 		struct sctps_ctx * ctx = (struct sctps_ctx *) ptr;
-		rcv_on = &ctx->recvon;
 	}
 #endif /* DISABLE_SCTP */
@@ -984,7 +974,4 @@
 			received += ret;
 		}
-		
-		/* The timestamp of the last TLS chunk received for this rebuilt message lives close to the session pointer, we piggyback it */
-		memcpy(newmsg + length, rcv_on, sizeof(struct timespec));
 		
 		/* We have received a complete message, pass it to the daemon */
Index: libfdcore/core.c
===================================================================
--- libfdcore/core.c	(revision 1034)
+++ libfdcore/core.c	(revision 1078)
@@ -209,7 +209,4 @@
 	CHECK_FCT( fd_conf_init() );
 	
-	/* Initialize the message logging facility */
-	fd_msg_log_init(fd_g_config->cnf_dict);
-
 	/* Add definitions of the base protocol */
 	CHECK_FCT( fd_dict_base_protocol(fd_g_config->cnf_dict) );
Index: bfdcore/fifo_stats.c
===================================================================
--- libfdcore/fifo_stats.c	(revision 1074)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*********************************************************************************************************
-* Software License Agreement (BSD License)                                                               *
-* Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
-*													 *
-* Copyright (c) 2013, WIDE Project and NICT								 *
-* All rights reserved.											 *
-* 													 *
-* Redistribution and use of this software in source and binary forms, with or without modification, are  *
-* permitted provided that the following conditions are met:						 *
-* 													 *
-* * Redistributions of source code must retain the above 						 *
-*   copyright notice, this list of conditions and the 							 *
-*   following disclaimer.										 *
-*    													 *
-* * 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.								 *
-* 													 *
-* * Neither the name of the WIDE Project or NICT nor the 						 *
-*   names of its contributors may be used to endorse or 						 *
-*   promote products derived from this software without 						 *
-*   specific prior written permission of WIDE Project and 						 *
-*   NICT.												 *
-* 													 *
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.								 *
-*********************************************************************************************************/
-
-#include "fdcore-internal.h"
-
-/* See include/freeDiameter/libfdcore.h for more information */
-int fd_stat_getstats(enum fd_stat_type stat, struct peer_hdr * peer, 
-			int * current_count, int * limit_count, int * highest_count, long long * total_count, 
-			struct timespec * total, struct timespec * blocking, struct timespec * last)
-{
-	struct fd_peer * p = (struct fd_peer *)peer;
-	TRACE_ENTRY( "%d %p %p %p %p %p %p %p %p", stat, peer, current_count, limit_count, highest_count, total_count, total, blocking, last);
-	
-	switch (stat) {
-		case STAT_G_LOCAL: {
-			CHECK_FCT( fd_fifo_getstats(fd_g_local, current_count, limit_count, highest_count, total_count, total, blocking, last) );
-		}
-		break;
-
-		case STAT_G_INCOMING: {
-			CHECK_FCT( fd_fifo_getstats(fd_g_incoming, current_count, limit_count, highest_count, total_count, total, blocking, last) );
-		}
-		break;
-
-		case STAT_G_OUTGOING: {
-			CHECK_FCT( fd_fifo_getstats(fd_g_outgoing, current_count, limit_count, highest_count, total_count, total, blocking, last) );
-		}
-		break;
-
-		case STAT_P_PSM: {
-			CHECK_PARAMS( CHECK_PEER( peer ) );
-			CHECK_FCT( fd_fifo_getstats(p->p_events, current_count, limit_count, highest_count, total_count, total, blocking, last) );
-		}
-		break;
-
-		case STAT_P_TOSEND: {
-			CHECK_PARAMS( CHECK_PEER( peer ) );
-			CHECK_FCT( fd_fifo_getstats(p->p_tosend, current_count, limit_count, highest_count, total_count, total, blocking, last) );
-		}
-		break;
-
-		default:
-			return EINVAL;
-	}
-	
-	return 0;
-}
Index: bfdcore/hooks.c
===================================================================
--- libfdcore/hooks.c	(revision 1077)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*********************************************************************************************************
-* Software License Agreement (BSD License)                                                               *
-* Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
-*													 *
-* Copyright (c) 2013, WIDE Project and NICT								 *
-* All rights reserved.											 *
-* 													 *
-* Redistribution and use of this software in source and binary forms, with or without modification, are  *
-* permitted provided that the following conditions are met:						 *
-* 													 *
-* * Redistributions of source code must retain the above 						 *
-*   copyright notice, this list of conditions and the 							 *
-*   following disclaimer.										 *
-*    													 *
-* * 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.								 *
-* 													 *
-* * Neither the name of the WIDE Project or NICT nor the 						 *
-*   names of its contributors may be used to endorse or 						 *
-*   promote products derived from this software without 						 *
-*   specific prior written permission of WIDE Project and 						 *
-*   NICT.												 *
-* 													 *
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.								 *
-*********************************************************************************************************/
-
-#include "fdcore-internal.h"
-
-struct fd_hook_hdl; 
-struct fd_hook_data_hdl;
-
-int fd_hook_data_register(
-	struct fd_hook_permsgdata * (*permsgdata_new_cb)     (void),
-        void (*permsgdata_destroy_cb) (struct fd_hook_permsgdata *),
-        struct fd_hook_data_hdl **    new_handle
-)
-{
-	return ENOTSUP;
-}
-
-int fd_hook_register (  enum fd_hook_type type, 
-			void (*fd_hook_cb)(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, void * regdata), 
-			void * regdata, 
-			struct fd_hook_data_hdl *data_hdl,
-			struct fd_hook_hdl ** handler )
-{
-	return ENOTSUP;
-}
-
-
-int fd_hook_unregister( struct fd_hook_hdl * handler )
-{
-	return ENOTSUP;
-}
-
Index: libfdcore/messages.c
===================================================================
--- libfdcore/messages.c	(revision 1014)
+++ libfdcore/messages.c	(revision 1078)
@@ -415,5 +415,5 @@
 		
 		/* Just discard */
-		fd_msg_log( FD_MSG_LOG_DROPPED, m, "Answer not compliant to dictionary's ABNF (%s)", pei.pei_errcode  );
+		//fd_msg_log( FD_MSG_LOG_DROPPED, m, "Answer not compliant to dictionary's ABNF (%s)", pei.pei_errcode  );
 		CHECK_FCT( fd_msg_free( m ) );
 		*msg = NULL;
Index: libfdcore/p_ce.c
===================================================================
--- libfdcore/p_ce.c	(revision 1027)
+++ libfdcore/p_ce.c	(revision 1078)
@@ -650,5 +650,5 @@
 	*recv_cnx = NULL;
 	if (*cer) {
-		fd_msg_log(FD_MSG_LOG_DROPPED, *cer, "An error occurred while rejecting a CER.");
+		//fd_msg_log(FD_MSG_LOG_DROPPED, *cer, "An error occurred while rejecting a CER.");
 		fd_msg_free(*cer);
 		*cer = NULL;
@@ -720,5 +720,5 @@
 	if (req || ((st = fd_peer_getstate(peer)) != STATE_WAITCEA)) {
 		if (*msg) {
-			fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Received CER/CEA while in '%s' state.", STATE_STR(st));
+			//fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Received CER/CEA while in '%s' state.", STATE_STR(st));
 			CHECK_FCT_DO( fd_msg_free(*msg), /* continue */);
 			*msg = NULL;
@@ -987,5 +987,5 @@
 cleanup:
 	if (msg) {
-		fd_msg_log(FD_MSG_LOG_DROPPED, msg, "An error occurred while processing a CER.");
+		//fd_msg_log(FD_MSG_LOG_DROPPED, msg, "An error occurred while processing a CER.");
 		fd_msg_free(msg);
 	}
Index: libfdcore/p_out.c
===================================================================
--- libfdcore/p_out.c	(revision 1027)
+++ libfdcore/p_out.c	(revision 1078)
@@ -45,5 +45,4 @@
 	int ret;
 	uint32_t bkp_hbh = 0;
-	struct timespec senton;
 	struct msg * cpy_for_logs_only;
 	
@@ -73,29 +72,6 @@
 	}
 	
-	CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &senton), /* ... */ );
-	CHECK_FCT_DO( fd_msg_ts_set_sent(cpy_for_logs_only, &senton), /* ... */ );
-	
 	/* Log the message */
-	fd_msg_log( FD_MSG_LOG_SENT, cpy_for_logs_only, "Sent to '%s'", fd_cnx_getid(cnx));
-	
-	{
-		struct timespec rcvon, delay;
-		
-		(void) fd_msg_ts_get_recv(cpy_for_logs_only, &rcvon);
-		if (rcvon.tv_sec != 0 || rcvon.tv_nsec != 0) {
-			TS_DIFFERENCE( &delay, &rcvon, &senton);
-			fd_msg_log( FD_MSG_LOG_TIMING, cpy_for_logs_only, "Forwarded in %ld.%6.6ld sec", (long)delay.tv_sec, delay.tv_nsec/1000);
-		} else { /* We log the answer time only for answers generated locally */
-			if (!msg_is_a_req) {
-				/* get the matching request */
-				struct msg * req;
-				struct timespec reqrcvon;
-				(void) fd_msg_answ_getq(cpy_for_logs_only, &req);
-				(void) fd_msg_ts_get_recv(req, &reqrcvon);
-				TS_DIFFERENCE( &delay, &reqrcvon, &senton);
-				fd_msg_log( FD_MSG_LOG_TIMING, cpy_for_logs_only, "Answered in %ld.%6.6ld sec", (long)delay.tv_sec, delay.tv_nsec/1000);
-			}
-		}
-	}
+	// fd_msg_log( FD_MSG_LOG_SENT, cpy_for_logs_only, "Sent to '%s'", fd_cnx_getid(cnx));
 	
 	/* Send the message */
@@ -122,5 +98,5 @@
 	CHECK_FCT_DO(fd_fifo_post(fd_g_outgoing, &msg),
 		{
-			fd_msg_log( FD_MSG_LOG_DROPPED, msg, "An error occurred while attempting to requeue this message during cancellation of the sending function");
+			//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "An error occurred while attempting to requeue this message during cancellation of the sending function");
 			CHECK_FCT_DO(fd_msg_free(msg), /* What can we do more? */);
 		} );
@@ -155,5 +131,5 @@
 			{
 				if (msg) {
-					fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) );
+					//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) );
 					fd_msg_free(msg);
 				}
@@ -207,5 +183,5 @@
 			{
 				if (msg) {
-					fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: Problem while sending (%s)", strerror(ret) );
+					//fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: Problem while sending (%s)", strerror(ret) );
 					fd_msg_free(*msg);
 					*msg = NULL;
Index: libfdcore/p_psm.c
===================================================================
--- libfdcore/p_psm.c	(revision 1033)
+++ libfdcore/p_psm.c	(revision 1078)
@@ -241,5 +241,5 @@
 			case FDEVP_CNX_INCOMING: {
 				struct cnx_incoming * evd = ev->data;
-				fd_msg_log( FD_MSG_LOG_DROPPED, evd->cer, "Message discarded while cleaning peer state machine queue." );
+				//fd_msg_log( FD_MSG_LOG_DROPPED, evd->cer, "Message discarded while cleaning peer state machine queue." );
 				CHECK_FCT_DO( fd_msg_free(evd->cer), /* continue */);
 				fd_cnx_destroy(evd->cnx);
@@ -489,8 +489,4 @@
 		struct msg * msg = NULL;
 		struct msg_hdr * hdr;
-		struct timespec rcvon;
-		
-		/* Retrieve the piggytailed timestamp */
-		memcpy(&rcvon, ev_data+ev_sz, sizeof(struct timespec));
 		
 		/* Parse the received buffer */
@@ -503,10 +499,8 @@
 			} );
 			
-		CHECK_FCT_DO( fd_msg_ts_set_recv(msg, &rcvon), /* ... */ );
-		
 		/* If the current state does not allow receiving messages, just drop it */
 		if (cur_state == STATE_CLOSED) {
 			/* In such case, just discard the message */
-			fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Purged from peer '%s''s queue (CLOSED state).", peer->p_hdr.info.pi_diamid );
+			//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Purged from peer '%s''s queue (CLOSED state).", peer->p_hdr.info.pi_diamid );
 			fd_msg_free(msg);
 			goto psm_loop;
@@ -514,5 +508,5 @@
 		
 		/* Log incoming message */
-		fd_msg_log( FD_MSG_LOG_RECEIVED, msg, "Received %zdb from '%s' (%s)", ev_sz, peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) );
+		//fd_msg_log( FD_MSG_LOG_RECEIVED, msg, "Received %zdb from '%s' (%s)", ev_sz, peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) );
 	
 		/* Extract the header */
@@ -525,5 +519,5 @@
 			CHECK_FCT_DO( fd_p_sr_fetch(&peer->p_sr, hdr->msg_hbhid, &req), goto psm_end );
 			if (req == NULL) {
-				fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Answer received with no corresponding sent request." );
+				//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Answer received with no corresponding sent request." );
 				fd_msg_free(msg);
 				goto psm_loop;
@@ -535,8 +529,5 @@
 			/* Display the delay to receive the answer */
 			{
-				struct timespec reqsent, delay;
-				(void) fd_msg_ts_get_sent(req, &reqsent);
-				TS_DIFFERENCE( &delay, &reqsent, &rcvon );
-				fd_msg_log( FD_MSG_LOG_TIMING, msg, "Answer received in %ld.%6.6ld sec.", (long)delay.tv_sec, delay.tv_nsec / 1000 );
+				//fd_msg_log( FD_MSG_LOG_TIMING, msg, "Answer received in %ld.%6.6ld sec.", (long)delay.tv_sec, delay.tv_nsec / 1000 );
 			}
 		} else {
@@ -586,5 +577,5 @@
 				default:
 					/* In such case, just discard the message */
-					fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received from peer '%s' while connection was not in state %s.", peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) );
+					//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received from peer '%s' while connection was not in state %s.", peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) );
 					fd_msg_free(msg);
 			}
@@ -603,5 +594,5 @@
 					if (msg) {
 						/* Only if an error occurred & the message was not saved / dumped */
-						fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) );
+						//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) );
 						CHECK_FCT_DO( fd_msg_free(msg), goto psm_end);
 					}
@@ -652,5 +643,5 @@
 				/* Cleanup the message if not done */
 				if (msg) {
-					fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received un-handled non-routable command from peer '%s'.", peer->p_hdr.info.pi_diamid );
+					//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received un-handled non-routable command from peer '%s'.", peer->p_hdr.info.pi_diamid );
 					CHECK_FCT_DO( fd_msg_free(msg), /* continue */);
 					msg = NULL;
@@ -660,5 +651,5 @@
 		/* At this point the message must have been fully handled already */
 		if (msg) {
-			fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error ('%s'): unhandled message.", peer->p_hdr.info.pi_diamid );
+			//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error ('%s'): unhandled message.", peer->p_hdr.info.pi_diamid );
 			fd_msg_free(msg);
 		}
@@ -746,5 +737,5 @@
 		}
 		if (params->cer) {
-			fd_msg_log( FD_MSG_LOG_DROPPED, params->cer, "Internal error: this CER was not handled as expected." );
+			//fd_msg_log( FD_MSG_LOG_DROPPED, params->cer, "Internal error: this CER was not handled as expected." );
 			CHECK_FCT_DO( fd_msg_free(params->cer), );
 			params->cer = NULL;
Index: libfdcore/p_sr.c
===================================================================
--- libfdcore/p_sr.c	(revision 1052)
+++ libfdcore/p_sr.c	(revision 1078)
@@ -119,5 +119,5 @@
 	/* If the callback did not dispose of the message, do it now */
 	if (ed->request) {
-		fd_msg_log(FD_MSG_LOG_DROPPED, ed->request, "Expiration period completed without an answer, and the expiry callback did not dispose of the message.");
+		//fd_msg_log(FD_MSG_LOG_DROPPED, ed->request, "Expiration period completed without an answer, and the expiry callback did not dispose of the message.");
 		CHECK_FCT_DO( fd_msg_free(ed->request), /* ignore */ );
 	}
@@ -325,10 +325,10 @@
 			CHECK_FCT_DO( ret = fd_fifo_post(fd_g_outgoing, &sr->req),
 				{
-					fd_msg_log( FD_MSG_LOG_DROPPED, sr->req, "Internal error: error while requeuing during failover: %s", strerror(ret) );
+					//fd_msg_log( FD_MSG_LOG_DROPPED, sr->req, "Internal error: error while requeuing during failover: %s", strerror(ret) );
 					CHECK_FCT_DO(fd_msg_free(sr->req), /* What can we do more? */)
 				});
 		} else {
 			/* Just free the request. */
-			fd_msg_log( FD_MSG_LOG_DROPPED, sr->req, "Sent & unanswered local message discarded during failover." );
+			//fd_msg_log( FD_MSG_LOG_DROPPED, sr->req, "Sent & unanswered local message discarded during failover." );
 			CHECK_FCT_DO(fd_msg_free(sr->req), /* Ignore */);
 		}
Index: libfdcore/peers.c
===================================================================
--- libfdcore/peers.c	(revision 1027)
+++ libfdcore/peers.c	(revision 1078)
@@ -245,5 +245,5 @@
 			{
 				/* fallback: destroy the message */
-				fd_msg_log(FD_MSG_LOG_DROPPED, m, "Internal error: unable to requeue this message during failover process");
+				//fd_msg_log(FD_MSG_LOG_DROPPED, m, "Internal error: unable to requeue this message during failover process");
 				CHECK_FCT_DO(fd_msg_free(m), /* What can we do more? */)
 			} );
Index: libfdcore/queues.c
===================================================================
--- libfdcore/queues.c	(revision 767)
+++ libfdcore/queues.c	(revision 1078)
@@ -74,5 +74,5 @@
 		
 		/* We got one! */
-		fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Message lost because framework is terminating." );
+		//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Message lost because framework is terminating." );
 		fd_msg_free(msg);
 	}
Index: libfdcore/routing_dispatch.c
===================================================================
--- libfdcore/routing_dispatch.c	(revision 1055)
+++ libfdcore/routing_dispatch.c	(revision 1078)
@@ -393,5 +393,5 @@
 
 			if (!peer) {
-				fd_msg_log(FD_MSG_LOG_DROPPED, *pmsg, "Unable to send error '%s' to deleted peer '%s' in reply to this message.", error_code, id);
+				//fd_msg_log(FD_MSG_LOG_DROPPED, *pmsg, "Unable to send error '%s' to deleted peer '%s' in reply to this message.", error_code, id);
 				fd_msg_free(*pmsg);
 				*pmsg = NULL;
@@ -450,5 +450,5 @@
 			}
 			if (msgptr) {	/* another error happen'd */
-				fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "An unexpected error occurred while parsing the message (%s)", strerror(ret));
+				//fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "An unexpected error occurred while parsing the message (%s)", strerror(ret));
 				CHECK_FCT_DO( fd_msg_free(msgptr), /* continue */);
 			}
@@ -511,5 +511,5 @@
 				
 				if (!is_req) {
-					fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "Internal error: Answer received to locally issued request, but not handled by any handler.");
+					//fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "Internal error: Answer received to locally issued request, but not handled by any handler.");
 					fd_msg_free(msgptr);
 					break;
@@ -756,5 +756,5 @@
 			CHECK_FCT_DO( ret = (*rh->rt_fwd_cb)(rh->cbdata, &msgptr),
 				{
-					fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: a FWD routing callback returned an error (%s)", strerror(ret));
+					//fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: a FWD routing callback returned an error (%s)", strerror(ret));
 					fd_msg_free(msgptr);
 					msgptr = NULL;
@@ -815,5 +815,5 @@
 		CHECK_FCT( fd_peer_getbyid( qry_src, qry_src_len, 0, (void *) &peer ) );
 		if (fd_peer_getstate(peer) != STATE_OPEN) {
-			fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Unable to forward answer to deleted / closed peer '%s'.", qry_src);
+			//fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Unable to forward answer to deleted / closed peer '%s'.", qry_src);
 			fd_msg_free(msgptr);
 			return 0;
@@ -900,5 +900,5 @@
 			CHECK_FCT_DO( ret = (*rh->rt_out_cb)(rh->cbdata, msgptr, candidates),
 				{
-					fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: an OUT routing callback returned an error (%s)", strerror(ret));
+					//fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: an OUT routing callback returned an error (%s)", strerror(ret));
 					fd_msg_free(msgptr);
 					msgptr = NULL;
@@ -948,5 +948,5 @@
 	/* If the message has not been sent, return an error */
 	if (msgptr) {
-		fd_msg_log( FD_MSG_LOG_NODELIVER, msgptr, "No suitable candidate to route the message to." );
+		//fd_msg_log( FD_MSG_LOG_NODELIVER, msgptr, "No suitable candidate to route the message to." );
 		return_error( &msgptr, "DIAMETER_UNABLE_TO_DELIVER", "No suitable candidate to route the message to", NULL);
 	}
Index: libfdcore/sctp.c
===================================================================
--- libfdcore/sctp.c	(revision 1027)
+++ libfdcore/sctp.c	(revision 1078)
@@ -1068,5 +1068,4 @@
 	size_t			 mempagesz = sysconf(_SC_PAGESIZE); /* We alloc buffer by memory pages for efficiency */
 	int 			 timedout = 0;
-	struct timespec 	 recv_on;
 	
 	TRACE_ENTRY("%p %p %p %p %p", conn, strid, buf, len, event);
@@ -1189,8 +1188,4 @@
 	}
 	
-	/* Piggy-tail the timestamp of reception */
-	CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &recv_on), /* continue */ );
-	memcpy(data + datasize, &recv_on, sizeof(struct timespec));
-		
 	/* From this point, we have received a message */
 	*event = FDEVP_CNX_MSG_RECV;
Index: libfdcore/server.c
===================================================================
--- libfdcore/server.c	(revision 1061)
+++ libfdcore/server.c	(revision 1078)
@@ -169,5 +169,5 @@
 	
 	/* Log incoming message */
-	fd_msg_log( FD_MSG_LOG_RECEIVED, msg, "Received %zdb from new client '%s'", bufsz, fd_cnx_getid(c->conn) );
+	//fd_msg_log( FD_MSG_LOG_RECEIVED, msg, "Received %zdb from new client '%s'", bufsz, fd_cnx_getid(c->conn) );
 	
 	/* We expect a CER, it must parse with our dictionary and rules */
@@ -195,5 +195,5 @@
 	/* Cleanup the parsed message if any */
 	if (msg) {
-		fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received invalid/unexpected message from connecting client '%s'", fd_cnx_getid(c->conn) );
+		//fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received invalid/unexpected message from connecting client '%s'", fd_cnx_getid(c->conn) );
 		CHECK_FCT_DO( fd_msg_free(msg), /* continue */);
 	}
Index: libfdproto/CMakeLists.txt
===================================================================
--- libfdproto/CMakeLists.txt	(revision 922)
+++ libfdproto/CMakeLists.txt	(revision 1078)
@@ -13,5 +13,4 @@
 	log.c
 	messages.c
-	msg_log.c
 	ostr.c
 	portability.c
Index: libfdproto/dispatch.c
===================================================================
--- libfdproto/dispatch.c	(revision 1017)
+++ libfdproto/dispatch.c	(revision 1078)
@@ -97,5 +97,5 @@
 		CHECK_FCT_DO( (r = (*hdl->cb)(msg, avp, sess, hdl->opaque, action)),
 			{
-				fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: a DISPATCH callback returned an error (%s)", strerror(r));
+				//fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: a DISPATCH callback returned an error (%s)", strerror(r));
 				fd_msg_free(*msg);
 				*msg = NULL;
Index: libfdproto/fifo.c
===================================================================
--- libfdproto/fifo.c	(revision 1073)
+++ libfdproto/fifo.c	(revision 1067)
@@ -152,5 +152,5 @@
 		for (li = queue->list.next; li != &queue->list; li = li->next) {
 			struct fifo_item * fi = (struct fifo_item *)li;
-			fd_log_debug("  [%i] item %p in fifo %p, posted:%ld.%06ld", 
+			fd_log_debug("  [%i] item %p in fifo %p, posted:ld.%06ld", 
 				i++, fi->item.o, queue, (long)fi->posted_on.tv_sec,(long)(fi->posted_on.tv_nsec/1000));
 			(*dump_item)(level, fi->item.o);
@@ -284,9 +284,32 @@
 }
 
-/* Get the information on the queue */
-int fd_fifo_getstats( struct fifo * queue, int * current_count, int * limit_count, int * highest_count, long long * total_count, 
-				           struct timespec * total, struct timespec * blocking, struct timespec * last)
-{
-	TRACE_ENTRY( "%p %p %p %p %p %p %p %p", queue, current_count, limit_count, highest_count, total_count, total, blocking, last);
+/* Get the length of the queue */
+int fd_fifo_length ( struct fifo * queue, int * length, int * max )
+{
+	TRACE_ENTRY( "%p %p %p", queue, length, max );
+	
+	/* Check the parameters */
+	CHECK_PARAMS( CHECK_FIFO( queue ) && length );
+	
+	/* lock the queue */
+	CHECK_POSIX(  pthread_mutex_lock( &queue->mtx )  );
+	
+	/* Retrieve the count */
+	*length = queue->count;
+	
+	if (max)
+		*max = queue->max;
+	
+	/* Unlock */
+	CHECK_POSIX(  pthread_mutex_unlock( &queue->mtx )  );
+	
+	/* Done */
+	return 0;
+}
+
+/* Get the timings */
+int fd_fifo_getstats( struct fifo * queue, long long *items, struct timespec * total, struct timespec * blocking, struct timespec * last)
+{
+	TRACE_ENTRY( "%p %p %p %p %p", queue, items, total, blocking, last);
 	
 	/* Check the parameters */
@@ -296,15 +319,6 @@
 	CHECK_POSIX(  pthread_mutex_lock( &queue->mtx )  );
 	
-	if (current_count)
-		*current_count = queue->count;
-	
-	if (limit_count)
-		*limit_count = queue->max;
-	
-	if (highest_count)
-		*highest_count = queue->highest_ever;
-	
-	if (total_count)
-		*total_count = queue->total_items;
+	if (items)
+		*items = queue->total_items;
 	
 	if (total)
@@ -326,5 +340,5 @@
 
 /* alternate version with no error checking */
-int fd_fifo_length ( struct fifo * queue )
+int fd_fifo_length_noerr ( struct fifo * queue )
 {
 	if ( !CHECK_FIFO( queue ) )
Index: libfdproto/messages.c
===================================================================
--- libfdproto/messages.c	(revision 1062)
+++ libfdproto/messages.c	(revision 1078)
@@ -129,6 +129,4 @@
 	DiamId_t		 msg_src_id;		/* Diameter Id of the peer this message was received from. This string is malloc'd and must be freed */
 	size_t			 msg_src_id_len;	/* cached length of this string */
-	struct timespec		 msg_ts_rcv;		/* Timestamp when this message was received from the network */
-	struct timespec		 msg_ts_sent;		/* Timestamp when this message was sent to the network */
 	
 };
@@ -734,15 +732,4 @@
 	}
 	
-	if ((msg->msg_ts_rcv.tv_sec != 0) || (msg->msg_ts_rcv.tv_nsec != 0)) {
-		tsoffset += strftime(buftime + tsoffset, sizeof(buftime) - tsoffset, "%D,%T", localtime_r( &msg->msg_ts_rcv.tv_sec , &tm ));
-		tsoffset += snprintf(buftime + tsoffset, sizeof(buftime) - tsoffset, ".%6.6ld", msg->msg_ts_rcv.tv_nsec / 1000);
-		CHECK_FCT( dump_add_str(outstr, offset, outlen, INOBJHDR "Received: %s|", INOBJHDRVAL, buftime) );
-	}
-	if ((msg->msg_ts_sent.tv_sec != 0) || (msg->msg_ts_sent.tv_nsec != 0)) {
-		tsoffset += strftime(buftime + tsoffset, sizeof(buftime) - tsoffset, "%D,%T", localtime_r( &msg->msg_ts_sent.tv_sec , &tm ));
-		tsoffset += snprintf(buftime + tsoffset, sizeof(buftime) - tsoffset, ".%6.6ld", msg->msg_ts_sent.tv_nsec / 1000);
-		CHECK_FCT( dump_add_str(outstr, offset, outlen, INOBJHDR "Sent    : %s|", INOBJHDRVAL, buftime) );
-	}
-	
 	if (!msg->msg_model) {
 		
@@ -998,5 +985,6 @@
 
 /* Dump full message */
-void fd_msg_dump_full ( int level, struct dictionary *dict, const char *prefix, msg_or_avp *obj )
+// TODO: need align with new prototype & behavior
+void fd_msg_dump_full_TODO ( int level, struct dictionary *dict, const char *prefix, msg_or_avp *obj )
 {
 	msg_or_avp * ref = obj;
@@ -1361,52 +1349,4 @@
 	
 	/* done */
-	return 0;
-}
-
-int fd_msg_ts_set_recv( struct msg * msg, struct timespec * ts )
-{
-	TRACE_ENTRY("%p %p", msg, ts);
-	
-	/* Check we received valid parameters */
-	CHECK_PARAMS( CHECK_MSG(msg) );
-	CHECK_PARAMS( ts );
-	
-	memcpy(&msg->msg_ts_rcv, ts, sizeof(struct timespec));
-	return 0;
-}
-
-int fd_msg_ts_get_recv( struct msg * msg, struct timespec * ts )
-{
-	TRACE_ENTRY("%p %p", msg, ts);
-	
-	/* Check we received valid parameters */
-	CHECK_PARAMS( CHECK_MSG(msg) );
-	CHECK_PARAMS( ts );
-	
-	memcpy(ts, &msg->msg_ts_rcv, sizeof(struct timespec));
-	return 0;
-}
-
-int fd_msg_ts_set_sent( struct msg * msg, struct timespec * ts )
-{
-	TRACE_ENTRY("%p %p", msg, ts);
-	
-	/* Check we received valid parameters */
-	CHECK_PARAMS( CHECK_MSG(msg) );
-	CHECK_PARAMS( ts );
-	
-	memcpy(&msg->msg_ts_sent, ts, sizeof(struct timespec));
-	return 0;
-}
-
-int fd_msg_ts_get_sent( struct msg * msg, struct timespec * ts )
-{
-	TRACE_ENTRY("%p %p", msg, ts);
-	
-	/* Check we received valid parameters */
-	CHECK_PARAMS( CHECK_MSG(msg) );
-	CHECK_PARAMS( ts );
-	
-	memcpy(ts, &msg->msg_ts_sent, sizeof(struct timespec));
 	return 0;
 }
@@ -2639,5 +2579,5 @@
 			*action = DISP_ACT_ERROR;
 		} else {
-			fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: Received this answer to a local query with an unsupported application %d", (*msg)->msg_public.msg_appl);
+			//fd_msg_log( FD_MSG_LOG_DROPPED, *msg, "Internal error: Received this answer to a local query with an unsupported application %d", (*msg)->msg_public.msg_appl);
 			fd_msg_free(*msg);
 			*msg = NULL;
Index: bfdproto/msg_log.c
===================================================================
--- libfdproto/msg_log.c	(revision 974)
+++ 	(revision )
@@ -1,206 +1,0 @@
-/*********************************************************************************************************
-* Software License Agreement (BSD License)                                                               *
-* Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
-*													 *
-* Copyright (c) 2013, WIDE Project and NICT								 *
-* All rights reserved.											 *
-* 													 *
-* Redistribution and use of this software in source and binary forms, with or without modification, are  *
-* permitted provided that the following conditions are met:						 *
-* 													 *
-* * Redistributions of source code must retain the above 						 *
-*   copyright notice, this list of conditions and the 							 *
-*   following disclaimer.										 *
-*    													 *
-* * 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.								 *
-* 													 *
-* * Neither the name of the WIDE Project or NICT nor the 						 *
-*   names of its contributors may be used to endorse or 						 *
-*   promote products derived from this software without 						 *
-*   specific prior written permission of WIDE Project and 						 *
-*   NICT.												 *
-* 													 *
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.								 *
-*********************************************************************************************************/
-
-/* messages logging facility */
-#include "fdproto-internal.h"
-#include <stdarg.h>
-
-/* Configuration of this module */
-static struct {
-	struct {
-		enum fd_msg_log_method 	meth;
-		const char * 		metharg;
-	} causes[FD_MSG_LOG_MAX + 1];
-	pthread_mutex_t lock;
-	int		init;
-	struct dictionary *dict;	
-} ml_conf = { .lock = PTHREAD_MUTEX_INITIALIZER, .init = 0 };
-
-
-/* Initialize the module, with a dictionary to use to better parse the messages */
-void fd_msg_log_init(struct dictionary *dict) 
-{
-	memset(&ml_conf.causes, 0, sizeof(ml_conf.causes));
-	ml_conf.init = 1;
-	ml_conf.dict = dict;
-}
-
-/* Set a configuration property */
-int fd_msg_log_config(enum fd_msg_log_cause cause, enum fd_msg_log_method method, const char * arg)
-{
-	/* Check the parameters are valid */
-	TRACE_ENTRY("%d %d %p", cause, method, arg);
-	CHECK_PARAMS( (cause >= 0) && (cause <= FD_MSG_LOG_MAX) );
-	CHECK_PARAMS( (method >= FD_MSG_LOGTO_NONE) && (method <= FD_MSG_LOGTO_DIR) );
-	CHECK_PARAMS( (method == FD_MSG_LOGTO_NONE) || (method == FD_MSG_LOGTO_DEBUGONLY) || (arg != NULL) );
-	
-	/* Lock the configuration */
-	CHECK_POSIX( pthread_mutex_lock(&ml_conf.lock) );
-	if (!ml_conf.init) {
-		ASSERT(0);
-	}
-	
-	/* Now set the parameter */
-	ml_conf.causes[cause].meth = method;
-	ml_conf.causes[cause].metharg = arg;
-	
-	if (method) {
-		TRACE_DEBUG(INFO, "Logging %s messages set to %s '%s'", 
-			(cause == FD_MSG_LOG_DROPPED) ? "DROPPED" :
-				(cause == FD_MSG_LOG_RECEIVED) ? "RECEIVED" :
-					(cause == FD_MSG_LOG_SENT) ? "SENT" :
-					(cause == FD_MSG_LOG_NODELIVER) ? "NODELIVER" :
-					(cause == FD_MSG_LOG_TIMING) ? "TIMING" :
-						"???",
-			(method == FD_MSG_LOGTO_NONE) ? "none" :
-				(method == FD_MSG_LOGTO_DEBUGONLY) ? "debug" :
-				(method == FD_MSG_LOGTO_FILE) ? "file" :
-				(method == FD_MSG_LOGTO_DIR) ? "directory" :
-					"???",
-			arg);
-	}
-	
-	CHECK_POSIX( pthread_mutex_unlock(&ml_conf.lock) );
-	
-	/* Done */
-	return 0;
-}
-
-/* Do not log anything within this one, since log lock is held */
-static void fd_cleanup_mutex_silent( void * mutex )
-{
-	(void)pthread_mutex_unlock((pthread_mutex_t *)mutex);
-}
-
-/* Really log the message */
-void fd_msg_log( enum fd_msg_log_cause cause, struct msg * msg, const char * prefix_format, ... )
-{
-	va_list ap;
-	enum fd_msg_log_method 	meth;
-	const char * 		metharg;
-	FILE * fstr;
-	
-	char buftime[256];
-	size_t offset = 0;
-	struct timespec ts;
-	struct tm tm;
-	
-	TRACE_ENTRY("%d %p %p", cause, msg, prefix_format);
-	CHECK_PARAMS_DO( (cause >= 0) && (cause <= FD_MSG_LOG_MAX),
-	{
-		TRACE_DEBUG(INFO, "Invalid cause received (%d)! Message was:", cause);
-		fd_msg_dump_walk(INFO, msg);
-	} );
-	
-	/* First retrieve the config for this message */
-	CHECK_POSIX_DO( pthread_mutex_lock(&ml_conf.lock), );
-	if (!ml_conf.init) {
-		ASSERT(0);
-	}
-	meth    = ml_conf.causes[cause].meth;
-	metharg = ml_conf.causes[cause].metharg;
-	CHECK_POSIX_DO( pthread_mutex_unlock(&ml_conf.lock), );
-	
-	/* Return now when loging is not requested */
-	if ((meth == FD_MSG_LOGTO_NONE) 
-	 || ((meth == FD_MSG_LOGTO_DEBUGONLY) && (fd_g_debug_lvl < INFO))) {
-		return;
-	}
-	
-	/* Get current time */
-	CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), /* continue */);
-	offset += strftime(buftime + offset, sizeof(buftime) - offset, "%D,%T", localtime_r( &ts.tv_sec , &tm ));
-	offset += snprintf(buftime + offset, sizeof(buftime) - offset, ".%6.6ld", ts.tv_nsec / 1000);
-	
-
-	/* Okay, now we will create the file descriptor */
-	switch (meth) {
-		case FD_MSG_LOGTO_DEBUGONLY:
-			fstr = fd_g_debug_fstr;
-			break;
-			
-		case FD_MSG_LOGTO_FILE:
-			TODO("Log to arg file");
-			TODO("Log a note to debug stream");
-			TRACE_DEBUG(INFO, "%s", metharg);
-			break;
-		case FD_MSG_LOGTO_DIR:
-			TODO("Log to arg directory in a new file");
-			TODO("Log a note to debug stream");
-			break;
-		default:
-			break;
-	}
-	
-	/* For file methods, let's parse the message so it looks better */
-	if (((meth != FD_MSG_LOGTO_DEBUGONLY) || (fd_g_debug_lvl > FULL)) && ml_conf.dict) {
-		CHECK_FCT_DO( fd_msg_parse_dict( msg, ml_conf.dict, NULL ), );
-	}
-	
-	/* Then dump the prefix message to this stream, & to debug stream */
-	(void)pthread_mutex_lock(&fd_log_lock);
-	pthread_cleanup_push(fd_cleanup_mutex_silent, &fd_log_lock);
-	fprintf( fstr, "\n");
-	va_start(ap, prefix_format);
-	vfprintf( fstr, prefix_format, ap);
-	va_end(ap);
-	fflush(fstr);
-	pthread_cleanup_pop(0);
-	(void)pthread_mutex_unlock(&fd_log_lock);
-	
-	fd_log_debug_fstr(fstr, " Logged: %s", buftime);
-	
-	/* And now the message itself */
-	if ((meth == FD_MSG_LOGTO_DEBUGONLY) && (fd_g_debug_lvl <= INFO)) {
-		/* dump only the header */
-		fd_msg_dump_fstr_one(msg, fstr);
-	} else {
-		/* dump the full content */
-		fd_msg_dump_fstr(msg, fstr);
-	}
-	
-	/* And finally close the stream if needed */
-	switch (meth) {
-		case FD_MSG_LOGTO_FILE:
-			TODO("close?");
-			break;
-		case FD_MSG_LOGTO_DIR:
-			TODO("close?");
-			break;
-		default:
-			break;
-	}
-}
-
Index: libfdproto/ostr.c
===================================================================
--- libfdproto/ostr.c	(revision 1070)
+++ libfdproto/ostr.c	(revision 1068)
@@ -188,5 +188,5 @@
 int fd_os_validate_DiameterIdentity(char ** id, size_t * inoutsz, int memory)
 {
-#if !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT)
+#if defined(DIAMID_IDNA_IGNORE) || defined(DIAMID_IDNA_REJECT)
 	int gotsize = 0;
 #endif /* defined(DIAMID_IDNA_IGNORE) || defined(DIAMID_IDNA_REJECT) */
@@ -197,5 +197,5 @@
 	if (!*inoutsz)
 		*inoutsz = strlen(*id);
-#if !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT)
+#if defined(DIAMID_IDNA_IGNORE) || defined(DIAMID_IDNA_REJECT)
 	else
 		gotsize = 1;
Index: tests/CMakeLists.txt
===================================================================
--- tests/CMakeLists.txt	(revision 1076)
+++ tests/CMakeLists.txt	(revision 1031)
@@ -26,5 +26,4 @@
 	testdict
 	testmesg
-	testmesg_stress
 	testsess
 	testdisp
Index: tests/testfifo.c
===================================================================
--- tests/testfifo.c	(revision 1071)
+++ tests/testfifo.c	(revision 1060)
@@ -217,7 +217,6 @@
 	{
 		struct fifo * queue = NULL;
+		int count, max;
 		struct msg * msg  = NULL;
-		int max;
-		long long count;
 		
 		/* Create the queue */
@@ -225,5 +224,7 @@
 		
 		/* Check the count is 0 */
-		CHECK( 0, fd_fifo_length(queue) );
+		CHECK( 0, fd_fifo_length(queue, &count, &max) );
+		CHECK( 0, count);
+		CHECK( 0, max);
 		
 		/* Now enqueue */
@@ -236,10 +237,13 @@
 		
 		/* Check the count is 3 */
-		CHECK( 3, fd_fifo_length(queue) );
+		CHECK( 0, fd_fifo_length(queue, &count, &max) );
+		CHECK( 3, count);
+		CHECK( 0, max);
 		
 		/* Retrieve the first message using fd_fifo_get */
 		CHECK( 0, fd_fifo_get(queue, &msg) );
 		CHECK( msg1, msg);
-		CHECK( 2, fd_fifo_length(queue) );
+		CHECK( 0, fd_fifo_length(queue, &count, NULL) );
+		CHECK( 2, count);
 		
 		/* Retrieve the second message using fd_fifo_timedget */
@@ -248,14 +252,17 @@
 		CHECK( 0, fd_fifo_timedget(queue, &msg, &ts) );
 		CHECK( msg2, msg);
-		CHECK( 1, fd_fifo_length(queue) );
+		CHECK( 0, fd_fifo_length(queue, &count, NULL) );
+		CHECK( 1, count);
 		
 		/* Retrieve the third message using meq_tryget */
 		CHECK( 0, fd_fifo_tryget(queue, &msg) );
 		CHECK( msg3, msg);
-		CHECK( 0, fd_fifo_length(queue) );
+		CHECK( 0, fd_fifo_length(queue, &count, NULL) );
+		CHECK( 0, count);
 		
 		/* Check that another meq_tryget does not block */
 		CHECK( EWOULDBLOCK, fd_fifo_tryget(queue, &msg) );
-		CHECK( 0, fd_fifo_length(queue) );
+		CHECK( 0, fd_fifo_length(queue, &count, NULL) );
+		CHECK( 0, count);
 		
 		/* Check the timedget actually timesout */
@@ -267,16 +274,6 @@
 		}
 		CHECK( ETIMEDOUT, fd_fifo_timedget(queue, &msg, &ts) );
-		CHECK( 0, fd_fifo_length(queue) );
-		
-		/* Post & get another message */
-		msg = msg1;
-		CHECK( 0, fd_fifo_post(queue, &msg) );
-		CHECK( 0, fd_fifo_timedget(queue, &msg, &ts) );
-		CHECK( msg1, msg);		
-		
-		/* Check some statistics */
-		CHECK( 0, fd_fifo_getstats(queue, NULL, NULL, &max, &count, NULL, NULL, NULL) );
-		CHECK( 3, max );
-		CHECK( 4, count );	
+		CHECK( 0, fd_fifo_length(queue, &count, NULL) );
+		CHECK( 0, count);
 		
 		/* We're done for basic tests */
@@ -295,4 +292,5 @@
 		pthread_t  		 thr [NBR_THREADS * 2];
 		struct dict_object	*dwr_model = NULL;
+		int 			 count;
 		int			 i;
 		int			 nbr_threads;
@@ -365,5 +363,6 @@
 		
 		/* Check the count of the queue is back to 0 */
-		CHECK( 0, fd_fifo_length(queue) );
+		CHECK( 0, fd_fifo_length(queue, &count, NULL) );
+		CHECK( 0, count);
 		
 		/* Destroy this queue and the messages */
Index: sts/testmesg_stress.c
===================================================================
--- tests/testmesg_stress.c	(revision 1076)
+++ 	(revision )
@@ -1,482 +1,0 @@
-/*********************************************************************************************************
-* Software License Agreement (BSD License)                                                               *
-* Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
-*													 *
-* Copyright (c) 2013, WIDE Project and NICT								 *
-* All rights reserved.											 *
-* 													 *
-* Redistribution and use of this software in source and binary forms, with or without modification, are  *
-* permitted provided that the following conditions are met:						 *
-* 													 *
-* * Redistributions of source code must retain the above 						 *
-*   copyright notice, this list of conditions and the 							 *
-*   following disclaimer.										 *
-*    													 *
-* * 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.								 *
-* 													 *
-* * Neither the name of the WIDE Project or NICT nor the 						 *
-*   names of its contributors may be used to endorse or 						 *
-*   promote products derived from this software without 						 *
-*   specific prior written permission of WIDE Project and 						 *
-*   NICT.												 *
-* 													 *
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER 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.								 *
-*********************************************************************************************************/
-
-#include "tests.h"
-
-/* The number of times each operation is repeated to measure the average operation time */
-#define NUMBER_OF_SAMPLES	100000
-
-/* Main test routine */
-int main(int argc, char *argv[])
-{
-	struct msg * acr = NULL;
-	struct avp * pi = NULL, *avp1, *avp2;
-	unsigned char * buf = NULL;
-	
-	/* First, initialize the daemon modules */
-	INIT_FD();
-	
-	{
-		struct dict_object * acr_model = NULL;
-
-		/* Now find the ACR dictionary object */
-		CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &acr_model, ENOENT ) );
-
-		/* Create the instance, using the templates */
-		CHECK( 0, fd_msg_new ( acr_model, 0, &acr ) );
-	}
-	
-	/* Now let's create some additional Dictionary objects for the test */
-	{
-		/* The constant values used here are totally arbitrary chosen */
-		struct dict_object * vendor;
-		{
-			struct dict_vendor_data vendor_data = { 73565, "Vendor test" };
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data , NULL, &vendor ) );
-		}
-		
-		{
-			struct dict_application_data app_data = { 73566, "Application test" };
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_APPLICATION, &app_data , vendor, NULL ) );
-		}
-		
-		{
-			struct dict_avp_data avp_data = { 73567, 0, "AVP Test - no vendor - f32", 0, 0, AVP_TYPE_FLOAT32 };
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) );
-		}
-		
-		{
-			struct dict_avp_data avp_data = { 139103, 0, "AVP Test - no vendor - f64", 0, 0, AVP_TYPE_FLOAT64 };
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) );
-		}
-		
-		{ 
-			struct dict_object  * type = NULL;
-			struct dict_type_data type_data = { AVP_TYPE_INTEGER64, "Int64 test" };
-			struct dict_avp_data  avp_data = { 73568, 73565, "AVP Test - i64", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_INTEGER64 };
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) );
-		}
-		
-		{
-			struct dict_object     * type = NULL;
-			struct dict_type_data    type_data = { AVP_TYPE_INTEGER32, "Enum32 test" };
-			struct dict_enumval_data val1 = { "i32 const test (val 1)", { .i32 = 1 } };
-			struct dict_enumval_data val2 = { "i32 const test (val 2)", { .i32 = 2 } };
-			struct dict_enumval_data val3 = { "i32 const test (val -5)",{ .i32 = -5 } };
-			struct dict_avp_data     avp_data = { 73569, 73565, "AVP Test - enumi32", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_INTEGER32 };
-			
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val1 , type, NULL ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val2 , type, NULL ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val3 , type, NULL ) );
-		}
-			
-		{ 
-			struct dict_object  * type = NULL;
-			struct dict_type_data type_data = { AVP_TYPE_OCTETSTRING, "OS test" };
-			struct dict_avp_data  avp_data = { 73570, 73565, "AVP Test - os", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING };
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) );
-		}
-		
-		{
-			struct dict_object     * type = NULL;
-			struct dict_type_data    type_data = { AVP_TYPE_OCTETSTRING, "OS enum test" };
-			struct dict_enumval_data val1 = { "os const test (Test)", { .os = { (unsigned char *)"Test", 4 } } };
-			struct dict_enumval_data val2 = { "os const test (waaad)", { .os = { (unsigned char *)"waaad", 5 } } };
-			struct dict_enumval_data val3 = { "os const test (waa)", { .os = { (unsigned char *)"waaad", 3 } } };
-			struct dict_avp_data     avp_data = { 73571, 73565, "AVP Test - enumos", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING };
-			
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val1 , type, NULL ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val2 , type, NULL ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val3 , type, NULL ) );
-		}
-		
-		{
-			struct dict_object * gavp = NULL;
-			struct dict_avp_data avp_data = { 73572, 73565, "AVP Test - grouped", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_GROUPED };
-			
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, &gavp ) );
-			
-			/* Macro to search AVP and create a rule */		
-			#define ADD_RULE( _parent, _vendor, _avpname, _pos, _min, _max, _ord ) {		\
-				struct dict_object * _avp = NULL;						\
-				struct dict_avp_request _req = { (_vendor), 0, (_avpname) };			\
-				struct dict_rule_data _data;							\
-				CHECK( 0, fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &_req, &_avp, ENOENT));\
-				_data.rule_avp = _avp;								\
-				_data.rule_position = (_pos);							\
-				_data.rule_order = (_ord);							\
-				_data.rule_min = (_min);							\
-				_data.rule_max = (_max);							\
-				CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &_data , (_parent), NULL ) );	\
-			}
-			
-			ADD_RULE(gavp, 73565, "AVP Test - os", RULE_OPTIONAL,   -1, -1,  0);
-			
-		}
-			
-		{
-			struct dict_object  * application = NULL;
-			struct dict_object  * command = NULL;
-			struct dict_cmd_data  cmd_data = { 73573, "Test-Command-Request", CMD_FLAG_REQUEST, CMD_FLAG_REQUEST };
-			
-			CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Application test", &application, ENOENT ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd_data , application, &command ) );
-			ADD_RULE(command, 0,     "AVP Test - no vendor - f32", 	RULE_FIXED_HEAD, -1,  1,  1);
-			ADD_RULE(command, 73565, "AVP Test - i64",		RULE_REQUIRED,   -1, -1,  0);
-			ADD_RULE(command, 73565, "AVP Test - enumi32", 		RULE_OPTIONAL,   -1, -1,  0);
-			ADD_RULE(command, 73565, "AVP Test - os", 		RULE_OPTIONAL,   -1, -1,  0);
-			ADD_RULE(command, 73565, "AVP Test - enumos", 		RULE_OPTIONAL,   -1, -1,  0);
-			ADD_RULE(command, 73565, "AVP Test - grouped", 		RULE_OPTIONAL,   -1, -1,  0);
-		}
-		
-		{
-			struct dict_object  * application = NULL;
-			struct dict_object  * command = NULL;
-			struct dict_cmd_data  cmd_data = { 73573, "Test-Command-Answer", CMD_FLAG_REQUEST, 0 };
-			
-			CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Application test", &application, ENOENT ) );
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd_data , application, &command ) );
-		}
-		
-		{
-			struct dict_object  * gavp = NULL;
-			struct dict_avp_data  avp_data = { 73574, 73565, "AVP Test - rules", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_GROUPED };
-			
-			CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, &gavp ) );
-			
-			ADD_RULE(gavp,     0, "AVP Test - no vendor - f32", RULE_FIXED_HEAD,   0, 1, 1);
-			ADD_RULE(gavp, 73565, "AVP Test - i64", 	    RULE_FIXED_HEAD,  -1, 1, 2);
-			ADD_RULE(gavp, 73565, "AVP Test - enumi32", 	    RULE_FIXED_HEAD,  -1, 1, 3);
-			ADD_RULE(gavp, 73565, "AVP Test - os", 	    	    RULE_REQUIRED,     2, 3, 0);
-			ADD_RULE(gavp, 73565, "AVP Test - enumos",     	    RULE_OPTIONAL,     0, 1, 0);
-			ADD_RULE(gavp, 73565, "AVP Test - grouped",         RULE_FIXED_TAIL,  -1, 1, 1);
-			/* ABNF : 
-				< no vendor - f32 >
-				< i64 >
-				< enumi32 >
-			    2*3 { os }
-			     *1 [ enumos ]
-				< grouped >
-						*/
-			#if 0
-			fd_dict_dump_object ( gavp );
-			#endif
-		}
-		#if 0
-		{
-			fd_dict_dump_object ( vendor );
-		}
-		#endif
-	}
-	
-	/* Now create some values and check the length is correctly handled */
-	{
-		struct dict_object * cmd_model = NULL;
-		struct msg         * msg = NULL;
-		struct dict_object * avp_model = NULL;
-		struct avp         * avp = NULL;
-		union avp_value      value;
-		
-		CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Test-Command-Request", &cmd_model, ENOENT ) );
-		
-		/* Check the sizes are handled properly */
-		{
-			struct avp * avpi = NULL;
-			struct avp * avpch = NULL;
-			struct avp_hdr * avpdata = NULL;
-			struct msg_hdr * msgdata = NULL;
-			#define ADD_AVP( _parent, _position, _avpi, _avpvendor, _avpname) {			\
-				struct dict_object * _avp = NULL;						\
-				struct dict_avp_request _req = { (_avpvendor), 0, (_avpname) };			\
-				CHECK( 0, fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &_req, &_avp, ENOENT));\
-				CHECK( 0, fd_msg_avp_new ( _avp, 0, &_avpi ) );					\
-				CHECK( 0, fd_msg_avp_add ( (_parent), (_position), _avpi ) );			\
-			}
-			/* Create a message with many AVP inside */
-			CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) );
-			CHECK( 0, fd_msg_hdr ( msg, &msgdata ) );
-			
-			/* Avp no vendor, float32 => size = 12 */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0,     "AVP Test - no vendor - f32" );
-			value.f32 = 3.1415;
-			CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) );
-			
-			/* Add a vendor AVP, integer64 => size = 20 */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - i64" );
-			value.i64 = 0x123456789abcdeLL;
-			CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) );
-			
-			/* Add an AVP with an enum value */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" );
-			{
-				struct dict_object * type_model = NULL;
-				struct dict_object * value_model = NULL;
-				struct dict_enumval_request request;
-				
-				CHECK( 0, fd_msg_model ( avpi, &avp_model ) );
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) );
-				memset(&request, 0, sizeof(request));
-				request.type_obj = type_model;
-				request.search.enum_name = "i32 const test (val 2)";
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) );
-				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
-				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
-			}
-			
-			/* Add an AVP with an enum value, negative */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" );
-			{
-				struct dict_object  * type_model = NULL;
-				struct dict_object  * value_model = NULL;
-				struct dict_enumval_request request;
-				
-				CHECK( 0, fd_msg_model ( avpi, &avp_model ) );
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) );
-				memset(&request, 0, sizeof(request));
-				request.type_obj = type_model;
-				request.search.enum_name = "i32 const test (val -5)";
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) );
-				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
-				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
-			}
-			
-			/* Now add a value which is not a constant into an enumerated AVP */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" );
-			value.i32 = -10;
-			CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) );
-			
-			/* Add an octetstring AVP */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - os" );
-			{
-				unsigned char buf[90];
-				memcpy(&buf, "This\0 is a buffer of dat\a. It is not a string so we can have any c\0ntr\0l character here...\0\0", 89);
-				value.os.data = buf;
-				value.os.len = 89;
-				CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) );
-				memset(&buf, 0, sizeof(buf)); /* Test that the OS value is really copied */
-			}
-
-			/* Add an octetstring from an enumerated constant */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumos" );
-			{
-				struct dict_object  * type_model = NULL;
-				struct dict_object  * value_model = NULL;
-				struct dict_enumval_request request;
-				
-				CHECK( 0, fd_msg_model ( avpi, &avp_model ) );
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) );
-				memset(&request, 0, sizeof(request));
-				request.type_obj = type_model;
-				request.search.enum_name = "os const test (waaad)";
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) );
-				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
-				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
-			}
-				
-			/* Add an octetstring from an enumerated constant */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumos" );
-			{
-				struct dict_object  * type_model = NULL;
-				struct dict_object  * value_model = NULL;
-				struct dict_enumval_request request;
-				
-				CHECK( 0, fd_msg_model ( avpi, &avp_model ) );
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) );
-				memset(&request, 0, sizeof(request));
-				request.type_obj = type_model;
-				request.search.enum_name = "os const test (waa)";
-				CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) );
-				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
-				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
-			}
-				
-			/* Now test the grouped AVPs */	
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - grouped" );
-			  ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" );
-			  {
-				value.os.data = (unsigned char *)"12345678";
-				value.os.len = 8;
-				CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) );
-			  }
-			  ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" );
-			  {
-				value.os.data = (unsigned char *)"123456789";
-				value.os.len = 9;
-				CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) );
-			  }
-			
-			/* Add another similar grouped AVP, to have lot of padding */
-			ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - grouped" );
-			  ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" );
-			  {
-				value.os.data = (unsigned char *)"1";
-				value.os.len = 1;
-				CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) );
-			  }
-			  ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" );
-			  {
-				value.os.data = (unsigned char *)"1234567";
-				value.os.len = 7;
-				CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) );
-			  }
-			
-			/* Set the application to the test application: 73566 */
-			msgdata->msg_appl = 73566;
-			
-			/* Set the hop-by-hop ID to a random value: 0x4b44b41d */
-			msgdata->msg_hbhid = 0x4b44b41d;
-			/* Set the end-to-end ID to a random value: 0xe2ee2e1d */
-			msgdata->msg_eteid = 0xe2ee2e1d;
-		}
-		
-		CHECK( 0, fd_msg_bufferize( msg, &buf, NULL ) );
-		
-		/* Now free the message, we keep only the buffer. */
-		CHECK( 0, fd_msg_free( msg ) );
-		
-	}
-	
-	/* We have our "buf" now, length is 344 -- cf. testmesg.c. */
-	
-	/* Test the throughput of the different functions function */
-	{
-		void ** stress_array;
-		int i;
-		struct timespec start, end;
-		
-		unsigned char * buf_cpy = NULL;
-		struct msg * msg;
-		
-		#define CPYBUF() {			\
-			buf_cpy = malloc(344);		\
-			CHECK( buf_cpy ? 1 : 0, 1);	\
-			memcpy(buf_cpy, buf, 344);	\
-		}
-		
-		/* Create the copies of the message buffer */
-		stress_array = calloc(NUMBER_OF_SAMPLES, sizeof(void *));
-		CHECK( stress_array ? 1 : 0, 1);
-		
-		for (i=0; i < NUMBER_OF_SAMPLES; i++) {
-			CPYBUF();
-			stress_array[i] = buf_cpy;
-		}
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) );
-		
-		/* Test the msg_parse_buffer function */
-		for (i=0; i < NUMBER_OF_SAMPLES; i++) {
-			CHECK( 0, fd_msg_parse_buffer( (uint8_t **)&stress_array[i], 344, &msg) );
-			stress_array[i] = msg;
-		}
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) );
-		
-		{
-			long us = (end.tv_sec - start.tv_sec) * 1000000;
-			us += (end.tv_nsec - start.tv_nsec) / 1000;
-			long double thrp = (NUMBER_OF_SAMPLES * (long double)1000000) / us;
-			printf("fd_msg_bufferize  : %d buffers  parsed in %ldus (%.2LFmsg/s)\n", NUMBER_OF_SAMPLES, us, thrp);
-		}
-		
-		
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) );
-		
-		/* Test the fd_msg_parse_dict function */
-		for (i=0; i < NUMBER_OF_SAMPLES; i++) {
-			CHECK( 0, fd_msg_parse_dict( stress_array[i], fd_g_config->cnf_dict, NULL ) );
-		}
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) );
-		
-		{
-			long us = (end.tv_sec - start.tv_sec) * 1000000;
-			us += (end.tv_nsec - start.tv_nsec) / 1000;
-			long double thrp = (NUMBER_OF_SAMPLES * (long double)1000000) / us;
-			printf("fd_msg_parse_dict : %d messages parsed in %ldus (%.2LFmsg/s)\n", NUMBER_OF_SAMPLES, us, thrp);
-		}
-		
-		
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) );
-		
-		/* Test the fd_msg_parse_rules function */
-		for (i=0; i < NUMBER_OF_SAMPLES; i++) {
-			CHECK( 0, fd_msg_parse_rules( stress_array[i], fd_g_config->cnf_dict, NULL ) );
-		}
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) );
-		
-		{
-			long us = (end.tv_sec - start.tv_sec) * 1000000;
-			us += (end.tv_nsec - start.tv_nsec) / 1000;
-			long double thrp = (NUMBER_OF_SAMPLES * (long double)1000000) / us;
-			printf("fd_msg_parse_rules: %d messages parsed in %ldus (%.2LFmsg/s)\n", NUMBER_OF_SAMPLES, us, thrp);
-		}
-		
-		
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) );
-		
-		/* Free those messages */
-		for (i=0; i < NUMBER_OF_SAMPLES; i++) {
-			fd_msg_free( stress_array[i]);
-			stress_array[i] = NULL;
-		}
-		
-		CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) );
-		
-		{
-			long us = (end.tv_sec - start.tv_sec) * 1000000;
-			us += (end.tv_nsec - start.tv_nsec) / 1000;
-			long double thrp = (NUMBER_OF_SAMPLES * (long double)1000000) / us;
-			printf("fd_msg_free       : %d messages freed  in %ldus (%.2LFmsg/s)\n", NUMBER_OF_SAMPLES, us, thrp);
-		}
-		
-		free(stress_array);
-	}
-		
-	
-	/* That's all for the tests yet */
-	PASSTEST();
-} 
-	
Index: tests/tests.h
===================================================================
--- tests/tests.h	(revision 1034)
+++ tests/tests.h	(revision 1078)
@@ -216,7 +216,4 @@
 	CHECK( 0, fd_conf_init() );
 
-	/* Initialize the message logging facility */
-	fd_msg_log_init(fd_g_config->cnf_dict);
-
 	/* Add definitions of the base protocol */
 	CHECK( 0, fd_dict_base_protocol(fd_g_config->cnf_dict) );
