aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
authorDavid Brodski <david@brodski.eu>2011-10-05 08:51:44 +0000
committerDavid Brodski <david@brodski.eu>2011-10-05 08:51:44 +0000
commitf362c6408eaad682a57b8a555057017f38da0daf (patch)
tree429fa46e6ca495a4da4922480e3c0f731d97b843 /src/transport/plugin_transport_wlan.c
parent19f38ae3d42baeb248892a781959803bc3441b74 (diff)
downloadgnunet-f362c6408eaad682a57b8a555057017f38da0daf.tar.gz
gnunet-f362c6408eaad682a57b8a555057017f38da0daf.zip
Error message handling changed
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 2bd2dc9d9..505ca2839 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -65,7 +65,7 @@
65/** 65/**
66 * scaling factor for hello beacon 66 * scaling factor for hello beacon
67 */ 67 */
68#define HALLO_BEACON_SCALING_FACTOR 1 68#define HALLO_BEACON_SCALING_FACTOR 30
69 69
70/** 70/**
71 * max size of fragment queue 71 * max size of fragment queue
@@ -100,9 +100,9 @@
100/** 100/**
101 * DEBUG switch 101 * DEBUG switch
102 */ 102 */
103#define DEBUG_wlan GNUNET_YES 103#define DEBUG_wlan GNUNET_EXTRA_LOGGING
104#define DEBUG_wlan_retransmission GNUNET_EXTRA_LOGGING 104#define DEBUG_wlan_retransmission GNUNET_EXTRA_LOGGING
105#define DEBUG_wlan_ip_udp_packets_on_air GNUNET_EXTRA_LOGGING 105#define DEBUG_wlan_ip_udp_packets_on_air GNUNET_NO
106#define DEBUG_wlan_msg_dump GNUNET_EXTRA_LOGGING 106#define DEBUG_wlan_msg_dump GNUNET_EXTRA_LOGGING
107 107
108 108
@@ -164,7 +164,7 @@ struct ieee80211_frame
164 u_int8_t i_addr3[IEEE80211_ADDR_LEN]; 164 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
165 u_int8_t i_seq[2]; 165 u_int8_t i_seq[2];
166 u_int8_t llc[4]; 166 u_int8_t llc[4];
167#if DEBUG_wlan_ip_udp_packets_on_air 167#if DEBUG_wlan_ip_udp_packets_on_air > 1
168 struct iph ip; 168 struct iph ip;
169 struct udphdr udp; 169 struct udphdr udp;
170#endif 170#endif
@@ -1278,7 +1278,7 @@ getWlanHeader (struct ieee80211_frame *Header,
1278 Header->llc[0] = WLAN_LLC_DSAP_FIELD; 1278 Header->llc[0] = WLAN_LLC_DSAP_FIELD;
1279 Header->llc[1] = WLAN_LLC_SSAP_FIELD; 1279 Header->llc[1] = WLAN_LLC_SSAP_FIELD;
1280 1280
1281#if DEBUG_wlan_ip_udp_packets_on_air 1281#if DEBUG_wlan_ip_udp_packets_on_air > 1
1282 uint crc = 0; 1282 uint crc = 0;
1283 uint16_t *x; 1283 uint16_t *x;
1284 int count; 1284 int count;
@@ -1364,7 +1364,7 @@ add_message_for_send (void *cls, const struct GNUNET_MessageHeader *hdr)
1364 struct GNUNET_MessageHeader *msgheader2; 1364 struct GNUNET_MessageHeader *msgheader2;
1365 uint16_t size; 1365 uint16_t size;
1366 1366
1367#if DEBUG_wlan_retransmission 1367#if DEBUG_wlan_retransmission > 1
1368 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 1368 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
1369 "Adding fragment of message %p to send, session %p, endpoint %p, type %u\n", 1369 "Adding fragment of message %p to send, session %p, endpoint %p, type %u\n",
1370 fm, fm->session, endpoint, hdr->type); 1370 fm, fm->session, endpoint, hdr->type);
@@ -1509,7 +1509,7 @@ add_ack_for_send (void *cls, uint32_t msg_id,
1509 GNUNET_CONTAINER_DLL_insert_tail (plugin->ack_send_queue_head, 1509 GNUNET_CONTAINER_DLL_insert_tail (plugin->ack_send_queue_head,
1510 plugin->ack_send_queue_tail, ack); 1510 plugin->ack_send_queue_tail, ack);
1511 1511
1512#if DEBUG_wlan_retransmission 1512#if DEBUG_wlan_retransmission > 1
1513 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 1513 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
1514 "Adding ack with message id %u to send, AckSendQueue %p, endpoint %p\n", 1514 "Adding ack with message id %u to send, AckSendQueue %p, endpoint %p\n",
1515 msg_id, ack, endpoint); 1515 msg_id, ack, endpoint);
@@ -1909,7 +1909,7 @@ wlan_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
1909 if (session->pending_message_head != NULL) 1909 if (session->pending_message_head != NULL)
1910 { 1910 {
1911 newmsg = session->pending_message_head; 1911 newmsg = session->pending_message_head;
1912 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, 1912 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
1913 "wlan_plugin_send: a pending message is already in the queue for this client\n remaining time to send this message is %u, queued fragment messages for this mac connection %u\n", 1913 "wlan_plugin_send: a pending message is already in the queue for this client\n remaining time to send this message is %u, queued fragment messages for this mac connection %u\n",
1914 GNUNET_TIME_absolute_get_remaining (newmsg-> 1914 GNUNET_TIME_absolute_get_remaining (newmsg->
1915 timeout).rel_value, 1915 timeout).rel_value,
@@ -1949,7 +1949,7 @@ wlan_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
1949 "New message for %p with size (incl wlan header) %u added\n", 1949 "New message for %p with size (incl wlan header) %u added\n",
1950 session, newmsg->message_size); 1950 session, newmsg->message_size);
1951#endif 1951#endif
1952#if DEBUG_wlan_msg_dump 1952#if DEBUG_wlan_msg_dump > 1
1953 hexdump (msgbuf, GNUNET_MIN (msgbuf_size, 256)); 1953 hexdump (msgbuf, GNUNET_MIN (msgbuf_size, 256));
1954#endif 1954#endif
1955 //queue session 1955 //queue session
@@ -2491,7 +2491,7 @@ wlan_data_helper (void *cls, struct Session_light *session_light,
2491 2491
2492 if (ret == GNUNET_OK) 2492 if (ret == GNUNET_OK)
2493 { 2493 {
2494#if DEBUG_wlan_retransmission 2494#if DEBUG_wlan_retransmission > 1
2495 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 2495 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
2496 "Got last ack, finished fragment message %p\n", fm); 2496 "Got last ack, finished fragment message %p\n", fm);
2497#endif 2497#endif
@@ -2504,7 +2504,7 @@ wlan_data_helper (void *cls, struct Session_light *session_light,
2504 } 2504 }
2505 if (ret == GNUNET_NO) 2505 if (ret == GNUNET_NO)
2506 { 2506 {
2507#if DEBUG_wlan_retransmission 2507#if DEBUG_wlan_retransmission > 1
2508 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 2508 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
2509 "Got ack for: %p\n", fm); 2509 "Got ack for: %p\n", fm);
2510#endif 2510#endif
@@ -2519,7 +2519,7 @@ wlan_data_helper (void *cls, struct Session_light *session_light,
2519 fm = fm2; 2519 fm = fm2;
2520 } 2520 }
2521 2521
2522#if DEBUG_wlan_retransmission 2522#if DEBUG_wlan_retransmission > 1
2523 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, 2523 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
2524 "WLAN fragment not in fragment list\n"); 2524 "WLAN fragment not in fragment list\n");
2525#endif 2525#endif
@@ -2779,7 +2779,7 @@ wlan_process_helper (void *cls, void *client,
2779 ntohs (hdr->type), ntohs (hdr->size)); 2779 ntohs (hdr->type), ntohs (hdr->size));
2780 2780
2781#endif 2781#endif
2782#if DEBUG_wlan_msg_dump 2782#if DEBUG_wlan_msg_dump > 1
2783 hexdump (hdr, GNUNET_MIN (ntohs (hdr->size), 256)); 2783 hexdump (hdr, GNUNET_MIN (ntohs (hdr->size), 256));
2784#endif 2784#endif
2785 GNUNET_break (0); 2785 GNUNET_break (0);