diff options
author | David Brodski <david@brodski.eu> | 2011-09-13 06:59:16 +0000 |
---|---|---|
committer | David Brodski <david@brodski.eu> | 2011-09-13 06:59:16 +0000 |
commit | 0e5be9c9ffb67542bd41257a7a2fe2384f448106 (patch) | |
tree | 8fe49efb4976db3374b7ee5eecae121125671673 /src/transport/plugin_transport_wlan.c | |
parent | 05680649d9fe7b4a6fc54031cada1aeca0e55db1 (diff) | |
download | gnunet-0e5be9c9ffb67542bd41257a7a2fe2384f448106.tar.gz gnunet-0e5be9c9ffb67542bd41257a7a2fe2384f448106.zip |
Big cleanup, less source files
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index d3bd1ef82..f75e507a4 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * @author David Brodski | 24 | * @author David Brodski |
25 | */ | 25 | */ |
26 | 26 | ||
27 | //TODO split rx and tx structures for better handling | ||
28 | |||
27 | #include "platform.h" | 29 | #include "platform.h" |
28 | #include "gnunet_hello_lib.h" | 30 | #include "gnunet_hello_lib.h" |
29 | #include "gnunet_protocols.h" | 31 | #include "gnunet_protocols.h" |
@@ -91,7 +93,7 @@ | |||
91 | /** | 93 | /** |
92 | * DEBUG switch | 94 | * DEBUG switch |
93 | */ | 95 | */ |
94 | #define DEBUG_wlan GNUNET_NO | 96 | #define DEBUG_wlan GNUNET_YES |
95 | #define DEBUG_wlan_retransmission GNUNET_NO | 97 | #define DEBUG_wlan_retransmission GNUNET_NO |
96 | #define DEBUG_wlan_ip_udp_packets_on_air GNUNET_NO | 98 | #define DEBUG_wlan_ip_udp_packets_on_air GNUNET_NO |
97 | 99 | ||
@@ -756,7 +758,7 @@ get_macendpoint (struct Plugin *plugin, const struct MacAddress *addr, | |||
756 | } | 758 | } |
757 | 759 | ||
758 | /** | 760 | /** |
759 | * search for a session with the addr and peer id | 761 | * search for a session with the address and peer id |
760 | * | 762 | * |
761 | * @param plugin pointer to the plugin struct | 763 | * @param plugin pointer to the plugin struct |
762 | * @param addr pointer to the mac address of the peer | 764 | * @param addr pointer to the mac address of the peer |
@@ -2281,8 +2283,9 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
2281 | * Function used for to process the data received from the wlan interface | 2283 | * Function used for to process the data received from the wlan interface |
2282 | * | 2284 | * |
2283 | * @param cls the plugin handle | 2285 | * @param cls the plugin handle |
2284 | * @param session_light FIXME: document | 2286 | * @param session_light pointer to the struct holding known informations |
2285 | * @param hdr hdr of the GNUNET_MessageHeader | 2287 | * @param hdr hdr of the GNUNET_MessageHeader |
2288 | * @param rxinfo pointer to the radiotap informations got with this packet | ||
2286 | */ | 2289 | */ |
2287 | static void | 2290 | static void |
2288 | wlan_data_helper (void *cls, struct Session_light *session_light, | 2291 | wlan_data_helper (void *cls, struct Session_light *session_light, |
@@ -2448,7 +2451,11 @@ wlan_data_helper (void *cls, struct Session_light *session_light, | |||
2448 | 2451 | ||
2449 | } | 2452 | } |
2450 | 2453 | ||
2451 | //TODO DOXIGEN | 2454 | /** |
2455 | * Function to print mac addresses nice * | ||
2456 | * @param pointer to 6 byte with the mac address | ||
2457 | * @return pointer to the chars which hold the print out | ||
2458 | */ | ||
2452 | const char * | 2459 | const char * |
2453 | macprinter (const u_int8_t * mac) | 2460 | macprinter (const u_int8_t * mac) |
2454 | { | 2461 | { |
@@ -2652,6 +2659,12 @@ wlan_process_helper (void *cls, void *client, | |||
2652 | sizeof (struct MacAddress)); | 2659 | sizeof (struct MacAddress)); |
2653 | break; | 2660 | break; |
2654 | default: | 2661 | default: |
2662 | #if DEBUG_wlan | ||
2663 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, | ||
2664 | "Func wlan_process_helper got unknown message with number %u, size %u\n", | ||
2665 | ntohs (hdr->type), | ||
2666 | ntohs (hdr->size)); | ||
2667 | #endif | ||
2655 | GNUNET_break (0); | 2668 | GNUNET_break (0); |
2656 | return; | 2669 | return; |
2657 | } | 2670 | } |