aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh_tunnel.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-01-06 05:18:30 +0000
committerBart Polot <bart@net.in.tum.de>2014-01-06 05:18:30 +0000
commit0ccd26a719e7f197ccfb053b9517162f51c9da2c (patch)
tree49b75cea3355768ea27778da602bdd234cacff21 /src/mesh/gnunet-service-mesh_tunnel.c
parent532ac9a55e3f2f6eaea7f6b6c38cd6a7bdbb3e6a (diff)
downloadgnunet-0ccd26a719e7f197ccfb053b9517162f51c9da2c.tar.gz
gnunet-0ccd26a719e7f197ccfb053b9517162f51c9da2c.zip
- more tunnels info for CLI
Diffstat (limited to 'src/mesh/gnunet-service-mesh_tunnel.c')
-rw-r--r--src/mesh/gnunet-service-mesh_tunnel.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c
index 3224c9939..07375a43c 100644
--- a/src/mesh/gnunet-service-mesh_tunnel.c
+++ b/src/mesh/gnunet-service-mesh_tunnel.c
@@ -2183,6 +2183,24 @@ GMT_get_cstate (struct MeshTunnel3 *t)
2183 2183
2184 2184
2185/** 2185/**
2186 * Get the encryption state of a tunnel.
2187 *
2188 * @param t Tunnel.
2189 *
2190 * @return Tunnel's encryption state.
2191 */
2192enum MeshTunnel3EState
2193GMT_get_estate (struct MeshTunnel3 *t)
2194{
2195 if (NULL == t)
2196 {
2197 GNUNET_assert (0);
2198 return (enum MeshTunnel3EState) -1;
2199 }
2200 return t->estate;
2201}
2202
2203/**
2186 * Get the maximum buffer space for a tunnel towards a local client. 2204 * Get the maximum buffer space for a tunnel towards a local client.
2187 * 2205 *
2188 * @param t Tunnel. 2206 * @param t Tunnel.
@@ -2387,7 +2405,9 @@ GMT_send_connection_acks (struct MeshTunnel3 *t)
2387 /* Authorize connections to send more data */ 2405 /* Authorize connections to send more data */
2388 to_allow = buffer; /* - allowed; */ 2406 to_allow = buffer; /* - allowed; */
2389 2407
2390 for (iter = t->connection_head; NULL != iter && to_allow > 0; iter = iter->next) 2408 for (iter = t->connection_head;
2409 NULL != iter && to_allow > 0;
2410 iter = iter->next)
2391 { 2411 {
2392 allow_per_connection = to_allow/cs; 2412 allow_per_connection = to_allow/cs;
2393 to_allow -= allow_per_connection; 2413 to_allow -= allow_per_connection;