aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
authorDavid Brodski <david@brodski.eu>2011-11-02 14:44:28 +0000
committerDavid Brodski <david@brodski.eu>2011-11-02 14:44:28 +0000
commit8fb836dfc5e3ee835412207f6ee19a5455e06091 (patch)
treeb44dd12283d6b7e3a71e95310ce8a0e71a33d8d7 /src/transport/plugin_transport_wlan.c
parent5d4dd95a17d90d532b52e1060dd259f80a333931 (diff)
downloadgnunet-8fb836dfc5e3ee835412207f6ee19a5455e06091.tar.gz
gnunet-8fb836dfc5e3ee835412207f6ee19a5455e06091.zip
Documantation and small fixes.
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index de735b971..2763b5082 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Christian Grothoff (and other contributing authors) 3 (C) 2010 2011 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -1234,6 +1234,7 @@ free_fragment_message (struct Plugin *plugin, struct FragmentMessage *fm)
1234 (session->mac->fragment_messages_out_count)--; 1234 (session->mac->fragment_messages_out_count)--;
1235 session->fragment_messages_out_count--; 1235 session->fragment_messages_out_count--;
1236 plugin->pending_Fragment_Messages--; 1236 plugin->pending_Fragment_Messages--;
1237 GNUNET_STATISTICS_set(plugin->env->stats, _("# wlan pending fragments"), plugin->pending_Fragment_Messages, GNUNET_NO);
1237 GNUNET_CONTAINER_DLL_remove (endpoint->sending_messages_head, 1238 GNUNET_CONTAINER_DLL_remove (endpoint->sending_messages_head,
1238 endpoint->sending_messages_tail, fm); 1239 endpoint->sending_messages_tail, fm);
1239 GNUNET_FRAGMENT_context_destroy (fm->fragcontext); 1240 GNUNET_FRAGMENT_context_destroy (fm->fragcontext);
@@ -1396,7 +1397,7 @@ add_message_for_send (void *cls, const struct GNUNET_MessageHeader *hdr)
1396 uint16_t size; 1397 uint16_t size;
1397 1398
1398#if DEBUG_wlan_retransmission > 1 1399#if DEBUG_wlan_retransmission > 1
1399 GNUNET_loHELLO_BEACON_SCALING_FACTORg_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 1400 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
1400 "Adding fragment of message %p to send, session %p, endpoint %p, type %u\n", 1401 "Adding fragment of message %p to send, session %p, endpoint %p, type %u\n",
1401 fm, fm->session, endpoint, hdr->type); 1402 fm, fm->session, endpoint, hdr->type);
1402#endif 1403#endif
@@ -1933,6 +1934,7 @@ check_fragment_queue (struct Plugin *plugin)
1933 session->mac->fragment_messages_out_count++; 1934 session->mac->fragment_messages_out_count++;
1934 session->fragment_messages_out_count++; 1935 session->fragment_messages_out_count++;
1935 plugin->pending_Fragment_Messages++; 1936 plugin->pending_Fragment_Messages++;
1937 GNUNET_STATISTICS_set(plugin->env->stats, _("# wlan pending fragments"), plugin->pending_Fragment_Messages, GNUNET_NO);
1936 1938
1937 fm = GNUNET_malloc (sizeof (struct FragmentMessage)); 1939 fm = GNUNET_malloc (sizeof (struct FragmentMessage));
1938 fm->session = session; 1940 fm->session = session;
@@ -2704,7 +2706,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
2704 * @param cls the plugin handle 2706 * @param cls the plugin handle
2705 * @param session_light pointer to the struct holding known informations 2707 * @param session_light pointer to the struct holding known informations
2706 * @param hdr hdr of the GNUNET_MessageHeader 2708 * @param hdr hdr of the GNUNET_MessageHeader
2707 * @param rxinfo pointer to the radiotap informations got with this packet 2709 * @param rxinfo pointer to the radiotap informations got with this packet FIXME: give ATS for info
2708 */ 2710 */
2709static void 2711static void
2710wlan_data_helper (void *cls, struct Session_light *session_light, 2712wlan_data_helper (void *cls, struct Session_light *session_light,
@@ -3059,7 +3061,7 @@ wlan_process_helper (void *cls, void *client,
3059 memcpy (&session_light->addr, &(wlanIeeeHeader->i_addr2), 3061 memcpy (&session_light->addr, &(wlanIeeeHeader->i_addr2),
3060 sizeof (struct MacAddress)); 3062 sizeof (struct MacAddress));
3061 //session_light->session = search_session(plugin,session_light->addr); 3063 //session_light->session = search_session(plugin,session_light->addr);
3062 GNUNET_STATISTICS_update (plugin->env->stats, _("# wlan messaged for this client received"), 1, GNUNET_NO); 3064 GNUNET_STATISTICS_update (plugin->env->stats, _("# wlan messages for this client received"), 1, GNUNET_NO);
3063 3065
3064 pos = 0; 3066 pos = 0;
3065 while (pos < datasize) 3067 while (pos < datasize)
@@ -3067,7 +3069,7 @@ wlan_process_helper (void *cls, void *client,
3067 temp_hdr = (struct GNUNET_MessageHeader *) &wlanIeeeHeader[1] + pos; 3069 temp_hdr = (struct GNUNET_MessageHeader *) &wlanIeeeHeader[1] + pos;
3068 if (ntohs(temp_hdr->size) <= datasize + pos) 3070 if (ntohs(temp_hdr->size) <= datasize + pos)
3069 { 3071 {
3070 GNUNET_STATISTICS_update (plugin->env->stats, _("# wlan messaged inside WLAN_HELPER_DATA received"), 1, GNUNET_NO); 3072 GNUNET_STATISTICS_update (plugin->env->stats, _("# wlan messages inside WLAN_HELPER_DATA received"), 1, GNUNET_NO);
3071 wlan_data_helper (plugin, session_light, temp_hdr, rxinfo); 3073 wlan_data_helper (plugin, session_light, temp_hdr, rxinfo);
3072 } 3074 }
3073 else 3075 else