aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-mesh.c2
-rw-r--r--src/mesh/gnunet-service-mesh-enc.c34
-rw-r--r--src/mesh/gnunet-service-mesh.c94
-rw-r--r--src/mesh/gnunet-service-mesh_channel.c14
-rw-r--r--src/mesh/gnunet-service-mesh_channel.h2
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c22
-rw-r--r--src/mesh/gnunet-service-mesh_connection.h2
-rw-r--r--src/mesh/gnunet-service-mesh_local.c12
-rw-r--r--src/mesh/gnunet-service-mesh_local.h4
-rw-r--r--src/mesh/gnunet-service-mesh_peer.c50
-rw-r--r--src/mesh/mesh.h8
-rw-r--r--src/mesh/mesh_api.c34
-rw-r--r--src/mesh/mesh_api_enc.c26
-rw-r--r--src/mesh/mesh_enc.h4
-rw-r--r--src/mesh/mesh_protocol.h4
-rw-r--r--src/mesh/mesh_protocol_enc.h2
-rw-r--r--src/mesh/mesh_test_lib.c14
-rw-r--r--src/mesh/mesh_test_lib.h2
-rw-r--r--src/mesh/mesh_tunnel_tree.c2
-rw-r--r--src/mesh/test_mesh_local.c12
-rw-r--r--src/mesh/test_mesh_single.c12
-rw-r--r--src/mesh/test_mesh_small.c20
22 files changed, 188 insertions, 188 deletions
diff --git a/src/mesh/gnunet-mesh.c b/src/mesh/gnunet-mesh.c
index aaa099774..440dc272d 100644
--- a/src/mesh/gnunet-mesh.c
+++ b/src/mesh/gnunet-mesh.c
@@ -95,7 +95,7 @@ tunnels_callback (void *cls,
95 * @param cls Closure. 95 * @param cls Closure.
96 * @param peer Peer in the tunnel's tree. 96 * @param peer Peer in the tunnel's tree.
97 * @param parent Parent of the current peer. All 0 when peer is root. 97 * @param parent Parent of the current peer. All 0 when peer is root.
98 * 98 *
99 */ 99 */
100static void 100static void
101tunnel_callback (void *cls, 101tunnel_callback (void *cls,
diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c
index 18b6460b7..be72963c3 100644
--- a/src/mesh/gnunet-service-mesh-enc.c
+++ b/src/mesh/gnunet-service-mesh-enc.c
@@ -33,7 +33,7 @@
33 * - relay corking down to core 33 * - relay corking down to core
34 * - set ttl relative to path length 34 * - set ttl relative to path length
35 * TODO END 35 * TODO END
36 * 36 *
37 * Dictionary: 37 * Dictionary:
38 * - peer: other mesh instance. If there is direct connection it's a neighbor. 38 * - peer: other mesh instance. If there is direct connection it's a neighbor.
39 * - tunnel: encrypted connection to a peer, neighbor or not. 39 * - tunnel: encrypted connection to a peer, neighbor or not.
@@ -409,7 +409,7 @@ tunnel_notify_connection_broken (struct MeshTunnel2 *t,
409 * @brief Use the given path for the tunnel. 409 * @brief Use the given path for the tunnel.
410 * Update the next and prev hops (and RCs). 410 * Update the next and prev hops (and RCs).
411 * (Re)start the path refresh in case the tunnel is locally owned. 411 * (Re)start the path refresh in case the tunnel is locally owned.
412 * 412 *
413 * @param t Tunnel to update. 413 * @param t Tunnel to update.
414 * @param p Path to use. 414 * @param p Path to use.
415 * 415 *
@@ -420,10 +420,10 @@ tunnel_use_path (struct MeshTunnel2 *t, struct MeshPeerPath *p);
420 420
421/** 421/**
422 * Tunnel is empty: destroy it. 422 * Tunnel is empty: destroy it.
423 * 423 *
424 * Notifies all participants (peers, cleints) about the destruction. 424 * Notifies all participants (peers, cleints) about the destruction.
425 * 425 *
426 * @param t Tunnel to destroy. 426 * @param t Tunnel to destroy.
427 */ 427 */
428static void 428static void
429tunnel_destroy_empty (struct MeshTunnel2 *t); 429tunnel_destroy_empty (struct MeshTunnel2 *t);
@@ -469,7 +469,7 @@ __mesh_divider______________________________________________________________();
469 * 469 *
470 * @param s Tunnel state. 470 * @param s Tunnel state.
471 * 471 *
472 * @return String representation. 472 * @return String representation.
473 */ 473 */
474static const char * 474static const char *
475GNUNET_MESH_DEBUG_TS2S (enum MeshTunnelState s) 475GNUNET_MESH_DEBUG_TS2S (enum MeshTunnelState s)
@@ -640,7 +640,7 @@ tunnel_get_buffer (struct MeshTunnel2 *t, int fwd)
640 640
641 641
642/** 642/**
643 * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME 643 * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
644 * Encrypt data with the tunnel key. 644 * Encrypt data with the tunnel key.
645 * 645 *
646 * @param t Tunnel whose key to use. 646 * @param t Tunnel whose key to use.
@@ -660,7 +660,7 @@ tunnel_encrypt (struct MeshTunnel2 *t,
660 660
661 661
662/** 662/**
663 * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME 663 * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
664 * Decrypt data with the tunnel key. 664 * Decrypt data with the tunnel key.
665 * 665 *
666 * @param t Tunnel whose key to use. 666 * @param t Tunnel whose key to use.
@@ -763,7 +763,7 @@ send_connection_create (struct MeshConnection *connection)
763 * @param fwd Is this a fwd ACK? (First is bck (SYNACK), second is fwd (ACK)) 763 * @param fwd Is this a fwd ACK? (First is bck (SYNACK), second is fwd (ACK))
764 */ 764 */
765static void 765static void
766send_connection_ack (struct MeshConnection *connection, int fwd) 766send_connection_ack (struct MeshConnection *connection, int fwd)
767{ 767{
768 struct MeshTunnel2 *t; 768 struct MeshTunnel2 *t;
769 769
@@ -938,7 +938,7 @@ connection_debug (struct MeshConnection *c)
938 } 938 }
939 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connection %s:%X\n", 939 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connection %s:%X\n",
940 peer2s (c->t->peer), GNUNET_h2s (&c->id)); 940 peer2s (c->t->peer), GNUNET_h2s (&c->id));
941 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " state: %u, pending msgs: %u\n", 941 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " state: %u, pending msgs: %u\n",
942 c->state, c->pending_messages); 942 c->state, c->pending_messages);
943 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " FWD FC\n"); 943 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " FWD FC\n");
944 fc_debug (&c->fwd_fc); 944 fc_debug (&c->fwd_fc);
@@ -1099,8 +1099,8 @@ tunnel_use_path (struct MeshTunnel2 *t, struct MeshPeerPath *p)
1099 * some of its peers. Sends a notification towards the root of the tree. 1099 * some of its peers. Sends a notification towards the root of the tree.
1100 * In case the peer is the owner of the tree, notifies the client that owns 1100 * In case the peer is the owner of the tree, notifies the client that owns
1101 * the tunnel and tries to reconnect. 1101 * the tunnel and tries to reconnect.
1102 * 1102 *
1103 * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME 1103 * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
1104 * 1104 *
1105 * @param t Tunnel affected. 1105 * @param t Tunnel affected.
1106 * @param p1 Peer that got disconnected from p2. 1106 * @param p1 Peer that got disconnected from p2.
@@ -1117,13 +1117,13 @@ tunnel_notify_connection_broken (struct MeshTunnel2* t,
1117// { 1117// {
1118// return; 1118// return;
1119// } 1119// }
1120// 1120//
1121// if (tree_get_predecessor (t->tree) != 0) 1121// if (tree_get_predecessor (t->tree) != 0)
1122// { 1122// {
1123// /* We are the peer still connected, notify owner of the disconnection. */ 1123// /* We are the peer still connected, notify owner of the disconnection. */
1124// struct GNUNET_MESH_PathBroken msg; 1124// struct GNUNET_MESH_PathBroken msg;
1125// struct GNUNET_PeerIdentity neighbor; 1125// struct GNUNET_PeerIdentity neighbor;
1126// 1126//
1127// msg.header.size = htons (sizeof (msg)); 1127// msg.header.size = htons (sizeof (msg));
1128// msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN); 1128// msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN);
1129// GNUNET_PEER_resolve (t->id.oid, &msg.oid); 1129// GNUNET_PEER_resolve (t->id.oid, &msg.oid);
@@ -1184,7 +1184,7 @@ send_ack (struct MeshConnection *c, struct MeshChannel *ch, int fwd)
1184 GNUNET_assert (NULL != ch); 1184 GNUNET_assert (NULL != ch);
1185 channel_send_connections_ack (ch, buffer, fwd); 1185 channel_send_connections_ack (ch, buffer, fwd);
1186 } 1186 }
1187 else 1187 else
1188 { 1188 {
1189 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " sending on connection\n"); 1189 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " sending on connection\n");
1190 connection_send_ack (c, buffer, fwd); 1190 connection_send_ack (c, buffer, fwd);
@@ -1358,7 +1358,7 @@ tunnel_destroy (struct MeshTunnel2 *t)
1358 * 1358 *
1359 * Notifies all connections about the destruction. 1359 * Notifies all connections about the destruction.
1360 * 1360 *
1361 * @param t Tunnel to destroy. 1361 * @param t Tunnel to destroy.
1362 */ 1362 */
1363static void 1363static void
1364tunnel_destroy_empty (struct MeshTunnel2 *t) 1364tunnel_destroy_empty (struct MeshTunnel2 *t)
@@ -1910,7 +1910,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1910 pk = GNUNET_CRYPTO_ecc_key_create_from_configuration (c); 1910 pk = GNUNET_CRYPTO_ecc_key_create_from_configuration (c);
1911 GNUNET_assert (NULL != pk); 1911 GNUNET_assert (NULL != pk);
1912 my_private_key = pk; 1912 my_private_key = pk;
1913 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, 1913 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key,
1914 &my_full_id.public_key); 1914 &my_full_id.public_key);
1915 myid = GNUNET_PEER_intern (&my_full_id); 1915 myid = GNUNET_PEER_intern (&my_full_id);
1916 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1916 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 422e5af1f..afa64f1fd 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -511,7 +511,7 @@ struct MeshTunnel
511 511
512/** 512/**
513 * Struct containing information about a client of the service 513 * Struct containing information about a client of the service
514 * 514 *
515 * TODO: add a list of 'waiting' ports 515 * TODO: add a list of 'waiting' ports
516 */ 516 */
517struct MeshClient 517struct MeshClient
@@ -626,7 +626,7 @@ static unsigned long long dht_replication_level;
626static unsigned long long max_tunnels; 626static unsigned long long max_tunnels;
627 627
628/** 628/**
629 * How many messages *in total* are we willing to queue, divided by number of 629 * How many messages *in total* are we willing to queue, divided by number of
630 * tunnels to get tunnel queue size. 630 * tunnels to get tunnel queue size.
631 */ 631 */
632static unsigned long long max_msgs_queue; 632static unsigned long long max_msgs_queue;
@@ -879,7 +879,7 @@ tunnel_bck_keepalive (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
879 * @brief Use the given path for the tunnel. 879 * @brief Use the given path for the tunnel.
880 * Update the next and prev hops (and RCs). 880 * Update the next and prev hops (and RCs).
881 * (Re)start the path refresh in case the tunnel is locally owned. 881 * (Re)start the path refresh in case the tunnel is locally owned.
882 * 882 *
883 * @param t Tunnel to update. 883 * @param t Tunnel to update.
884 * @param p Path to use. 884 * @param p Path to use.
885 */ 885 */
@@ -888,10 +888,10 @@ tunnel_use_path (struct MeshTunnel *t, struct MeshPeerPath *p);
888 888
889/** 889/**
890 * Tunnel is empty: destroy it. 890 * Tunnel is empty: destroy it.
891 * 891 *
892 * Notifies all participants (peers, cleints) about the destruction. 892 * Notifies all participants (peers, cleints) about the destruction.
893 * 893 *
894 * @param t Tunnel to destroy. 894 * @param t Tunnel to destroy.
895 */ 895 */
896static void 896static void
897tunnel_destroy_empty (struct MeshTunnel *t); 897tunnel_destroy_empty (struct MeshTunnel *t);
@@ -915,12 +915,12 @@ tunnel_destroy (struct MeshTunnel *t);
915 915
916/** 916/**
917 * @brief Queue and pass message to core when possible. 917 * @brief Queue and pass message to core when possible.
918 * 918 *
919 * If type is payload (UNICAST, TO_ORIGIN, MULTICAST) checks for queue status 919 * If type is payload (UNICAST, TO_ORIGIN, MULTICAST) checks for queue status
920 * and accounts for it. In case the queue is full, the message is dropped and 920 * and accounts for it. In case the queue is full, the message is dropped and
921 * a break issued. 921 * a break issued.
922 * 922 *
923 * Otherwise, message is treated as internal and allowed to go regardless of 923 * Otherwise, message is treated as internal and allowed to go regardless of
924 * queue status. 924 * queue status.
925 * 925 *
926 * @param cls Closure (@c type dependant). It will be used by queue_send to 926 * @param cls Closure (@c type dependant). It will be used by queue_send to
@@ -1169,7 +1169,7 @@ send_local_tunnel_destroy (struct MeshTunnel *t, int fwd)
1169 1169
1170/** 1170/**
1171 * Build a local ACK message and send it to a local client. 1171 * Build a local ACK message and send it to a local client.
1172 * 1172 *
1173 * @param t Tunnel on which to send the ACK. 1173 * @param t Tunnel on which to send the ACK.
1174 * @param c Client to whom send the ACK. 1174 * @param c Client to whom send the ACK.
1175 * @param is_fwd Set to GNUNET_YES for FWD ACK (dest->owner) 1175 * @param is_fwd Set to GNUNET_YES for FWD ACK (dest->owner)
@@ -1310,7 +1310,7 @@ send_path_create (struct MeshTunnel *t)
1310 * @param t Tunnel which to confirm. 1310 * @param t Tunnel which to confirm.
1311 */ 1311 */
1312static void 1312static void
1313send_path_ack (struct MeshTunnel *t) 1313send_path_ack (struct MeshTunnel *t)
1314{ 1314{
1315 struct MeshPeer *neighbor; 1315 struct MeshPeer *neighbor;
1316 1316
@@ -1327,7 +1327,7 @@ send_path_ack (struct MeshTunnel *t)
1327 1327
1328/** 1328/**
1329 * Build an ACK message and queue it to send to the given peer. 1329 * Build an ACK message and queue it to send to the given peer.
1330 * 1330 *
1331 * @param t Tunnel on which to send the ACK. 1331 * @param t Tunnel on which to send the ACK.
1332 * @param peer Peer to whom send the ACK. 1332 * @param peer Peer to whom send the ACK.
1333 * @param ack Value of the ACK. 1333 * @param ack Value of the ACK.
@@ -1536,7 +1536,7 @@ peer_get_short (const GNUNET_PEER_Id peer)
1536 * 1536 *
1537 * @param pi Peer we want to poll. 1537 * @param pi Peer we want to poll.
1538 * @param t Tunnel about which we want to poll. 1538 * @param t Tunnel about which we want to poll.
1539 * 1539 *
1540 * @return PID to use, either last sent or first_in_queue - 1 1540 * @return PID to use, either last sent or first_in_queue - 1
1541 */ 1541 */
1542static uint32_t 1542static uint32_t
@@ -1571,7 +1571,7 @@ peer_get_first_payload_pid (struct MeshPeer *p, struct MeshTunnel *t)
1571 1571
1572/** 1572/**
1573 * Choose the best path towards a peer considering the tunnel properties. 1573 * Choose the best path towards a peer considering the tunnel properties.
1574 * 1574 *
1575 * @param peer The destination peer. 1575 * @param peer The destination peer.
1576 * @param t The tunnel the path is for. 1576 * @param t The tunnel the path is for.
1577 * 1577 *
@@ -1626,7 +1626,7 @@ peer_connect (struct MeshPeer *peer, struct MeshTunnel *t)
1626 1626
1627 GNUNET_PEER_resolve (peer->id, &id); 1627 GNUNET_PEER_resolve (peer->id, &id);
1628 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1628 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1629 "Starting DHT GET for peer %s\n", 1629 "Starting DHT GET for peer %s\n",
1630 GNUNET_i2s (&id)); 1630 GNUNET_i2s (&id));
1631 GNUNET_CRYPTO_hash (&id, sizeof (my_full_id), &phash); 1631 GNUNET_CRYPTO_hash (&id, sizeof (my_full_id), &phash);
1632 peer->dhtget = GNUNET_DHT_get_start (dht_handle, /* handle */ 1632 peer->dhtget = GNUNET_DHT_get_start (dht_handle, /* handle */
@@ -1947,7 +1947,7 @@ peer_add_path_to_origin (struct MeshPeer *peer_info,
1947/** 1947/**
1948 * Add a tunnel to the list of tunnels a peer participates in. 1948 * Add a tunnel to the list of tunnels a peer participates in.
1949 * Update the tunnel's destination. 1949 * Update the tunnel's destination.
1950 * 1950 *
1951 * @param p Peer to add to. 1951 * @param p Peer to add to.
1952 * @param t Tunnel to add. 1952 * @param t Tunnel to add.
1953 */ 1953 */
@@ -1968,7 +1968,7 @@ peer_add_tunnel (struct MeshPeer *p, struct MeshTunnel *t)
1968/** 1968/**
1969 * Remove a tunnel from the list of tunnels a peer participates in. 1969 * Remove a tunnel from the list of tunnels a peer participates in.
1970 * Free the tunnel's destination. 1970 * Free the tunnel's destination.
1971 * 1971 *
1972 * @param p Peer to clean. 1972 * @param p Peer to clean.
1973 * @param t Tunnel to remove. 1973 * @param t Tunnel to remove.
1974 */ 1974 */
@@ -2034,7 +2034,7 @@ tunnel_poll (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
2034 GNUNET_break (0); 2034 GNUNET_break (0);
2035 return; 2035 return;
2036 } 2036 }
2037 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** peer: %s!\n", 2037 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** peer: %s!\n",
2038 GNUNET_i2s(GNUNET_PEER_resolve2 (peer))); 2038 GNUNET_i2s(GNUNET_PEER_resolve2 (peer)));
2039 if (0 == peer) 2039 if (0 == peer)
2040 { 2040 {
@@ -2274,7 +2274,7 @@ tunnel_change_state (struct MeshTunnel *t, enum MeshTunnelState state)
2274 2274
2275/** 2275/**
2276 * Add a client to a tunnel, initializing all needed data structures. 2276 * Add a client to a tunnel, initializing all needed data structures.
2277 * 2277 *
2278 * @param t Tunnel to which add the client. 2278 * @param t Tunnel to which add the client.
2279 * @param c Client which to add to the tunnel. 2279 * @param c Client which to add to the tunnel.
2280 */ 2280 */
@@ -2368,13 +2368,13 @@ tunnel_notify_connection_broken (struct MeshTunnel *t, GNUNET_PEER_Id p1,
2368// { 2368// {
2369// return; 2369// return;
2370// } 2370// }
2371// 2371//
2372// if (tree_get_predecessor (t->tree) != 0) 2372// if (tree_get_predecessor (t->tree) != 0)
2373// { 2373// {
2374// /* We are the peer still connected, notify owner of the disconnection. */ 2374// /* We are the peer still connected, notify owner of the disconnection. */
2375// struct GNUNET_MESH_PathBroken msg; 2375// struct GNUNET_MESH_PathBroken msg;
2376// struct GNUNET_PeerIdentity neighbor; 2376// struct GNUNET_PeerIdentity neighbor;
2377// 2377//
2378// msg.header.size = htons (sizeof (msg)); 2378// msg.header.size = htons (sizeof (msg));
2379// msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN); 2379// msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN);
2380// GNUNET_PEER_resolve (t->id.oid, &msg.oid); 2380// GNUNET_PEER_resolve (t->id.oid, &msg.oid);
@@ -2390,7 +2390,7 @@ tunnel_notify_connection_broken (struct MeshTunnel *t, GNUNET_PEER_Id p1,
2390 2390
2391/** 2391/**
2392 * Send an end-to-end FWD ACK message for the most recent in-sequence payload. 2392 * Send an end-to-end FWD ACK message for the most recent in-sequence payload.
2393 * 2393 *
2394 * @param t Tunnel this is about. 2394 * @param t Tunnel this is about.
2395 * @param fwd Is for FWD traffic? (ACK dest->owner) 2395 * @param fwd Is for FWD traffic? (ACK dest->owner)
2396 */ 2396 */
@@ -2447,7 +2447,7 @@ tunnel_send_data_ack (struct MeshTunnel *t, int fwd)
2447 * If buffering is on, send when sent to children and buffer space is free. 2447 * If buffering is on, send when sent to children and buffer space is free.
2448 * Note that although the name is fwd_ack, the FWD mean forward *traffic*, 2448 * Note that although the name is fwd_ack, the FWD mean forward *traffic*,
2449 * the ACK itself goes "back" (towards root). 2449 * the ACK itself goes "back" (towards root).
2450 * 2450 *
2451 * @param t Tunnel on which to send the ACK. 2451 * @param t Tunnel on which to send the ACK.
2452 * @param type Type of message that triggered the ACK transmission. 2452 * @param type Type of message that triggered the ACK transmission.
2453 * @param fwd Is this FWD ACK? (Going dest->owner) 2453 * @param fwd Is this FWD ACK? (Going dest->owner)
@@ -2518,7 +2518,7 @@ tunnel_send_ack (struct MeshTunnel *t, uint16_t type, int fwd)
2518 delta_mid = rel->mid_sent - rel->head_sent->mid; 2518 delta_mid = rel->mid_sent - rel->head_sent->mid;
2519 else 2519 else
2520 delta_mid = 0; 2520 delta_mid = 0;
2521 if (0 > delta || (GNUNET_YES == t->reliable && 2521 if (0 > delta || (GNUNET_YES == t->reliable &&
2522 NULL != o && 2522 NULL != o &&
2523 (10 < rel->n_sent || 64 <= delta_mid))) 2523 (10 < rel->n_sent || 64 <= delta_mid)))
2524 delta = 0; 2524 delta = 0;
@@ -2549,7 +2549,7 @@ tunnel_send_ack (struct MeshTunnel *t, uint16_t type, int fwd)
2549 2549
2550/** 2550/**
2551 * Modify the mesh message TID from global to local and send to client. 2551 * Modify the mesh message TID from global to local and send to client.
2552 * 2552 *
2553 * @param t Tunnel on which to send the message. 2553 * @param t Tunnel on which to send the message.
2554 * @param msg Message to modify and send. 2554 * @param msg Message to modify and send.
2555 * @param c Client to send to. 2555 * @param c Client to send to.
@@ -2585,7 +2585,7 @@ tunnel_send_client_to_tid (struct MeshTunnel *t,
2585 2585
2586/** 2586/**
2587 * Modify the unicast message TID from global to local and send to client. 2587 * Modify the unicast message TID from global to local and send to client.
2588 * 2588 *
2589 * @param t Tunnel on which to send the message. 2589 * @param t Tunnel on which to send the message.
2590 * @param msg Message to modify and send. 2590 * @param msg Message to modify and send.
2591 * @param fwd Forward? 2591 * @param fwd Forward?
@@ -2604,7 +2604,7 @@ tunnel_send_client_data (struct MeshTunnel *t,
2604 2604
2605/** 2605/**
2606 * Send up to 64 buffered messages to the client for in order delivery. 2606 * Send up to 64 buffered messages to the client for in order delivery.
2607 * 2607 *
2608 * @param t Tunnel on which to empty the message buffer. 2608 * @param t Tunnel on which to empty the message buffer.
2609 * @param c Client to send to. 2609 * @param c Client to send to.
2610 * @param rel Reliability structure to corresponding peer. 2610 * @param rel Reliability structure to corresponding peer.
@@ -2650,7 +2650,7 @@ tunnel_send_client_buffered_data (struct MeshTunnel *t, struct MeshClient *c,
2650/** 2650/**
2651 * We have received a message out of order, buffer it until we receive 2651 * We have received a message out of order, buffer it until we receive
2652 * the missing one and we can feed the rest to the client. 2652 * the missing one and we can feed the rest to the client.
2653 * 2653 *
2654 * @param t Tunnel to add to. 2654 * @param t Tunnel to add to.
2655 * @param msg Message to buffer. 2655 * @param msg Message to buffer.
2656 * @param rel Reliability data to the corresponding direction. 2656 * @param rel Reliability data to the corresponding direction.
@@ -2697,7 +2697,7 @@ tunnel_add_buffered_data (struct MeshTunnel *t,
2697 * Destroy a reliable message after it has been acknowledged, either by 2697 * Destroy a reliable message after it has been acknowledged, either by
2698 * direct mid ACK or bitfield. Updates the appropriate data structures and 2698 * direct mid ACK or bitfield. Updates the appropriate data structures and
2699 * timers and frees all memory. 2699 * timers and frees all memory.
2700 * 2700 *
2701 * @param copy Message that is no longer needed: remote peer got it. 2701 * @param copy Message that is no longer needed: remote peer got it.
2702 */ 2702 */
2703static void 2703static void
@@ -3111,7 +3111,7 @@ tunnel_destroy (struct MeshTunnel *t)
3111 GNUNET_break (0); 3111 GNUNET_break (0);
3112 r = GNUNET_SYSERR; 3112 r = GNUNET_SYSERR;
3113 } 3113 }
3114 if (GNUNET_YES != 3114 if (GNUNET_YES !=
3115 GNUNET_CONTAINER_multihashmap32_remove (incoming_tunnels, 3115 GNUNET_CONTAINER_multihashmap32_remove (incoming_tunnels,
3116 t->local_tid_dest, t)) 3116 t->local_tid_dest, t))
3117 { 3117 {
@@ -3163,10 +3163,10 @@ tunnel_destroy (struct MeshTunnel *t)
3163 3163
3164/** 3164/**
3165 * Tunnel is empty: destroy it. 3165 * Tunnel is empty: destroy it.
3166 * 3166 *
3167 * Notifies all participants (peers, cleints) about the destruction. 3167 * Notifies all participants (peers, cleints) about the destruction.
3168 * 3168 *
3169 * @param t Tunnel to destroy. 3169 * @param t Tunnel to destroy.
3170 */ 3170 */
3171static void 3171static void
3172tunnel_destroy_empty (struct MeshTunnel *t) 3172tunnel_destroy_empty (struct MeshTunnel *t)
@@ -3192,7 +3192,7 @@ tunnel_destroy_empty (struct MeshTunnel *t)
3192 3192
3193/** 3193/**
3194 * Initialize a Flow Control structure to the initial state. 3194 * Initialize a Flow Control structure to the initial state.
3195 * 3195 *
3196 * @param fc Flow Control structure to initialize. 3196 * @param fc Flow Control structure to initialize.
3197 */ 3197 */
3198static void 3198static void
@@ -3209,12 +3209,12 @@ fc_init (struct MeshFlowControl *fc)
3209 3209
3210/** 3210/**
3211 * Create a new tunnel 3211 * Create a new tunnel
3212 * 3212 *
3213 * @param owner Who is the owner of the tunnel (short ID). 3213 * @param owner Who is the owner of the tunnel (short ID).
3214 * @param tid Tunnel Number of the tunnel. 3214 * @param tid Tunnel Number of the tunnel.
3215 * @param client Clients that owns the tunnel, NULL for foreign tunnels. 3215 * @param client Clients that owns the tunnel, NULL for foreign tunnels.
3216 * @param local Tunnel Number for the tunnel, for the client point of view. 3216 * @param local Tunnel Number for the tunnel, for the client point of view.
3217 * 3217 *
3218 * @return A new initialized tunnel. NULL on error. 3218 * @return A new initialized tunnel. NULL on error.
3219 */ 3219 */
3220static struct MeshTunnel * 3220static struct MeshTunnel *
@@ -3277,7 +3277,7 @@ tunnel_new (GNUNET_PEER_Id owner,
3277 3277
3278/** 3278/**
3279 * Set options in a tunnel, extracted from a bit flag field 3279 * Set options in a tunnel, extracted from a bit flag field
3280 * 3280 *
3281 * @param t Tunnel to set options to. 3281 * @param t Tunnel to set options to.
3282 * @param options Bit array in host byte order. 3282 * @param options Bit array in host byte order.
3283 */ 3283 */
@@ -3789,12 +3789,12 @@ queue_send (void *cls, size_t size, void *buf)
3789 3789
3790/** 3790/**
3791 * @brief Queue and pass message to core when possible. 3791 * @brief Queue and pass message to core when possible.
3792 * 3792 *
3793 * If type is payload (UNICAST, TO_ORIGIN) checks for queue status and 3793 * If type is payload (UNICAST, TO_ORIGIN) checks for queue status and
3794 * accounts for it. In case the queue is full, the message is dropped and 3794 * accounts for it. In case the queue is full, the message is dropped and
3795 * a break issued. 3795 * a break issued.
3796 * 3796 *
3797 * Otherwise, message is treated as internal and allowed to go regardless of 3797 * Otherwise, message is treated as internal and allowed to go regardless of
3798 * queue status. 3798 * queue status.
3799 * 3799 *
3800 * @param cls Closure (@c type dependant). It will be used by queue_send to 3800 * @param cls Closure (@c type dependant). It will be used by queue_send to
@@ -4065,7 +4065,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
4065 /* Eliminate tunnel when origin dies */ 4065 /* Eliminate tunnel when origin dies */
4066 tunnel_reset_timeout (t, GNUNET_YES); 4066 tunnel_reset_timeout (t, GNUNET_YES);
4067 /* Keep tunnel alive in direction dest->owner*/ 4067 /* Keep tunnel alive in direction dest->owner*/
4068 tunnel_reset_timeout (t, GNUNET_NO); 4068 tunnel_reset_timeout (t, GNUNET_NO);
4069 } 4069 }
4070 else 4070 else
4071 { 4071 {
@@ -4753,7 +4753,7 @@ handle_mesh_keepalive (void *cls, const struct GNUNET_PeerIdentity *peer,
4753 return GNUNET_OK; 4753 return GNUNET_OK;
4754 } 4754 }
4755 4755
4756 fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ? 4756 fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ?
4757 GNUNET_YES : GNUNET_NO; 4757 GNUNET_YES : GNUNET_NO;
4758 c = fwd ? t->client : t->owner; 4758 c = fwd ? t->client : t->owner;
4759 hop = fwd ? t->next_hop : t->prev_hop; 4759 hop = fwd ? t->next_hop : t->prev_hop;
@@ -4845,7 +4845,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
4845 GNUNET_PEER_resolve (peer->tunnels[i]->id.oid, &id); 4845 GNUNET_PEER_resolve (peer->tunnels[i]->id.oid, &id);
4846 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ... tunnel %s:%X (%X / %X)\n", 4846 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " ... tunnel %s:%X (%X / %X)\n",
4847 GNUNET_i2s (&id), peer->tunnels[i]->id.tid, 4847 GNUNET_i2s (&id), peer->tunnels[i]->id.tid,
4848 peer->tunnels[i]->local_tid, 4848 peer->tunnels[i]->local_tid,
4849 peer->tunnels[i]->local_tid_dest); 4849 peer->tunnels[i]->local_tid_dest);
4850 if (peer->tunnels[i]->state == MESH_TUNNEL_SEARCHING) 4850 if (peer->tunnels[i]->state == MESH_TUNNEL_SEARCHING)
4851 { 4851 {
@@ -5152,7 +5152,7 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client,
5152 peer_remove_tunnel (peer_get_short (t->dest), t); 5152 peer_remove_tunnel (peer_get_short (t->dest), t);
5153 t->owner = NULL; 5153 t->owner = NULL;
5154 } 5154 }
5155 else 5155 else
5156 { 5156 {
5157 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 5157 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
5158 " tunnel %X client %p (%p, %p)\n", 5158 " tunnel %X client %p (%p, %p)\n",
@@ -5225,7 +5225,7 @@ handle_local_data (void *cls, struct GNUNET_SERVER_Client *client,
5225 t->owner->handle == client) 5225 t->owner->handle == client)
5226 || 5226 ||
5227 (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV && 5227 (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV &&
5228 t->client && 5228 t->client &&
5229 t->client->handle == client) ) ) 5229 t->client->handle == client) ) )
5230 { 5230 {
5231 GNUNET_break (0); 5231 GNUNET_break (0);
@@ -5621,7 +5621,7 @@ server_init (void)
5621 * @param identity the public identity of this peer 5621 * @param identity the public identity of this peer
5622 */ 5622 */
5623static void 5623static void
5624core_init (void *cls, 5624core_init (void *cls,
5625 const struct GNUNET_PeerIdentity *identity) 5625 const struct GNUNET_PeerIdentity *identity)
5626{ 5626{
5627 const struct GNUNET_CONFIGURATION_Handle *c = cls; 5627 const struct GNUNET_CONFIGURATION_Handle *c = cls;
@@ -5901,7 +5901,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
5901 GNUNET_free (keyfile); 5901 GNUNET_free (keyfile);
5902 GNUNET_assert (NULL != pk); 5902 GNUNET_assert (NULL != pk);
5903 my_private_key = pk; 5903 my_private_key = pk;
5904 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, 5904 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key,
5905 &my_full_id.public_key); 5905 &my_full_id.public_key);
5906 myid = GNUNET_PEER_intern (&my_full_id); 5906 myid = GNUNET_PEER_intern (&my_full_id);
5907 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 5907 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c
index 971b8279f..822e7e5fe 100644
--- a/src/mesh/gnunet-service-mesh_channel.c
+++ b/src/mesh/gnunet-service-mesh_channel.c
@@ -294,7 +294,7 @@ add_buffered_data (const struct GNUNET_MESH_Data *msg,
294 294
295/** 295/**
296 * Send data to a client. 296 * Send data to a client.
297 * 297 *
298 * If the client is ready, send directly, otherwise buffer while listening 298 * If the client is ready, send directly, otherwise buffer while listening
299 * for a local ACK. 299 * for a local ACK.
300 * 300 *
@@ -377,7 +377,7 @@ channel_get (struct MeshTunnel2 *t, MESH_ChannelNumber chid)
377 377
378/** 378/**
379 * Add a client to a channel, initializing all needed data structures. 379 * Add a client to a channel, initializing all needed data structures.
380 * 380 *
381 * @param ch Channel to which add the client. 381 * @param ch Channel to which add the client.
382 * @param c Client which to add to the channel. 382 * @param c Client which to add to the channel.
383 */ 383 */
@@ -466,7 +466,7 @@ static unsigned int
466channel_get_buffer (struct MeshChannel *ch, int fwd) 466channel_get_buffer (struct MeshChannel *ch, int fwd)
467{ 467{
468 struct MeshChannelReliability *rel; 468 struct MeshChannelReliability *rel;
469 469
470 rel = fwd ? ch->dest_rel : ch->root_rel; 470 rel = fwd ? ch->dest_rel : ch->root_rel;
471 471
472 /* If rel is NULL it means that the end is not yet created, 472 /* If rel is NULL it means that the end is not yet created,
@@ -735,7 +735,7 @@ channel_send_connections_ack (struct MeshChannel *ch,
735 * Destroy a reliable message after it has been acknowledged, either by 735 * Destroy a reliable message after it has been acknowledged, either by
736 * direct mid ACK or bitfield. Updates the appropriate data structures and 736 * direct mid ACK or bitfield. Updates the appropriate data structures and
737 * timers and frees all memory. 737 * timers and frees all memory.
738 * 738 *
739 * @param copy Message that is no longer needed: remote peer got it. 739 * @param copy Message that is no longer needed: remote peer got it.
740 */ 740 */
741static void 741static void
@@ -907,7 +907,7 @@ send_client_buffered_data (struct MeshChannel *ch,
907 907
908/** 908/**
909 * Destroy a channel and free all resources. 909 * Destroy a channel and free all resources.
910 * 910 *
911 * @param ch Channel to destroy. 911 * @param ch Channel to destroy.
912 */ 912 */
913static void 913static void
@@ -1004,7 +1004,7 @@ channel_new (struct MeshTunnel2 *t,
1004 1004
1005/** 1005/**
1006 * Set options in a channel, extracted from a bit flag field 1006 * Set options in a channel, extracted from a bit flag field
1007 * 1007 *
1008 * @param ch Channel to set options to. 1008 * @param ch Channel to set options to.
1009 * @param options Bit array in host byte order. 1009 * @param options Bit array in host byte order.
1010 */ 1010 */
@@ -1145,7 +1145,7 @@ GMCH_send_channel_destroy (struct MeshChannel *ch, int fwd)
1145 1145
1146/** 1146/**
1147 * Send data on a channel. 1147 * Send data on a channel.
1148 * 1148 *
1149 * If the destination is local, send it to client, otherwise encrypt and 1149 * If the destination is local, send it to client, otherwise encrypt and
1150 * send to next hop. 1150 * send to next hop.
1151 * 1151 *
diff --git a/src/mesh/gnunet-service-mesh_channel.h b/src/mesh/gnunet-service-mesh_channel.h
index 4886e4a09..75136b4de 100644
--- a/src/mesh/gnunet-service-mesh_channel.h
+++ b/src/mesh/gnunet-service-mesh_channel.h
@@ -57,7 +57,7 @@ GMCH_send_ack (struct MeshChannel *ch, int fwd);
57 57
58/** 58/**
59 * Send data on a channel. 59 * Send data on a channel.
60 * 60 *
61 * If the destination is local, send it to client, otherwise encrypt and 61 * If the destination is local, send it to client, otherwise encrypt and
62 * send to next hop. 62 * send to next hop.
63 * 63 *
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c
index dfe4fa953..3f407f418 100644
--- a/src/mesh/gnunet-service-mesh_connection.c
+++ b/src/mesh/gnunet-service-mesh_connection.c
@@ -271,7 +271,7 @@ static struct GNUNET_CONTAINER_MultiHashMap *connections;
271static unsigned long long max_connections; 271static unsigned long long max_connections;
272 272
273/** 273/**
274 * How many messages *in total* are we willing to queue, divide by number of 274 * How many messages *in total* are we willing to queue, divide by number of
275 * connections to get connection queue size. 275 * connections to get connection queue size.
276 */ 276 */
277static unsigned long long max_msgs_queue; 277static unsigned long long max_msgs_queue;
@@ -293,7 +293,7 @@ static struct GNUNET_CORE_Handle *core_handle;
293 * 293 *
294 * @param s Tunnel state. 294 * @param s Tunnel state.
295 * 295 *
296 * @return String representation. 296 * @return String representation.
297 */ 297 */
298static const char * 298static const char *
299GMC_DEBUG_state2s (enum MeshTunnelState s) 299GMC_DEBUG_state2s (enum MeshTunnelState s)
@@ -317,7 +317,7 @@ GMC_DEBUG_state2s (enum MeshTunnelState s)
317 317
318/** 318/**
319 * Initialize a Flow Control structure to the initial state. 319 * Initialize a Flow Control structure to the initial state.
320 * 320 *
321 * @param fc Flow Control structure to initialize. 321 * @param fc Flow Control structure to initialize.
322 */ 322 */
323static void 323static void
@@ -680,7 +680,7 @@ queue_add (void *cls, uint16_t type, size_t size,
680 GNUNET_break (0); 680 GNUNET_break (0);
681 return; 681 return;
682 } 682 }
683 683
684 if (NULL == peer->connections) 684 if (NULL == peer->connections)
685 { 685 {
686 /* We are not connected to this peer, ignore request. */ 686 /* We are not connected to this peer, ignore request. */
@@ -1172,9 +1172,9 @@ static unsigned int
1172connection_get_buffer (struct MeshConnection *c, int fwd) 1172connection_get_buffer (struct MeshConnection *c, int fwd)
1173{ 1173{
1174 struct MeshFlowControl *fc; 1174 struct MeshFlowControl *fc;
1175 1175
1176 fc = fwd ? &c->fwd_fc : &c->bck_fc; 1176 fc = fwd ? &c->fwd_fc : &c->bck_fc;
1177 1177
1178 return (fc->queue_max - fc->queue_n); 1178 return (fc->queue_max - fc->queue_n);
1179} 1179}
1180 1180
@@ -1337,7 +1337,7 @@ connection_poll (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1337 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** Polling!\n"); 1337 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** Polling!\n");
1338 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** connection [%X]\n", 1338 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** connection [%X]\n",
1339 GNUNET_h2s (&c->id)); 1339 GNUNET_h2s (&c->id));
1340 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** %s\n", 1340 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " *** %s\n",
1341 fc == &c->fwd_fc ? "FWD" : "BCK"); 1341 fc == &c->fwd_fc ? "FWD" : "BCK");
1342 1342
1343 msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_POLL); 1343 msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_POLL);
@@ -1378,7 +1378,7 @@ connection_get_prev_hop (struct MeshConnection *c)
1378 * 1378 *
1379 * @param c Connection. 1379 * @param c Connection.
1380 * 1380 *
1381 * @return Next peer in the connection. 1381 * @return Next peer in the connection.
1382 */ 1382 */
1383static struct MeshPeer * 1383static struct MeshPeer *
1384connection_get_next_hop (struct MeshConnection *c) 1384connection_get_next_hop (struct MeshConnection *c)
@@ -1400,7 +1400,7 @@ connection_get_next_hop (struct MeshConnection *c)
1400 * @param c Connection. 1400 * @param c Connection.
1401 * @param fwd Next hop? 1401 * @param fwd Next hop?
1402 * 1402 *
1403 * @return Next peer in the connection. 1403 * @return Next peer in the connection.
1404 */ 1404 */
1405static struct MeshPeer * 1405static struct MeshPeer *
1406connection_get_hop (struct MeshConnection *c, int fwd) 1406connection_get_hop (struct MeshConnection *c, int fwd)
@@ -1598,7 +1598,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
1598 * @param identity the public identity of this peer 1598 * @param identity the public identity of this peer
1599 */ 1599 */
1600static void 1600static void
1601core_init (void *cls, 1601core_init (void *cls,
1602 const struct GNUNET_PeerIdentity *identity) 1602 const struct GNUNET_PeerIdentity *identity)
1603{ 1603{
1604 const struct GNUNET_CONFIGURATION_Handle *c = cls; 1604 const struct GNUNET_CONFIGURATION_Handle *c = cls;
@@ -2310,7 +2310,7 @@ handle_keepalive (void *cls, const struct GNUNET_PeerIdentity *peer,
2310 return GNUNET_OK; 2310 return GNUNET_OK;
2311 } 2311 }
2312 2312
2313 fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ? 2313 fwd = GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE == ntohs (message->type) ?
2314 GNUNET_YES : GNUNET_NO; 2314 GNUNET_YES : GNUNET_NO;
2315 2315
2316 /* Check if origin is as expected */ 2316 /* Check if origin is as expected */
diff --git a/src/mesh/gnunet-service-mesh_connection.h b/src/mesh/gnunet-service-mesh_connection.h
index 5db12f2fb..4e423e7ee 100644
--- a/src/mesh/gnunet-service-mesh_connection.h
+++ b/src/mesh/gnunet-service-mesh_connection.h
@@ -78,7 +78,7 @@ GMC_destroy (struct MeshConnection *c);
78 * Count connections in a DLL. 78 * Count connections in a DLL.
79 */ 79 */
80unsigned int 80unsigned int
81GMC_count (const struct MeshConnection *head); 81GMC_count (const struct MeshConnection *head);
82 82
83/** 83/**
84 * Send FWD keepalive packets for a connection. 84 * Send FWD keepalive packets for a connection.
diff --git a/src/mesh/gnunet-service-mesh_local.c b/src/mesh/gnunet-service-mesh_local.c
index 764ebd68f..7b58f0854 100644
--- a/src/mesh/gnunet-service-mesh_local.c
+++ b/src/mesh/gnunet-service-mesh_local.c
@@ -30,7 +30,7 @@
30 30
31/** 31/**
32 * Struct containing information about a client of the service 32 * Struct containing information about a client of the service
33 * 33 *
34 * TODO: add a list of 'waiting' ports 34 * TODO: add a list of 'waiting' ports
35 */ 35 */
36struct MeshClient 36struct MeshClient
@@ -462,7 +462,7 @@ handle_channel_destroy (void *cls, struct GNUNET_SERVER_Client *client,
462 { 462 {
463 ch->root = NULL; 463 ch->root = NULL;
464 } 464 }
465 else 465 else
466 { 466 {
467 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 467 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
468 " channel %X client %p (%p, %p)\n", 468 " channel %X client %p (%p, %p)\n",
@@ -538,7 +538,7 @@ handle_data (void *cls, struct GNUNET_SERVER_Client *client,
538 ch->root->handle == client) 538 ch->root->handle == client)
539 || 539 ||
540 (!fwd && 540 (!fwd &&
541 ch->dest && 541 ch->dest &&
542 ch->dest->handle == client) ) ) 542 ch->dest->handle == client) ) )
543 { 543 {
544 GNUNET_break (0); 544 GNUNET_break (0);
@@ -654,16 +654,16 @@ handle_ack (void *cls, struct GNUNET_SERVER_Client *client,
654// struct GNUNET_SERVER_Client *client = cls; 654// struct GNUNET_SERVER_Client *client = cls;
655// struct MeshChannel *ch = value; 655// struct MeshChannel *ch = value;
656// struct GNUNET_MESH_LocalMonitor *msg; 656// struct GNUNET_MESH_LocalMonitor *msg;
657// 657//
658// msg = GNUNET_malloc (sizeof(struct GNUNET_MESH_LocalMonitor)); 658// msg = GNUNET_malloc (sizeof(struct GNUNET_MESH_LocalMonitor));
659// msg->channel_id = htonl (ch->gid); 659// msg->channel_id = htonl (ch->gid);
660// msg->header.size = htons (sizeof (struct GNUNET_MESH_LocalMonitor)); 660// msg->header.size = htons (sizeof (struct GNUNET_MESH_LocalMonitor));
661// msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_TUNNELS); 661// msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_TUNNELS);
662// 662//
663// GNUNET_log (GNUNET_ERROR_TYPE_INFO, 663// GNUNET_log (GNUNET_ERROR_TYPE_INFO,
664// "* sending info about tunnel %s\n", 664// "* sending info about tunnel %s\n",
665// GNUNET_i2s (&msg->owner)); 665// GNUNET_i2s (&msg->owner));
666// 666//
667// GNUNET_SERVER_notification_context_unicast (nc, client, 667// GNUNET_SERVER_notification_context_unicast (nc, client,
668// &msg->header, GNUNET_NO); 668// &msg->header, GNUNET_NO);
669// return GNUNET_YES; 669// return GNUNET_YES;
diff --git a/src/mesh/gnunet-service-mesh_local.h b/src/mesh/gnunet-service-mesh_local.h
index b3a7ad621..5a22c66ab 100644
--- a/src/mesh/gnunet-service-mesh_local.h
+++ b/src/mesh/gnunet-service-mesh_local.h
@@ -53,7 +53,7 @@ struct MeshClient;
53 53
54/** 54/**
55 * Initialize server subsystem. 55 * Initialize server subsystem.
56 * 56 *
57 * @param handle Server handle. 57 * @param handle Server handle.
58 */ 58 */
59void 59void
@@ -123,7 +123,7 @@ GML_send_channel_destroy (struct MeshClient *c, uint32_t id);
123 123
124/** 124/**
125 * Modify the mesh message TID from global to local and send to client. 125 * Modify the mesh message TID from global to local and send to client.
126 * 126 *
127 * @param ch Channel on which to send the message. 127 * @param ch Channel on which to send the message.
128 * @param msg Message to modify and send. 128 * @param msg Message to modify and send.
129 * @param c Client to send to. 129 * @param c Client to send to.
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c
index 75decd3bb..ece4470e2 100644
--- a/src/mesh/gnunet-service-mesh_peer.c
+++ b/src/mesh/gnunet-service-mesh_peer.c
@@ -79,7 +79,7 @@ struct MeshPeer
79 * Transmission queue to core DLL head 79 * Transmission queue to core DLL head
80 */ 80 */
81 struct MeshPeerQueue *queue_head; 81 struct MeshPeerQueue *queue_head;
82 82
83 /** 83 /**
84 * Transmission queue to core DLL tail 84 * Transmission queue to core DLL tail
85 */ 85 */
@@ -121,8 +121,8 @@ static unsigned long long max_peers;
121 * #GNUNET_NO if not. 121 * #GNUNET_NO if not.
122 */ 122 */
123static int 123static int
124shutdown_tunnel (void *cls, 124shutdown_tunnel (void *cls,
125 const struct GNUNET_PeerIdentity *key, 125 const struct GNUNET_PeerIdentity *key,
126 void *value) 126 void *value)
127{ 127{
128 struct MeshPeer *p = value; 128 struct MeshPeer *p = value;
@@ -148,10 +148,10 @@ peer_destroy (struct MeshPeer *peer)
148 struct GNUNET_PeerIdentity id; 148 struct GNUNET_PeerIdentity id;
149 struct MeshPeerPath *p; 149 struct MeshPeerPath *p;
150 struct MeshPeerPath *nextp; 150 struct MeshPeerPath *nextp;
151 151
152 GNUNET_PEER_resolve (peer->id, &id); 152 GNUNET_PEER_resolve (peer->id, &id);
153 GNUNET_PEER_change_rc (peer->id, -1); 153 GNUNET_PEER_change_rc (peer->id, -1);
154 154
155 if (GNUNET_YES != 155 if (GNUNET_YES !=
156 GNUNET_CONTAINER_multipeermap_remove (peers, &id, peer)) 156 GNUNET_CONTAINER_multipeermap_remove (peers, &id, peer))
157 { 157 {
@@ -188,10 +188,10 @@ static int
188peer_is_used (struct MeshPeer *peer) 188peer_is_used (struct MeshPeer *peer)
189{ 189{
190 struct MeshPeerPath *p; 190 struct MeshPeerPath *p;
191 191
192 if (NULL != peer->tunnel) 192 if (NULL != peer->tunnel)
193 return GNUNET_YES; 193 return GNUNET_YES;
194 194
195 for (p = peer->path_head; NULL != p; p = p->next) 195 for (p = peer->path_head; NULL != p; p = p->next)
196 { 196 {
197 if (p->length < 3) 197 if (p->length < 3)
@@ -215,14 +215,14 @@ peer_get_oldest (void *cls,
215{ 215{
216 struct MeshPeer *p = value; 216 struct MeshPeer *p = value;
217 struct GNUNET_TIME_Absolute *abs = cls; 217 struct GNUNET_TIME_Absolute *abs = cls;
218 218
219 /* Don't count active peers */ 219 /* Don't count active peers */
220 if (GNUNET_YES == peer_is_used (p)) 220 if (GNUNET_YES == peer_is_used (p))
221 return GNUNET_YES; 221 return GNUNET_YES;
222 222
223 if (abs->abs_value_us < p->last_contact.abs_value_us) 223 if (abs->abs_value_us < p->last_contact.abs_value_us)
224 abs->abs_value_us = p->last_contact.abs_value_us; 224 abs->abs_value_us = p->last_contact.abs_value_us;
225 225
226 return GNUNET_YES; 226 return GNUNET_YES;
227} 227}
228 228
@@ -241,7 +241,7 @@ peer_timeout (void *cls,
241{ 241{
242 struct MeshPeer *p = value; 242 struct MeshPeer *p = value;
243 struct GNUNET_TIME_Absolute *abs = cls; 243 struct GNUNET_TIME_Absolute *abs = cls;
244 244
245 if (p->last_contact.abs_value_us == abs->abs_value_us && 245 if (p->last_contact.abs_value_us == abs->abs_value_us &&
246 GNUNET_NO == peer_is_used (p)) 246 GNUNET_NO == peer_is_used (p))
247 { 247 {
@@ -259,9 +259,9 @@ static void
259peer_delete_oldest (void) 259peer_delete_oldest (void)
260{ 260{
261 struct GNUNET_TIME_Absolute abs; 261 struct GNUNET_TIME_Absolute abs;
262 262
263 abs = GNUNET_TIME_UNIT_FOREVER_ABS; 263 abs = GNUNET_TIME_UNIT_FOREVER_ABS;
264 264
265 GNUNET_CONTAINER_multipeermap_iterate (peers, 265 GNUNET_CONTAINER_multipeermap_iterate (peers,
266 &peer_get_oldest, 266 &peer_get_oldest,
267 &abs); 267 &abs);
@@ -283,7 +283,7 @@ static struct MeshPeer *
283peer_get (const struct GNUNET_PeerIdentity *peer_id) 283peer_get (const struct GNUNET_PeerIdentity *peer_id)
284{ 284{
285 struct MeshPeer *peer; 285 struct MeshPeer *peer;
286 286
287 peer = GNUNET_CONTAINER_multipeermap_get (peers, peer_id); 287 peer = GNUNET_CONTAINER_multipeermap_get (peers, peer_id);
288 if (NULL == peer) 288 if (NULL == peer)
289 { 289 {
@@ -297,7 +297,7 @@ peer_get (const struct GNUNET_PeerIdentity *peer_id)
297 peer->id = GNUNET_PEER_intern (peer_id); 297 peer->id = GNUNET_PEER_intern (peer_id);
298 } 298 }
299 peer->last_contact = GNUNET_TIME_absolute_get(); 299 peer->last_contact = GNUNET_TIME_absolute_get();
300 300
301 return peer; 301 return peer;
302} 302}
303 303
@@ -333,13 +333,13 @@ peer_get_path_cost (const struct MeshPeer *peer,
333 unsigned int overlap; 333 unsigned int overlap;
334 unsigned int i; 334 unsigned int i;
335 unsigned int j; 335 unsigned int j;
336 336
337 if (NULL == path) 337 if (NULL == path)
338 return 0; 338 return 0;
339 339
340 overlap = 0; 340 overlap = 0;
341 GNUNET_assert (NULL != peer->tunnel); 341 GNUNET_assert (NULL != peer->tunnel);
342 342
343 for (i = 0; i < path->length; i++) 343 for (i = 0; i < path->length; i++)
344 { 344 {
345 for (c = peer->tunnel->connection_head; NULL != c; c = c->next) 345 for (c = peer->tunnel->connection_head; NULL != c; c = c->next)
@@ -373,7 +373,7 @@ peer_get_best_path (const struct MeshPeer *peer)
373 struct MeshConnection *c; 373 struct MeshConnection *c;
374 unsigned int best_cost; 374 unsigned int best_cost;
375 unsigned int cost; 375 unsigned int cost;
376 376
377 best_cost = UINT_MAX; 377 best_cost = UINT_MAX;
378 best_p = NULL; 378 best_p = NULL;
379 for (p = peer->path_head; NULL != p; p = p->next) 379 for (p = peer->path_head; NULL != p; p = p->next)
@@ -383,7 +383,7 @@ peer_get_best_path (const struct MeshPeer *peer)
383 break; 383 break;
384 if (NULL != c) 384 if (NULL != c)
385 continue; /* If path is in use in a connection, skip it. */ 385 continue; /* If path is in use in a connection, skip it. */
386 386
387 if ((cost = peer_get_path_cost (peer, p)) < best_cost) 387 if ((cost = peer_get_path_cost (peer, p)) < best_cost)
388 { 388 {
389 best_cost = cost; 389 best_cost = cost;
@@ -410,7 +410,7 @@ peer_add_path (struct MeshPeer *peer_info, struct MeshPeerPath *path,
410 struct MeshPeerPath *aux; 410 struct MeshPeerPath *aux;
411 unsigned int l; 411 unsigned int l;
412 unsigned int l2; 412 unsigned int l2;
413 413
414 if ((NULL == peer_info) || (NULL == path)) 414 if ((NULL == peer_info) || (NULL == path))
415 { 415 {
416 GNUNET_break (0); 416 GNUNET_break (0);
@@ -444,17 +444,17 @@ peer_add_path (struct MeshPeer *peer_info, struct MeshPeerPath *path,
444 GNUNET_realloc (path->peers, path->length * sizeof (GNUNET_PEER_Id)); 444 GNUNET_realloc (path->peers, path->length * sizeof (GNUNET_PEER_Id));
445 } 445 }
446 } 446 }
447 447
448 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "adding path [%u] to peer %s\n", 448 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "adding path [%u] to peer %s\n",
449 path->length, peer2s (peer_info)); 449 path->length, peer2s (peer_info));
450 450
451 l = path_get_length (path); 451 l = path_get_length (path);
452 if (0 == l) 452 if (0 == l)
453 { 453 {
454 path_destroy (path); 454 path_destroy (path);
455 return; 455 return;
456 } 456 }
457 457
458 GNUNET_assert (peer_info->id == path->peers[path->length - 1]); 458 GNUNET_assert (peer_info->id == path->peers[path->length - 1]);
459 for (aux = peer_info->path_head; aux != NULL; aux = aux->next) 459 for (aux = peer_info->path_head; aux != NULL; aux = aux->next)
460 { 460 {
@@ -569,7 +569,7 @@ GMP_connect (struct MeshPeer *peer)
569 { 569 {
570 /* This case can happen when the path includes a first hop that is 570 /* This case can happen when the path includes a first hop that is
571 * not yet known to be connected. 571 * not yet known to be connected.
572 * 572 *
573 * This happens quite often during testing when running mesh 573 * This happens quite often during testing when running mesh
574 * under valgrind: core connect notifications come very late and the 574 * under valgrind: core connect notifications come very late and the
575 * DHT result has already come and created a valid path. 575 * DHT result has already come and created a valid path.
diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h
index de0d270a2..dc515b473 100644
--- a/src/mesh/mesh.h
+++ b/src/mesh/mesh.h
@@ -63,14 +63,14 @@ extern "C"
63 * notify_transmit_ready None (queue / GNUNET_CLIENT_ntf_tmt_rdy) 63 * notify_transmit_ready None (queue / GNUNET_CLIENT_ntf_tmt_rdy)
64 * notify_transmit_ready_cancel None (clear of internal data structures) 64 * notify_transmit_ready_cancel None (clear of internal data structures)
65 * 65 *
66 * 66 *
67 * EVENT MESSAGE USED 67 * EVENT MESSAGE USED
68 * ----- ------------ 68 * ----- ------------
69 * data GNUNET_MESH_Unicast OR 69 * data GNUNET_MESH_Unicast OR
70 * GNUNET_MESH_Multicast OR 70 * GNUNET_MESH_Multicast OR
71 * GNUNET_MESH_ToOrigin 71 * GNUNET_MESH_ToOrigin
72 * data ack GNUNET_MESH_LocalAck 72 * data ack GNUNET_MESH_LocalAck
73 * 73 *
74 * new incoming tunnel GNUNET_MESH_PeerControl 74 * new incoming tunnel GNUNET_MESH_PeerControl
75 * peer connects to a tunnel FIXME 75 * peer connects to a tunnel FIXME
76 * peer disconnects from a tunnel FIXME 76 * peer disconnects from a tunnel FIXME
@@ -305,9 +305,9 @@ GMC_min_pid (uint32_t a, uint32_t b);
305 * Generated with: 305 * Generated with:
306 * FIND: "#define ([^ ]+)[ ]*([0-9]+)" 306 * FIND: "#define ([^ ]+)[ ]*([0-9]+)"
307 * REPLACE: " case \2: return "\1"; break;" 307 * REPLACE: " case \2: return "\1"; break;"
308 * 308 *
309 * @param m Message type. 309 * @param m Message type.
310 * 310 *
311 * @return Human readable string description. 311 * @return Human readable string description.
312 */ 312 */
313const char * 313const char *
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index d3dad49a4..2db89fc6e 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -188,7 +188,7 @@ struct GNUNET_MESH_Handle
188 * Time to the next reconnect in case one reconnect fails 188 * Time to the next reconnect in case one reconnect fails
189 */ 189 */
190 struct GNUNET_TIME_Relative reconnect_time; 190 struct GNUNET_TIME_Relative reconnect_time;
191 191
192 /** 192 /**
193 * Task for trying to reconnect. 193 * Task for trying to reconnect.
194 */ 194 */
@@ -373,9 +373,9 @@ th_is_payload (struct GNUNET_MESH_TransmitHandle *th)
373 373
374/** 374/**
375 * Check whether there is any message ready in the queue and find the size. 375 * Check whether there is any message ready in the queue and find the size.
376 * 376 *
377 * @param h Mesh handle. 377 * @param h Mesh handle.
378 * 378 *
379 * @return The size of the first ready message in the queue, 379 * @return The size of the first ready message in the queue,
380 * 0 if there is none. 380 * 0 if there is none.
381 */ 381 */
@@ -483,8 +483,8 @@ destroy_tunnel (struct GNUNET_MESH_Tunnel *t, int call_cleaner)
483 GNUNET_break (0); 483 GNUNET_break (0);
484 return; 484 return;
485 } 485 }
486 LOG (GNUNET_ERROR_TYPE_DEBUG, 486 LOG (GNUNET_ERROR_TYPE_DEBUG,
487 "destroy_tunnel %X\n", 487 "destroy_tunnel %X\n",
488 t->tid); 488 t->tid);
489 h = t->mesh; 489 h = t->mesh;
490 490
@@ -508,7 +508,7 @@ destroy_tunnel (struct GNUNET_MESH_Tunnel *t, int call_cleaner)
508 /* clean up request */ 508 /* clean up request */
509 if (GNUNET_SCHEDULER_NO_TASK != th->timeout_task) 509 if (GNUNET_SCHEDULER_NO_TASK != th->timeout_task)
510 GNUNET_SCHEDULER_cancel (th->timeout_task); 510 GNUNET_SCHEDULER_cancel (th->timeout_task);
511 GNUNET_free (th); 511 GNUNET_free (th);
512 } 512 }
513 513
514 /* if there are no more pending requests with mesh service, cancel active request */ 514 /* if there are no more pending requests with mesh service, cancel active request */
@@ -528,7 +528,7 @@ destroy_tunnel (struct GNUNET_MESH_Tunnel *t, int call_cleaner)
528 528
529/** 529/**
530 * Notify client that the transmission has timed out 530 * Notify client that the transmission has timed out
531 * 531 *
532 * @param cls closure 532 * @param cls closure
533 * @param tc task context 533 * @param tc task context
534 */ 534 */
@@ -590,7 +590,7 @@ send_packet (struct GNUNET_MESH_Handle *h,
590 590
591/** 591/**
592 * Send an ack on the tunnel to confirm the processing of a message. 592 * Send an ack on the tunnel to confirm the processing of a message.
593 * 593 *
594 * @param t Tunnel on which to send the ACK. 594 * @param t Tunnel on which to send the ACK.
595 */ 595 */
596static void 596static void
@@ -702,7 +702,7 @@ do_reconnect (struct GNUNET_MESH_Handle *h)
702 GNUNET_TIME_relative_min (GNUNET_TIME_UNIT_SECONDS, 702 GNUNET_TIME_relative_min (GNUNET_TIME_UNIT_SECONDS,
703 GNUNET_TIME_relative_multiply 703 GNUNET_TIME_relative_multiply
704 (h->reconnect_time, 2)); 704 (h->reconnect_time, 2));
705 LOG (GNUNET_ERROR_TYPE_DEBUG, 705 LOG (GNUNET_ERROR_TYPE_DEBUG,
706 "Next retry in %s\n", 706 "Next retry in %s\n",
707 GNUNET_STRINGS_relative_time_to_string (h->reconnect_time, 707 GNUNET_STRINGS_relative_time_to_string (h->reconnect_time,
708 GNUNET_NO)); 708 GNUNET_NO));
@@ -916,7 +916,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
916 LOG (GNUNET_ERROR_TYPE_DEBUG, 916 LOG (GNUNET_ERROR_TYPE_DEBUG,
917 " %s data on tunnel %s [%X]\n", 917 " %s data on tunnel %s [%X]\n",
918 t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV ? "fwd" : "bck", 918 t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV ? "fwd" : "bck",
919 GNUNET_i2s (GNUNET_PEER_resolve2(t->peer)), 919 GNUNET_i2s (GNUNET_PEER_resolve2(t->peer)),
920 ntohl (dmsg->tid)); 920 ntohl (dmsg->tid));
921 type = ntohs (payload->type); 921 type = ntohs (payload->type);
922 LOG (GNUNET_ERROR_TYPE_DEBUG, " payload type %u\n", type); 922 LOG (GNUNET_ERROR_TYPE_DEBUG, " payload type %u\n", type);
@@ -948,7 +948,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
948/** 948/**
949 * Process a local ACK message, enabling the client to send 949 * Process a local ACK message, enabling the client to send
950 * more data to the service. 950 * more data to the service.
951 * 951 *
952 * @param h Mesh handle. 952 * @param h Mesh handle.
953 * @param message Message itself. 953 * @param message Message itself.
954 */ 954 */
@@ -1082,7 +1082,7 @@ msg_received (void *cls, const struct GNUNET_MessageHeader *msg)
1082 1082
1083 if (msg == NULL) 1083 if (msg == NULL)
1084 { 1084 {
1085 LOG (GNUNET_ERROR_TYPE_DEBUG, 1085 LOG (GNUNET_ERROR_TYPE_DEBUG,
1086 "Mesh service disconnected, reconnecting\n", h); 1086 "Mesh service disconnected, reconnecting\n", h);
1087 reconnect (h); 1087 reconnect (h);
1088 return; 1088 return;
@@ -1265,7 +1265,7 @@ send_callback (void *cls, size_t size, void *buf)
1265 * Auxiliary function to send an already constructed packet to the service. 1265 * Auxiliary function to send an already constructed packet to the service.
1266 * Takes care of creating a new queue element, copying the message and 1266 * Takes care of creating a new queue element, copying the message and
1267 * calling the tmt_rdy function if necessary. 1267 * calling the tmt_rdy function if necessary.
1268 * 1268 *
1269 * @param h mesh handle 1269 * @param h mesh handle
1270 * @param msg message to transmit 1270 * @param msg message to transmit
1271 * @param tunnel tunnel this send is related to (NULL if N/A) 1271 * @param tunnel tunnel this send is related to (NULL if N/A)
@@ -1441,7 +1441,7 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle)
1441 * @return handle to the tunnel 1441 * @return handle to the tunnel
1442 */ 1442 */
1443struct GNUNET_MESH_Tunnel * 1443struct GNUNET_MESH_Tunnel *
1444GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, 1444GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
1445 void *tunnel_ctx, 1445 void *tunnel_ctx,
1446 const struct GNUNET_PeerIdentity *peer, 1446 const struct GNUNET_PeerIdentity *peer,
1447 uint32_t port, 1447 uint32_t port,
@@ -1723,7 +1723,7 @@ static size_t
1723mesh_mq_ntr (void *cls, size_t size, 1723mesh_mq_ntr (void *cls, size_t size,
1724 void *buf) 1724 void *buf)
1725{ 1725{
1726 struct GNUNET_MQ_Handle *mq = cls; 1726 struct GNUNET_MQ_Handle *mq = cls;
1727 struct MeshMQState *state = GNUNET_MQ_impl_state (mq); 1727 struct MeshMQState *state = GNUNET_MQ_impl_state (mq);
1728 const struct GNUNET_MessageHeader *msg = GNUNET_MQ_impl_current (mq); 1728 const struct GNUNET_MessageHeader *msg = GNUNET_MQ_impl_current (mq);
1729 uint16_t msize; 1729 uint16_t msize;
@@ -1769,7 +1769,7 @@ mesh_mq_send_impl (struct GNUNET_MQ_Handle *mq,
1769 GNUNET_MESH_notify_transmit_ready (state->tunnel, 1769 GNUNET_MESH_notify_transmit_ready (state->tunnel,
1770 /* FIXME: add option for corking */ 1770 /* FIXME: add option for corking */
1771 GNUNET_NO, 1771 GNUNET_NO,
1772 GNUNET_TIME_UNIT_FOREVER_REL, 1772 GNUNET_TIME_UNIT_FOREVER_REL,
1773 ntohs (msg->size), 1773 ntohs (msg->size),
1774 mesh_mq_ntr, mq); 1774 mesh_mq_ntr, mq);
1775 1775
@@ -1781,7 +1781,7 @@ mesh_mq_send_impl (struct GNUNET_MQ_Handle *mq,
1781 * destruction of a message queue. 1781 * destruction of a message queue.
1782 * Implementations must not free 'mq', but should 1782 * Implementations must not free 'mq', but should
1783 * take care of 'impl_state'. 1783 * take care of 'impl_state'.
1784 * 1784 *
1785 * @param mq the message queue to destroy 1785 * @param mq the message queue to destroy
1786 * @param impl_state state of the implementation 1786 * @param impl_state state of the implementation
1787 */ 1787 */
diff --git a/src/mesh/mesh_api_enc.c b/src/mesh/mesh_api_enc.c
index 75adb6544..93099abdb 100644
--- a/src/mesh/mesh_api_enc.c
+++ b/src/mesh/mesh_api_enc.c
@@ -178,7 +178,7 @@ struct GNUNET_MESH_Handle
178 * Time to the next reconnect in case one reconnect fails 178 * Time to the next reconnect in case one reconnect fails
179 */ 179 */
180 struct GNUNET_TIME_Relative reconnect_time; 180 struct GNUNET_TIME_Relative reconnect_time;
181 181
182 /** 182 /**
183 * Task for trying to reconnect. 183 * Task for trying to reconnect.
184 */ 184 */
@@ -356,9 +356,9 @@ th_is_payload (struct GNUNET_MESH_TransmitHandle *th)
356 356
357/** 357/**
358 * Check whether there is any message ready in the queue and find the size. 358 * Check whether there is any message ready in the queue and find the size.
359 * 359 *
360 * @param h Mesh handle. 360 * @param h Mesh handle.
361 * 361 *
362 * @return The size of the first ready message in the queue, 362 * @return The size of the first ready message in the queue,
363 * 0 if there is none. 363 * 0 if there is none.
364 */ 364 */
@@ -492,7 +492,7 @@ destroy_channel (struct GNUNET_MESH_Channel *ch, int call_cleaner)
492 /* clean up request */ 492 /* clean up request */
493 if (GNUNET_SCHEDULER_NO_TASK != th->timeout_task) 493 if (GNUNET_SCHEDULER_NO_TASK != th->timeout_task)
494 GNUNET_SCHEDULER_cancel (th->timeout_task); 494 GNUNET_SCHEDULER_cancel (th->timeout_task);
495 GNUNET_free (th); 495 GNUNET_free (th);
496 } 496 }
497 497
498 /* if there are no more pending requests with mesh service, cancel active request */ 498 /* if there are no more pending requests with mesh service, cancel active request */
@@ -512,7 +512,7 @@ destroy_channel (struct GNUNET_MESH_Channel *ch, int call_cleaner)
512 512
513/** 513/**
514 * Notify client that the transmission has timed out 514 * Notify client that the transmission has timed out
515 * 515 *
516 * @param cls closure 516 * @param cls closure
517 * @param tc task context 517 * @param tc task context
518 */ 518 */
@@ -574,7 +574,7 @@ send_packet (struct GNUNET_MESH_Handle *h,
574 574
575/** 575/**
576 * Send an ack on the channel to confirm the processing of a message. 576 * Send an ack on the channel to confirm the processing of a message.
577 * 577 *
578 * @param ch Channel on which to send the ACK. 578 * @param ch Channel on which to send the ACK.
579 */ 579 */
580static void 580static void
@@ -926,7 +926,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
926/** 926/**
927 * Process a local ACK message, enabling the client to send 927 * Process a local ACK message, enabling the client to send
928 * more data to the service. 928 * more data to the service.
929 * 929 *
930 * @param h Mesh handle. 930 * @param h Mesh handle.
931 * @param message Message itself. 931 * @param message Message itself.
932 */ 932 */
@@ -1059,7 +1059,7 @@ msg_received (void *cls, const struct GNUNET_MessageHeader *msg)
1059 1059
1060 if (msg == NULL) 1060 if (msg == NULL)
1061 { 1061 {
1062 LOG (GNUNET_ERROR_TYPE_DEBUG, 1062 LOG (GNUNET_ERROR_TYPE_DEBUG,
1063 "Mesh service disconnected, reconnecting\n", h); 1063 "Mesh service disconnected, reconnecting\n", h);
1064 reconnect (h); 1064 reconnect (h);
1065 return; 1065 return;
@@ -1242,7 +1242,7 @@ send_callback (void *cls, size_t size, void *buf)
1242 * Auxiliary function to send an already constructed packet to the service. 1242 * Auxiliary function to send an already constructed packet to the service.
1243 * Takes care of creating a new queue element, copying the message and 1243 * Takes care of creating a new queue element, copying the message and
1244 * calling the tmt_rdy function if necessary. 1244 * calling the tmt_rdy function if necessary.
1245 * 1245 *
1246 * @param h mesh handle 1246 * @param h mesh handle
1247 * @param msg message to transmit 1247 * @param msg message to transmit
1248 * @param channel channel this send is related to (NULL if N/A) 1248 * @param channel channel this send is related to (NULL if N/A)
@@ -1414,7 +1414,7 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle)
1414 * @return handle to the channel 1414 * @return handle to the channel
1415 */ 1415 */
1416struct GNUNET_MESH_Channel * 1416struct GNUNET_MESH_Channel *
1417GNUNET_MESH_channel_create (struct GNUNET_MESH_Handle *h, 1417GNUNET_MESH_channel_create (struct GNUNET_MESH_Handle *h,
1418 void *channel_ctx, 1418 void *channel_ctx,
1419 const struct GNUNET_PeerIdentity *peer, 1419 const struct GNUNET_PeerIdentity *peer,
1420 uint32_t port, 1420 uint32_t port,
@@ -1695,7 +1695,7 @@ static size_t
1695mesh_mq_ntr (void *cls, size_t size, 1695mesh_mq_ntr (void *cls, size_t size,
1696 void *buf) 1696 void *buf)
1697{ 1697{
1698 struct GNUNET_MQ_Handle *mq = cls; 1698 struct GNUNET_MQ_Handle *mq = cls;
1699 struct MeshMQState *state = GNUNET_MQ_impl_state (mq); 1699 struct MeshMQState *state = GNUNET_MQ_impl_state (mq);
1700 const struct GNUNET_MessageHeader *msg = GNUNET_MQ_impl_current (mq); 1700 const struct GNUNET_MessageHeader *msg = GNUNET_MQ_impl_current (mq);
1701 uint16_t msize; 1701 uint16_t msize;
@@ -1734,7 +1734,7 @@ mesh_mq_send_impl (struct GNUNET_MQ_Handle *mq,
1734 GNUNET_MESH_notify_transmit_ready (state->channel, 1734 GNUNET_MESH_notify_transmit_ready (state->channel,
1735 /* FIXME: add option for corking */ 1735 /* FIXME: add option for corking */
1736 GNUNET_NO, 1736 GNUNET_NO,
1737 GNUNET_TIME_UNIT_FOREVER_REL, 1737 GNUNET_TIME_UNIT_FOREVER_REL,
1738 ntohs (msg->size), 1738 ntohs (msg->size),
1739 mesh_mq_ntr, mq); 1739 mesh_mq_ntr, mq);
1740 1740
@@ -1746,7 +1746,7 @@ mesh_mq_send_impl (struct GNUNET_MQ_Handle *mq,
1746 * destruction of a message queue. 1746 * destruction of a message queue.
1747 * Implementations must not free 'mq', but should 1747 * Implementations must not free 'mq', but should
1748 * take care of 'impl_state'. 1748 * take care of 'impl_state'.
1749 * 1749 *
1750 * @param mq the message queue to destroy 1750 * @param mq the message queue to destroy
1751 * @param impl_state state of the implementation 1751 * @param impl_state state of the implementation
1752 */ 1752 */
diff --git a/src/mesh/mesh_enc.h b/src/mesh/mesh_enc.h
index 42cd22890..93a3a2e9e 100644
--- a/src/mesh/mesh_enc.h
+++ b/src/mesh/mesh_enc.h
@@ -241,9 +241,9 @@ GMC_min_pid (uint32_t a, uint32_t b);
241 * Generated with: 241 * Generated with:
242 * FIND: "#define ([^ ]+)[ ]*([0-9]+)" 242 * FIND: "#define ([^ ]+)[ ]*([0-9]+)"
243 * REPLACE: " case \2: return "\1"; break;" 243 * REPLACE: " case \2: return "\1"; break;"
244 * 244 *
245 * @param m Message type. 245 * @param m Message type.
246 * 246 *
247 * @return Human readable string description. 247 * @return Human readable string description.
248 */ 248 */
249const char * 249const char *
diff --git a/src/mesh/mesh_protocol.h b/src/mesh/mesh_protocol.h
index 37d3676f0..2d708eb62 100644
--- a/src/mesh/mesh_protocol.h
+++ b/src/mesh/mesh_protocol.h
@@ -309,12 +309,12 @@ struct GNUNET_MESH_TunnelKeepAlive
309 * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_(FWD|BCK)_KEEPALIVE 309 * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_(FWD|BCK)_KEEPALIVE
310 */ 310 */
311 struct GNUNET_MessageHeader header; 311 struct GNUNET_MessageHeader header;
312 312
313 /** 313 /**
314 * TID of the tunnel 314 * TID of the tunnel
315 */ 315 */
316 uint32_t tid GNUNET_PACKED; 316 uint32_t tid GNUNET_PACKED;
317 317
318 /** 318 /**
319 * OID of the tunnel 319 * OID of the tunnel
320 */ 320 */
diff --git a/src/mesh/mesh_protocol_enc.h b/src/mesh/mesh_protocol_enc.h
index f088cd057..78c3666b1 100644
--- a/src/mesh/mesh_protocol_enc.h
+++ b/src/mesh/mesh_protocol_enc.h
@@ -125,7 +125,7 @@ struct GNUNET_MESH_Encrypted
125 * Number of hops to live. 125 * Number of hops to live.
126 */ 126 */
127 uint32_t ttl GNUNET_PACKED; 127 uint32_t ttl GNUNET_PACKED;
128 128
129 /** 129 /**
130 * Always 0. 130 * Always 0.
131 */ 131 */
diff --git a/src/mesh/mesh_test_lib.c b/src/mesh/mesh_test_lib.c
index 353edb494..022cee2f3 100644
--- a/src/mesh/mesh_test_lib.c
+++ b/src/mesh/mesh_test_lib.c
@@ -51,7 +51,7 @@ struct GNUNET_MESH_TEST_Context
51 * Main function of the test to run once all MESHs are available. 51 * Main function of the test to run once all MESHs are available.
52 */ 52 */
53 GNUNET_MESH_TEST_AppMain app_main; 53 GNUNET_MESH_TEST_AppMain app_main;
54 54
55 /** 55 /**
56 * Closure for 'app_main'. 56 * Closure for 'app_main'.
57 */ 57 */
@@ -137,7 +137,7 @@ mesh_connect_adapter (void *cls,
137 * @param cls closure 137 * @param cls closure
138 * @param op_result service handle returned from the connect adapter 138 * @param op_result service handle returned from the connect adapter
139 */ 139 */
140static void 140static void
141mesh_disconnect_adapter (void *cls, 141mesh_disconnect_adapter (void *cls,
142 void *op_result) 142 void *op_result)
143{ 143{
@@ -154,12 +154,12 @@ mesh_disconnect_adapter (void *cls,
154 * 154 *
155 * @param cls The callback closure from functions generating an operation. 155 * @param cls The callback closure from functions generating an operation.
156 * @param op The operation that has been finished. 156 * @param op The operation that has been finished.
157 * @param ca_result The service handle returned from 157 * @param ca_result The service handle returned from
158 * GNUNET_TESTBED_ConnectAdapter() (mesh handle). 158 * GNUNET_TESTBED_ConnectAdapter() (mesh handle).
159 * @param emsg Error message in case the operation has failed. 159 * @param emsg Error message in case the operation has failed.
160 * NULL if operation has executed successfully. 160 * NULL if operation has executed successfully.
161 */ 161 */
162static void 162static void
163mesh_connect_cb (void *cls, 163mesh_connect_cb (void *cls,
164 struct GNUNET_TESTBED_Operation *op, 164 struct GNUNET_TESTBED_Operation *op,
165 void *ca_result, 165 void *ca_result,
@@ -167,7 +167,7 @@ mesh_connect_cb (void *cls,
167{ 167{
168 struct GNUNET_MESH_TEST_Context *ctx = cls; 168 struct GNUNET_MESH_TEST_Context *ctx = cls;
169 unsigned int i; 169 unsigned int i;
170 170
171 if (NULL != emsg) 171 if (NULL != emsg)
172 { 172 {
173 fprintf (stderr, "Failed to connect to MESH service: %s\n", 173 fprintf (stderr, "Failed to connect to MESH service: %s\n",
@@ -211,7 +211,7 @@ GNUNET_MESH_TEST_cleanup (struct GNUNET_MESH_TEST_Context *ctx)
211/** 211/**
212 * Callback run when the testbed is ready (peers running and connected to 212 * Callback run when the testbed is ready (peers running and connected to
213 * each other) 213 * each other)
214 * 214 *
215 * @param cls Closure (context). 215 * @param cls Closure (context).
216 * @param h the run handle 216 * @param h the run handle
217 * @param num_peers Number of peers that are running. 217 * @param num_peers Number of peers that are running.
@@ -252,7 +252,7 @@ mesh_test_run (void *cls,
252} 252}
253 253
254 254
255void 255void
256GNUNET_MESH_TEST_run (const char *testname, 256GNUNET_MESH_TEST_run (const char *testname,
257 const char *cfgname, 257 const char *cfgname,
258 unsigned int num_peers, 258 unsigned int num_peers,
diff --git a/src/mesh/mesh_test_lib.h b/src/mesh/mesh_test_lib.h
index c560d50c0..5732338f7 100644
--- a/src/mesh/mesh_test_lib.h
+++ b/src/mesh/mesh_test_lib.h
@@ -73,7 +73,7 @@ typedef void (*GNUNET_MESH_TEST_AppMain) (void *cls,
73 * @param handlers Message handlers. 73 * @param handlers Message handlers.
74 * @param ports Ports the peers offer. 74 * @param ports Ports the peers offer.
75 */ 75 */
76void 76void
77GNUNET_MESH_TEST_run (const char *testname, 77GNUNET_MESH_TEST_run (const char *testname,
78 const char *cfgname, 78 const char *cfgname,
79 unsigned int num_peers, 79 unsigned int num_peers,
diff --git a/src/mesh/mesh_tunnel_tree.c b/src/mesh/mesh_tunnel_tree.c
index 41b25c3a4..c2fe6c3d9 100644
--- a/src/mesh/mesh_tunnel_tree.c
+++ b/src/mesh/mesh_tunnel_tree.c
@@ -496,7 +496,7 @@ tree_get_predecessor (struct MeshTunnelTree *tree)
496 * 496 *
497 * @return peerinfo of the peer who is the first hop in the tunnel 497 * @return peerinfo of the peer who is the first hop in the tunnel
498 * NULL on error 498 * NULL on error
499 * 499 *
500 * FIXME use PEER_Id 500 * FIXME use PEER_Id
501 */ 501 */
502struct GNUNET_PeerIdentity * 502struct GNUNET_PeerIdentity *
diff --git a/src/mesh/test_mesh_local.c b/src/mesh/test_mesh_local.c
index c76c93f8e..4ecef81e2 100644
--- a/src/mesh/test_mesh_local.c
+++ b/src/mesh/test_mesh_local.c
@@ -98,7 +98,7 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
98 * @param channel connection to the other end 98 * @param channel connection to the other end
99 * @param channel_ctx place to store local state associated with the channel 99 * @param channel_ctx place to store local state associated with the channel
100 * @param message the actual message 100 * @param message the actual message
101 * 101 *
102 * @return GNUNET_OK to keep the connection open, 102 * @return GNUNET_OK to keep the connection open,
103 * GNUNET_SYSERR to close it (signal serious error) 103 * GNUNET_SYSERR to close it (signal serious error)
104 */ 104 */
@@ -190,11 +190,11 @@ static struct GNUNET_MESH_MessageHandler handlers2[] = {
190 190
191/** 191/**
192 * Data send callback: fillbuffer with test packet. 192 * Data send callback: fillbuffer with test packet.
193 * 193 *
194 * @param cls Closure (unused). 194 * @param cls Closure (unused).
195 * @param size Buffer size. 195 * @param size Buffer size.
196 * @param buf Buffer to fill. 196 * @param buf Buffer to fill.
197 * 197 *
198 * @return size of test packet. 198 * @return size of test packet.
199 */ 199 */
200static size_t 200static size_t
@@ -216,7 +216,7 @@ do_send (void *cls, size_t size, void *buf)
216 216
217/** 217/**
218 * Connect to other client and send data 218 * Connect to other client and send data
219 * 219 *
220 * @param cls Closue (unused). 220 * @param cls Closue (unused).
221 * @param tc TaskContext. 221 * @param tc TaskContext.
222 */ 222 */
@@ -238,13 +238,13 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
238 238
239/** 239/**
240 * Initialize framework and start test 240 * Initialize framework and start test
241 * 241 *
242 * @param cls Closure (unused). 242 * @param cls Closure (unused).
243 * @param cfg Configuration handle. 243 * @param cfg Configuration handle.
244 * @param peer Testing peer handle. 244 * @param peer Testing peer handle.
245 */ 245 */
246static void 246static void
247run (void *cls, 247run (void *cls,
248 const struct GNUNET_CONFIGURATION_Handle *cfg, 248 const struct GNUNET_CONFIGURATION_Handle *cfg,
249 struct GNUNET_TESTING_Peer *peer) 249 struct GNUNET_TESTING_Peer *peer)
250{ 250{
diff --git a/src/mesh/test_mesh_single.c b/src/mesh/test_mesh_single.c
index 196bda6e7..9e850079f 100644
--- a/src/mesh/test_mesh_single.c
+++ b/src/mesh/test_mesh_single.c
@@ -104,7 +104,7 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
104 * @param channel connection to the other end 104 * @param channel connection to the other end
105 * @param channel_ctx place to store local state associated with the channel 105 * @param channel_ctx place to store local state associated with the channel
106 * @param message the actual message 106 * @param message the actual message
107 * 107 *
108 * @return GNUNET_OK to keep the connection open, 108 * @return GNUNET_OK to keep the connection open,
109 * GNUNET_SYSERR to close it (signal serious error) 109 * GNUNET_SYSERR to close it (signal serious error)
110 */ 110 */
@@ -196,11 +196,11 @@ static struct GNUNET_MESH_MessageHandler handlers1[] = {
196 196
197/** 197/**
198 * Data send callback: fillbuffer with test packet. 198 * Data send callback: fillbuffer with test packet.
199 * 199 *
200 * @param cls Closure (unused). 200 * @param cls Closure (unused).
201 * @param size Buffer size. 201 * @param size Buffer size.
202 * @param buf Buffer to fill. 202 * @param buf Buffer to fill.
203 * 203 *
204 * @return size of test packet. 204 * @return size of test packet.
205 */ 205 */
206static size_t 206static size_t
@@ -223,7 +223,7 @@ do_send (void *cls, size_t size, void *buf)
223 223
224/** 224/**
225 * Connect to other client and send data 225 * Connect to other client and send data
226 * 226 *
227 * @param cls Closue (unused). 227 * @param cls Closue (unused).
228 * @param tc TaskContext. 228 * @param tc TaskContext.
229 */ 229 */
@@ -244,13 +244,13 @@ do_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
244 244
245/** 245/**
246 * Initialize framework and start test 246 * Initialize framework and start test
247 * 247 *
248 * @param cls Closure (unused). 248 * @param cls Closure (unused).
249 * @param cfg Configuration handle. 249 * @param cfg Configuration handle.
250 * @param peer Testing peer handle. 250 * @param peer Testing peer handle.
251 */ 251 */
252static void 252static void
253run (void *cls, 253run (void *cls,
254 const struct GNUNET_CONFIGURATION_Handle *cfg, 254 const struct GNUNET_CONFIGURATION_Handle *cfg,
255 struct GNUNET_TESTING_Peer *peer) 255 struct GNUNET_TESTING_Peer *peer)
256{ 256{
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c
index 970283c1a..439f6ec5c 100644
--- a/src/mesh/test_mesh_small.c
+++ b/src/mesh/test_mesh_small.c
@@ -207,7 +207,7 @@ show_end_data (void)
207 207
208/** 208/**
209 * Shut down peergroup, clean up. 209 * Shut down peergroup, clean up.
210 * 210 *
211 * @param cls Closure (unused). 211 * @param cls Closure (unused).
212 * @param tc Task Context. 212 * @param tc Task Context.
213 */ 213 */
@@ -221,7 +221,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
221 221
222/** 222/**
223 * Disconnect from mesh services af all peers, call shutdown. 223 * Disconnect from mesh services af all peers, call shutdown.
224 * 224 *
225 * @param cls Closure (unused). 225 * @param cls Closure (unused).
226 * @param tc Task Context. 226 * @param tc Task Context.
227 */ 227 */
@@ -260,7 +260,7 @@ disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
260 260
261/** 261/**
262 * Abort test: schedule disconnect and shutdown immediately 262 * Abort test: schedule disconnect and shutdown immediately
263 * 263 *
264 * @param line Line in the code the abort is requested from (__LINE__). 264 * @param line Line in the code the abort is requested from (__LINE__).
265 */ 265 */
266static void 266static void
@@ -276,11 +276,11 @@ abort_test (long line)
276 276
277/** 277/**
278 * Transmit ready callback. 278 * Transmit ready callback.
279 * 279 *
280 * @param cls Closure (message type). 280 * @param cls Closure (message type).
281 * @param size Size of the tranmist buffer. 281 * @param size Size of the tranmist buffer.
282 * @param buf Pointer to the beginning of the buffer. 282 * @param buf Pointer to the beginning of the buffer.
283 * 283 *
284 * @return Number of bytes written to buf. 284 * @return Number of bytes written to buf.
285 */ 285 */
286static size_t 286static size_t
@@ -289,7 +289,7 @@ tmt_rdy (void *cls, size_t size, void *buf);
289 289
290/** 290/**
291 * Task to schedule a new data transmission. 291 * Task to schedule a new data transmission.
292 * 292 *
293 * @param cls Closure (peer #). 293 * @param cls Closure (peer #).
294 * @param tc Task Context. 294 * @param tc Task Context.
295 */ 295 */
@@ -385,7 +385,7 @@ tmt_rdy (void *cls, size_t size, void *buf)
385 GNUNET_SCHEDULER_add_now (&data_task, NULL); 385 GNUNET_SCHEDULER_add_now (&data_task, NULL);
386 } 386 }
387 } 387 }
388 388
389 return size_payload; 389 return size_payload;
390} 390}
391 391
@@ -615,10 +615,10 @@ channel_cleaner (void *cls, const struct GNUNET_MESH_Channel *channel,
615 615
616/** 616/**
617 * START THE TESTCASE ITSELF, AS WE ARE CONNECTED TO THE MESH SERVICES. 617 * START THE TESTCASE ITSELF, AS WE ARE CONNECTED TO THE MESH SERVICES.
618 * 618 *
619 * Testcase continues when the root receives confirmation of connected peers, 619 * Testcase continues when the root receives confirmation of connected peers,
620 * on callback funtion ch. 620 * on callback funtion ch.
621 * 621 *
622 * @param cls Closure (unsued). 622 * @param cls Closure (unsued).
623 * @param tc Task Context. 623 * @param tc Task Context.
624 */ 624 */
@@ -663,7 +663,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
663 data_received = 0; 663 data_received = 0;
664 data_sent = 0; 664 data_sent = 0;
665 GNUNET_MESH_notify_transmit_ready (ch, GNUNET_NO, 665 GNUNET_MESH_notify_transmit_ready (ch, GNUNET_NO,
666 GNUNET_TIME_UNIT_FOREVER_REL, 666 GNUNET_TIME_UNIT_FOREVER_REL,
667 size_payload, &tmt_rdy, (void *) 1L); 667 size_payload, &tmt_rdy, (void *) 1L);
668} 668}
669 669