[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33703 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33703 - gnunet/src/cadet |
Date: |
Tue, 17 Jun 2014 14:15:25 +0200 |
Author: bartpolot
Date: 2014-06-17 14:15:25 +0200 (Tue, 17 Jun 2014)
New Revision: 33703
Modified:
gnunet/src/cadet/gnunet-service-cadet_channel.c
gnunet/src/cadet/gnunet-service-cadet_connection.c
gnunet/src/cadet/gnunet-service-cadet_peer.c
gnunet/src/cadet/gnunet-service-cadet_tunnel.c
gnunet/src/cadet/gnunet-service-cadet_tunnel.h
Log:
- rename
Modified: gnunet/src/cadet/gnunet-service-cadet_channel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_channel.c 2014-06-17 12:13:46 UTC
(rev 33702)
+++ gnunet/src/cadet/gnunet-service-cadet_channel.c 2014-06-17 12:15:25 UTC
(rev 33703)
@@ -1848,7 +1848,7 @@
if (GCP_get_short_id (peer) == myid)
{
- GCT_change_cstate (t, CADET_TUNNEL3_READY);
+ GCT_change_cstate (t, CADET_TUNNEL_READY);
}
else
{
Modified: gnunet/src/cadet/gnunet-service-cadet_connection.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.c 2014-06-17 12:13:46 UTC
(rev 33702)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.c 2014-06-17 12:15:25 UTC
(rev 33703)
@@ -810,8 +810,8 @@
sizeof (struct GNUNET_CADET_ConnectionACK),
connection, fwd, &conn_message_sent, NULL);
connection->pending_messages++;
- if (CADET_TUNNEL3_NEW == GCT_get_cstate (t))
- GCT_change_cstate (t, CADET_TUNNEL3_WAITING);
+ if (CADET_TUNNEL_NEW == GCT_get_cstate (t))
+ GCT_change_cstate (t, CADET_TUNNEL_WAITING);
if (CADET_CONNECTION_READY != connection->state)
connection_change_state (connection, CADET_CONNECTION_SENT);
}
@@ -949,7 +949,7 @@
if (GNUNET_NO != c->destroy)
return;
- if (CADET_TUNNEL3_SEARCHING == GCT_get_cstate (c->t))
+ if (CADET_TUNNEL_SEARCHING == GCT_get_cstate (c->t))
{
/* TODO DHT GET with RO_BART */
return;
@@ -1625,8 +1625,8 @@
GCP_add_path_to_origin (orig_peer, path_duplicate (path), GNUNET_YES);
add_to_peer (c, orig_peer);
- if (CADET_TUNNEL3_NEW == GCT_get_cstate (c->t))
- GCT_change_cstate (c->t, CADET_TUNNEL3_WAITING);
+ if (CADET_TUNNEL_NEW == GCT_get_cstate (c->t))
+ GCT_change_cstate (c->t, CADET_TUNNEL_WAITING);
send_connection_ack (c, GNUNET_NO);
if (CADET_CONNECTION_SENT == c->state)
@@ -1741,8 +1741,8 @@
send_connection_ack (c, GNUNET_YES);
/* Change tunnel state, trigger KX */
- if (CADET_TUNNEL3_WAITING == GCT_get_cstate (c->t))
- GCT_change_cstate (c->t, CADET_TUNNEL3_READY);
+ if (CADET_TUNNEL_WAITING == GCT_get_cstate (c->t))
+ GCT_change_cstate (c->t, CADET_TUNNEL_READY);
return GNUNET_OK;
}
@@ -1762,8 +1762,8 @@
connection_reset_timeout (c, GNUNET_NO);
/* Change tunnel state */
- if (CADET_TUNNEL3_WAITING == GCT_get_cstate (c->t))
- GCT_change_cstate (c->t, CADET_TUNNEL3_READY);
+ if (CADET_TUNNEL_WAITING == GCT_get_cstate (c->t))
+ GCT_change_cstate (c->t, CADET_TUNNEL_READY);
return GNUNET_OK;
}
@@ -2106,8 +2106,8 @@
connection_change_state (c, CADET_CONNECTION_READY);
if (NULL != c->t)
{
- if (CADET_TUNNEL3_WAITING == GCT_get_cstate (c->t))
- GCT_change_cstate (c->t, CADET_TUNNEL3_READY);
+ if (CADET_TUNNEL_WAITING == GCT_get_cstate (c->t))
+ GCT_change_cstate (c->t, CADET_TUNNEL_READY);
}
}
connection_reset_timeout (c, fwd);
@@ -3057,8 +3057,8 @@
size, connection, GNUNET_YES, &conn_message_sent, NULL);
state = GCT_get_cstate (connection->t);
- if (CADET_TUNNEL3_SEARCHING == state || CADET_TUNNEL3_NEW == state)
- GCT_change_cstate (connection->t, CADET_TUNNEL3_WAITING);
+ if (CADET_TUNNEL_SEARCHING == state || CADET_TUNNEL_NEW == state)
+ GCT_change_cstate (connection->t, CADET_TUNNEL_WAITING);
if (CADET_CONNECTION_NEW == connection->state)
connection_change_state (connection, CADET_CONNECTION_SENT);
}
Modified: gnunet/src/cadet/gnunet-service-cadet_peer.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.c 2014-06-17 12:13:46 UTC
(rev 33702)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.c 2014-06-17 12:15:25 UTC
(rev 33703)
@@ -878,7 +878,7 @@
if (3 <= connection_count)
return;
- if (CADET_TUNNEL3_SEARCHING == GCT_get_cstate (peer->tunnel))
+ if (CADET_TUNNEL_SEARCHING == GCT_get_cstate (peer->tunnel))
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " ... connect!\n");
GCP_connect (peer);
@@ -1634,8 +1634,8 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
" Starting DHT GET for peer %s\n", GCP_2s (peer));
peer->search_h = GCD_search (id, &search_handler, peer);
- if (CADET_TUNNEL3_NEW == GCT_get_cstate (t))
- GCT_change_cstate (t, CADET_TUNNEL3_SEARCHING);
+ if (CADET_TUNNEL_NEW == GCT_get_cstate (t))
+ GCT_change_cstate (t, CADET_TUNNEL_SEARCHING);
}
}
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-06-17 12:13:46 UTC
(rev 33702)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-06-17 12:15:25 UTC
(rev 33703)
@@ -337,14 +337,14 @@
switch (cs)
{
- case CADET_TUNNEL3_NEW:
- return "CADET_TUNNEL3_NEW";
- case CADET_TUNNEL3_SEARCHING:
- return "CADET_TUNNEL3_SEARCHING";
- case CADET_TUNNEL3_WAITING:
- return "CADET_TUNNEL3_WAITING";
- case CADET_TUNNEL3_READY:
- return "CADET_TUNNEL3_READY";
+ case CADET_TUNNEL_NEW:
+ return "CADET_TUNNEL_NEW";
+ case CADET_TUNNEL_SEARCHING:
+ return "CADET_TUNNEL_SEARCHING";
+ case CADET_TUNNEL_WAITING:
+ return "CADET_TUNNEL_WAITING";
+ case CADET_TUNNEL_READY:
+ return "CADET_TUNNEL_READY";
default:
sprintf (buf, "%u (UNKNOWN STATE)", cs);
@@ -368,16 +368,16 @@
switch (es)
{
- case CADET_TUNNEL3_KEY_UNINITIALIZED:
- return "CADET_TUNNEL3_KEY_UNINITIALIZED";
- case CADET_TUNNEL3_KEY_SENT:
- return "CADET_TUNNEL3_KEY_SENT";
- case CADET_TUNNEL3_KEY_PING:
- return "CADET_TUNNEL3_KEY_PING";
- case CADET_TUNNEL3_KEY_OK:
- return "CADET_TUNNEL3_KEY_OK";
- case CADET_TUNNEL3_KEY_REKEY:
- return "CADET_TUNNEL3_KEY_REKEY";
+ case CADET_TUNNEL_KEY_UNINITIALIZED:
+ return "CADET_TUNNEL_KEY_UNINITIALIZED";
+ case CADET_TUNNEL_KEY_SENT:
+ return "CADET_TUNNEL_KEY_SENT";
+ case CADET_TUNNEL_KEY_PING:
+ return "CADET_TUNNEL_KEY_PING";
+ case CADET_TUNNEL_KEY_OK:
+ return "CADET_TUNNEL_KEY_OK";
+ case CADET_TUNNEL_KEY_REKEY:
+ return "CADET_TUNNEL_KEY_REKEY";
default:
sprintf (buf, "%u (UNKNOWN STATE)", es);
return buf;
@@ -401,9 +401,9 @@
int ready;
GCT_debug (t, GNUNET_ERROR_TYPE_DEBUG);
- ready = CADET_TUNNEL3_READY == t->cstate
- && (CADET_TUNNEL3_KEY_OK == t->estate
- || CADET_TUNNEL3_KEY_REKEY == t->estate);
+ ready = CADET_TUNNEL_READY == t->cstate
+ && (CADET_TUNNEL_KEY_OK == t->estate
+ || CADET_TUNNEL_KEY_REKEY == t->estate);
ready = ready || GCT_is_loopback (t);
return ready;
}
@@ -716,7 +716,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, " t_decrypt with %s\n",
GNUNET_h2s ((struct GNUNET_HashCode *) &t->d_key));
#endif
- if (t->estate == CADET_TUNNEL3_KEY_UNINITIALIZED)
+ if (t->estate == CADET_TUNNEL_KEY_UNINITIALIZED)
{
GNUNET_STATISTICS_update (stats, "# non decryptable data", 1, GNUNET_NO);
LOG (GNUNET_ERROR_TYPE_WARNING,
@@ -1071,7 +1071,7 @@
if (NULL == c)
{
if (GNUNET_SCHEDULER_NO_TASK != t->destroy_task
- || CADET_TUNNEL3_SEARCHING != t->cstate)
+ || CADET_TUNNEL_SEARCHING != t->cstate)
{
GNUNET_break (0);
GCT_debug (t, GNUNET_ERROR_TYPE_WARNING);
@@ -1214,7 +1214,7 @@
/* Must have a connection. */
if (NULL == t->connection_head)
{
- GNUNET_break (CADET_TUNNEL3_SEARCHING == t->cstate);
+ GNUNET_break (CADET_TUNNEL_SEARCHING == t->cstate);
GCT_debug (t, GNUNET_ERROR_TYPE_WARNING);
return;
}
@@ -1226,7 +1226,7 @@
if (NULL == c)
{
GNUNET_break (GNUNET_SCHEDULER_NO_TASK != t->destroy_task
- || CADET_TUNNEL3_READY != t->cstate);
+ || CADET_TUNNEL_READY != t->cstate);
GCT_debug (t, GNUNET_ERROR_TYPE_WARNING);
return;
}
@@ -1360,16 +1360,16 @@
switch (t->estate)
{
- case CADET_TUNNEL3_KEY_UNINITIALIZED:
- t->estate = CADET_TUNNEL3_KEY_SENT;
+ case CADET_TUNNEL_KEY_UNINITIALIZED:
+ t->estate = CADET_TUNNEL_KEY_SENT;
break;
- case CADET_TUNNEL3_KEY_SENT:
+ case CADET_TUNNEL_KEY_SENT:
break;
- case CADET_TUNNEL3_KEY_OK:
- t->estate = CADET_TUNNEL3_KEY_REKEY;
+ case CADET_TUNNEL_KEY_OK:
+ t->estate = CADET_TUNNEL_KEY_REKEY;
/* fall-thru */
- case CADET_TUNNEL3_KEY_PING:
- case CADET_TUNNEL3_KEY_REKEY:
+ case CADET_TUNNEL_KEY_PING:
+ case CADET_TUNNEL_KEY_REKEY:
send_ping (t);
break;
default:
@@ -1769,16 +1769,16 @@
{
t->peers_ephemeral_key = msg->ephemeral_key;
create_keys (t);
- if (CADET_TUNNEL3_KEY_OK == t->estate)
+ if (CADET_TUNNEL_KEY_OK == t->estate)
{
- t->estate = CADET_TUNNEL3_KEY_REKEY;
+ t->estate = CADET_TUNNEL_KEY_REKEY;
}
}
- if (CADET_TUNNEL3_KEY_SENT == t->estate)
+ if (CADET_TUNNEL_KEY_SENT == t->estate)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " our key was sent, sending ping\n");
send_ping (t);
- t->estate = CADET_TUNNEL3_KEY_PING;
+ t->estate = CADET_TUNNEL_KEY_PING;
}
}
@@ -1891,7 +1891,7 @@
delay = GNUNET_TIME_relative_min (delay, GNUNET_TIME_UNIT_MINUTES);
t->kx_ctx->finish_task = GNUNET_SCHEDULER_add_delayed (delay, finish_kx,
t);
}
- GCT_change_estate (t, CADET_TUNNEL3_KEY_OK);
+ GCT_change_estate (t, CADET_TUNNEL_KEY_OK);
}
@@ -2141,16 +2141,16 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s cstate %s => %s\n",
GCP_2s (t->peer), cstate2s (t->cstate), cstate2s (cstate));
if (myid != GCP_get_short_id (t->peer) &&
- CADET_TUNNEL3_READY != t->cstate &&
- CADET_TUNNEL3_READY == cstate)
+ CADET_TUNNEL_READY != t->cstate &&
+ CADET_TUNNEL_READY == cstate)
{
t->cstate = cstate;
- if (CADET_TUNNEL3_KEY_OK == t->estate)
+ if (CADET_TUNNEL_KEY_OK == t->estate)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate triggered send queued data\n");
send_queued_data (t);
}
- else if (CADET_TUNNEL3_KEY_UNINITIALIZED == t->estate)
+ else if (CADET_TUNNEL_KEY_UNINITIALIZED == t->estate)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate triggered rekey\n");
rekey_tunnel (t, NULL);
@@ -2158,7 +2158,7 @@
}
t->cstate = cstate;
- if (CADET_TUNNEL3_READY == cstate
+ if (CADET_TUNNEL_READY == cstate
&& CONNECTIONS_PER_TUNNEL <= GCT_count_connections (t))
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate triggered stop dht\n");
@@ -2184,7 +2184,7 @@
"Tunnel %s estate is now %s\n",
GCP_2s (t->peer), estate2s (state));
if (myid != GCP_get_short_id (t->peer) &&
- CADET_TUNNEL3_KEY_OK != t->estate && CADET_TUNNEL3_KEY_OK == state)
+ CADET_TUNNEL_KEY_OK != t->estate && CADET_TUNNEL_KEY_OK == state)
{
t->estate = state;
send_queued_data (t);
@@ -2311,17 +2311,17 @@
/* Start new connections if needed */
if (CONNECTIONS_PER_TUNNEL < GCT_count_connections (t)
&& GNUNET_SCHEDULER_NO_TASK == t->destroy_task
- && CADET_TUNNEL3_SHUTDOWN != t->cstate
+ && CADET_TUNNEL_SHUTDOWN != t->cstate
&& GNUNET_NO == shutting_down)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " no more connections, getting new ones\n");
- t->cstate = CADET_TUNNEL3_SEARCHING;
+ t->cstate = CADET_TUNNEL_SEARCHING;
GCP_connect (t->peer);
return;
}
/* If not marked as ready, no change is needed */
- if (CADET_TUNNEL3_READY != t->cstate)
+ if (CADET_TUNNEL_READY != t->cstate)
return;
/* Check if any connection is ready to maintaing cstate */
@@ -2329,7 +2329,7 @@
if (CADET_CONNECTION_READY == GCC_get_state (aux->c))
return;
- t->cstate = CADET_TUNNEL3_WAITING;
+ t->cstate = CADET_TUNNEL_WAITING;
}
@@ -2445,7 +2445,7 @@
return;
}
t->destroy_task = GNUNET_SCHEDULER_NO_TASK;
- t->cstate = CADET_TUNNEL3_SHUTDOWN;
+ t->cstate = CADET_TUNNEL_SHUTDOWN;
for (iter = t->connection_head; NULL != iter; iter = iter->next)
{
@@ -2595,7 +2595,7 @@
return NULL;
}
- if (CADET_TUNNEL3_SHUTDOWN == t->cstate)
+ if (CADET_TUNNEL_SHUTDOWN == t->cstate)
{
GNUNET_break (0);
return NULL;
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.h 2014-06-17 12:13:46 UTC
(rev 33702)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.h 2014-06-17 12:15:25 UTC
(rev 33703)
@@ -48,27 +48,27 @@
/**
* Uninitialized status, should never appear in operation.
*/
- CADET_TUNNEL3_NEW,
+ CADET_TUNNEL_NEW,
/**
* Path to the peer not known yet.
*/
- CADET_TUNNEL3_SEARCHING,
+ CADET_TUNNEL_SEARCHING,
/**
* Request sent, not yet answered.
*/
- CADET_TUNNEL3_WAITING,
+ CADET_TUNNEL_WAITING,
/**
* Peer connected and ready to accept data.
*/
- CADET_TUNNEL3_READY,
+ CADET_TUNNEL_READY,
/**
* Tunnel being shut down, don't try to keep it alive.
*/
- CADET_TUNNEL3_SHUTDOWN
+ CADET_TUNNEL_SHUTDOWN
};
@@ -80,12 +80,12 @@
/**
* Uninitialized status, should never appear in operation.
*/
- CADET_TUNNEL3_KEY_UNINITIALIZED,
+ CADET_TUNNEL_KEY_UNINITIALIZED,
/**
* Ephemeral key sent, waiting for peer's key.
*/
- CADET_TUNNEL3_KEY_SENT,
+ CADET_TUNNEL_KEY_SENT,
/**
* New ephemeral key and ping sent, waiting for pong.
@@ -93,19 +93,19 @@
* state would be KEY_SENT. We DO NOT have a valid session key (either no
* previous key or previous key expired).
*/
- CADET_TUNNEL3_KEY_PING,
+ CADET_TUNNEL_KEY_PING,
/**
* Handshake completed: session key available.
*/
- CADET_TUNNEL3_KEY_OK,
+ CADET_TUNNEL_KEY_OK,
/**
* New ephemeral key and ping sent, waiting for pong. Opposite to KEY_PING,
* we still have a valid session key and therefore we *can* still send
* traffic on the tunnel.
*/
- CADET_TUNNEL3_KEY_REKEY,
+ CADET_TUNNEL_KEY_REKEY,
};
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33703 - gnunet/src/cadet,
gnunet <=