[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36069 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36069 - gnunet/src/cadet |
Date: |
Tue, 14 Jul 2015 23:56:33 +0200 |
Author: grothoff
Date: 2015-07-14 23:56:33 +0200 (Tue, 14 Jul 2015)
New Revision: 36069
Modified:
gnunet/src/cadet/gnunet-service-cadet_connection.c
gnunet/src/cadet/gnunet-service-cadet_connection.h
gnunet/src/cadet/gnunet-service-cadet_dht.h
gnunet/src/cadet/gnunet-service-cadet_peer.c
gnunet/src/cadet/gnunet-service-cadet_peer.h
gnunet/src/cadet/gnunet-service-cadet_tunnel.h
Log:
committing version used to produce 3846:9432
Modified: gnunet/src/cadet/gnunet-service-cadet_connection.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.c 2015-07-13 20:23:53 UTC
(rev 36068)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.c 2015-07-14 21:56:33 UTC
(rev 36069)
@@ -501,6 +501,7 @@
int delta;
/* If origin, there is no connection to send ACKs. Wrong function! */
+ GCC_check_connections ();
if (GCC_is_origin (c, fwd))
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "connection %s is origin in %s\n",
@@ -523,6 +524,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
" last pid recv: %u, last ack sent: %u\n",
prev_fc->last_pid_recv, prev_fc->last_ack_sent);
+ GCC_check_connections ();
return;
}
@@ -536,6 +538,7 @@
if (ack == prev_fc->last_ack_sent && GNUNET_NO == force)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "Not sending FWD ACK, not needed\n");
+ GCC_check_connections ();
return;
}
@@ -551,6 +554,7 @@
else
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " same ACK already in queue\n");
+ GCC_check_connections ();
return;
}
}
@@ -567,6 +571,7 @@
!fwd, GNUNET_YES,
&ack_sent, prev_fc);
GNUNET_assert (NULL != prev_fc->ack_msg);
+ GCC_check_connections ();
}
@@ -598,6 +603,7 @@
double usecsperbyte;
int forced;
+ GCC_check_connections ();
LOG (GNUNET_ERROR_TYPE_DEBUG, "connection message_sent\n");
GCC_debug (c, GNUNET_ERROR_TYPE_DEBUG);
@@ -633,6 +639,7 @@
LOG (GNUNET_ERROR_TYPE_ERROR, "Message %s sent on NULL connection!\n",
GC_m2s (type));
}
+ GCC_check_connections ();
return GNUNET_NO;
}
LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P- %p %u\n", c, c->pending_messages);
@@ -643,6 +650,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
"! destroying connection!\n");
GCC_destroy (c);
+ GCC_check_connections ();
return GNUNET_YES;
}
/* Send ACK if needed, after accounting for sent ID in fc->queue_n */
@@ -729,6 +737,7 @@
p->avg /= p->size;
}
p->idx = (p->idx + 1) % AVG_MSGS;
+ GCC_check_connections ();
return GNUNET_NO;
}
@@ -806,6 +815,7 @@
GCP_check_connection (get_prev_hop (c), c);
}
+
/**
* Helper for #check_connections(). Calls #check_neighbours().
*
@@ -827,11 +837,13 @@
/**
- * Check all connections using #check_neighbours().
+ * Check invariants for all connections using #check_neighbours().
*/
-static void
-check_connections ()
+void
+GCC_check_connections ()
{
+ if (NULL == connections)
+ return;
GNUNET_CONTAINER_multihashmap_iterate (connections,
&check_connection,
NULL);
@@ -933,6 +945,7 @@
{
struct CadetTunnel *t;
+ GCC_check_connections ();
t = connection->t;
LOG (GNUNET_ERROR_TYPE_INFO, "---> {%14s ACK} on connection %s\n",
GC_f2s (!fwd), GCC_2s (connection));
@@ -945,6 +958,7 @@
GCT_change_cstate (t, CADET_TUNNEL_WAITING);
if (CADET_CONNECTION_READY != connection->state)
connection_change_state (connection, CADET_CONNECTION_SENT);
+ GCC_check_connections ();
}
@@ -964,13 +978,16 @@
{
struct GNUNET_CADET_ConnectionBroken msg;
+ GCC_check_connections ();
msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionBroken));
msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN);
msg.cid = c->id;
msg.peer1 = *id1;
msg.peer2 = *id2;
- GNUNET_assert (NULL == GCC_send_prebuilt_message (&msg.header, 0, 0, c, fwd,
- GNUNET_YES, NULL, NULL));
+ GNUNET_assert (NULL ==
+ GCC_send_prebuilt_message (&msg.header, 0, 0, c, fwd,
+ GNUNET_YES, NULL, NULL));
+ GCC_check_connections ();
}
@@ -992,6 +1009,7 @@
struct GNUNET_CADET_ConnectionBroken *msg;
struct CadetPeer *neighbor;
+ GCC_check_connections ();
LOG (GNUNET_ERROR_TYPE_INFO, "---> BROKEN on unknown connection %s\n",
GNUNET_h2s (GC_h2hc (connection_id)));
@@ -1009,6 +1027,7 @@
0, 2, sizeof (struct GNUNET_CADET_ConnectionBroken),
NULL, GNUNET_SYSERR, /* connection, fwd */
NULL, NULL); /* continuation */
+ GCC_check_connections ();
}
@@ -1024,7 +1043,9 @@
struct GNUNET_MessageHeader msg;
struct CadetFlowControl *fc;
- LOG (GNUNET_ERROR_TYPE_INFO, "keepalive %s for connection %s\n",
+ GCC_check_connections ();
+ LOG (GNUNET_ERROR_TYPE_INFO,
+ "keepalive %s for connection %s\n",
GC_f2s (fwd), GCC_2s (c));
fc = fwd ? &c->fwd_fc : &c->bck_fc;
@@ -1043,6 +1064,7 @@
GNUNET_assert (NULL ==
GCT_send_prebuilt_message (&msg, c->t, c,
GNUNET_NO, NULL, NULL));
+ GCC_check_connections ();
}
@@ -1055,7 +1077,8 @@
static void
connection_recreate (struct CadetConnection *c, int fwd)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "sending connection recreate\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "sending connection recreate\n");
if (fwd)
GCC_send_create (c);
else
@@ -1113,7 +1136,6 @@
}
-
/**
* Keep the connection alive.
*
@@ -1125,7 +1147,9 @@
static void
connection_keepalive (struct CadetConnection *c, int fwd, int shutdown)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "%s keepalive for %s\n",
+ GCC_check_connections ();
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "%s keepalive for %s\n",
GC_f2s (fwd), GCC_2s (c));
if (fwd)
@@ -1137,7 +1161,7 @@
return;
connection_maintain (c, fwd);
-
+ GCC_check_connections ();
/* Next execution will be scheduled by message_sent or _maintain*/
}
@@ -1152,9 +1176,11 @@
connection_fwd_keepalive (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
+ GCC_check_connections ();
connection_keepalive ((struct CadetConnection *) cls,
GNUNET_YES,
tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN);
+ GCC_check_connections ();
}
@@ -1168,9 +1194,11 @@
connection_bck_keepalive (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
+ GCC_check_connections ();
connection_keepalive ((struct CadetConnection *) cls,
GNUNET_NO,
tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN);
+ GCC_check_connections ();
}
@@ -1190,6 +1218,7 @@
struct GNUNET_SCHEDULER_Task * *task_id;
GNUNET_SCHEDULER_TaskCallback keepalive_task;
+ GCC_check_connections ();
if (GNUNET_NO == GCC_is_origin (c, fwd))
return;
@@ -1229,9 +1258,12 @@
}
/* Schedule the task */
- *task_id = GNUNET_SCHEDULER_add_delayed (delay, keepalive_task, c);
+ *task_id = GNUNET_SCHEDULER_add_delayed (delay,
+ keepalive_task,
+ c);
LOG (GNUNET_ERROR_TYPE_DEBUG, "next keepalive in %s\n",
GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES));
+ GCC_check_connections ();
}
@@ -1250,7 +1282,9 @@
{
struct CadetPeer *peer;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "connection_unlock_queue %s on %s\n",
+ GCC_check_connections ();
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "connection_unlock_queue %s on %s\n",
GC_f2s (fwd), GCC_2s (c));
if (GCC_is_terminal (c, fwd))
@@ -1261,6 +1295,7 @@
peer = get_hop (c, fwd);
GCP_queue_unlock (peer, c);
+ GCC_check_connections ();
}
@@ -1279,7 +1314,9 @@
struct CadetFlowControl *fc;
struct CadetPeer *peer;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Cancel %s queues for connection %s\n",
+ GCC_check_connections ();
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Cancel %s queues for connection %s\n",
GC_f2s (fwd), GCC_2s (c));
if (NULL == c)
{
@@ -1296,6 +1333,7 @@
}
peer = get_hop (c, fwd);
GCP_queue_cancel (peer, c);
+ GCC_check_connections ();
}
@@ -1307,7 +1345,8 @@
* @param tc TaskContext.
*/
static void
-connection_poll (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+connection_poll (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -1338,11 +1377,12 @@
fc->poll_msg = NULL;
fc->poll_time = GNUNET_TIME_STD_BACKOFF (fc->poll_time);
fc->poll_task = GNUNET_SCHEDULER_add_delayed (fc->poll_time,
- &connection_poll, fc);
+ &connection_poll,
+ fc);
LOG (GNUNET_ERROR_TYPE_DEBUG, " task %u\n", fc->poll_task);
-
}
+
/**
* Function called if a connection has been stalled for a while,
* possibly due to a missed ACK. Poll the neighbor about its ACK status.
@@ -1359,6 +1399,7 @@
int fwd;
fc->poll_task = NULL;
+ GCC_check_connections ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
{
return;
@@ -1377,6 +1418,7 @@
GCC_send_prebuilt_message (&msg.header, 0, fc->last_pid_sent, c,
fc == &c->fwd_fc, GNUNET_YES, &poll_sent, fc);
GNUNET_assert (NULL != fc->poll_msg);
+ GCC_check_connections ();
}
@@ -1396,6 +1438,7 @@
unsigned int pending;
int destroyed;
+ GCC_check_connections ();
c->state = CADET_CONNECTION_DESTROYED;
c->destroy = GNUNET_YES;
@@ -1423,6 +1466,7 @@
}
GCC_destroy (c);
}
+ GCC_check_connections ();
}
@@ -1440,6 +1484,7 @@
{
struct CadetFlowControl *reverse_fc;
+ GCC_check_connections ();
reverse_fc = fwd ? &c->bck_fc : &c->fwd_fc;
LOG (GNUNET_ERROR_TYPE_INFO,
@@ -1463,10 +1508,12 @@
send_broken_unknown (&c->id, &my_full_id, NULL, next_hop);
if (0 < reverse_fc->queue_n)
resend_messages_and_destroy (c, !fwd);
+ GCC_check_connections ();
return;
}
GCC_destroy (c);
+ GCC_check_connections ();
}
@@ -1486,8 +1533,9 @@
c->fwd_maintenance_task = NULL;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
-
+ GCC_check_connections ();
connection_timeout (c, GNUNET_YES);
+ GCC_check_connections ();
}
@@ -1507,8 +1555,9 @@
c->bck_maintenance_task = NULL;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
-
+ GCC_check_connections ();
connection_timeout (c, GNUNET_NO);
+ GCC_check_connections ();
}
@@ -1530,7 +1579,6 @@
connection_reset_timeout (struct CadetConnection *c, int fwd)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "Connection %s reset timeout\n", GC_f2s (fwd));
-
if (GCC_is_origin (c, fwd)) /* Startpoint */
{
schedule_next_keepalive (c, fwd);
@@ -1658,7 +1706,6 @@
}
-
/**
* Iterator to compare each connection's path with the path of a new
connection.
*
@@ -1689,6 +1736,7 @@
}
}
+
/**
* Finds out if this path is already being used by and existing connection.
*
@@ -1700,9 +1748,8 @@
* the peer will eventually reject our attempt).
*
* @param path Path to check.
- *
- * @return GNUNET_YES if the tunnel has a connection with the same path,
- * GNUNET_NO otherwise.
+ * @return #GNUNET_YES if the tunnel has a connection with the same path,
+ * #GNUNET_NO otherwise.
*/
static int
does_connection_exist (struct CadetConnection *conn)
@@ -1810,7 +1857,7 @@
unsigned int own_pos;
uint16_t size;
- check_connections ();
+ GCC_check_connections ();
/* Check size */
size = ntohs (message->size);
if (size < sizeof (struct GNUNET_CADET_ConnectionCreate))
@@ -1879,7 +1926,7 @@
/* If we are destination, why did the creation fail? */
GNUNET_break (0);
path_destroy (path);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
send_broken_unknown (cid, &my_full_id,
@@ -1886,7 +1933,7 @@
GNUNET_PEER_resolve2 (path->peers[own_pos + 1]),
peer);
path_destroy (path);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
GCP_add_path_to_all (path, GNUNET_NO);
@@ -1924,7 +1971,7 @@
path_destroy (path);
GCC_destroy (c);
send_broken_unknown (cid, &my_full_id, NULL, peer);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -1946,7 +1993,7 @@
NULL, NULL));
}
path_destroy (path);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -1972,7 +2019,7 @@
enum CadetConnectionState oldstate;
int fwd;
- check_connections ();
+ GCC_check_connections ();
msg = (struct GNUNET_CADET_ConnectionACK *) message;
log_message (message, peer, &msg->cid);
c = connection_get (&msg->cid);
@@ -1983,7 +2030,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
" don't know the connection!\n");
send_broken_unknown (&msg->cid, &my_full_id, NULL, peer);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -1991,7 +2038,7 @@
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
" connection being destroyed\n");
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2051,7 +2098,7 @@
/* Change tunnel state, trigger KX */
if (CADET_TUNNEL_WAITING == GCT_get_cstate (c->t))
GCT_change_cstate (c->t, CADET_TUNNEL_READY);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2072,7 +2119,7 @@
/* Change tunnel state */
if (CADET_TUNNEL_WAITING == GCT_get_cstate (c->t))
GCT_change_cstate (c->t, CADET_TUNNEL_READY);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2080,7 +2127,7 @@
GNUNET_assert (NULL ==
GCC_send_prebuilt_message (message, 0, 0, c, fwd,
GNUNET_YES, NULL, NULL));
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2105,7 +2152,7 @@
int pending;
int fwd;
- check_connections ();
+ GCC_check_connections ();
msg = (struct GNUNET_CADET_ConnectionBroken *) message;
log_message (message, id, &msg->cid);
LOG (GNUNET_ERROR_TYPE_DEBUG, " regarding %s\n",
@@ -2116,7 +2163,7 @@
if (NULL == c)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " duplicate CONNECTION_BROKEN\n");
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2156,7 +2203,7 @@
GNUNET_YES, NULL, NULL));
connection_cancel_queues (c, !fwd);
}
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2179,7 +2226,7 @@
struct CadetConnection *c;
int fwd;
- check_connections ();
+ GCC_check_connections ();
msg = (const struct GNUNET_CADET_ConnectionDestroy *) message;
log_message (message, peer, &msg->cid);
c = connection_get (&msg->cid);
@@ -2193,7 +2240,7 @@
1, GNUNET_NO);
LOG (GNUNET_ERROR_TYPE_DEBUG,
" connection unknown: already destroyed?\n");
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
fwd = is_fwd (c, peer);
@@ -2209,7 +2256,7 @@
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " directly destroying connection!\n");
GCC_destroy (c);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
c->destroy = GNUNET_YES;
@@ -2219,7 +2266,7 @@
GCT_remove_connection (c->t, c);
c->t = NULL;
}
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2368,7 +2415,7 @@
uint32_t ttl;
int fwd;
- check_connections ();
+ GCC_check_connections ();
if (GNUNET_MESSAGE_TYPE_CADET_AX == ntohs (message->type))
{
overhead = sizeof (struct GNUNET_CADET_AX);
@@ -2394,7 +2441,7 @@
/* If something went wrong, discard message. */
if (GNUNET_SYSERR == fwd)
{
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2410,7 +2457,7 @@
}
GCT_handle_encrypted (c->t, message);
GCC_send_ack (c, fwd, GNUNET_NO);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2425,7 +2472,7 @@
GNUNET_STATISTICS_update (stats, "# TTL drops", 1, GNUNET_NO);
LOG (GNUNET_ERROR_TYPE_WARNING, " TTL is 0, DROPPING!\n");
GCC_send_ack (c, fwd, GNUNET_NO);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
}
@@ -2433,7 +2480,7 @@
GNUNET_STATISTICS_update (stats, "# messages forwarded", 1, GNUNET_NO);
GNUNET_assert (NULL == GCC_send_prebuilt_message (message, 0, 0, c, fwd,
GNUNET_NO, NULL, NULL));
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2455,7 +2502,7 @@
size_t expected_size;
int fwd;
- check_connections ();
+ GCC_check_connections ();
cid = &msg->cid;
log_message (&msg->header, peer, cid);
@@ -2479,7 +2526,7 @@
return GNUNET_OK;
}
GCT_handle_kx (c->t, &msg[1].header);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2488,7 +2535,7 @@
GNUNET_STATISTICS_update (stats, "# messages forwarded", 1, GNUNET_NO);
GNUNET_assert (NULL == GCC_send_prebuilt_message (&msg->header, 0, 0, c, fwd,
GNUNET_NO, NULL, NULL));
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2507,7 +2554,7 @@
const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message)
{
- check_connections ();
+ GCC_check_connections ();
return handle_cadet_kx (peer, (struct GNUNET_CADET_KX *) message);
}
@@ -2525,7 +2572,7 @@
GCC_handle_encrypted (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message)
{
- check_connections ();
+ GCC_check_connections ();
return handle_cadet_encrypted (peer, message);
}
@@ -2550,7 +2597,7 @@
uint32_t ack;
int fwd;
- check_connections ();
+ GCC_check_connections ();
msg = (struct GNUNET_CADET_ACK *) message;
log_message (message, peer, &msg->cid);
c = connection_get (&msg->cid);
@@ -2559,7 +2606,7 @@
GNUNET_STATISTICS_update (stats, "# ack on unknown connection", 1,
GNUNET_NO);
send_broken_unknown (&msg->cid, &my_full_id, NULL, peer);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2598,7 +2645,7 @@
}
connection_unlock_queue (c, fwd);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2624,7 +2671,7 @@
uint32_t pid;
int fwd;
- check_connections ();
+ GCC_check_connections ();
msg = (struct GNUNET_CADET_Poll *) message;
log_message (message, peer, &msg->cid);
c = connection_get (&msg->cid);
@@ -2635,7 +2682,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, "POLL message on unknown connection %s!\n",
GNUNET_h2s (GC_h2hc (&msg->cid)));
send_broken_unknown (&msg->cid, &my_full_id, NULL, peer);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2666,7 +2713,7 @@
fc->last_pid_recv = pid;
fwd = fc == &c->bck_fc;
GCC_send_ack (c, fwd, GNUNET_YES);
- check_connections ();
+ GCC_check_connections ();
return GNUNET_OK;
}
@@ -2685,7 +2732,7 @@
{
unsigned int buffer;
- check_connections ();
+ GCC_check_connections ();
LOG (GNUNET_ERROR_TYPE_DEBUG, "GCC send %s ACK on %s\n",
GC_f2s (fwd), GCC_2s (c));
@@ -2698,7 +2745,7 @@
if (GNUNET_NO != c->destroy)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " being destroyed, why bother...\n");
- check_connections ();
+ GCC_check_connections ();
return;
}
@@ -2716,7 +2763,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, " buffer available: %u\n", buffer);
if (0 == buffer && GNUNET_NO == force)
{
- check_connections ();
+ GCC_check_connections ();
return;
}
@@ -2732,7 +2779,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, " sending on connection\n");
send_ack (c, buffer, fwd, force);
}
- check_connections ();
+ GCC_check_connections ();
}
@@ -2807,7 +2854,7 @@
void
GCC_shutdown (void)
{
- check_connections ();
+ GCC_check_connections ();
GNUNET_CONTAINER_multihashmap_iterate (connections,
&shutdown_iterator,
NULL);
@@ -2835,7 +2882,7 @@
struct CadetConnection *c;
struct CadetPeerPath *p;
- check_connections ();
+ GCC_check_connections ();
p = path_duplicate (path);
c = GNUNET_new (struct CadetConnection);
c->id = *cid;
@@ -2871,7 +2918,7 @@
return NULL;
}
LOG (GNUNET_ERROR_TYPE_INFO, "New connection %s\n", GCC_2s (c));
- check_connections ();
+ GCC_check_connections ();
return c;
}
@@ -2879,7 +2926,7 @@
void
GCC_destroy (struct CadetConnection *c)
{
- check_connections ();
+ GCC_check_connections ();
if (NULL == c)
{
GNUNET_break (0);
@@ -2953,7 +3000,7 @@
-1,
GNUNET_NO);
GNUNET_free (c);
- check_connections ();
+ GCC_check_connections ();
}
@@ -3145,7 +3192,7 @@
struct CadetPeer *hop;
int fwd;
- check_connections ();
+ GCC_check_connections ();
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Notify broken on %s due to %s disconnect\n",
GCC_2s (c),
@@ -3162,7 +3209,7 @@
{
/* Local shutdown, no one to notify about this. */
GCC_destroy (c);
- check_connections ();
+ GCC_check_connections ();
return;
}
if (GNUNET_NO == c->destroy)
@@ -3178,7 +3225,7 @@
* Cancel all queues, if no message is left, connection will be destroyed.
*/
connection_cancel_queues (c, ! fwd);
- check_connections ();
+ GCC_check_connections ();
}
@@ -3296,7 +3343,7 @@
uint16_t type;
int droppable;
- check_connections ();
+ GCC_check_connections ();
size = ntohs (message->size);
data = GNUNET_malloc (size);
memcpy (data, message, size);
@@ -3418,12 +3465,12 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, "dropping msg on %s, NULL q\n", GCC_2s (c));
GNUNET_free (data);
GNUNET_free (q);
- check_connections ();
+ GCC_check_connections ();
return NULL;
}
q->cont = cont;
q->cont_cls = cont_cls;
- check_connections ();
+ GCC_check_connections ();
return (NULL == cont) ? NULL : q;
}
@@ -3444,7 +3491,7 @@
/* queue destroy calls message_sent, which calls q->cont and frees q */
GCP_queue_destroy (q->q, GNUNET_YES, GNUNET_NO, 0);
- check_connections ();
+ GCC_check_connections ();
}
@@ -3460,7 +3507,7 @@
enum CadetTunnelCState state;
size_t size;
- check_connections ();
+ GCC_check_connections ();
size = sizeof (struct GNUNET_CADET_ConnectionCreate);
size += connection->path->length * sizeof (struct GNUNET_PeerIdentity);
@@ -3481,7 +3528,7 @@
GCT_change_cstate (connection->t, CADET_TUNNEL_WAITING);
if (CADET_CONNECTION_NEW == connection->state)
connection_change_state (connection, CADET_CONNECTION_SENT);
- check_connections ();
+ GCC_check_connections ();
}
@@ -3501,7 +3548,7 @@
if (GNUNET_YES == c->destroy)
return;
- check_connections ();
+ GCC_check_connections ();
msg.header.size = htons (sizeof (msg));
msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY);
msg.cid = c->id;
@@ -3519,7 +3566,7 @@
NULL, NULL));
c->destroy = GNUNET_YES;
c->state = CADET_CONNECTION_DESTROYED;
- check_connections ();
+ GCC_check_connections ();
}
Modified: gnunet/src/cadet/gnunet-service-cadet_connection.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.h 2015-07-13 20:23:53 UTC
(rev 36068)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.h 2015-07-14 21:56:33 UTC
(rev 36069)
@@ -92,7 +92,13 @@
#include "gnunet-service-cadet_peer.h"
+/**
+ * Check invariants for all connections using #check_neighbours().
+ */
+void
+GCC_check_connections ();
+
/**
* Callback called when a queued message is sent.
*
Modified: gnunet/src/cadet/gnunet-service-cadet_dht.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_dht.h 2015-07-13 20:23:53 UTC (rev
36068)
+++ gnunet/src/cadet/gnunet-service-cadet_dht.h 2015-07-14 21:56:33 UTC (rev
36069)
@@ -50,8 +50,9 @@
* @param path An unchecked, unoptimized path to the target node.
* After callback will no longer be valid!
*/
-typedef void (*GCD_search_callback) (void *cls,
- const struct CadetPeerPath *path);
+typedef void
+(*GCD_search_callback) (void *cls,
+ const struct CadetPeerPath *path);
/******************************************************************************/
/******************************** API
***********************************/
@@ -89,4 +90,4 @@
/* ifndef GNUNET_CADET_SERVICE_LOCAL_H */
#endif
-/* end of gnunet-cadet-service_LOCAL.h */
\ No newline at end of file
+/* end of gnunet-cadet-service_LOCAL.h */
Modified: gnunet/src/cadet/gnunet-service-cadet_peer.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.c 2015-07-13 20:23:53 UTC
(rev 36068)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.c 2015-07-14 21:56:33 UTC
(rev 36069)
@@ -409,6 +409,7 @@
struct CadetPeerPath *path;
char own_id[16];
+ GCC_check_connections ();
GNUNET_snprintf (own_id,
sizeof (own_id),
"%s",
@@ -444,6 +445,7 @@
if ( (NULL != GCP_get_tunnel (mp)) &&
(0 > GNUNET_CRYPTO_cmp_peer_identity (&my_full_id, peer)) )
GCP_connect (mp);
+ GCC_check_connections ();
}
@@ -461,6 +463,7 @@
struct CadetPeerPath *direct_path;
char own_id[16];
+ GCC_check_connections ();
strncpy (own_id, GNUNET_i2s (&my_full_id), 15);
p = GNUNET_CONTAINER_multipeermap_get (peers, peer);
if (NULL == p)
@@ -493,6 +496,7 @@
-1,
GNUNET_NO);
path_destroy (direct_path);
+ GCC_check_connections ();
}
@@ -789,8 +793,9 @@
static int
is_searching (const struct CadetPeer *peer)
{
- return (NULL == peer->search_h && NULL == peer->search_delayed) ?
- GNUNET_NO : GNUNET_YES;
+ return ( (NULL == peer->search_h) &&
+ (NULL == peer->search_delayed) ) ?
+ GNUNET_NO : GNUNET_YES;
}
@@ -806,11 +811,11 @@
struct CadetPeer *peer = cls;
peer->search_delayed = NULL;
-
if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason))
return;
-
+ GCC_check_connections ();
GCP_start_search (peer);
+ GCC_check_connections ();
}
@@ -1017,6 +1022,7 @@
struct CadetPeer *peer = cls;
unsigned int connection_count;
+ GCC_check_connections ();
GCP_add_path_to_all (path, GNUNET_NO);
/* Count connections */
@@ -1024,7 +1030,10 @@
/* If we already have our minimum (or more) connections, it's enough */
if (CONNECTIONS_PER_TUNNEL <= connection_count)
+ {
+ GCC_check_connections ();
return;
+ }
if (CADET_TUNNEL_SEARCHING == GCT_get_cstate (peer->tunnel))
{
@@ -1031,6 +1040,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, " ... connect!\n");
GCP_connect (peer);
}
+ GCC_check_connections ();
}
@@ -1147,6 +1157,7 @@
char *dst;
uint32_t pid;
+ GCC_check_connections ();
LOG (GNUNET_ERROR_TYPE_DEBUG, "\n");
LOG (GNUNET_ERROR_TYPE_DEBUG, "\n");
LOG (GNUNET_ERROR_TYPE_DEBUG, "Queue send towards %s (max %u)\n",
@@ -1175,6 +1186,7 @@
peer->core_transmit = NULL;
peer->tmt_time.abs_value_us = 0;
}
+ GCC_check_connections ();
return 0;
}
@@ -1274,7 +1286,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, " return %d\n", total_size);
queue_debug (peer, GNUNET_ERROR_TYPE_DEBUG);
-
+ GCC_check_connections ();
return total_size;
}
@@ -1300,12 +1312,15 @@
* #GNUNET_NO otherwise.
*/
int
-GCP_queue_destroy (struct CadetPeerQueue *queue, int clear_cls,
- int sent, uint32_t pid)
+GCP_queue_destroy (struct CadetPeerQueue *queue,
+ int clear_cls,
+ int sent,
+ uint32_t pid)
{
struct CadetPeer *peer;
int connection_destroyed;
+ GCC_check_connections ();
peer = queue->peer;
LOG (GNUNET_ERROR_TYPE_DEBUG, "queue destroy %s\n", GC_m2s (queue->type));
if (GNUNET_YES == clear_cls)
@@ -1365,6 +1380,7 @@
}
GNUNET_free (queue);
+ GCC_check_connections ();
return connection_destroyed;
}
@@ -1396,6 +1412,7 @@
int priority;
int call_core;
+ GCC_check_connections ();
if (NULL == c && GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN != type)
error_level = GNUNET_ERROR_TYPE_ERROR;
else
@@ -1481,6 +1498,7 @@
}
queue_debug (peer, GNUNET_ERROR_TYPE_DEBUG);
+ GCC_check_connections ();
return q;
}
@@ -1500,6 +1518,7 @@
struct CadetPeerQueue *prev;
int connection_destroyed;
+ GCC_check_connections ();
connection_destroyed = GNUNET_NO;
for (q = peer->queue_head; NULL != q; q = next)
{
@@ -1537,6 +1556,7 @@
peer->core_transmit = NULL;
peer->tmt_time.abs_value_us = 0;
}
+ GCC_check_connections ();
}
@@ -1592,6 +1612,7 @@
struct GNUNET_MessageHeader *msg;
int dest;
+ GCC_check_connections ();
GNUNET_assert (NULL != destroyed);
LOG (GNUNET_ERROR_TYPE_DEBUG, "connection_pop on connection %p\n", c);
for (q = peer->queue_head; NULL != q; q = next)
@@ -1636,10 +1657,11 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, "Unknown message %s\n", GC_m2s
(q->type));
}
}
-
+ GCC_check_connections ();
return NULL;
}
+
/**
* Unlock a possibly locked queue for a connection.
*
@@ -1656,6 +1678,7 @@
struct CadetPeerQueue *q;
size_t size;
+ GCC_check_connections ();
if (NULL != peer->core_transmit)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " already unlocked!\n");
@@ -1679,6 +1702,7 @@
&queue_send,
peer);
peer->tmt_time = GNUNET_TIME_absolute_get ();
+ GCC_check_connections ();
}
@@ -1865,6 +1889,7 @@
struct CadetConnection *c;
int rerun_search;
+ GCC_check_connections ();
LOG (GNUNET_ERROR_TYPE_DEBUG, "peer_connect towards %s\n", GCP_2s (peer));
/* If we have a current hello, try to connect using it. */
@@ -1924,13 +1949,16 @@
GCP_stop_search (peer);
delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 100);
- peer->search_delayed = GNUNET_SCHEDULER_add_delayed (delay,
&delayed_search,
+ peer->search_delayed = GNUNET_SCHEDULER_add_delayed (delay,
+ &delayed_search,
peer);
+ GCC_check_connections ();
return;
}
if (GNUNET_NO == is_searching (peer))
GCP_start_search (peer);
+ GCC_check_connections ();
}
@@ -1971,9 +1999,11 @@
void
GCP_add_tunnel (struct CadetPeer *peer)
{
+ GCC_check_connections ();
if (NULL != peer->tunnel)
return;
peer->tunnel = GCT_new (peer);
+ GCC_check_connections ();
}
@@ -2025,7 +2055,8 @@
* NULL on error.
*/
struct CadetPeerPath *
-GCP_add_path (struct CadetPeer *peer, struct CadetPeerPath *path,
+GCP_add_path (struct CadetPeer *peer,
+ struct CadetPeerPath *path,
int trusted)
{
struct CadetPeerPath *aux;
@@ -2032,7 +2063,9 @@
unsigned int l;
unsigned int l2;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "adding path [%u] to peer %s\n",
+ GCC_check_connections ();
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "adding path [%u] to peer %s\n",
path->length, GCP_2s (peer));
if (NULL == peer || NULL == path
@@ -2106,6 +2139,7 @@
{
GCP_connect (peer);
}
+ GCC_check_connections ();
return path;
}
@@ -2148,6 +2182,7 @@
unsigned int i;
/* TODO: invert and add */
+ GCC_check_connections ();
for (i = 0; i < p->length && p->peers[i] != myid; i++) /* skip'em */ ;
for (i++; i < p->length; i++)
{
@@ -2159,6 +2194,7 @@
copy->length = i + 1;
GCP_add_path (aux, copy, p->length < 3 ? GNUNET_NO : confirmed);
}
+ GCC_check_connections ();
}
@@ -2174,6 +2210,7 @@
struct CadetPeerPath *iter;
struct CadetPeerPath *next;
+ GCC_check_connections ();
GNUNET_assert (myid == path->peers[0]);
GNUNET_assert (peer->id == path->peers[path->length - 1]);
@@ -2194,6 +2231,7 @@
}
}
path_destroy (path);
+ GCC_check_connections ();
}
@@ -2259,7 +2297,8 @@
const struct GNUNET_PeerIdentity *id;
struct CadetTunnel *t = peer->tunnel;
- if (NULL != peer->search_h)
+ GCC_check_connections ();
+ if (NULL != peer->search_h)
{
GNUNET_break (0);
return;
@@ -2283,6 +2322,7 @@
{
GCT_change_cstate (t, CADET_TUNNEL_SEARCHING);
}
+ GCC_check_connections ();
}
@@ -2295,6 +2335,7 @@
void
GCP_stop_search (struct CadetPeer *peer)
{
+ GCC_check_connections ();
if (NULL != peer->search_h)
{
GCD_search_stop (peer->search_h);
@@ -2305,6 +2346,7 @@
GNUNET_SCHEDULER_cancel (peer->search_delayed);
peer->search_delayed = NULL;
}
+ GCC_check_connections ();
}
@@ -2381,7 +2423,8 @@
struct GNUNET_HELLO_Message *old;
size_t size;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "set hello for %s\n", GCP_2s (peer));
+ GCC_check_connections ();
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "set hello for %s\n", GCP_2s (peer));
if (NULL == hello)
return;
@@ -2400,6 +2443,7 @@
peer->hello, GNUNET_HELLO_size (hello));
GNUNET_free (old);
}
+ GCC_check_connections ();
}
@@ -2445,13 +2489,17 @@
if (NULL == transport_handle)
return;
-
+ GCC_check_connections ();
hello = GCP_get_hello (peer);
if (NULL == hello)
return;
mh = GNUNET_HELLO_get_header (hello);
- GNUNET_TRANSPORT_offer_hello (transport_handle, mh, try_connect, peer);
+ GNUNET_TRANSPORT_offer_hello (transport_handle,
+ mh,
+ &try_connect,
+ peer);
+ GCC_check_connections ();
}
@@ -2474,6 +2522,7 @@
GNUNET_PEER_Id p1;
GNUNET_PEER_Id p2;
+ GCC_check_connections ();
p1 = GNUNET_PEER_search (peer1);
p2 = GNUNET_PEER_search (peer2);
@@ -2502,6 +2551,7 @@
}
}
}
+ GCC_check_connections ();
}
@@ -2535,9 +2585,11 @@
GCP_iterate_all (GNUNET_CONTAINER_PeerMapIterator iter,
void *cls)
{
+ GCC_check_connections ();
GNUNET_CONTAINER_multipeermap_iterate (peers,
iter,
cls);
+ GCC_check_connections ();
}
@@ -2555,3 +2607,6 @@
return "(NULL)";
return GNUNET_i2s (GNUNET_PEER_resolve2 (peer->id));
}
+
+
+/* end of gnunet-service-cadet_peer.c */
Modified: gnunet/src/cadet/gnunet-service-cadet_peer.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.h 2015-07-13 20:23:53 UTC
(rev 36068)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.h 2015-07-14 21:56:33 UTC
(rev 36069)
@@ -52,6 +52,7 @@
#include "gnunet-service-cadet_connection.h"
+
/**
* Callback called when a queued message is sent.
*
@@ -63,14 +64,15 @@
* @param fwd Was this a FWD going message?
* @param size Size of the message.
* @param wait Time spent waiting for core (only the time for THIS message)
- *
* @return #GNUNET_YES if connection was destroyed, #GNUNET_NO otherwise.
*/
-typedef int (*GCP_sent) (void *cls,
- struct CadetConnection *c, int sent,
- uint16_t type, uint32_t pid, int fwd, size_t size,
- struct GNUNET_TIME_Relative wait);
+typedef int
+(*GCP_sent) (void *cls,
+ struct CadetConnection *c, int sent,
+ uint16_t type, uint32_t pid, int fwd, size_t size,
+ struct GNUNET_TIME_Relative wait);
+
/******************************************************************************/
/******************************** API
***********************************/
/******************************************************************************/
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.h 2015-07-13 20:23:53 UTC
(rev 36068)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.h 2015-07-14 21:56:33 UTC
(rev 36069)
@@ -156,6 +156,7 @@
GCT_init (const struct GNUNET_CONFIGURATION_Handle *c,
const struct GNUNET_CRYPTO_EddsaPrivateKey *key);
+
/**
* Shut down the tunnel subsystem.
*/
@@ -162,6 +163,7 @@
void
GCT_shutdown (void);
+
/**
* Create a tunnel.
*
@@ -170,6 +172,7 @@
struct CadetTunnel *
GCT_new (struct CadetPeer *destination);
+
/**
* Tunnel is empty: destroy it.
*
@@ -180,6 +183,7 @@
void
GCT_destroy_empty (struct CadetTunnel *t);
+
/**
* Destroy tunnel if empty (no more channels).
*
@@ -188,6 +192,7 @@
void
GCT_destroy_if_empty (struct CadetTunnel *t);
+
/**
* Destroy the tunnel.
*
@@ -222,6 +227,7 @@
void
GCT_change_estate (struct CadetTunnel* t, enum CadetTunnelEState state);
+
/**
* Add a connection to a tunnel.
*
@@ -231,6 +237,7 @@
void
GCT_add_connection (struct CadetTunnel *t, struct CadetConnection *c);
+
/**
* Remove a connection from a tunnel.
*
@@ -240,6 +247,7 @@
void
GCT_remove_connection (struct CadetTunnel *t, struct CadetConnection *c);
+
/**
* Add a channel to a tunnel.
*
@@ -249,6 +257,7 @@
void
GCT_add_channel (struct CadetTunnel *t, struct CadetChannel *ch);
+
/**
* Remove a channel from a tunnel.
*
@@ -258,6 +267,7 @@
void
GCT_remove_channel (struct CadetTunnel *t, struct CadetChannel *ch);
+
/**
* Search for a channel by global ID.
*
@@ -269,6 +279,7 @@
struct CadetChannel *
GCT_get_channel (struct CadetTunnel *t, CADET_ChannelNumber chid);
+
/**
* Decrypt and demultiplex by message type. Call appropriate handler
* for a message towards a channel of a local tunnel.
@@ -291,6 +302,7 @@
GCT_handle_kx (struct CadetTunnel *t,
const struct GNUNET_MessageHeader *message);
+
/**
* @brief Use the given path for the tunnel.
* Update the next and prev hops (and RCs).
@@ -304,6 +316,7 @@
struct CadetConnection *
GCT_use_path (struct CadetTunnel *t, struct CadetPeerPath *p);
+
/**
* Count all created connections of a tunnel. Not necessarily ready
connections!
*
@@ -314,6 +327,7 @@
unsigned int
GCT_count_any_connections (struct CadetTunnel *t);
+
/**
* Count established (ready) connections of a tunnel.
*
@@ -324,6 +338,7 @@
unsigned int
GCT_count_connections (struct CadetTunnel *t);
+
/**
* Count channels of a tunnel.
*
@@ -334,6 +349,7 @@
unsigned int
GCT_count_channels (struct CadetTunnel *t);
+
/**
* Get the connectivity state of a tunnel.
*
@@ -344,6 +360,7 @@
enum CadetTunnelCState
GCT_get_cstate (struct CadetTunnel *t);
+
/**
* Get the encryption state of a tunnel.
*
@@ -354,6 +371,7 @@
enum CadetTunnelEState
GCT_get_estate (struct CadetTunnel *t);
+
/**
* Get the maximum buffer space for a tunnel towards a local client.
*
@@ -364,6 +382,7 @@
unsigned int
GCT_get_channels_buffer (struct CadetTunnel *t);
+
/**
* Get the total buffer space for a tunnel for P2P traffic.
*
@@ -374,6 +393,7 @@
unsigned int
GCT_get_connections_buffer (struct CadetTunnel *t);
+
/**
* Get the tunnel's destination.
*
@@ -384,6 +404,7 @@
const struct GNUNET_PeerIdentity *
GCT_get_destination (struct CadetTunnel *t);
+
/**
* Get the tunnel's next free Channel ID.
*
@@ -394,6 +415,7 @@
CADET_ChannelNumber
GCT_get_next_chid (struct CadetTunnel *t);
+
/**
* Send ACK on one or more channels due to buffer in connections.
*
@@ -402,6 +424,7 @@
void
GCT_unchoke_channels (struct CadetTunnel *t);
+
/**
* Send ACK on one or more connections due to buffer space to the client.
*
@@ -412,6 +435,7 @@
void
GCT_send_connection_acks (struct CadetTunnel *t);
+
/**
* Cancel a previously sent message while it's in the queue.
*
@@ -424,6 +448,7 @@
void
GCT_cancel (struct CadetTunnelQueue *q);
+
/**
* Sends an already built message on a tunnel, encrypting it and
* choosing the best connection.
@@ -442,6 +467,7 @@
struct CadetTunnel *t, struct CadetConnection *c,
int force, GCT_sent cont, void *cont_cls);
+
/**
* Send an Axolotl KX message.
*
@@ -451,6 +477,7 @@
void
GCT_send_ax_kx (struct CadetTunnel *t, int force_reply);
+
/**
* Sends an already built and encrypted message on a tunnel, choosing the best
* connection. Useful for re-queueing messages queued on a destroyed
connection.
@@ -462,6 +489,7 @@
GCT_resend_message (const struct GNUNET_MessageHeader *message,
struct CadetTunnel *t);
+
/**
* Is the tunnel directed towards the local peer?
*
@@ -472,6 +500,7 @@
int
GCT_is_loopback (const struct CadetTunnel *t);
+
/**
* Is the tunnel using this path already?
*
@@ -483,6 +512,7 @@
int
GCT_is_path_used (const struct CadetTunnel *t, const struct CadetPeerPath *p);
+
/**
* Get a cost of a path for a tunnel considering existing connections.
*
@@ -495,6 +525,7 @@
GCT_get_path_cost (const struct CadetTunnel *t,
const struct CadetPeerPath *path);
+
/**
* Get the static string for the peer this tunnel is directed.
*
@@ -505,6 +536,7 @@
const char *
GCT_2s (const struct CadetTunnel *t);
+
/**
* Log all possible info about the tunnel state.
*
@@ -514,6 +546,7 @@
void
GCT_debug (const struct CadetTunnel *t, enum GNUNET_ErrorType level);
+
/**
* Iterate all tunnels.
*
@@ -523,6 +556,7 @@
void
GCT_iterate_all (GNUNET_CONTAINER_PeerMapIterator iter, void *cls);
+
/**
* Count all tunnels.
*
@@ -531,6 +565,7 @@
unsigned int
GCT_count_all (void);
+
/**
* Iterate all connections of a tunnel.
*
@@ -541,6 +576,7 @@
void
GCT_iterate_connections (struct CadetTunnel *t, GCT_conn_iter iter, void *cls);
+
/**
* Iterate all channels of a tunnel.
*
@@ -549,8 +585,11 @@
* @param cls Closure for @c iter.
*/
void
-GCT_iterate_channels (struct CadetTunnel *t, GCT_chan_iter iter, void *cls);
+GCT_iterate_channels (struct CadetTunnel *t,
+ GCT_chan_iter iter,
+ void *cls);
+
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36069 - gnunet/src/cadet,
gnunet <=