gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r33286 - gnunet/src/cadet


From: gnunet
Subject: [GNUnet-SVN] r33286 - gnunet/src/cadet
Date: Wed, 14 May 2014 18:50:32 +0200

Author: bartpolot
Date: 2014-05-14 18:50:31 +0200 (Wed, 14 May 2014)
New Revision: 33286

Modified:
   gnunet/src/cadet/gnunet-service-cadet_channel.c
   gnunet/src/cadet/gnunet-service-cadet_channel.h
   gnunet/src/cadet/gnunet-service-cadet_connection.c
   gnunet/src/cadet/gnunet-service-cadet_connection.h
   gnunet/src/cadet/gnunet-service-cadet_local.c
   gnunet/src/cadet/gnunet-service-cadet_peer.c
   gnunet/src/cadet/gnunet-service-cadet_peer.h
   gnunet/src/cadet/gnunet-service-cadet_tunnel.c
   gnunet/src/cadet/gnunet-service-cadet_tunnel.h
Log:
- stop using CadetTunnel3 and go back to CadetTunnel

Modified: gnunet/src/cadet/gnunet-service-cadet_channel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_channel.c     2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_channel.c     2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -69,7 +69,7 @@
   /**
    * Tunnel Queue.
    */
-  struct CadetTunnel3Queue *tq;
+  struct CadetTunnelQueue *tq;
 
   /**
    * Message type (DATA/DATA_ACK)
@@ -205,7 +205,7 @@
     /**
      * Tunnel this channel is in.
      */
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
 
     /**
      * Destination port of the channel.
@@ -789,8 +789,8 @@
  */
 static void
 ch_message_sent (void *cls,
-                 struct CadetTunnel3 *t,
-                 struct CadetTunnel3Queue *q,
+                 struct CadetTunnel *t,
+                 struct CadetTunnelQueue *q,
                  uint16_t type, size_t size)
 {
   struct CadetChannelQueue *chq = cls;
@@ -1248,7 +1248,7 @@
  * @return A new initialized channel. NULL on error.
  */
 static struct CadetChannel *
-channel_new (struct CadetTunnel3 *t,
+channel_new (struct CadetTunnel *t,
              struct CadetClient *owner,
              CADET_ChannelNumber lid_root)
 {
@@ -1348,7 +1348,7 @@
 GCCH_destroy (struct CadetChannel *ch)
 {
   struct CadetClient *c;
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
 
   if (NULL == ch)
     return;
@@ -1405,7 +1405,7 @@
  *
  * @return tunnel of the channel.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCCH_get_tunnel (const struct CadetChannel *ch)
 {
   return ch->t;
@@ -1827,7 +1827,7 @@
                           struct GNUNET_CADET_ChannelMessage *msg)
 {
   struct CadetChannel *ch;
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
   struct CadetPeer *peer;
   CADET_ChannelNumber chid;
 
@@ -2096,7 +2096,7 @@
  * @param msg Channel crate message.
  */
 struct CadetChannel *
-GCCH_handle_create (struct CadetTunnel3 *t,
+GCCH_handle_create (struct CadetTunnel *t,
                     const struct GNUNET_CADET_ChannelCreate *msg)
 {
   CADET_ChannelNumber chid;

Modified: gnunet/src/cadet/gnunet-service-cadet_channel.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_channel.h     2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_channel.h     2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -79,7 +79,7 @@
  *
  * @return tunnel of the channel.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCCH_get_tunnel (const struct CadetChannel *ch);
 
 /**
@@ -262,7 +262,7 @@
  * @param msg Channel crate message.
  */
 struct CadetChannel *
-GCCH_handle_create (struct CadetTunnel3 *t,
+GCCH_handle_create (struct CadetTunnel *t,
                     const struct GNUNET_CADET_ChannelCreate *msg);
 
 /**

Modified: gnunet/src/cadet/gnunet-service-cadet_connection.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.c  2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.c  2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -146,7 +146,7 @@
   /**
    * Tunnel this connection is part of.
    */
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
 
   /**
    * Flow control information for traffic fwd.
@@ -799,7 +799,7 @@
 static void
 send_connection_ack (struct CadetConnection *connection, int fwd)
 {
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
 
   t = connection->t;
   LOG (GNUNET_ERROR_TYPE_INFO, "===> {%14s ACK} on connection %s\n",
@@ -2451,7 +2451,7 @@
 
 struct CadetConnection *
 GCC_new (const struct GNUNET_CADET_Hash *cid,
-         struct CadetTunnel3 *t,
+         struct CadetTunnel *t,
          struct CadetPeerPath *p,
          unsigned int own_pos)
 {
@@ -2625,7 +2625,7 @@
  *
  * @return tunnel of the connection.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCC_get_tunnel (const struct CadetConnection *c)
 {
   return c->t;
@@ -3037,7 +3037,7 @@
 void
 GCC_send_create (struct CadetConnection *connection)
 {
-  enum CadetTunnel3CState state;
+  enum CadetTunnelCState state;
   size_t size;
 
   size = sizeof (struct GNUNET_CADET_ConnectionCreate);

Modified: gnunet/src/cadet/gnunet-service-cadet_connection.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.h  2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.h  2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -267,7 +267,7 @@
  */
 struct CadetConnection *
 GCC_new (const struct GNUNET_CADET_Hash *cid,
-         struct CadetTunnel3 *t,
+         struct CadetTunnel *t,
          struct CadetPeerPath *p,
          unsigned int own_pos);
 
@@ -331,7 +331,7 @@
  *
  * @return tunnel of the connection.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCC_get_tunnel (const struct CadetConnection *c);
 
 /**

Modified: gnunet/src/cadet/gnunet-service-cadet_local.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_local.c       2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_local.c       2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -666,7 +666,7 @@
                           void *value)
 {
   struct GNUNET_SERVER_Client *client = cls;
-  struct CadetTunnel3 *t = value;
+  struct CadetTunnel *t = value;
   struct GNUNET_CADET_LocalInfoTunnel msg;
 
   msg.header.size = htons (sizeof (msg));
@@ -759,7 +759,7 @@
   const struct GNUNET_CADET_LocalInfo *msg;
   struct GNUNET_CADET_LocalInfoTunnel *resp;
   struct CadetClient *c;
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
   unsigned int ch_n;
   unsigned int c_n;
   size_t size;

Modified: gnunet/src/cadet/gnunet-service-cadet_peer.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.c        2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.c        2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -144,7 +144,7 @@
     /**
      * Tunnel to this peer, if any.
      */
-  struct CadetTunnel3 *tunnel;
+  struct CadetTunnel *tunnel;
 
     /**
      * Connections that go through this peer, indexed by tid;
@@ -613,7 +613,7 @@
                  void *value)
 {
   struct CadetPeer *p = value;
-  struct CadetTunnel3 *t = p->tunnel;
+  struct CadetTunnel *t = p->tunnel;
 
   if (NULL != t)
     GCT_destroy (t);
@@ -1552,7 +1552,7 @@
 void
 GCP_connect (struct CadetPeer *peer)
 {
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
   struct CadetPeerPath *p;
   struct CadetConnection *c;
   int rerun_search;
@@ -2010,7 +2010,7 @@
  * @param t Tunnel.
  */
 void
-GCP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel3 *t)
+GCP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel *t)
 {
   peer->tunnel = t;
   if (NULL == t && NULL != peer->search_h)
@@ -2027,7 +2027,7 @@
  *
  * @return Tunnel towards peer.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCP_get_tunnel (const struct CadetPeer *peer)
 {
   return peer->tunnel;

Modified: gnunet/src/cadet/gnunet-service-cadet_peer.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.h        2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.h        2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -187,7 +187,7 @@
  * @param t Tunnel.
  */
 void
-GCP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel3 *t);
+GCP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel *t);
 
 /**
  * Check whether there is a direct (core level)  connection to peer.
@@ -332,7 +332,7 @@
  *
  * @return Tunnel towards peer.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCP_get_tunnel (const struct CadetPeer *peer);
 
 /**

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -101,7 +101,7 @@
 /**
  * Struct containing all information regarding a tunnel to a peer.
  */
-struct CadetTunnel3
+struct CadetTunnel
 {
     /**
      * Endpoint of the tunnel.
@@ -111,12 +111,12 @@
     /**
      * State of the tunnel connectivity.
      */
-  enum CadetTunnel3CState cstate;
+  enum CadetTunnelCState cstate;
 
   /**
    * State of the tunnel encryption.
    */
-  enum CadetTunnel3EState estate;
+  enum CadetTunnelEState estate;
 
   /**
    * Key eXchange context.
@@ -187,12 +187,12 @@
   /**
    * Tunnel.
    */
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
 
   /**
    * Tunnel queue given to the channel to cancel request. Update on 
send_queued.
    */
-  struct CadetTunnel3Queue *tq;
+  struct CadetTunnelQueue *tq;
 
   /**
    * Message to send.
@@ -204,7 +204,7 @@
 /**
  * Handle for messages queued but not yet sent.
  */
-struct CadetTunnel3Queue
+struct CadetTunnelQueue
 {
   /**
    * Connection queue handle, to cancel if necessary.
@@ -302,7 +302,7 @@
  * @return String representation.
  */
 static const char *
-cstate2s (enum CadetTunnel3CState cs)
+cstate2s (enum CadetTunnelCState cs)
 {
   static char buf[128];
 
@@ -333,7 +333,7 @@
  * @return String representation.
  */
 static const char *
-estate2s (enum CadetTunnel3EState es)
+estate2s (enum CadetTunnelEState es)
 {
   static char buf[128];
 
@@ -366,7 +366,7 @@
  * @return #GNUNET_YES if ready, #GNUNET_NO otherwise
  */
 static int
-is_ready (struct CadetTunnel3 *t)
+is_ready (struct CadetTunnel *t)
 {
   int ready;
 
@@ -490,7 +490,7 @@
  * @return GNUNET_OK if message is fine, GNUNET_SYSERR otherwise.
  */
 int
-check_ephemeral (struct CadetTunnel3 *t,
+check_ephemeral (struct CadetTunnel *t,
                  const struct GNUNET_CADET_KX_Ephemeral *msg)
 {
   /* Check message size */
@@ -529,7 +529,7 @@
  * @param iv Initialization Vector to use.
  */
 static int
-t_encrypt (struct CadetTunnel3 *t,
+t_encrypt (struct CadetTunnel *t,
            void *dst, const void *src,
            size_t size, uint32_t iv)
 {
@@ -556,7 +556,7 @@
  * @param iv Initialization Vector to use.
  */
 static int
-t_decrypt (struct CadetTunnel3 *t,
+t_decrypt (struct CadetTunnel *t,
            void *dst, const void *src,
            size_t size, uint32_t iv)
 {
@@ -645,7 +645,7 @@
  * @return The connection on which to send the next message.
  */
 static struct CadetConnection *
-tunnel_get_connection (struct CadetTunnel3 *t)
+tunnel_get_connection (struct CadetTunnel *t)
 {
   struct CadetTConnection *iter;
   struct CadetConnection *best;
@@ -693,8 +693,8 @@
               struct CadetConnectionQueue *q,
               uint16_t type, int fwd, size_t size)
 {
-  struct CadetTunnel3Queue *qt = cls;
-  struct CadetTunnel3 *t;
+  struct CadetTunnelQueue *qt = cls;
+  struct CadetTunnel *t;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG, "tun_message_sent\n");
 
@@ -726,7 +726,7 @@
  * @param msg Message itself (copy will be made).
  */
 static struct CadetTunnelDelayed *
-queue_data (struct CadetTunnel3 *t, const struct GNUNET_MessageHeader *msg)
+queue_data (struct CadetTunnel *t, const struct GNUNET_MessageHeader *msg)
 {
   struct CadetTunnelDelayed *tqd;
   uint16_t size = ntohs (msg->size);
@@ -759,7 +759,7 @@
  * @param hmac Destination to store the HMAC.
  */
 static void
-t_hmac (struct CadetTunnel3 *t, const void *plaintext, size_t size, uint32_t 
iv,
+t_hmac (struct CadetTunnel *t, const void *plaintext, size_t size, uint32_t iv,
         int outgoing, struct GNUNET_CADET_Hash *hmac)
 {
   struct GNUNET_CRYPTO_AuthKey auth_key;
@@ -794,13 +794,13 @@
  *
  * @return Handle to cancel message. NULL if @c cont is NULL.
  */
-static struct CadetTunnel3Queue *
+static struct CadetTunnelQueue *
 send_prebuilt_message (const struct GNUNET_MessageHeader *message,
-                       struct CadetTunnel3 *t, struct CadetConnection *c,
+                       struct CadetTunnel *t, struct CadetConnection *c,
                        int force, GCT_sent cont, void *cont_cls,
-                       struct CadetTunnel3Queue *existing_q)
+                       struct CadetTunnelQueue *existing_q)
 {
-  struct CadetTunnel3Queue *tq;
+  struct CadetTunnelQueue *tq;
   struct GNUNET_CADET_Encrypted *msg;
   size_t size = ntohs (message->size);
   char cbuf[sizeof (struct GNUNET_CADET_Encrypted) + size];
@@ -821,7 +821,7 @@
     tqd = queue_data (t, message);
     if (NULL == cont)
       return NULL;
-    tq = GNUNET_new (struct CadetTunnel3Queue);
+    tq = GNUNET_new (struct CadetTunnelQueue);
     tq->tqd = tqd;
     tqd->tq = tq;
     tq->cont = cont;
@@ -887,7 +887,7 @@
   }
   if (NULL == existing_q)
   {
-    tq = GNUNET_new (struct CadetTunnel3Queue); /* FIXME valgrind: leak*/
+    tq = GNUNET_new (struct CadetTunnelQueue); /* FIXME valgrind: leak*/
   }
   else
   {
@@ -909,7 +909,7 @@
  * @param t Tunnel that holds the messages. Cannot be loopback.
  */
 static void
-send_queued_data (struct CadetTunnel3 *t)
+send_queued_data (struct CadetTunnel *t)
 {
   struct CadetTunnelDelayed *tqd;
   struct CadetTunnelDelayed *next;
@@ -959,7 +959,7 @@
  * @param message Message to send. Function modifies it.
  */
 static void
-send_kx (struct CadetTunnel3 *t,
+send_kx (struct CadetTunnel *t,
          const struct GNUNET_MessageHeader *message)
 {
   struct CadetConnection *c;
@@ -1030,7 +1030,7 @@
  * @param t Tunnel on which to send the key.
  */
 static void
-send_ephemeral (struct CadetTunnel3 *t)
+send_ephemeral (struct CadetTunnel *t)
 {
   LOG (GNUNET_ERROR_TYPE_INFO, "=> EPHM for %s\n", GCT_2s (t));
 
@@ -1044,7 +1044,7 @@
  * @param t Tunnel on which to send the ping.
  */
 static void
-send_ping (struct CadetTunnel3 *t)
+send_ping (struct CadetTunnel *t)
 {
   struct GNUNET_CADET_KX_Ping msg;
 
@@ -1072,7 +1072,7 @@
  * @param challenge Value sent in the ping that we have to send back.
  */
 static void
-send_pong (struct CadetTunnel3 *t, uint32_t challenge)
+send_pong (struct CadetTunnel *t, uint32_t challenge)
 {
   struct GNUNET_CADET_KX_Pong msg;
 
@@ -1098,7 +1098,7 @@
 static void
 rekey_tunnel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  struct CadetTunnel3 *t = cls;
+  struct CadetTunnel *t = cls;
 
   t->rekey_task = GNUNET_SCHEDULER_NO_TASK;
 
@@ -1153,7 +1153,7 @@
                 const struct GNUNET_PeerIdentity *key,
                 void *value)
 {
-  struct CadetTunnel3 *t = value;
+  struct CadetTunnel *t = value;
   struct GNUNET_TIME_Relative delay;
   long n = (long) cls;
   uint32_t r;
@@ -1225,7 +1225,7 @@
                 const struct GNUNET_PeerIdentity *key,
                 void *value)
 {
-  struct CadetTunnel3 *t = value;
+  struct CadetTunnel *t = value;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG, "GCT_shutdown destroying tunnel at %p\n", t);
   GCT_destroy (t);
@@ -1241,7 +1241,7 @@
  * @param gid ID of the channel.
  */
 static void
-send_channel_destroy (struct CadetTunnel3 *t, unsigned int gid)
+send_channel_destroy (struct CadetTunnel *t, unsigned int gid)
 {
   struct GNUNET_CADET_ChannelManage msg;
 
@@ -1267,7 +1267,7 @@
  *            #GNUNET_SYSERR if message on a one-ended channel (remote)
  */
 static void
-handle_data (struct CadetTunnel3 *t,
+handle_data (struct CadetTunnel *t,
              const struct GNUNET_CADET_Data *msg,
              int fwd)
 {
@@ -1313,7 +1313,7 @@
  *            #GNUNET_SYSERR if message on a one-ended channel (remote)
  */
 static void
-handle_data_ack (struct CadetTunnel3 *t,
+handle_data_ack (struct CadetTunnel *t,
                  const struct GNUNET_CADET_DataACK *msg,
                  int fwd)
 {
@@ -1350,7 +1350,7 @@
  * @param msg Data message.
  */
 static void
-handle_ch_create (struct CadetTunnel3 *t,
+handle_ch_create (struct CadetTunnel *t,
                   const struct GNUNET_CADET_ChannelCreate *msg)
 {
   struct CadetChannel *ch;
@@ -1385,7 +1385,7 @@
  * @param msg NACK message.
  */
 static void
-handle_ch_nack (struct CadetTunnel3 *t,
+handle_ch_nack (struct CadetTunnel *t,
                 const struct GNUNET_CADET_ChannelManage *msg)
 {
   struct CadetChannel *ch;
@@ -1425,7 +1425,7 @@
  *            #GNUNET_SYSERR if message on a one-ended channel (remote)
  */
 static void
-handle_ch_ack (struct CadetTunnel3 *t,
+handle_ch_ack (struct CadetTunnel *t,
                const struct GNUNET_CADET_ChannelManage *msg,
                int fwd)
 {
@@ -1467,7 +1467,7 @@
  *            #GNUNET_SYSERR if message on a one-ended channel (remote)
  */
 static void
-handle_ch_destroy (struct CadetTunnel3 *t,
+handle_ch_destroy (struct CadetTunnel *t,
                    const struct GNUNET_CADET_ChannelManage *msg,
                    int fwd)
 {
@@ -1501,7 +1501,7 @@
  * @param msg Key eXchange message.
  */
 static void
-handle_ephemeral (struct CadetTunnel3 *t,
+handle_ephemeral (struct CadetTunnel *t,
                   const struct GNUNET_CADET_KX_Ephemeral *msg)
 {
   struct GNUNET_HashCode km;
@@ -1533,7 +1533,7 @@
  * @param msg Key eXchange Ping message.
  */
 static void
-handle_ping (struct CadetTunnel3 *t,
+handle_ping (struct CadetTunnel *t,
              const struct GNUNET_CADET_KX_Ping *msg)
 {
   struct GNUNET_CADET_KX_Ping res;
@@ -1572,7 +1572,7 @@
  * @param msg Key eXchange Pong message.
  */
 static void
-handle_pong (struct CadetTunnel3 *t,
+handle_pong (struct CadetTunnel *t,
              const struct GNUNET_CADET_KX_Pong *msg)
 {
   uint32_t challenge;
@@ -1614,7 +1614,7 @@
  *            #GNUNET_SYSERR if message on a one-ended channel (remote)
  */
 static void
-handle_decrypted (struct CadetTunnel3 *t,
+handle_decrypted (struct CadetTunnel *t,
                   const struct GNUNET_MessageHeader *msgh,
                   int fwd)
 {
@@ -1682,7 +1682,7 @@
  * @param msg Encrypted message.
  */
 void
-GCT_handle_encrypted (struct CadetTunnel3 *t,
+GCT_handle_encrypted (struct CadetTunnel *t,
                       const struct GNUNET_CADET_Encrypted *msg)
 {
   size_t size = ntohs (msg->header.size);
@@ -1721,7 +1721,7 @@
  * @param message Payload of KX message.
  */
 void
-GCT_handle_kx (struct CadetTunnel3 *t,
+GCT_handle_kx (struct CadetTunnel *t,
                const struct GNUNET_MessageHeader *message)
 {
   uint16_t type;
@@ -1808,12 +1808,12 @@
  *
  * @param destination Peer this tunnel is towards.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCT_new (struct CadetPeer *destination)
 {
-  struct CadetTunnel3 *t;
+  struct CadetTunnel *t;
 
-  t = GNUNET_new (struct CadetTunnel3);
+  t = GNUNET_new (struct CadetTunnel);
   t->next_chid = 0;
   t->peer = destination;
 
@@ -1836,7 +1836,7 @@
  * @param cstate New connection state.
  */
 void
-GCT_change_cstate (struct CadetTunnel3* t, enum CadetTunnel3CState cstate)
+GCT_change_cstate (struct CadetTunnel* t, enum CadetTunnelCState cstate)
 {
   if (NULL == t)
     return;
@@ -1875,7 +1875,7 @@
  * @param state New encryption state.
  */
 void
-GCT_change_estate (struct CadetTunnel3* t, enum CadetTunnel3EState state)
+GCT_change_estate (struct CadetTunnel* t, enum CadetTunnelEState state)
 {
   if (NULL == t)
     return;
@@ -1909,7 +1909,7 @@
 static void
 trim_connections (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  struct CadetTunnel3 *t = cls;
+  struct CadetTunnel *t = cls;
 
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
     return;
@@ -1950,7 +1950,7 @@
  * @param c Connection.
  */
 void
-GCT_add_connection (struct CadetTunnel3 *t, struct CadetConnection *c)
+GCT_add_connection (struct CadetTunnel *t, struct CadetConnection *c)
 {
   struct CadetTConnection *aux;
 
@@ -1979,7 +1979,7 @@
  * @param path Invalid path to remove. Is destroyed after removal.
  */
 void
-GCT_remove_path (struct CadetTunnel3 *t, struct CadetPeerPath *path)
+GCT_remove_path (struct CadetTunnel *t, struct CadetPeerPath *path)
 {
   GCP_remove_path (t->peer, path);
 }
@@ -1992,7 +1992,7 @@
  * @param c Connection.
  */
 void
-GCT_remove_connection (struct CadetTunnel3 *t,
+GCT_remove_connection (struct CadetTunnel *t,
                        struct CadetConnection *c)
 {
   struct CadetTConnection *aux;
@@ -2042,7 +2042,7 @@
  * @param ch Channel.
  */
 void
-GCT_add_channel (struct CadetTunnel3 *t, struct CadetChannel *ch)
+GCT_add_channel (struct CadetTunnel *t, struct CadetChannel *ch)
 {
   struct CadetTChannel *aux;
 
@@ -2078,7 +2078,7 @@
  * @param ch Channel.
  */
 void
-GCT_remove_channel (struct CadetTunnel3 *t, struct CadetChannel *ch)
+GCT_remove_channel (struct CadetTunnel *t, struct CadetChannel *ch)
 {
   struct CadetTChannel *aux;
 
@@ -2105,7 +2105,7 @@
  * @return channel handler, NULL if doesn't exist
  */
 struct CadetChannel *
-GCT_get_channel (struct CadetTunnel3 *t, CADET_ChannelNumber chid)
+GCT_get_channel (struct CadetTunnel *t, CADET_ChannelNumber chid)
 {
   struct CadetTChannel *iter;
 
@@ -2135,7 +2135,7 @@
 static void
 delayed_destroy (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  struct CadetTunnel3 *t = cls;
+  struct CadetTunnel *t = cls;
   struct CadetTConnection *iter;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG, "delayed destroying tunnel %p\n", t);
@@ -2165,7 +2165,7 @@
  * @param t Tunnel to destroy.
  */
 void
-GCT_destroy_empty (struct CadetTunnel3 *t)
+GCT_destroy_empty (struct CadetTunnel *t)
 {
   if (GNUNET_YES == shutting_down)
     return; /* Will be destroyed immediately anyway */
@@ -2199,7 +2199,7 @@
  * @param t Tunnel to destroy if empty.
  */
 void
-GCT_destroy_if_empty (struct CadetTunnel3 *t)
+GCT_destroy_if_empty (struct CadetTunnel *t)
 {
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s destroy if empty\n", GCT_2s (t));
   if (1 < GCT_count_channels (t))
@@ -2221,7 +2221,7 @@
  * @param t The tunnel to destroy.
  */
 void
-GCT_destroy (struct CadetTunnel3 *t)
+GCT_destroy (struct CadetTunnel *t)
 {
   struct CadetTConnection *iter_c;
   struct CadetTConnection *next_c;
@@ -2284,7 +2284,7 @@
  * @return Connection created.
  */
 struct CadetConnection *
-GCT_use_path (struct CadetTunnel3 *t, struct CadetPeerPath *p)
+GCT_use_path (struct CadetTunnel *t, struct CadetPeerPath *p)
 {
   struct CadetConnection *c;
   struct GNUNET_CADET_Hash cid;
@@ -2333,7 +2333,7 @@
  * @return Number of connections.
  */
 unsigned int
-GCT_count_connections (struct CadetTunnel3 *t)
+GCT_count_connections (struct CadetTunnel *t)
 {
   struct CadetTConnection *iter;
   unsigned int count;
@@ -2356,7 +2356,7 @@
  * @return Number of channels.
  */
 unsigned int
-GCT_count_channels (struct CadetTunnel3 *t)
+GCT_count_channels (struct CadetTunnel *t)
 {
   struct CadetTChannel *iter;
   unsigned int count;
@@ -2376,13 +2376,13 @@
  *
  * @return Tunnel's connectivity state.
  */
-enum CadetTunnel3CState
-GCT_get_cstate (struct CadetTunnel3 *t)
+enum CadetTunnelCState
+GCT_get_cstate (struct CadetTunnel *t)
 {
   if (NULL == t)
   {
     GNUNET_assert (0);
-    return (enum CadetTunnel3CState) -1;
+    return (enum CadetTunnelCState) -1;
   }
   return t->cstate;
 }
@@ -2395,13 +2395,13 @@
  *
  * @return Tunnel's encryption state.
  */
-enum CadetTunnel3EState
-GCT_get_estate (struct CadetTunnel3 *t)
+enum CadetTunnelEState
+GCT_get_estate (struct CadetTunnel *t)
 {
   if (NULL == t)
   {
     GNUNET_assert (0);
-    return (enum CadetTunnel3EState) -1;
+    return (enum CadetTunnelEState) -1;
   }
   return t->estate;
 }
@@ -2414,7 +2414,7 @@
  * @return Biggest buffer space offered by any channel in the tunnel.
  */
 unsigned int
-GCT_get_channels_buffer (struct CadetTunnel3 *t)
+GCT_get_channels_buffer (struct CadetTunnel *t)
 {
   struct CadetTChannel *iter;
   unsigned int buffer;
@@ -2445,7 +2445,7 @@
  * @return Buffer space offered by all connections in the tunnel.
  */
 unsigned int
-GCT_get_connections_buffer (struct CadetTunnel3 *t)
+GCT_get_connections_buffer (struct CadetTunnel *t)
 {
   struct CadetTConnection *iter;
   unsigned int buffer;
@@ -2472,7 +2472,7 @@
  * @return ID of the destination peer.
  */
 const struct GNUNET_PeerIdentity *
-GCT_get_destination (struct CadetTunnel3 *t)
+GCT_get_destination (struct CadetTunnel *t)
 {
   return GCP_get_id (t->peer);
 }
@@ -2486,7 +2486,7 @@
  * @return GID of a channel free to use.
  */
 CADET_ChannelNumber
-GCT_get_next_chid (struct CadetTunnel3 *t)
+GCT_get_next_chid (struct CadetTunnel *t)
 {
   CADET_ChannelNumber chid;
   CADET_ChannelNumber mask;
@@ -2523,7 +2523,7 @@
  * @param t Channel which has some free buffer space.
  */
 void
-GCT_unchoke_channels (struct CadetTunnel3 *t)
+GCT_unchoke_channels (struct CadetTunnel *t)
 {
   struct CadetTChannel *iter;
   unsigned int buffer;
@@ -2574,7 +2574,7 @@
  * @param t Tunnel.
  */
 void
-GCT_send_connection_acks (struct CadetTunnel3 *t)
+GCT_send_connection_acks (struct CadetTunnel *t)
 {
   struct CadetTConnection *iter;
   uint32_t allowed;
@@ -2641,7 +2641,7 @@
  * @param q Handle to the queue.
  */
 void
-GCT_cancel (struct CadetTunnel3Queue *q)
+GCT_cancel (struct CadetTunnelQueue *q)
 {
   if (NULL != q->cq)
   {
@@ -2676,9 +2676,9 @@
  *
  * @return Handle to cancel message. NULL if @c cont is NULL.
  */
-struct CadetTunnel3Queue *
+struct CadetTunnelQueue *
 GCT_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
-                           struct CadetTunnel3 *t, struct CadetConnection *c,
+                           struct CadetTunnel *t, struct CadetConnection *c,
                            int force, GCT_sent cont, void *cont_cls)
 {
   return send_prebuilt_message (message, t, c, force, cont, cont_cls, NULL);
@@ -2693,7 +2693,7 @@
  * @return #GNUNET_YES if it is loopback.
  */
 int
-GCT_is_loopback (const struct CadetTunnel3 *t)
+GCT_is_loopback (const struct CadetTunnel *t)
 {
   return (myid == GCP_get_short_id (t->peer));
 }
@@ -2708,7 +2708,7 @@
  * @return #GNUNET_YES a connection uses this path.
  */
 int
-GCT_is_path_used (const struct CadetTunnel3 *t, const struct CadetPeerPath *p)
+GCT_is_path_used (const struct CadetTunnel *t, const struct CadetPeerPath *p)
 {
   struct CadetTConnection *iter;
 
@@ -2729,7 +2729,7 @@
  * @return Cost of the path (path length + number of overlapping nodes)
  */
 unsigned int
-GCT_get_path_cost (const struct CadetTunnel3 *t,
+GCT_get_path_cost (const struct CadetTunnel *t,
                    const struct CadetPeerPath *path)
 {
   struct CadetTConnection *iter;
@@ -2774,7 +2774,7 @@
  * @return Static string the destination peer's ID.
  */
 const char *
-GCT_2s (const struct CadetTunnel3 *t)
+GCT_2s (const struct CadetTunnel *t)
 {
   if (NULL == t)
     return "(NULL)";
@@ -2794,7 +2794,7 @@
  * @param t Tunnel to debug.
  */
 void
-GCT_debug (const struct CadetTunnel3 *t)
+GCT_debug (const struct CadetTunnel *t)
 {
   struct CadetTChannel *iterch;
   struct CadetTConnection *iterc;
@@ -2862,7 +2862,7 @@
  * @param cls Closure for @c iter.
  */
 void
-GCT_iterate_connections (struct CadetTunnel3 *t, GCT_conn_iter iter, void *cls)
+GCT_iterate_connections (struct CadetTunnel *t, GCT_conn_iter iter, void *cls)
 {
   struct CadetTConnection *ct;
 
@@ -2879,7 +2879,7 @@
  * @param cls Closure for @c iter.
  */
 void
-GCT_iterate_channels (struct CadetTunnel3 *t, GCT_chan_iter iter, void *cls)
+GCT_iterate_channels (struct CadetTunnel *t, GCT_chan_iter iter, void *cls)
 {
   struct CadetTChannel *cht;
 

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.h      2014-05-14 16:50:28 UTC 
(rev 33285)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.h      2014-05-14 16:50:31 UTC 
(rev 33286)
@@ -43,7 +43,7 @@
 /**
  * All the connectivity states a tunnel can be in.
  */
-enum CadetTunnel3CState
+enum CadetTunnelCState
 {
     /**
      * Uninitialized status, should never appear in operation.
@@ -75,7 +75,7 @@
 /**
  * All the encryption states a tunnel can be in.
  */
-enum CadetTunnel3EState
+enum CadetTunnelEState
 {
   /**
    * Uninitialized status, should never appear in operation.
@@ -103,7 +103,7 @@
 /**
  * Struct containing all information regarding a given peer
  */
-struct CadetTunnel3;
+struct CadetTunnel;
 
 
 #include "gnunet-service-cadet_channel.h"
@@ -113,7 +113,7 @@
 /**
  * Handle for messages queued but not yet sent.
  */
-struct CadetTunnel3Queue;
+struct CadetTunnelQueue;
 
 /**
  * Callback called when a queued message is sent.
@@ -124,8 +124,8 @@
  * @param size Size of the message.
  */
 typedef void (*GCT_sent) (void *cls,
-                          struct CadetTunnel3 *t,
-                          struct CadetTunnel3Queue *q,
+                          struct CadetTunnel *t,
+                          struct CadetTunnelQueue *q,
                           uint16_t type, size_t size);
 
 typedef void (*GCT_conn_iter) (void *cls, struct CadetConnection *c);
@@ -157,7 +157,7 @@
  *
  * @param destination Peer this tunnel is towards.
  */
-struct CadetTunnel3 *
+struct CadetTunnel *
 GCT_new (struct CadetPeer *destination);
 
 /**
@@ -168,7 +168,7 @@
  * @param t Tunnel to destroy.
  */
 void
-GCT_destroy_empty (struct CadetTunnel3 *t);
+GCT_destroy_empty (struct CadetTunnel *t);
 
 /**
  * Destroy tunnel if empty (no more channels).
@@ -176,7 +176,7 @@
  * @param t Tunnel to destroy if empty.
  */
 void
-GCT_destroy_if_empty (struct CadetTunnel3 *t);
+GCT_destroy_if_empty (struct CadetTunnel *t);
 
 /**
  * Destroy the tunnel.
@@ -190,7 +190,7 @@
  * @param t The tunnel to destroy.
  */
 void
-GCT_destroy (struct CadetTunnel3 *t);
+GCT_destroy (struct CadetTunnel *t);
 
 
 /**
@@ -200,7 +200,7 @@
  * @param cstate New connection state.
  */
 void
-GCT_change_cstate (struct CadetTunnel3* t, enum CadetTunnel3CState cstate);
+GCT_change_cstate (struct CadetTunnel* t, enum CadetTunnelCState cstate);
 
 
 /**
@@ -210,7 +210,7 @@
  * @param state New encryption state.
  */
 void
-GCT_change_estate (struct CadetTunnel3* t, enum CadetTunnel3EState state);
+GCT_change_estate (struct CadetTunnel* t, enum CadetTunnelEState state);
 
 /**
  * Add a connection to a tunnel.
@@ -219,7 +219,7 @@
  * @param c Connection.
  */
 void
-GCT_add_connection (struct CadetTunnel3 *t, struct CadetConnection *c);
+GCT_add_connection (struct CadetTunnel *t, struct CadetConnection *c);
 
 /**
  * Mark a path as no longer valid for this tunnel: has been tried and failed.
@@ -228,7 +228,7 @@
  * @param path Invalid path to remove. Is destroyed after removal.
  */
 void
-GCT_remove_path (struct CadetTunnel3 *t, struct CadetPeerPath *path);
+GCT_remove_path (struct CadetTunnel *t, struct CadetPeerPath *path);
 
 /**
  * Remove a connection from a tunnel.
@@ -237,7 +237,7 @@
  * @param c Connection.
  */
 void
-GCT_remove_connection (struct CadetTunnel3 *t, struct CadetConnection *c);
+GCT_remove_connection (struct CadetTunnel *t, struct CadetConnection *c);
 
 /**
  * Add a channel to a tunnel.
@@ -246,7 +246,7 @@
  * @param ch Channel.
  */
 void
-GCT_add_channel (struct CadetTunnel3 *t, struct CadetChannel *ch);
+GCT_add_channel (struct CadetTunnel *t, struct CadetChannel *ch);
 
 /**
  * Remove a channel from a tunnel.
@@ -255,7 +255,7 @@
  * @param ch Channel.
  */
 void
-GCT_remove_channel (struct CadetTunnel3 *t, struct CadetChannel *ch);
+GCT_remove_channel (struct CadetTunnel *t, struct CadetChannel *ch);
 
 /**
  * Search for a channel by global ID.
@@ -266,7 +266,7 @@
  * @return channel handler, NULL if doesn't exist
  */
 struct CadetChannel *
-GCT_get_channel (struct CadetTunnel3 *t, CADET_ChannelNumber chid);
+GCT_get_channel (struct CadetTunnel *t, CADET_ChannelNumber chid);
 
 /**
  * Decrypt and demultiplex by message type. Call appropriate handler
@@ -277,7 +277,7 @@
  * @param msg Message header.
  */
 void
-GCT_handle_encrypted (struct CadetTunnel3 *t,
+GCT_handle_encrypted (struct CadetTunnel *t,
                       const struct GNUNET_CADET_Encrypted *msg);
 
 /**
@@ -287,7 +287,7 @@
  * @param message KX message itself.
  */
 void
-GCT_handle_kx (struct CadetTunnel3 *t,
+GCT_handle_kx (struct CadetTunnel *t,
                const struct GNUNET_MessageHeader *message);
 
 /**
@@ -301,7 +301,7 @@
  * @return Connection created.
  */
 struct CadetConnection *
-GCT_use_path (struct CadetTunnel3 *t, struct CadetPeerPath *p);
+GCT_use_path (struct CadetTunnel *t, struct CadetPeerPath *p);
 
 /**
  * Count established (ready) connections of a tunnel.
@@ -311,7 +311,7 @@
  * @return Number of connections.
  */
 unsigned int
-GCT_count_connections (struct CadetTunnel3 *t);
+GCT_count_connections (struct CadetTunnel *t);
 
 /**
  * Count channels of a tunnel.
@@ -321,7 +321,7 @@
  * @return Number of channels.
  */
 unsigned int
-GCT_count_channels (struct CadetTunnel3 *t);
+GCT_count_channels (struct CadetTunnel *t);
 
 /**
  * Get the connectivity state of a tunnel.
@@ -330,8 +330,8 @@
  *
  * @return Tunnel's connectivity state.
  */
-enum CadetTunnel3CState
-GCT_get_cstate (struct CadetTunnel3 *t);
+enum CadetTunnelCState
+GCT_get_cstate (struct CadetTunnel *t);
 
 /**
  * Get the encryption state of a tunnel.
@@ -340,8 +340,8 @@
  *
  * @return Tunnel's encryption state.
  */
-enum CadetTunnel3EState
-GCT_get_estate (struct CadetTunnel3 *t);
+enum CadetTunnelEState
+GCT_get_estate (struct CadetTunnel *t);
 
 /**
  * Get the maximum buffer space for a tunnel towards a local client.
@@ -351,7 +351,7 @@
  * @return Biggest buffer space offered by any channel in the tunnel.
  */
 unsigned int
-GCT_get_channels_buffer (struct CadetTunnel3 *t);
+GCT_get_channels_buffer (struct CadetTunnel *t);
 
 /**
  * Get the total buffer space for a tunnel for P2P traffic.
@@ -361,7 +361,7 @@
  * @return Buffer space offered by all connections in the tunnel.
  */
 unsigned int
-GCT_get_connections_buffer (struct CadetTunnel3 *t);
+GCT_get_connections_buffer (struct CadetTunnel *t);
 
 /**
  * Get the tunnel's destination.
@@ -371,7 +371,7 @@
  * @return ID of the destination peer.
  */
 const struct GNUNET_PeerIdentity *
-GCT_get_destination (struct CadetTunnel3 *t);
+GCT_get_destination (struct CadetTunnel *t);
 
 /**
  * Get the tunnel's next free Channel ID.
@@ -381,7 +381,7 @@
  * @return ID of a channel free to use.
  */
 CADET_ChannelNumber
-GCT_get_next_chid (struct CadetTunnel3 *t);
+GCT_get_next_chid (struct CadetTunnel *t);
 
 /**
  * Send ACK on one or more channels due to buffer in connections.
@@ -389,7 +389,7 @@
  * @param t Channel which has some free buffer space.
  */
 void
-GCT_unchoke_channels (struct CadetTunnel3 *t);
+GCT_unchoke_channels (struct CadetTunnel *t);
 
 /**
  * Send ACK on one or more connections due to buffer space to the client.
@@ -399,7 +399,7 @@
  * @param t Tunnel which has some free buffer space.
  */
 void
-GCT_send_connection_acks (struct CadetTunnel3 *t);
+GCT_send_connection_acks (struct CadetTunnel *t);
 
 /**
  * Cancel a previously sent message while it's in the queue.
@@ -411,7 +411,7 @@
  * @param q Handle to the queue.
  */
 void
-GCT_cancel (struct CadetTunnel3Queue *q);
+GCT_cancel (struct CadetTunnelQueue *q);
 
 /**
  * Sends an already built message on a tunnel, encrypting it and
@@ -426,9 +426,9 @@
  *
  * @return Handle to cancel message. NULL if @c cont is NULL.
  */
-struct CadetTunnel3Queue *
+struct CadetTunnelQueue *
 GCT_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
-                           struct CadetTunnel3 *t, struct CadetConnection *c,
+                           struct CadetTunnel *t, struct CadetConnection *c,
                            int force, GCT_sent cont, void *cont_cls);
 
 /**
@@ -439,7 +439,7 @@
  * @return #GNUNET_YES if it is loopback.
  */
 int
-GCT_is_loopback (const struct CadetTunnel3 *t);
+GCT_is_loopback (const struct CadetTunnel *t);
 
 /**
  * Is the tunnel using this path already?
@@ -450,7 +450,7 @@
  * @return #GNUNET_YES a connection uses this path.
  */
 int
-GCT_is_path_used (const struct CadetTunnel3 *t, const struct CadetPeerPath *p);
+GCT_is_path_used (const struct CadetTunnel *t, const struct CadetPeerPath *p);
 
 /**
  * Get a cost of a path for a tunnel considering existing connections.
@@ -461,7 +461,7 @@
  * @return Cost of the path (path length + number of overlapping nodes)
  */
 unsigned int
-GCT_get_path_cost (const struct CadetTunnel3 *t,
+GCT_get_path_cost (const struct CadetTunnel *t,
                    const struct CadetPeerPath *path);
 
 /**
@@ -472,7 +472,7 @@
  * @return Static string the destination peer's ID.
  */
 const char *
-GCT_2s (const struct CadetTunnel3 *t);
+GCT_2s (const struct CadetTunnel *t);
 
 /**
  * Log all possible info about the tunnel state.
@@ -480,7 +480,7 @@
  * @param t Tunnel to debug.
  */
 void
-GCT_debug (const struct CadetTunnel3 *t);
+GCT_debug (const struct CadetTunnel *t);
 
 /**
  * Iterate all tunnels.
@@ -507,7 +507,7 @@
  * @param cls Closure for @c iter.
  */
 void
-GCT_iterate_connections (struct CadetTunnel3 *t, GCT_conn_iter iter, void 
*cls);
+GCT_iterate_connections (struct CadetTunnel *t, GCT_conn_iter iter, void *cls);
 
 /**
  * Iterate all channels of a tunnel.
@@ -517,7 +517,7 @@
  * @param cls Closure for @c iter.
  */
 void
-GCT_iterate_channels (struct CadetTunnel3 *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 */
 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]