aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-09-26 13:51:11 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-09-26 13:51:11 +0000
commit9b42f770681e66f682a6514b1fb75023d49d10dd (patch)
treef409f0b025d4214789e54410d67fb277de37911e /src/transport/plugin_transport_wlan.c
parentbb64dc55f0a281d1e95965cf27cb72a9897daf9e (diff)
downloadgnunet-9b42f770681e66f682a6514b1fb75023d49d10dd.tar.gz
gnunet-9b42f770681e66f682a6514b1fb75023d49d10dd.zip
WLAN stats
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index eb9732ac3..4ff1b67bf 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -706,6 +706,7 @@ fragment_transmission_done (void *cls,
706{ 706{
707 struct FragmentMessage *fm = cls; 707 struct FragmentMessage *fm = cls;
708 708
709
709 fm->sh = NULL; 710 fm->sh = NULL;
710 GNUNET_FRAGMENT_context_transmission_done (fm->fragcontext); 711 GNUNET_FRAGMENT_context_transmission_done (fm->fragcontext);
711} 712}
@@ -749,6 +750,12 @@ transmit_fragment (void *cls,
749 1, GNUNET_NO); 750 1, GNUNET_NO);
750 else 751 else
751 GNUNET_FRAGMENT_context_transmission_done (fm->fragcontext); 752 GNUNET_FRAGMENT_context_transmission_done (fm->fragcontext);
753 GNUNET_STATISTICS_update (endpoint->plugin->env->stats,
754 "# bytes currently in WLAN buffers",
755 -msize, GNUNET_NO);
756 GNUNET_STATISTICS_update (endpoint->plugin->env->stats,
757 "# bytes transmitted via WLAN",
758 msize, GNUNET_NO);
752 } 759 }
753} 760}
754 761
@@ -1063,6 +1070,11 @@ wlan_plugin_send (void *cls,
1063 wlanheader->target = session->target; 1070 wlanheader->target = session->target;
1064 wlanheader->crc = htonl (GNUNET_CRYPTO_crc32_n (msgbuf, msgbuf_size)); 1071 wlanheader->crc = htonl (GNUNET_CRYPTO_crc32_n (msgbuf, msgbuf_size));
1065 memcpy (&wlanheader[1], msgbuf, msgbuf_size); 1072 memcpy (&wlanheader[1], msgbuf, msgbuf_size);
1073
1074 GNUNET_STATISTICS_update (plugin->env->stats,
1075 "# bytes currently in WLAN buffers",
1076 msgbuf_size, GNUNET_NO);
1077
1066 send_with_fragmentation (session->mac, 1078 send_with_fragmentation (session->mac,
1067 to, 1079 to,
1068 &session->target, 1080 &session->target,
@@ -1099,6 +1111,11 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1099 ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE); 1111 ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
1100 ats[1].value = htonl (GNUNET_ATS_NET_WLAN); 1112 ats[1].value = htonl (GNUNET_ATS_NET_WLAN);
1101 msize = ntohs (hdr->size); 1113 msize = ntohs (hdr->size);
1114
1115 GNUNET_STATISTICS_update (plugin->env->stats,
1116 "# bytes received via WLAN",
1117 msize, GNUNET_NO);
1118
1102 switch (ntohs (hdr->type)) 1119 switch (ntohs (hdr->type))
1103 { 1120 {
1104 case GNUNET_MESSAGE_TYPE_HELLO: 1121 case GNUNET_MESSAGE_TYPE_HELLO: