gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37915 - in gnunet/src: cadet include


From: gnunet
Subject: [GNUnet-SVN] r37915 - in gnunet/src: cadet include
Date: Mon, 12 Sep 2016 13:31:50 +0200

Author: grothoff
Date: 2016-09-12 13:31:50 +0200 (Mon, 12 Sep 2016)
New Revision: 37915

Modified:
   gnunet/src/cadet/cadet.h
   gnunet/src/cadet/cadet_protocol.h
   gnunet/src/cadet/gnunet-service-cadet_channel.c
   gnunet/src/cadet/gnunet-service-cadet_channel.h
   gnunet/src/cadet/gnunet-service-cadet_connection.h
   gnunet/src/cadet/gnunet-service-cadet_local.c
   gnunet/src/cadet/gnunet-service-cadet_tunnel.h
   gnunet/src/include/gnunet_protocols.h
Log:
realigning CADET messages and bumping message types to avoid interactions with 
incompatible old versions complicating diagnostics

Modified: gnunet/src/cadet/cadet.h
===================================================================
--- gnunet/src/cadet/cadet.h    2016-09-11 19:22:36 UTC (rev 37914)
+++ gnunet/src/cadet/cadet.h    2016-09-12 11:31:50 UTC (rev 37915)
@@ -69,16 +69,17 @@
  */
 struct GNUNET_CADET_PortMessage
 {
-    /**
-     * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_[OPEN|CLOSE]
-     *
-     * Size: sizeof(struct GNUNET_CADET_ChannelMessage)
-     */
+  /**
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN
+   * or #GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE
+   *
+   * Size: sizeof(struct GNUNET_CADET_ChannelMessage)
+   */
   struct GNUNET_MessageHeader header;
 
-    /**
-     * Port to open/close.
-     */
+  /**
+   * Port to open/close.
+   */
   struct GNUNET_HashCode port GNUNET_PACKED;
 };
 
@@ -96,31 +97,31 @@
  */
 struct GNUNET_CADET_ChannelCreateMessage
 {
-    /**
-     * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_CREATE
-     *
-     * Size: sizeof(struct GNUNET_CADET_ChannelCreateMessage)
-     */
+  /**
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_CREATE
+   *
+   * Size: sizeof(struct GNUNET_CADET_ChannelCreateMessage)
+   */
   struct GNUNET_MessageHeader header;
 
-    /**
-     * ID of a channel controlled by this client.
-     */
+  /**
+   * ID of a channel controlled by this client.
+   */
   CADET_ChannelNumber channel_id GNUNET_PACKED;
 
-    /**
-     * Channel's peer
-     */
+  /**
+   * Channel's peer
+   */
   struct GNUNET_PeerIdentity peer;
 
-    /**
-     * Port of the channel.
-     */
+  /**
+   * Port of the channel.
+   */
   struct GNUNET_HashCode port;
 
-    /**
-     * Options.
-     */
+  /**
+   * Options.
+   */
   uint32_t opt GNUNET_PACKED;
 };
 
@@ -130,16 +131,16 @@
  */
 struct GNUNET_CADET_ChannelDestroyMessage
 {
-    /**
-     * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_DESTROY
-     *
-     * Size: sizeof(struct GNUNET_CADET_ChannelDestroyMessage)
-     */
+  /**
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_DESTROY
+   *
+   * Size: sizeof(struct GNUNET_CADET_ChannelDestroyMessage)
+   */
   struct GNUNET_MessageHeader header;
-
-    /**
-     * ID of a channel controlled by this client.
-     */
+  
+  /**
+   * ID of a channel controlled by this client.
+   */
   CADET_ChannelNumber channel_id GNUNET_PACKED;
 };
 
@@ -149,19 +150,19 @@
  */
 struct GNUNET_CADET_LocalData
 {
-    /**
-     * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA
-     */
+  /**
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA
+   */
   struct GNUNET_MessageHeader header;
 
-    /**
-     * ID of the channel
-     */
+  /**
+   * ID of the channel
+   */
   uint32_t id GNUNET_PACKED;
 
-    /**
-     * Payload follows
-     */
+  /**
+   * Payload follows
+   */
 };
 
 
@@ -171,14 +172,14 @@
  */
 struct GNUNET_CADET_LocalAck
 {
-    /**
-     * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK
-     */
+  /**
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK
+   */
   struct GNUNET_MessageHeader header;
 
-    /**
-     * ID of the channel allowed to send more data.
-     */
+  /**
+   * ID of the channel allowed to send more data.
+   */
   CADET_ChannelNumber channel_id GNUNET_PACKED;
 
 };
@@ -190,7 +191,8 @@
 struct GNUNET_CADET_LocalInfo
 {
   /**
-     * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO[_TUNNEL,_PEER]
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL or
+   * #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER
    */
   struct GNUNET_MessageHeader header;
 
@@ -217,7 +219,8 @@
 struct GNUNET_CADET_LocalInfoPeer
 {
   /**
-   * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER[S]
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER or
+   * #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS
    */
   struct GNUNET_MessageHeader header;
 
@@ -246,7 +249,8 @@
 struct GNUNET_CADET_LocalInfoTunnel
 {
   /**
-   * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL[S]
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL
+   * or #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS
    */
   struct GNUNET_MessageHeader header;
 

Modified: gnunet/src/cadet/cadet_protocol.h
===================================================================
--- gnunet/src/cadet/cadet_protocol.h   2016-09-11 19:22:36 UTC (rev 37914)
+++ gnunet/src/cadet/cadet_protocol.h   2016-09-12 11:31:50 UTC (rev 37915)
@@ -61,6 +61,11 @@
   struct GNUNET_MessageHeader header;
 
   /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+  
+  /**
    * ID of the connection
    */
   struct GNUNET_CADET_Hash cid;
@@ -78,14 +83,19 @@
  */
 struct GNUNET_CADET_ConnectionACK
 {
-    /**
-     * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK
-     */
+  /**
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK
+   */
   struct GNUNET_MessageHeader header;
 
-    /**
-     * ID of the connection.
-     */
+  /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+
+  /**
+   * ID of the connection.
+   */
   struct GNUNET_CADET_Hash cid;
 
 };
@@ -96,14 +106,19 @@
  */
 struct GNUNET_CADET_KX
 {
-    /**
-     * Type: #GNUNET_MESSAGE_TYPE_CADET_KX.
-     */
+  /**
+   * Type: #GNUNET_MESSAGE_TYPE_CADET_KX.
+   */
   struct GNUNET_MessageHeader header;
+  
+  /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
 
-    /**
-     * ID of the connection.
-     */
+  /**
+   * ID of the connection.
+   */
   struct GNUNET_CADET_Hash cid;
 
   /* Specific KX message follows. */
@@ -222,9 +237,9 @@
   struct GNUNET_MessageHeader header;
 
   /**
-   * ID of the channel
+   * Channel options.
    */
-  CADET_ChannelNumber chid GNUNET_PACKED;
+  uint32_t opt GNUNET_PACKED;
 
   /**
    * Destination port.
@@ -232,9 +247,9 @@
   struct GNUNET_HashCode port;
 
   /**
-   * Channel options.
+   * ID of the channel
    */
-  uint32_t opt GNUNET_PACKED;
+  CADET_ChannelNumber chid GNUNET_PACKED;
 };
 
 
@@ -367,6 +382,11 @@
   struct GNUNET_MessageHeader header;
 
   /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+
+  /**
    * ID of the connection.
    */
   struct GNUNET_CADET_Hash cid;
@@ -394,6 +414,11 @@
   struct GNUNET_MessageHeader header;
 
   /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+
+  /**
    * ID of the connection.
    */
   struct GNUNET_CADET_Hash cid;

Modified: gnunet/src/cadet/gnunet-service-cadet_channel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_channel.c     2016-09-11 19:22:36 UTC 
(rev 37914)
+++ gnunet/src/cadet/gnunet-service-cadet_channel.c     2016-09-12 11:31:50 UTC 
(rev 37915)
@@ -94,25 +94,25 @@
  */
 struct CadetReliableMessage
 {
-    /**
-     * Double linked list, FIFO style
-     */
+  /**
+   * Double linked list, FIFO style
+   */
   struct CadetReliableMessage   *next;
   struct CadetReliableMessage   *prev;
 
-    /**
-     * Type of message (payload, channel management).
-     */
+  /**
+   * Type of message (payload, channel management).
+   */
   int16_t                       type;
 
-    /**
-     * Tunnel Reliability queue this message is in.
-     */
+  /**
+   * Tunnel Reliability queue this message is in.
+   */
   struct CadetChannelReliability *rel;
 
-    /**
-     * ID of the message (ACK needed to free)
-     */
+  /**
+   * ID of the message (ACK needed to free)
+   */
   uint32_t                      mid;
 
   /**
@@ -120,9 +120,9 @@
    */
   struct CadetChannelQueue      *chq;
 
-    /**
-     * When was this message issued (to calculate ACK delay)
-     */
+  /**
+   * When was this message issued (to calculate ACK delay)
+   */
   struct GNUNET_TIME_Absolute   timestamp;
 
   /* struct GNUNET_CADET_Data with payload */
@@ -134,46 +134,46 @@
  */
 struct CadetChannelReliability
 {
-    /**
-     * Channel this is about.
-     */
+  /**
+   * Channel this is about.
+   */
   struct CadetChannel *ch;
 
-    /**
-     * DLL of messages sent and not yet ACK'd.
-     */
+  /**
+   * DLL of messages sent and not yet ACK'd.
+   */
   struct CadetReliableMessage        *head_sent;
   struct CadetReliableMessage        *tail_sent;
 
-    /**
-     * DLL of messages received out of order.
-     */
+  /**
+   * DLL of messages received out of order.
+   */
   struct CadetReliableMessage        *head_recv;
   struct CadetReliableMessage        *tail_recv;
 
-    /**
-     * Messages received.
-     */
+  /**
+   * Messages received.
+   */
   unsigned int                      n_recv;
 
-    /**
-     * Next MID to use for outgoing traffic.
-     */
+  /**
+   * Next MID to use for outgoing traffic.
+   */
   uint32_t                          mid_send;
 
-    /**
-     * Next MID expected for incoming traffic.
-     */
+  /**
+   * Next MID expected for incoming traffic.
+   */
   uint32_t                          mid_recv;
 
-    /**
-     * Handle for queued unique data CREATE, DATA_ACK.
-     */
+  /**
+   * Handle for queued unique data CREATE, DATA_ACK.
+   */
   struct CadetChannelQueue           *uniq;
 
-    /**
-     * Can we send data to the client?
-     */
+  /**
+   * Can we send data to the client?
+   */
   int                               client_ready;
 
   /**
@@ -181,19 +181,19 @@
    */
   int                               client_allowed;
 
-    /**
-     * Task to resend/poll in case no ACK is received.
-     */
+  /**
+   * Task to resend/poll in case no ACK is received.
+   */
   struct GNUNET_SCHEDULER_Task *   retry_task;
 
-    /**
-     * Counter for exponential backoff.
-     */
+  /**
+   * Counter for exponential backoff.
+   */
   struct GNUNET_TIME_Relative       retry_timer;
 
-    /**
-     * How long does it usually take to get an ACK.
-     */
+  /**
+   * How long does it usually take to get an ACK.
+   */
   struct GNUNET_TIME_Relative       expected_delay;
 };
 
@@ -203,85 +203,85 @@
  */
 struct CadetChannel
 {
-    /**
-     * Tunnel this channel is in.
-     */
+  /**
+   * Tunnel this channel is in.
+   */
   struct CadetTunnel *t;
 
-    /**
-     * Destination port of the channel.
-     */
+  /**
+   * Destination port of the channel.
+   */
   struct GNUNET_HashCode port;
 
-    /**
-     * Global channel number ( < GNUNET_CADET_LOCAL_CHANNEL_ID_CLI)
-     */
+  /**
+   * Global channel number ( < GNUNET_CADET_LOCAL_CHANNEL_ID_CLI)
+   */
   CADET_ChannelNumber gid;
 
-    /**
-     * Local tunnel number for root (owner) client.
-     * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_CLI or 0 )
-     */
+  /**
+   * Local tunnel number for root (owner) client.
+   * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_CLI or 0 )
+   */
   CADET_ChannelNumber lid_root;
-
-    /**
-     * Local tunnel number for local destination clients (incoming number)
-     * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_SERV or 0).
-     */
+  
+  /**
+   * Local tunnel number for local destination clients (incoming number)
+   * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_SERV or 0).
+   */
   CADET_ChannelNumber lid_dest;
 
-    /**
-     * Channel state.
-     */
+  /**
+   * Channel state.
+   */
   enum CadetChannelState state;
 
-    /**
-     * Is the tunnel bufferless (minimum latency)?
-     */
+  /**
+   * Is the tunnel bufferless (minimum latency)?
+   */
   int nobuffer;
 
-    /**
-     * Is the tunnel reliable?
-     */
+  /**
+   * Is the tunnel reliable?
+   */
   int reliable;
 
-    /**
-     * Last time the channel was used
-     */
+  /**
+   * Last time the channel was used
+   */
   struct GNUNET_TIME_Absolute timestamp;
 
-    /**
-     * Client owner of the tunnel, if any
-     */
+  /**
+   * Client owner of the tunnel, if any
+   */
   struct CadetClient *root;
 
-    /**
-     * Client destination of the tunnel, if any.
-     */
+  /**
+   * Client destination of the tunnel, if any.
+   */
   struct CadetClient *dest;
 
-    /**
-     * Flag to signal the destruction of the channel.
-     * If this is set GNUNET_YES the channel will be destroyed
-     * when the queue is empty.
-     */
+  /**
+   * Flag to signal the destruction of the channel.
+   * If this is set to #GNUNET_YES the channel will be destroyed
+   * when the queue is empty.
+   */
   int destroy;
 
-    /**
-     * Total (reliable) messages pending ACK for this channel.
-     */
+  /**
+   * Total (reliable) messages pending ACK for this channel.
+   */
   unsigned int pending_messages;
 
-    /**
-     * Reliability data.
-     * Only present (non-NULL) at the owner of a tunnel.
-     */
+  /**
+   * Reliability data.
+   * Only present (non-NULL) at the owner of a tunnel.
+   */
   struct CadetChannelReliability *root_rel;
 
-    /**
-     * Reliability data.
-     * Only present (non-NULL) at the destination of a tunnel.
-     */
+  /**
+   * Reliability data.
+   * Only present (non-NULL) at the destination of a tunnel.
+   */
   struct CadetChannelReliability *dest_rel;
 
 };

Modified: gnunet/src/cadet/gnunet-service-cadet_channel.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_channel.h     2016-09-11 19:22:36 UTC 
(rev 37914)
+++ gnunet/src/cadet/gnunet-service-cadet_channel.h     2016-09-12 11:31:50 UTC 
(rev 37915)
@@ -211,6 +211,7 @@
                            struct CadetClient *c,
                            int is_root);
 
+
 /**
  * Handle a channel create requested by a client.
  *
@@ -219,7 +220,7 @@
  * @param c Client that requested the creation (will be the root).
  * @param msg Create Channel message.
  *
- * @return GNUNET_OK if everything went fine, GNUNET_SYSERR otherwise.
+ * @return #GNUNET_OK if everything went fine, #GNUNET_SYSERR otherwise.
  */
 int
 GCCH_handle_local_create (struct CadetClient *c,
@@ -240,6 +241,7 @@
                   const struct GNUNET_CADET_Data *msg,
                   int fwd);
 
+
 /**
  * Handler for cadet network traffic end-to-end ACKs.
  *
@@ -255,6 +257,7 @@
                       const struct GNUNET_CADET_DataACK *msg,
                       int fwd);
 
+
 /**
  * Handler for channel create messages.
  *
@@ -267,6 +270,7 @@
 GCCH_handle_create (struct CadetTunnel *t,
                     const struct GNUNET_CADET_ChannelCreate *msg);
 
+
 /**
  * Handler for channel NACK messages.
  *
@@ -277,6 +281,7 @@
 void
 GCCH_handle_nack (struct CadetChannel *ch);
 
+
 /**
  * Handler for channel ack messages.
  *
@@ -292,6 +297,7 @@
                  const struct GNUNET_CADET_ChannelManage *msg,
                  int fwd);
 
+
 /**
  * Handler for channel destroy messages.
  *
@@ -307,6 +313,7 @@
                      const struct GNUNET_CADET_ChannelManage *msg,
                      int fwd);
 
+
 /**
  * Sends an already built message on a channel.
  *
@@ -328,6 +335,7 @@
                             struct CadetChannel *ch, int fwd,
                             void *existing_copy);
 
+
 /**
  * Get the static string for identification of the channel.
  *

Modified: gnunet/src/cadet/gnunet-service-cadet_connection.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.h  2016-09-11 19:22:36 UTC 
(rev 37914)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.h  2016-09-12 11:31:50 UTC 
(rev 37915)
@@ -96,7 +96,7 @@
  * Check invariants for all connections using #check_neighbours().
  */
 void
-GCC_check_connections ();
+GCC_check_connections (void);
 
 
 /**

Modified: gnunet/src/cadet/gnunet-service-cadet_local.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_local.c       2016-09-11 19:22:36 UTC 
(rev 37914)
+++ gnunet/src/cadet/gnunet-service-cadet_local.c       2016-09-12 11:31:50 UTC 
(rev 37915)
@@ -47,51 +47,51 @@
  */
 struct CadetClient
 {
-    /**
-     * Linked list next
-     */
+  /**
+   * Linked list next
+   */
   struct CadetClient *next;
 
-    /**
-     * Linked list prev
-     */
+  /**
+   * Linked list prev
+   */
   struct CadetClient *prev;
 
-    /**
-     * Tunnels that belong to this client, indexed by local id
-     */
+  /**
+   * Tunnels that belong to this client, indexed by local id
+   */
   struct GNUNET_CONTAINER_MultiHashMap32 *own_channels;
-
-    /**
-     * Tunnels this client has accepted, indexed by incoming local id
-     */
+  
+  /**
+   * Tunnels this client has accepted, indexed by incoming local id
+   */
   struct GNUNET_CONTAINER_MultiHashMap32 *incoming_channels;
 
-    /**
-     * Channel ID for the next incoming channel.
-     */
+  /**
+   * Channel ID for the next incoming channel.
+   */
   CADET_ChannelNumber next_chid;
 
-    /**
-     * Handle to communicate with the client
-     */
+  /**
+   * Handle to communicate with the client
+   */
   struct GNUNET_SERVER_Client *handle;
 
-    /**
-     * Ports that this client has declared interest in.
-     * Indexed by port, contains *Client.
-     */
+  /**
+   * Ports that this client has declared interest in.
+   * Indexed by port, contains *Client.
+   */
   struct GNUNET_CONTAINER_MultiHashMap *ports;
 
-    /**
-     * Whether the client is active or shutting down (don't send confirmations
-     * to a client that is shutting down.
-     */
+  /**
+   * Whether the client is active or shutting down (don't send confirmations
+   * to a client that is shutting down.
+   */
   int shutting_down;
 
-    /**
-     * ID of the client, mainly for debug messages
-     */
+  /**
+   * ID of the client, mainly for debug messages
+   */
   unsigned int id;
 };
 
@@ -146,7 +146,7 @@
  * @param key Port.
  * @param value Client structure.
  *
- * @return GNUNET_OK, keep iterating.
+ * @return #GNUNET_OK, keep iterating.
  */
 static int
 client_release_ports (void *cls,
@@ -174,7 +174,7 @@
  * @param key The local channel id (used to access the hashmap).
  * @param value The value stored at the key (channel to destroy).
  *
- * @return GNUNET_OK, keep iterating.
+ * @return #GNUNET_OK, keep iterating.
  */
 static int
 channel_destroy_iterator (void *cls,
@@ -230,6 +230,7 @@
   GNUNET_free (c);
 }
 
+
 /**
  * Create a client record, register data and initialize memory.
  *

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.h      2016-09-11 19:22:36 UTC 
(rev 37914)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.h      2016-09-12 11:31:50 UTC 
(rev 37915)
@@ -47,24 +47,24 @@
  */
 enum CadetTunnelCState
 {
-    /**
-     * Uninitialized status, should never appear in operation.
-     */
+  /**
+   * Uninitialized status, should never appear in operation.
+   */
   CADET_TUNNEL_NEW,
 
-    /**
-     * No path to the peer known yet.
-     */
+  /**
+   * No path to the peer known yet.
+   */
   CADET_TUNNEL_SEARCHING,
 
-    /**
-     * Request sent, not yet answered.
-     */
+  /**
+   * Request sent, not yet answered.
+   */
   CADET_TUNNEL_WAITING,
 
-    /**
-     * Peer connected and ready to accept data.
-     */
+  /**
+   * Peer connected and ready to accept data.
+   */
   CADET_TUNNEL_READY,
 
   /**
@@ -142,15 +142,20 @@
  * @param type Type of message sent.
  * @param size Size of the message.
  */
-typedef void (*GCT_sent) (void *cls,
-                          struct CadetTunnel *t,
-                          struct CadetTunnelQueue *q,
-                          uint16_t type, size_t size);
+typedef void
+(*GCT_sent) (void *cls,
+            struct CadetTunnel *t,
+            struct CadetTunnelQueue *q,
+            uint16_t type, size_t size);
 
-typedef void (*GCT_conn_iter) (void *cls, struct CadetConnection *c);
-typedef void (*GCT_chan_iter) (void *cls, struct CadetChannel *ch);
+typedef void
+(*GCT_conn_iter) (void *cls, struct CadetConnection *c);
 
 
+typedef void
+(*GCT_chan_iter) (void *cls, struct CadetChannel *ch);
+
+
 
/******************************************************************************/
 /********************************    API    
***********************************/
 
/******************************************************************************/

Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h       2016-09-11 19:22:36 UTC (rev 
37914)
+++ gnunet/src/include/gnunet_protocols.h       2016-09-12 11:31:50 UTC (rev 
37915)
@@ -796,179 +796,7 @@
 #define GNUNET_MESSAGE_TYPE_DNS_HELPER 214
 
 
-/*******************************************************************************
- * CADET message types
- 
******************************************************************************/
 
-/**
- * Type of message used to transport messages throug a CADET-tunnel (LEGACY)
- */
-#define GNUNET_MESSAGE_TYPE_CADET 215
-
-/**
- * Type of message used to send another peer which messages we want to receive
- * through a cadet-tunnel (LEGACY)
- */
-#define GNUNET_MESSAGE_TYPE_CADET_HELLO 216
-
-/**
- * Request the creation of a connection
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE      256
-
-/**
- * Send origin an ACK that the connection is complete
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK         257
-
-/**
- * Notify that a connection is no longer valid
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN      258
-
-/**
- * At some point, the route will spontaneously change TODO
- */
-#define GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED           259
-
-/**
- * Payload data (usually inside a encrypted tunnel).
- */
-#define GNUNET_MESSAGE_TYPE_CADET_DATA                   260
-
-/**
- * Confirm payload data end-to-end.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_DATA_ACK               261
-
-/**
- * Key exchange encapsulation.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_KX                     262
-
-/**
- * Request the destuction of a connection
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY     266
-
-/**
- * Hop-by-hop, connection dependent ACK.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_ACK                    268
-
-/**
- * Poll for a hop-by-hop ACK.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_POLL                   269
-
-/**
- * Announce connection is still alive (direction sensitive).
- */
-#define GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE              270
-
-
-/**
- * Ask the cadet service to create a new channel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE         273
-
-/**
- * Ask the cadet service to destroy a channel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY        274
-
-/**
- * Confirm the creation of a channel
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK            275
-
-/**
- * Reject the creation of a channel
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK           276
-
-/**
- * Axolotl key exchange.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_AX_KX                  281
-
-/**
- * Axolotl encrypted data.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_AX                     282
-
-/**
- * Payload client <-> service
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA             285
-
-/**
- * Local ACK for data.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK              286
-
-/**
- * Start listening on a port.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN        287
-
-/**
- * Stop listening on a port.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE       288
-
-/**
- * Local information about all channels of service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS    290
-
-/**
- * Local information of service about a specific channel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL     291
-
-/**
- * Local information about all tunnels of service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS     292
-
-/**
- * Local information of service about a specific tunnel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL      293
-
-/**
- * Local information about all connections of service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 294
-
-/**
- * Local information of service about a specific connection.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION  295
-
-/**
- * Local information about all peers known to the service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS       296
-
-/**
- * Local information of service about a specific peer.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER        297
-
-/**
- * Traffic (net-cat style) used by the Command Line Interface.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CLI                    298
-
-/**
- * Debug request.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP        299
-
-
-
 
/*******************************************************************************
  * CHAT message types START
  
******************************************************************************/
@@ -1961,39 +1789,8 @@
 #define GNUNET_MESSAGE_TYPE_TESTBED_LOGGER_ACK 601
 
 
-/*******************************************************************************
- * EXPERIMENTATION message types
- 
******************************************************************************/
 
 /**
- * Message for experimentation request
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_REQUEST 610
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_RESPONSE 611
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_START 612
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_START_ACK 613
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_STOP 614
-
-
-
-
-/**
  * Advertise regex capability.
  */
 #define GNUNET_MESSAGE_TYPE_REGEX_ANNOUNCE 620
@@ -2478,72 +2275,6 @@
 
 
 
/*******************************************************************************
- * SENSOR message types
- 
******************************************************************************/
-
-/**
- * Request information about all sensors
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_GETALL 800
-
-/**
- * Request information about one sensor
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_GET 801
-
-/**
- * Message carrying sensor information
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_INFO 802
-
-/**
- * End of an iteration sequence
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_END 803
-
-/**
- * Message carrying a single sensor reading
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_READING 804
-
-/**
- * Request for sensor list from update point
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_LIST_REQ 805
-
-/**
- * Messsage carrying brief sensor information (name, version)
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_BRIEF 806
-
-/**
- * Request for full sensor information
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_FULL_REQ 807
-
-/**
- * Full sensor information
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_FULL 808
-
-/**
- * Sensor anomaly report
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_REPORT 809
-
-/**
- * Message sent from API to service to force a new sensor anomaly status
- * (For testing purposes only)
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_FORCE 810
-
-/**
- * Sensor anomaly report exchanged between peers
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_REPORT_P2P 811
-
-
-/*******************************************************************************
  * PEERSTORE message types
  
******************************************************************************/
 
@@ -2851,11 +2582,186 @@
 
 
/*******************************************************************************/
 
+
+/*******************************************************************************
+ * CADET message types
+ 
******************************************************************************/
+
 /**
- * Next available: 970
+ * Type of message used to transport messages throug a CADET-tunnel (LEGACY)
  */
+#define GNUNET_MESSAGE_TYPE_CADET 1000
 
 /**
+ * Type of message used to send another peer which messages we want to receive
+ * through a cadet-tunnel (LEGACY)
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_HELLO 1001
+
+/**
+ * Request the creation of a connection
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE 1002
+
+/**
+ * Send origin an ACK that the connection is complete
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK 1003
+
+/**
+ * Notify that a connection is no longer valid
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN 1004
+
+/**
+ * At some point, the route will spontaneously change TODO
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED 1005
+
+/**
+ * Payload data (usually inside a encrypted tunnel).
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_DATA 1006
+
+/**
+ * Confirm payload data end-to-end.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_DATA_ACK 1007
+
+/**
+ * Key exchange encapsulation.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_KX 1008
+
+/**
+ * Request the destuction of a connection
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY 1009
+
+/**
+ * Hop-by-hop, connection dependent ACK.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_ACK 1010
+
+/**
+ * Poll for a hop-by-hop ACK.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_POLL 1011
+
+/**
+ * Announce connection is still alive (direction sensitive).
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE 1012
+
+
+/**
+ * Ask the cadet service to create a new channel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE 1013
+
+/**
+ * Ask the cadet service to destroy a channel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY 1014
+
+/**
+ * Confirm the creation of a channel
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK 1015
+
+/**
+ * Reject the creation of a channel
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK 1016
+
+/**
+ * Axolotl key exchange.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_AX_KX 1017
+
+/**
+ * Axolotl encrypted data.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_AX 1018
+
+/**
+ * Payload client <-> service
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA 1019
+
+/**
+ * Local ACK for data.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK 1020
+
+/**
+ * Start listening on a port.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN 1021
+
+/**
+ * Stop listening on a port.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE 1022
+
+/**
+ * Local information about all channels of service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS 1023
+
+/**
+ * Local information of service about a specific channel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL 1024
+
+/**
+ * Local information about all tunnels of service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS 1025
+
+/**
+ * Local information of service about a specific tunnel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL 1026
+
+/**
+ * Local information about all connections of service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 1027
+
+/**
+ * Local information of service about a specific connection.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION 1028
+
+/**
+ * Local information about all peers known to the service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS 1029
+
+/**
+ * Local information of service about a specific peer.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER 1030
+
+/**
+ * Traffic (net-cat style) used by the Command Line Interface.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CLI 1031
+
+/**
+ * Debug request.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP 1032
+
+
+/**
+ * Next available: 1060
+ */
+
+
+
+/**
  * Type used to match 'all' message types.
  */
 #define GNUNET_MESSAGE_TYPE_ALL 65535




reply via email to

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