struct GNUNET_ATS_Information ats_network;
unsigned int bytes_in_queue;
+ unsigned int bytes_in_sent;
+ unsigned int bytes_in_recv;
+ unsigned int bytes_discarded;
};
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received message from %s\n",
un->sun_path);
+
+ plugin->bytes_in_recv += ntohs(currhdr->size);
+ GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes received",
+ plugin->bytes_in_recv, GNUNET_NO);
+
plugin->env->receive (plugin->env->cls, sender, currhdr,
(const struct GNUNET_ATS_Information *) &ats, 2,
NULL, un->sun_path, strlen (un->sun_path) + 1);
GNUNET_break_op (0);
break;
}
+
unix_demultiplexer (plugin, &sender, currhdr, &un, sizeof (un));
offset += csize;
}
plugin->bytes_in_queue -= msgw->msgsize;
GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes in send queue",
plugin->bytes_in_queue, GNUNET_NO);
+ plugin->bytes_discarded += msgw->msgsize;
+ GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes discarded",
+ plugin->bytes_discarded, GNUNET_NO);
GNUNET_free (msgw->msg);
GNUNET_free (msgw);
plugin->bytes_in_queue -= msgw->msgsize;
GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes in send queue",
plugin->bytes_in_queue, GNUNET_NO);
+ plugin->bytes_in_sent += msgw->msgsize;
+ GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes sent",
+ plugin->bytes_in_sent, GNUNET_NO);
GNUNET_free (msgw->msg);
GNUNET_free (msgw);