client_manager: add API for async operations
[oweals/gnunet.git] / src / include / gnunet_protocols.h
index 35c16d883cceb30288c33992a47e98162ad76f62..cdbc46f7f02c3f6ba92a1e925ea96425ad38f0cb 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001-2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2001--2015 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -333,16 +333,15 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_CORE_SEND 76
 
-
 /**
- * Request for peer iteration from CORE service.
+ * Request for connection monitoring from CORE service.
  */
-#define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS 78
+#define GNUNET_MESSAGE_TYPE_CORE_MONITOR_PEERS 78
 
 /**
- * Last reply from core to request for peer iteration from CORE service.
+ * Reply for monitor by CORE service.
  */
-#define GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS_END 79
+#define GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY 79
 
 /**
  * Encapsulation for an encrypted message between peers.
@@ -379,6 +378,11 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY 88
 
+/**
+ * Other peer confirms having received the type map
+ */
+#define GNUNET_MESSAGE_TYPE_CORE_CONFIRM_TYPE_MAP 89
+
 
 /*******************************************************************************
  * DATASTORE message types
@@ -454,6 +458,16 @@ extern "C"
  * FS message types
  ******************************************************************************/
 
+/**
+ * Message sent by fs client to request LOC signature.
+ */
+#define GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGN 126
+
+/**
+ * Reply sent by fs service with LOC signature.
+ */
+#define GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGNATURE 127
+
 /**
  * Message sent by fs client to start indexing.
  */
@@ -507,7 +521,8 @@ extern "C"
 
 /**
  * P2P response with content or active migration of content.  Also
- * used between the service and clients (in response to START_SEARCH).
+ * used between the service and clients (in response to
+ * #GNUNET_MESSAGE_TYPE_FS_START_SEARCH).
  */
 #define GNUNET_MESSAGE_TYPE_FS_PUT 138
 
@@ -517,20 +532,19 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP 139
 
 /**
- * P2P request for content (one FS to another via a mesh).
+ * P2P request for content (one FS to another via a cadet).
  */
-#define GNUNET_MESSAGE_TYPE_FS_MESH_QUERY 140
+#define GNUNET_MESSAGE_TYPE_FS_CADET_QUERY 140
 
 /**
- * P2P answer for content (one FS to another via a mesh).
+ * P2P answer for content (one FS to another via a cadet).
  */
-#define GNUNET_MESSAGE_TYPE_FS_MESH_REPLY 141
+#define GNUNET_MESSAGE_TYPE_FS_CADET_REPLY 141
 
 
 /*******************************************************************************
  * DHT message types
  ******************************************************************************/
-
 /**
  * Client wants to store item in DHT.
  */
@@ -606,6 +620,9 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_RESULTS_KNOWN             156
 
+/**
+ * Further X-VINE DHT messages continued from 880
+ */
 
 /*******************************************************************************
  * HOSTLIST message types
@@ -769,198 +786,184 @@ extern "C"
 
 
 /*******************************************************************************
- * MESH message types
+ * CADET message types
  ******************************************************************************/
 
 /**
- * Type of message used to transport messages throug a MESH-tunnel (LEGACY)
+ * Type of message used to transport messages throug a CADET-tunnel (LEGACY)
  */
-#define GNUNET_MESSAGE_TYPE_MESH 215
+#define GNUNET_MESSAGE_TYPE_CADET 215
 
 /**
  * Type of message used to send another peer which messages we want to receive
- * through a mesh-tunnel (LEGACY)
+ * through a cadet-tunnel (LEGACY)
  */
-#define GNUNET_MESSAGE_TYPE_MESH_HELLO 216
+#define GNUNET_MESSAGE_TYPE_CADET_HELLO 216
 
 /**
- * Request the creation of a connection DEPRECATED
+ * Request the creation of a connection
  */
-#define GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE            256
-#define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_CREATE      256
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE      256
 
 /**
- * Send origin an ACK that the connection is complete DEPRECATED
+ * Send origin an ACK that the connection is complete
  */
-#define GNUNET_MESSAGE_TYPE_MESH_PATH_ACK               257
-#define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_ACK         257
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK         257
 
 /**
- * Notify that a connection is no longer valid DEPRECATED
+ * Notify that a connection is no longer valid
  */
-#define GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN            258
-#define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN      258
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN      258
 
 /**
  * At some point, the route will spontaneously change TODO
  */
-#define GNUNET_MESSAGE_TYPE_MESH_PATH_CHANGED           259
+#define GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED           259
 
 /**
  * Payload data (usually inside a encrypted tunnel).
  */
-#define GNUNET_MESSAGE_TYPE_MESH_DATA                   260
+#define GNUNET_MESSAGE_TYPE_CADET_DATA                   260
 
 /**
  * Confirm payload data end-to-end.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_DATA_ACK               261
+#define GNUNET_MESSAGE_TYPE_CADET_DATA_ACK               261
 
 /**
  * Key exchange encapsulation.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_KX                     262
+#define GNUNET_MESSAGE_TYPE_CADET_KX                     262
 
 /**
  * New ephemeral key.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_KX_EPHEMERAL           263
-
-/**
- * Challenge to test peer's session key.
- */
-#define GNUNET_MESSAGE_TYPE_MESH_KX_PING                264
+#define GNUNET_MESSAGE_TYPE_CADET_KX_EPHEMERAL           263
 
 /**
  * Answer to session key challenge.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_KX_PONG                265
+#define GNUNET_MESSAGE_TYPE_CADET_KX_PONG                265
 
 /**
- * Payload data origin->end DEPRECATED.
+ * Request the destuction of a connection
  */
-#define GNUNET_MESSAGE_TYPE_MESH_UNICAST                260
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY     266
 
 /**
- * Payload data end->origin DEPRECATED.
+ * Hop-by-hop, connection dependent ACK.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN              262
+#define GNUNET_MESSAGE_TYPE_CADET_ACK                    268
 
 /**
- * Confirm owner->dest data end-to-end (ack goes dest->owner). DEPRECATED
+ * Poll for a hop-by-hop ACK.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_UNICAST_ACK            263
+#define GNUNET_MESSAGE_TYPE_CADET_POLL                   269
 
 /**
- * Confirm dest->owner data end-to-end (ack goes owner->dest). DEPRECATED
+ * Announce connection is still alive (direction sensitive).
  */
-#define GNUNET_MESSAGE_TYPE_MESH_TO_ORIG_ACK            264
+#define GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE              270
 
 /**
- * Request the destuction of a path (PATH DEPRECATED)
+ * Connect to the cadet service, specifying subscriptions
  */
-#define GNUNET_MESSAGE_TYPE_MESH_PATH_DESTROY           266
-#define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY     266
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_CONNECT          272
 
 /**
- * Request the destruction of a whole tunnel
+ * Ask the cadet service to create a new channel.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY         267
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE         273
 
 /**
- * Hop-by-hop, connection dependent ACK.
+ * Ask the cadet service to destroy a channel.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_ACK                    268
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY        274
 
 /**
- * Poll for a hop-by-hop ACK.
+ * Confirm the creation of a channel
  */
-#define GNUNET_MESSAGE_TYPE_MESH_POLL                   269
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK            275
 
 /**
- * Announce origin is still alive.
+ * Reject the creation of a channel
  */
-#define GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE          270
-#define GNUNET_MESSAGE_TYPE_MESH_KEEPALIVE          270
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK           276
 
 /**
- * Announce destination is still alive. DEPRECATED
+ * Encrypted data. (Payload, channel management, keepalive)
  */
-#define GNUNET_MESSAGE_TYPE_MESH_BCK_KEEPALIVE          271
+#define GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED              280
 
 /**
- * Connect to the mesh service, specifying subscriptions
+ * Axolotl key exchange.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT          272
+#define GNUNET_MESSAGE_TYPE_CADET_AX_KX                  281
 
 /**
- * Ask the mesh service to create a new tunnel DEPRECATED
+ * Axolotl encrypted data.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE         273
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE    273
+#define GNUNET_MESSAGE_TYPE_CADET_AX                     282
 
 /**
- * Ask the mesh service to destroy a tunnel DEPRECATED
+ * Payload client <-> service
  */
-#define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY        274
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY   274
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA             285
 
 /**
- * Confirm the creation of a channel
+ * Local ACK for data.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK            275
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK              286
 
 /**
- * Reject the creation of a channel
+ * Local information about all channels of service.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_NACK           276
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS    290
 
 /**
- * Encrypted data going forward. DEPRECATED
+ * Local information of service about a specific channel.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_FWD                    280
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL     291
 
 /**
- * Encrypted data. (Payload, channel management, keepalive)
+ * Local information about all tunnels of service.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED              280
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS     292
 
 /**
- * Encrypted data going backwards.
+ * Local information of service about a specific tunnel.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_BCK                    281
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL      293
 
 /**
- * Payload client <-> service
+ * Local information about all connections of service.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA             285
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 294
 
 /**
- * Local ACK for data.
+ * Local information of service about a specific connection.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK              286
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION  295
 
 /**
- * Local NACK for rejected channels.
+ * Local information about all peers known to the service.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_NACK             287
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS       296
 
 /**
- * Local information about all tunnels of service. DEPRECATED
+ * Local information of service about a specific peer.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_TUNNELS     287
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_CHANNELS    287
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER        297
 
 /**
- * Local information of service about a specific tunnel. DEPRECATED
+ * Traffic (net-cat style) used by the Command Line Interface.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_TUNNEL      288
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_CHANNEL     288
+#define GNUNET_MESSAGE_TYPE_CADET_CLI                    298
 
 /**
- * 640kb should be enough for everybody
+ * Debug request.
  */
-#define GNUNET_MESSAGE_TYPE_MESH_RESERVE_END            299
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP        299
 
 
 
@@ -1154,18 +1157,6 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE 350
 
-/**
- * Type of the 'struct AddressUseMessage' sent by ATS to client
- * to confirm that an address is used or not used anymore
- */
-#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_IN_USE 351
-
-/**
- * Type of the 'struct AddressUseMessage' sent by ATS to client
- * to confirm that an address is used or not used anymore
- */
-#define GNUNET_MESSAGE_TYPE_ATS_RESET_BACKOFF 352
-
 /**
  * Type of the 'struct AddressUpdateMessage' sent by client to ATS
  * to add a new address
@@ -1281,20 +1272,20 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_CONNECT 374
 
 /**
- * Transport CONNECT message exchanged between transport services to
+ * Transport SYN message exchanged between transport services to
  * indicate that a session should be marked as 'connected'.
  */
-#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT 375
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_SYN 375
 
 /**
- * Transport CONNECT_ACK message exchanged between transport services to
- * indicate that a CONNECT message was accepted
+ * Transport SYN_ACK message exchanged between transport services to
+ * indicate that a SYN message was accepted
  */
-#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT_ACK 376
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_SYN_ACK 376
 
 /**
- * Transport CONNECT_ACK message exchanged between transport services to
- * indicate that a CONNECT message was accepted
+ * Transport ACK message exchanged between transport services to
+ * indicate that a SYN_ACK message was accepted
  */
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_ACK 377
 
@@ -1304,10 +1295,17 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT 378
 
+/**
+ * Message exchanged between transport services to
+ * indicate that the sender should limit its transmission
+ * rate to the indicated quota.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA 379
+
 /**
  * Request to monitor addresses used by a peer or all peers.
  */
-#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE 380
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST 380
 
 /**
  * Message send by a peer to notify the other to keep the session alive
@@ -1316,16 +1314,16 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 381
 
 /**
- * Response to a GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE message to
+ * Response to a #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE message to
  * measure latency in a regular interval
  */
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE 382
 
-
 /**
- * Request to iterate over all known addresses.
+ * Response to #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST
+ * request to iterate over all known addresses.
  */
-#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE 383
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE 383
 
 /**
  * Message send by a peer to notify the other to keep the session alive.
@@ -1337,6 +1335,40 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC 385
 
+/**
+ * Request to monitor address validations by a peer or all peers.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_REQUEST 386
+
+/**
+ * Response to #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_REQUEST
+ * request to iterate over all known addresses.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_RESPONSE 387
+
+/**
+ * Request to start monitoring the connection state of plugins.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_START 388
+
+/**
+ * Monitoring event about the connection state of plugins,
+ * generated in response to a subscription initiated via
+ * #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_START
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_EVENT 389
+
+/**
+ * Monitoring event notifying client that the initial iteration
+ * is now completed and we are in sync with the state of the subsystem.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC 390
+
+/**
+ * Message for transport service from a client asking that a
+ * connection with another peer be torn down.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_DISCONNECT 391
 
 
 /*******************************************************************************
@@ -1852,9 +1884,9 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENT_REQUESTS 585
 
 /**
- * Operation is done.
+ * Union operation is done.
  */
-#define GNUNET_MESSAGE_TYPE_SET_P2P_DONE 586
+#define GNUNET_MESSAGE_TYPE_SET_UNION_P2P_DONE 586
 
 /**
  * Start iteration over set elements.
@@ -1871,10 +1903,21 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_SET_ITER_DONE 589
 
+/**
+ * Information about the element count for intersection
+ */
+#define GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_ELEMENT_INFO 591
+
 /**
  * Bloom filter message for intersection exchange started by Bob.
  */
-#define GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_BF 591
+#define GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_BF 592
+
+/**
+ * Intersection operation is done.
+ */
+#define GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_DONE 593
+
 
 /*******************************************************************************
  * TESTBED LOGGER message types
@@ -2014,39 +2057,51 @@ extern "C"
  ******************************************************************************/
 
 /**
- * Client -> Vector-Product Service request message
+ * Client -> Alice
  */
 #define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_TO_ALICE 640
 
 /**
- * Client -> Vector-Product Service request message
+ * Client -> Bob
  */
 #define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_TO_BOB 641
 
 /**
- * Vector-Product Service request -> remote VP Service
+ * Client -> Alice multipart
  */
-#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_TO_BOB 642
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART_ALICE 642
 
 /**
- * Vector-Product Service request -> remote VP Service Multipart
+ * Client -> Bob multipart
  */
-#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_TO_BOB_MULTIPART 643
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART_BOB 643
 
 /**
- * remote Vector-Product Service response -> requesting VP Service
+ * Alice -> Bob session initialization
  */
-#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_TO_ALICE 644
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SESSION_INITIALIZATION 644
 
 /**
- * remote Vector-Product Service response -> requesting VP Service Multipart
+ * Alice -> Bob SP crypto-data (after intersection)
  */
-#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_TO_ALICE_MULTIPART 645
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA 645
 
 /**
- * Vector-Product Service response -> Client
+ * Bob -> Alice SP crypto-data
  */
-#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SERVICE_TO_CLIENT 646
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA 647
+
+/**
+ * Bob -> Alice SP crypto-data multipart
+ */
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_CRYPTODATA_MULTIPART 648
+
+/**
+ * Alice/Bob -> Client Result
+ */
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT 649
+
+
 
 
 /*******************************************************************************
@@ -2103,58 +2158,85 @@ extern "C"
  * PSYC message types
  ******************************************************************************/
 
-#define GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE 680
+/**
+ * C: client
+ * S: service
+ * M: multicast
+ */
 
+/** S->C: result of an operation */
+#define GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE 680
 
+/** C->S: request to start a channel as a master */
 #define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START 681
 
+/** S->C: master start acknowledgement */
 #define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK 682
 
-#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_STOP 683
+/** C->S: request to join a channel as a slave */
+#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN 683
 
+/** S->C: slave join acknowledgement */
+#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 684
 
-#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN 684
+/* 685-686 */
 
-#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 685
+/** M->S->C: incoming join request from multicast */
+#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687
 
-#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_PART 686
+/** C->S->M: decision about a join request */
+#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION 688
 
 
-#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687
+/** C->S: request to add/remove channel slave in the membership database. */
+#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_MEMBERSHIP_STORE 689
 
-#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION 688
+/* 690 */
 
+/** S<--C: PSYC message which contains one or more message parts. */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE 691
 
-#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_ADD 689
+/** M<->S<->C: PSYC message which contains a header and one or more message parts. */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_HEADER 692 // FIXME: start using this where appropriate
 
-#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_RM 690
+/** Message part: method */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD 693
 
+/** Message part: modifier */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER 694
 
-#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD 691
+/** Message part: modifier continuation */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT 695
 
-#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER 692
+/** Message part: data */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_DATA 696
 
-#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT 693
+/** Message part: end of message */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END 697
 
-#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_DATA 694
+/** Message part: message cancelled */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_CANCEL 698
 
-#define GNUNET_MESSAGE_TYPE_PSYC_TRANSMIT_ACK 695
+/** S->C: message acknowledgement */
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK 699
 
+/* 700 */
 
-#define GNUNET_MESSAGE_TYPE_PSYC_STORY_REQUEST 701
+/** C->S: client requests channel history from PSYCstore. */
+#define GNUNET_MESSAGE_TYPE_PSYC_HISTORY_REPLAY 701
 
-#define GNUNET_MESSAGE_TYPE_PSYC_STORY_RESPONSE 702
+/** S->C: result for a channel history request */
+#define GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT 702
 
 
+/** C->S: request best matching state variable from PSYCstore. */
 #define GNUNET_MESSAGE_TYPE_PSYC_STATE_GET 703
 
+/** C->S: request state variables with a given prefix from PSYCstore. */
 #define GNUNET_MESSAGE_TYPE_PSYC_STATE_GET_PREFIX 704
 
-#define GNUNET_MESSAGE_TYPE_PSYC_STATE_RESPONSE 705
-
-#define GNUNET_MESSAGE_TYPE_PSYC_STATE_MODIFIER 706
-
-#define GNUNET_MESSAGE_TYPE_PSYC_STATE_MOD_CONT 707
+/** S->C: result for a state request. */
+#define GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT 705
 
 
 /*******************************************************************************
@@ -2167,147 +2249,507 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO 730
 
 /**
- * Client -> Server message register a phone.
+ * Client -> Server message to register a phone.
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER 730
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER 731
 
 /**
- * Client -> Server meessage to reject/hangup a call
+ * Client -> Server message to reject/hangup a call
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP 731
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP 732
 
 /**
- * Client -> Server meessage to reject/hangup a call
+ * Client -> Server message to reject/hangup a call
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP 732
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP 733
 
 /**
  * Client <- Server message to indicate a ringing phone
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL 733
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL 734
 
 /**
  * Client <- Server message to indicate a ringing phone
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING 734
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING 735
 
 /**
- * Client <-> Server message to send audio data.
+ * Client <-> Server message to suspend connection.
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_BUSY 735
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND 736
+
+/**
+ * Client <-> Server message to resume connection.
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME 737
 
 /**
  * Client <-> Server message to send audio data.
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP 736
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP 738
 
 /**
  * Client <-> Server message to send audio data.
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO 737
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO 739
 
 /**
- * Mesh: call initiation
+ * Cadet: call initiation
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_RING 738
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING 740
 
 /**
- * Mesh: hang up / refuse call
+ * Cadet: hang up / refuse call
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_HANG_UP 739
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP 741
 
 /**
- * Mesh: pick up phone (establish audio channel)
+ * Cadet: pick up phone (establish audio channel)
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_PICK_UP 740
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP 742
 
 /**
- * Mesh: phone is busy (refuse nicely)
+ * Cadet: phone suspended.
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_BUSY 741
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND 743
 
 /**
- * Mesh: audio data
+ * Cadet: phone resumed.
  */
-#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_AUDIO 742
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME 744
+
+/**
+ * Cadet: audio data
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO 745
 
 
 /*******************************************************************************
  * MULTICAST message types
  ******************************************************************************/
 
-
-/* WIP: no numbers assigned yet */
+/**
+ * C: client
+ * S: service
+ * T: cadet
+ */
 
 /**
- * Multicast message from the origin to all members.
+ * C->S: Start the origin.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE 750
+#define GNUNET_MESSAGE_TYPE_MULTICAST_ORIGIN_START 750
 
 /**
- * A unicast message from a group member to the origin.
+ * C->S: Join group as a member.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_REQUEST
+#define GNUNET_MESSAGE_TYPE_MULTICAST_MEMBER_JOIN 751
 
 /**
- * A peer wants to join the group.
+ * C<--S<->T: A peer wants to join the group.
  *
  * Unicast message to the origin or another group member.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST
+#define GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST 752
 
 /**
- * Response to a join request.
+ * C<->S<->T: Response to a join request.
  *
  * Unicast message from a group member to the peer wanting to join.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION
+#define GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION 753
 
 /**
  * A peer wants to part the group.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_PART_REQUEST
+#define GNUNET_MESSAGE_TYPE_MULTICAST_PART_REQUEST 754
 
 /**
  * Acknowledgement sent in response to a part request.
  *
  * Unicast message from a group member to the peer wanting to part.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK
+#define GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK 755
 
 /**
  * Group terminated.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_GROUP_END
+#define GNUNET_MESSAGE_TYPE_MULTICAST_GROUP_END 756
 
 /**
- *
+ * C<->S<->T: Multicast message from the origin to all members.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST
+#define GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE 757
 
 /**
- *
+ * C<->S<->T: Unicast request from a group member to the origin.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL
+#define GNUNET_MESSAGE_TYPE_MULTICAST_REQUEST 758
 
+/**
+ * C<->S<->T: Replay request from a group member to another member.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST 759
+
+/**
+ * C<->S<->T: Cancellation of a replay request.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL 760
 
 /**
- * Next available: 780
+ * S->C: Membership test request.
  */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_MEMBERSHIP_TEST 761
+
+/**
+ * C->S: Membership test result.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_MEMBERSHIP_TEST_RESULT 762
+
 
 
 /*******************************************************************************
- * PSYC message types
+ * SECRETSHARING message types
  ******************************************************************************/
 
+
+/**
+ * Establish a new session.
+ */
+#define GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_GENERATE 780
+
+/**
+ * Request the decryption of a ciphertext.
+ */
+#define GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_DECRYPT 781
+
+/**
+ * The service succeeded in decrypting a ciphertext.
+ */
+#define GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_DECRYPT_DONE 782
+
+/**
+ * The cryptosystem has been established.
+ * Contains the peer's share.
+ */
+#define GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_SECRET_READY 783
+
+
 /*******************************************************************************
- * PSYCSTORE message types
+ * 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
+ ******************************************************************************/
+
+/**
+ * Store request message
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_STORE 820
+
+/**
+ * Iteration request
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE 821
+
+/**
+ * Iteration record message
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_RECORD 822
+
+/**
+ * Iteration end message
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END 823
+
+/**
+ * Watch request
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH 824
+
+/**
+ * Watch response
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_RECORD 825
+
+/**
+ * Watch cancel request
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_CANCEL 826
+
 /*******************************************************************************
  * SOCIAL message types
  ******************************************************************************/
 
+/**
+ * C: client
+ * S: service
+ * P: PSYC
+ */
+
+/** S->C: result of an operation */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_RESULT_CODE 840
+
+/** C->S: request to enter a place as the host */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER 841
+
+/** S->C: host enter acknowledgement */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK 842
+
+/** C->S: request to enter a place as a guest */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER 843
+
+/** S->C: guest enter acknowledgement */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK 844
+
+/** P->S->C: incoming entry request from PSYC */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_ENTRY_REQUEST 845
+
+/** C->S->P: decision about an entry request */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_ENTRY_DECISION 846
+
+/*******************************************************************************
+ * X-VINE DHT messages
+ ******************************************************************************/
+
+/**
+ * Trail setup request is received by a peer.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP 880
+
+/**
+ * Trail to a particular peer is returned to this peer.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_RESULT 881
+
+/**
+ * Verify if your immediate successor is still your immediate successor.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR 882
+
+/**
+ * Notify your new immediate successor that you are its new predecessor.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_NEW_SUCCESSOR 883
+
+/**
+ * Message which contains the immediate predecessor of requested successor
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR_RESULT 884
+
+/**
+ * Message which contains the get result.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_GET_RESULT 885
+
+/**
+ * Trail Rejection Message.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_REJECTION 886
+
+/**
+ * Trail Tear down Message.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_TEARDOWN 887
+
+/**
+ * Routing table add message.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_ADD_TRAIL 888
+
+/**
+ * Peer is storing the data in DHT.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_PUT 890
+
+/**
+ * Peer tries to find data in DHT.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_GET 891
+
+/**
+ * Send back peer that considers you are its successor, a confirmation
+ * that you got the notify successor message.
+ */
+#define GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_SUCCESSOR_CONFIRMATION 892
+
+#if ENABLE_MALICIOUS
+/**
+ * Turn X-VINE DHT service malicious
+ */
+#define GNUNET_MESSAGE_TYPE_DHT_ACT_MALICIOUS 893
+
+/**
+ * Acknowledge receiving ACT MALICIOUS request
+ */
+#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_ACT_MALICIOUS_OK  894
+
+#endif
+
+
+/*******************************************************************************
+ * Whanau DHT messages
+ ******************************************************************************/
+
+
+/**
+ * This message contains the query for performing a random walk
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK 910
+
+/**
+ * This message contains the result of a random walk
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK_RESPONSE 911
+
+/**
+ * This message contains a notification for the death of a trail
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_TRAIL_DESTROY 912
+
+/**
+ * This message are used to route a query to a peer
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_TRAIL_ROUTE 913
+
+/**
+ * This message contains the query to transfer successor values.
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_SUCCESSOR_FIND 914
+
+/**
+ * Message which contains the get query
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_GET 915
+
+/**
+ * Message which contains the "put", a response to
+ * #GNUNET_MESSAGE_TYPE_WDHT_SUCCESSOR_FIND.
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_PUT 916
+
+/**
+ * Message which contains the get result, a response
+ * to #GNUNET_MESSAGE_TYPE_WDHT_GET.
+ */
+#define GNUNET_MESSAGE_TYPE_WDHT_GET_RESULT 917
+
+
+/*******************************************************************************
+ * RPS messages
+ ******************************************************************************/
+
+/* P2P Messages */
+
+/**
+ * RPS PUSH message to push own ID to another peer
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_PP_PUSH         950
+
+/**
+ * RPS PULL REQUEST message to request the local view of another peer
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST 951
+
+/**
+ * RPS PULL REPLY message which contains the view of the other peer
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY   952
+
+
+
+/* Client-Service Messages */
+
+/**
+ * RPS CS REQUEST Message for the Client to request (a) random peer(s)
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_REQUEST      953
+
+/**
+ * RPS CS REPLY Message for the Server to send (a) random peer(s)
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_REPLY        954
+
+/**
+ * RPS CS SEED Message for the Client to seed peers into rps
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_SEED         955
+
+#ifdef ENABLE_MALICIOUS
+/**
+ * Turn RPS service malicious
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_ACT_MALICIOUS   956
+
+#endif /* ENABLE_MALICIOUS */
+
+/*******************************************************************************/
+
+/**
+ * Next available: 960
+ */
 
 /**
  * Type used to match 'all' message types.