realigning CADET messages and bumping message types to avoid interactions with incomp...
authorChristian Grothoff <christian@grothoff.org>
Mon, 12 Sep 2016 11:31:50 +0000 (11:31 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 12 Sep 2016 11:31:50 +0000 (11:31 +0000)
src/cadet/cadet.h
src/cadet/cadet_protocol.h
src/cadet/gnunet-service-cadet_channel.c
src/cadet/gnunet-service-cadet_channel.h
src/cadet/gnunet-service-cadet_connection.h
src/cadet/gnunet-service-cadet_local.c
src/cadet/gnunet-service-cadet_tunnel.h
src/include/gnunet_protocols.h

index 063711fd2f72e40f4b95e367a06d41b8004b9e22..3ff93c2547dce7c2f5539f356d4890c281949fbf 100644 (file)
@@ -69,16 +69,17 @@ GNUNET_NETWORK_STRUCT_BEGIN
  */
 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 @@ typedef uint32_t CADET_ChannelNumber;
  */
 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_ChannelCreateMessage
  */
 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_ChannelDestroyMessage
  */
 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_LocalData
  */
 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_LocalAck
 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_LocalInfo
 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_LocalInfoPeer
 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;
 
index e40fa0e7b4ec5bc220e0a479eac7152273428d73..2df652e3476ce1de51fa03e85e442c6deec6f136 100644 (file)
@@ -60,6 +60,11 @@ struct GNUNET_CADET_ConnectionCreate
    */
   struct GNUNET_MessageHeader header;
 
+  /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+  
   /**
    * ID of the connection
    */
@@ -78,14 +83,19 @@ struct GNUNET_CADET_ConnectionCreate
  */
 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_ConnectionACK
  */
 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_CADET_ChannelCreate
   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_CADET_ChannelCreate
   struct GNUNET_HashCode port;
 
   /**
-   * Channel options.
+   * ID of the channel
    */
-  uint32_t opt GNUNET_PACKED;
+  CADET_ChannelNumber chid GNUNET_PACKED;
 };
 
 
@@ -366,6 +381,11 @@ struct GNUNET_CADET_ConnectionBroken
    */
   struct GNUNET_MessageHeader header;
 
+  /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+
   /**
    * ID of the connection.
    */
@@ -393,6 +413,11 @@ struct GNUNET_CADET_ConnectionDestroy
    */
   struct GNUNET_MessageHeader header;
 
+  /**
+   * For alignment.
+   */
+  uint32_t reserved GNUNET_PACKED;
+
   /**
    * ID of the connection.
    */
index d1dcfdd2d59c7528f56b44d8a2062e5f6ed62af4..0e9b7a3af4644a3d0abd5fdf0ea222d4188ef051 100644 (file)
@@ -94,25 +94,25 @@ struct CadetChannelQueue
  */
 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 CadetReliableMessage
    */
   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 CadetReliableMessage
  */
 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 @@ struct CadetChannelReliability
    */
   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 CadetChannelReliability
  */
 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;
 
 };
index cc1eb4d8aeafc3485490de4a834e7ea3e547289b..eeea02712f098311440c1a9cd783d03590e85628 100644 (file)
@@ -211,6 +211,7 @@ GCCH_handle_local_destroy (struct CadetChannel *ch,
                            struct CadetClient *c,
                            int is_root);
 
+
 /**
  * Handle a channel create requested by a client.
  *
@@ -219,7 +220,7 @@ GCCH_handle_local_destroy (struct CadetChannel *ch,
  * @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 @@ GCCH_handle_data (struct CadetChannel *ch,
                   const struct GNUNET_CADET_Data *msg,
                   int fwd);
 
+
 /**
  * Handler for cadet network traffic end-to-end ACKs.
  *
@@ -255,6 +257,7 @@ GCCH_handle_data_ack (struct CadetChannel *ch,
                       const struct GNUNET_CADET_DataACK *msg,
                       int fwd);
 
+
 /**
  * Handler for channel create messages.
  *
@@ -267,6 +270,7 @@ struct CadetChannel *
 GCCH_handle_create (struct CadetTunnel *t,
                     const struct GNUNET_CADET_ChannelCreate *msg);
 
+
 /**
  * Handler for channel NACK messages.
  *
@@ -277,6 +281,7 @@ GCCH_handle_create (struct CadetTunnel *t,
 void
 GCCH_handle_nack (struct CadetChannel *ch);
 
+
 /**
  * Handler for channel ack messages.
  *
@@ -292,6 +297,7 @@ GCCH_handle_ack (struct CadetChannel *ch,
                  const struct GNUNET_CADET_ChannelManage *msg,
                  int fwd);
 
+
 /**
  * Handler for channel destroy messages.
  *
@@ -307,6 +313,7 @@ GCCH_handle_destroy (struct CadetChannel *ch,
                      const struct GNUNET_CADET_ChannelManage *msg,
                      int fwd);
 
+
 /**
  * Sends an already built message on a channel.
  *
@@ -328,6 +335,7 @@ GCCH_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
                             struct CadetChannel *ch, int fwd,
                             void *existing_copy);
 
+
 /**
  * Get the static string for identification of the channel.
  *
index 261dd106708aa3d9b084e563c2d1b3e6afbedd15..e96e2f24cd1cc1305917e70e66788fd5d05d3697 100644 (file)
@@ -96,7 +96,7 @@ struct CadetConnectionQueue;
  * Check invariants for all connections using #check_neighbours().
  */
 void
-GCC_check_connections ();
+GCC_check_connections (void);
 
 
 /**
index 4213ad278c3a34e15952e23c910edb0c8c3a6cbd..303eaee867cfbc5f04c06420d9fb5a7bef5a7251 100644 (file)
  */
 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 @@ static struct GNUNET_SERVER_NotificationContext *nc;
  * @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 @@ client_release_ports (void *cls,
  * @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 @@ client_destroy (struct CadetClient *c)
   GNUNET_free (c);
 }
 
+
 /**
  * Create a client record, register data and initialize memory.
  *
index e836e4b24e9caa663f4f3cf67ad50862402b05dd..ca553a7d359b1908509081f8557cac426fa28a6a 100644 (file)
@@ -47,24 +47,24 @@ extern "C"
  */
 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,13 +142,18 @@ struct CadetTunnelQueue;
  * @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_conn_iter) (void *cls, struct CadetConnection *c);
-typedef void (*GCT_chan_iter) (void *cls, struct CadetChannel *ch);
+typedef void
+(*GCT_chan_iter) (void *cls, struct CadetChannel *ch);
 
 
 /******************************************************************************/
index 8da8fcd004578de264f3acfdb693cbe095e5f1db..dc5b5deed96463a9bc1a140f72b648dd5b75a5c7 100644 (file)
@@ -796,178 +796,6 @@ extern "C"
 #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,37 +1789,6 @@ extern "C"
 #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.
@@ -2477,72 +2274,6 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_SECRET_READY 783
 
 
-/*******************************************************************************
- * 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,9 +2582,184 @@ extern "C"
 
 /*******************************************************************************/
 
+
+/*******************************************************************************
+ * CADET message types
+ ******************************************************************************/
+
+/**
+ * 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
+
 /**
- * Next available: 970
+ * 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.