-remove GNUNET_MQ_impl_send_commit, make it part of send_continue, to ensure calling...
[oweals/gnunet.git] / src / include / gnunet_protocols.h
index 07d8e95ff5af5e0fce759453e4a369f61d234c5b..3169e2318d91b06185c847027c5172de7a930205 100644 (file)
  * @brief constants for network protocols
  * @author Christian Grothoff
  * @defgroup protocols Types of messages used in GNUnet
- * @{ 
+ * @{
  */
 
 /*******************************************************************************
  * TODO: we need a way to register message types centrally (via some webpage).
  * For now: unofficial extensions should start at 48k, internal extensions
- * define here should leave some room (4-10 additional messages to the previous
+ * defined here should leave some room (4-10 additional messages to the previous
  * extension).
  ******************************************************************************/
 
@@ -149,7 +149,7 @@ extern "C"
  ******************************************************************************/
 
 /**
- * Type of data messages from the plugin to the gnunet-wlan-helper 
+ * Type of data messages from the plugin to the gnunet-wlan-helper
  */
 #define GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER 39
 
@@ -807,7 +807,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CHANGED           259
 
 /**
- * Payload data.
+ * Payload data (usually inside a encrypted tunnel).
  */
 #define GNUNET_MESSAGE_TYPE_MESH_DATA                   260
 
@@ -816,6 +816,26 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_MESH_DATA_ACK               261
 
+/**
+ * Key exchange encapsulation.
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_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
+
+/**
+ * Answer to session key challenge.
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_KX_PONG                265
+
 /**
  * Payload data origin->end DEPRECATED.
  */
@@ -843,7 +863,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY     266
 
 /**
- * Request the destruction of a whole tunnel 
+ * Request the destruction of a whole tunnel
  */
 #define GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY         267
 
@@ -861,9 +881,10 @@ extern "C"
  * Announce origin is still alive.
  */
 #define GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE          270
+#define GNUNET_MESSAGE_TYPE_MESH_KEEPALIVE          270
 
 /**
- * Announce destination is still alive.
+ * Announce destination is still alive. DEPRECATED
  */
 #define GNUNET_MESSAGE_TYPE_MESH_BCK_KEEPALIVE          271
 
@@ -890,10 +911,20 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK            275
 
 /**
- * Encrypted data going forward.
+ * Reject the creation of a channel
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_NACK           276
+
+/**
+ * Encrypted data going forward. DEPRECATED
  */
 #define GNUNET_MESSAGE_TYPE_MESH_FWD                    280
 
+/**
+ * Encrypted data. (Payload, channel management, keepalive)
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED              280
+
 /**
  * Encrypted data going backwards.
  */
@@ -909,6 +940,11 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK              286
 
+/**
+ * Local NACK for rejected channels.
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_NACK             287
+
 /**
  * Local information about all tunnels of service. DEPRECATED
  */
@@ -1344,38 +1380,52 @@ extern "C"
 
 
 /*******************************************************************************
- * NAMESTORE message types
+ * NAMECACHE message types
  ******************************************************************************/
 
 /**
  * Client to service: lookup block
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_BLOCK 431
+#define GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK 431
 
 /**
  * Service to client: result of block lookup
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_BLOCK_RESPONSE 432
+#define GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK_RESPONSE 432
+
+/**
+ * Client to service: cache a block
+ */
+#define GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE 433
+
+/**
+ * Service to client: result of block cache request
+ */
+#define GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE_RESPONSE 434
+
+/*******************************************************************************
+ * NAMESTORE message types
+ ******************************************************************************/
 
 /**
  * Client to service: store records (as authority)
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE 433
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE 435
 
 /**
  * Service to client: result of store operation.
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE 434
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE 436
 
 /**
- * Client to service: cache a block
+ * Client to service: lookup label
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_BLOCK_CACHE 435
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP 437
 
 /**
- * Service to client: result of block cache request
+ * Service to client: lookup label
  */
-#define GNUNET_MESSAGE_TYPE_NAMESTORE_BLOCK_CACHE_RESPONSE 436
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE 438
 
 /**
  * Client to service: "reverse" lookup for zone name based on zone key
@@ -1419,7 +1469,6 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP 448
 
-
 /*******************************************************************************
  * LOCKMANAGER message types
  ******************************************************************************/
@@ -1605,21 +1654,19 @@ extern "C"
 
 
 /******************************************************************************
- * GNS. FIXME: document!
+ * GNS.
  *****************************************************************************/
 
+/**
+ * Client would like to resolve a name.
+ */
 #define GNUNET_MESSAGE_TYPE_GNS_LOOKUP 500
 
+/**
+ * Service response to name resolution request from client.
+ */
 #define GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT 501
 
-#define GNUNET_MESSAGE_TYPE_GNS_SHORTEN 502
-
-#define GNUNET_MESSAGE_TYPE_GNS_SHORTEN_RESULT 503
-
-#define GNUNET_MESSAGE_TYPE_GNS_GET_AUTH 504
-
-#define GNUNET_MESSAGE_TYPE_GNS_GET_AUTH_RESULT 505
-
 
 /*******************************************************************************
  * CONSENSUS message types
@@ -1787,12 +1834,12 @@ extern "C"
 /**
  * Strata estimator.
  */
-#define GNUNET_MESSAGE_TYPE_SET_P2P_SE 582
+#define GNUNET_MESSAGE_TYPE_SET_UNION_P2P_SE 582
 
 /**
  * Invertible bloom filter.
  */
-#define GNUNET_MESSAGE_TYPE_SET_P2P_IBF 583
+#define GNUNET_MESSAGE_TYPE_SET_UNION_P2P_IBF 583
 
 /**
  * Actual set elements.
@@ -1824,6 +1871,15 @@ 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 592
 
 /*******************************************************************************
  * TESTBED LOGGER message types
@@ -1884,7 +1940,7 @@ extern "C"
 
 /**
  * Result in response to regex search.
- */ 
+ */
 #define GNUNET_MESSAGE_TYPE_REGEX_RESULT 622
 
 /*******************************************************************************
@@ -1933,6 +1989,31 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_IDENTITY_DELETE 631
 
 
+/*******************************************************************************
+ * REVOCATION message types
+ ******************************************************************************/
+
+/**
+ * Client to service: was this key revoked?
+ */
+#define GNUNET_MESSAGE_TYPE_REVOCATION_QUERY 636
+
+/**
+ * Service to client: answer if key was revoked!
+ */
+#define GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE 637
+
+/**
+ * Client to service OR peer-to-peer: revoke this key!
+ */
+#define GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE 638
+
+/**
+ * Service to client: revocation confirmed
+ */
+#define GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE 639
+
+
 /*******************************************************************************
  * SCALARPRODUCT message types
  ******************************************************************************/
@@ -1952,15 +2033,25 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_TO_BOB 642
 
+/**
+ * Vector-Product Service request -> remote VP Service Multipart
+ */
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_TO_BOB_MULTIPART 643
+
 /**
  * remote Vector-Product Service response -> requesting VP Service
  */
-#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_TO_ALICE 643
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_TO_ALICE 644
+
+/**
+ * remote Vector-Product Service response -> requesting VP Service Multipart
+ */
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_BOB_TO_ALICE_MULTIPART 645
 
 /**
  * Vector-Product Service response -> Client
  */
-#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SERVICE_TO_CLIENT 644
+#define GNUNET_MESSAGE_TYPE_SCALARPRODUCT_SERVICE_TO_CLIENT 646
 
 
 /*******************************************************************************
@@ -1985,9 +2076,9 @@ extern "C"
 
 #define GNUNET_MESSAGE_TYPE_PSYCSTORE_MESSAGE_GET_FRAGMENT 655
 
-#define GNUNET_MESSAGE_TYPE_PSYCSTORE_COUNTERS_GET_MASTER 656
+#define GNUNET_MESSAGE_TYPE_PSYCSTORE_COUNTERS_GET 656
 
-#define GNUNET_MESSAGE_TYPE_PSYCSTORE_COUNTERS_GET_SLAVE 657
+/* 657 */
 
 #define GNUNET_MESSAGE_TYPE_PSYCSTORE_STATE_MODIFY 658
 
@@ -2008,28 +2099,165 @@ extern "C"
 
 #define GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_FRAGMENT 665
 
-#define GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS_MASTER 666
+#define GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS 666
+
+#define GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_STATE 667
+
+
+/*******************************************************************************
+ * PSYC message types
+ ******************************************************************************/
+
+#define GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE 680
+
 
-#define GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS_SLAVE 667
+#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START 681
 
-#define GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_STATE 668
+#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK 682
+
+#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_STOP 683
+
+
+#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN 684
+
+#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 685
+
+#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_PART 686
+
+
+#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687
+
+#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION 688
+
+
+#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_ADD 689
+
+#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_RM 690
+
+
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD 691
+
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER 692
+
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT 693
+
+#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_DATA 694
+
+#define GNUNET_MESSAGE_TYPE_PSYC_TRANSMIT_ACK 695
+
+
+#define GNUNET_MESSAGE_TYPE_PSYC_STORY_REQUEST 701
+
+#define GNUNET_MESSAGE_TYPE_PSYC_STORY_RESPONSE 702
+
+
+#define GNUNET_MESSAGE_TYPE_PSYC_STATE_GET 703
+
+#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
+
+
+/*******************************************************************************
+ * CONVERSATION message types
+ ******************************************************************************/
+
+/**
+ * Message to transmit the audio between helper and speaker/microphone library.
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO 730
 
 /**
- * Next available: 680
+ * Client -> Server message register a phone.
  */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER 731
 
+/**
+ * Client -> Server message to reject/hangup a call
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP 732
 
+/**
+ * Client -> Server message to reject/hangup a call
+ */
+#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 734
+
+/**
+ * Client <- Server message to indicate a ringing phone
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING 735
+
+/**
+ * Client <-> Server message to suspend connection.
+ */
+#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 738
+
+/**
+ * Client <-> Server message to send audio data.
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO 739
+
+/**
+ * Mesh: call initiation
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_RING 740
+
+/**
+ * Mesh: hang up / refuse call
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_HANG_UP 741
+
+/**
+ * Mesh: pick up phone (establish audio channel)
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_PICK_UP 742
+
+/**
+ * Mesh: phone suspended.
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_SUSPEND 743
+
+/**
+ * Mesh: phone resumed.
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_RESUME 744
+
+/**
+ * Mesh: audio data
+ */
+#define GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_AUDIO 745
 
-/* WIP: no numbers assigned yet */
 
 /*******************************************************************************
  * MULTICAST message types
  ******************************************************************************/
 
+
+/* WIP: no numbers assigned yet */
+
 /**
  * Multicast message from the origin to all members.
  */
-#define GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE 700
+#define GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE 750
 
 /**
  * A unicast message from a group member to the origin.
@@ -2078,6 +2306,11 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL
 
 
+/**
+ * Next available: 780
+ */
+
+
 /*******************************************************************************
  * PSYC message types
  ******************************************************************************/