curl: reschedule uses GNUNET_CURL_perform2.
[oweals/gnunet.git] / src / include / gnunet_protocols.h
index 596196311034b5cefea9a67e101bbc655533d1db..03b13fd48f29155a9c311c03905ff77cce96fd04 100644 (file)
@@ -1,21 +1,19 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2001--2015 GNUnet e.V.
+     Copyright (C) 2001--2018 GNUnet e.V.
 
-     GNUnet is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
+     GNUnet is free software: you can redistribute it and/or modify it
+     under the terms of the GNU Affero General Public License as published
+     by the Free Software Foundation, either version 3 of the License,
+     or (at your option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
-
-     You should have received a copy of the GNU General Public License
-     along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-     Boston, MA 02110-1301, USA.
+     Affero General Public License for more details.
+    
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /**
@@ -66,6 +64,11 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_DUMMY 2
 
+/**
+ * Another dummy messages for testing / benchmarking.
+ */
+#define GNUNET_MESSAGE_TYPE_DUMMY2 3
+
 /*******************************************************************************
  * RESOLVER message types
  ******************************************************************************/
@@ -80,6 +83,21 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 5
 
+/*******************************************************************************
+ * AGPL source code download
+ * *****************************************************************************/
+
+/**
+ * Message to request source code link.
+ */
+#define GNUNET_MESSAGE_TYPE_REQUEST_AGPL 6
+
+/**
+ * Source code link.
+ */
+#define GNUNET_MESSAGE_TYPE_RESPONSE_AGPL 7
+
+
 /*******************************************************************************
  * ARM message types
  ******************************************************************************/
@@ -247,6 +265,12 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_DV_BOX 53
 
 
+/**
+ * Experimental message type.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_XU_MESSAGE 55
+
+
 /*******************************************************************************
  * Transport-UDP message types
  ******************************************************************************/
@@ -423,11 +447,6 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 95
 
-/**
- * Message sent by datastore client to update data.
- */
-#define GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE 96
-
 /**
  * Message sent by datastore client to get data.
  */
@@ -628,11 +647,6 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_DHT_MONITOR_STOP             154
 
-/**
- * Acknowledge receiving PUT request
- */
-#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK             155
-
 /**
  * Certain results are already known to the client, filter those.
  */
@@ -1315,6 +1329,13 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT 443
 
+/**
+ * Client to service: I am now ready for the next (set of) monitor
+ * events. Monitoring equivlaent of
+ * #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT.
+ */
+#define GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT 444
+
 /**
  * Client to service: please start iteration; receives
  * "GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_NAME_RESPONSE" messages in return.
@@ -1322,7 +1343,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START 445
 
 /**
- * Client to service: next record in iteration please.
+ * Client to service: next record(s) in iteration please.
  */
 #define GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT 447
 
@@ -1641,6 +1662,12 @@ extern "C"
  * SET message types
  ******************************************************************************/
 
+/**
+ * Demand the whole element from the other
+ * peer, given only the hash code.
+ */
+#define GNUNET_MESSAGE_TYPE_SET_UNION_P2P_REQUEST_FULL 565
+
 /**
  * Demand the whole element from the other
  * peer, given only the hash code.
@@ -1800,6 +1827,26 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_CONNECT 596
 
+/**
+ * Request all missing elements from the other peer,
+ * based on their sets and the elements we previously sent
+ * with #GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENTS.
+ */
+#define GNUNET_MESSAGE_TYPE_SET_UNION_P2P_FULL_DONE 597
+
+/**
+ * Send a set element, not as response to a demand but because
+ * we're sending the full set.
+ */
+#define GNUNET_MESSAGE_TYPE_SET_UNION_P2P_FULL_ELEMENT 598
+
+/**
+ * Request all missing elements from the other peer,
+ * based on their sets and the elements we previously sent
+ * with #GNUNET_MESSAGE_TYPE_SET_P2P_ELEMENTS.
+ */
+#define GNUNET_MESSAGE_TYPE_SET_UNION_P2P_OVER 599
+
 
 /*******************************************************************************
  * TESTBED LOGGER message types
@@ -2046,7 +2093,11 @@ extern "C"
 /** S->C: slave join acknowledgement */
 #define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 684
 
-/* 685-686 */
+/** C->S: request to part from a channel */
+#define GNUNET_MESSAGE_TYPE_PSYC_PART_REQUEST 685
+
+/** S->C: acknowledgement that a slave of master parted from a channel */
+#define GNUNET_MESSAGE_TYPE_PSYC_PART_ACK 686
 
 /** M->S->C: incoming join request from multicast */
 #define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687
@@ -2237,6 +2288,7 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK 755
 
+// FIXME: this is never used!
 /**
  * Group terminated.
  */
@@ -2377,35 +2429,38 @@ extern "C"
 /** C->S: request to leave a place */
 #define GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE 848
 
+/** S->C: place leave acknowledgement */
+#define GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK 849
+
 /** C->S: add place to GNS zone */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_PLACE 849
+#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_PLACE 850
 
 /** C->S: add nym to GNS zone */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_NYM 850
+#define GNUNET_MESSAGE_TYPE_SOCIAL_ZONE_ADD_NYM 851
 
 /** C->S: connect application */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT 851
+#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_CONNECT 852
 
 /** C->S: detach a place from application */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_DETACH 852
+#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_DETACH 853
 
 /** S->C: notify about an existing ego */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO 853
+#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO 854
 
 /** S->C: end of ego list */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END 854
+#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END 855
 
 /** S->C: notify about an existing place */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE 855
+#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE 856
 
 /** S->C: end of place list */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END 856
+#define GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END 857
 
 /** C->S: set message processing flags */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET 860
+#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_SET 858
 
 /** C->S: clear message processing flags */
-#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_CLEAR 861
+#define GNUNET_MESSAGE_TYPE_SOCIAL_MSG_PROC_CLEAR 859
 
 /*******************************************************************************
  * X-VINE DHT messages
@@ -2564,33 +2619,31 @@ extern "C"
 
 /* Client-Service Messages */
 
-/**
- * RPS CS REQUEST Message for the Client to request (a) random peer(s)
- */
-#define GNUNET_MESSAGE_TYPE_RPS_CS_REQUEST        954
 
 /**
- * RPS CS REPLY Message for the Server to send (a) random peer(s)
+ * RPS CS SEED Message for the Client to seed peers into rps
  */
-#define GNUNET_MESSAGE_TYPE_RPS_CS_REPLY          955
+#define GNUNET_MESSAGE_TYPE_RPS_CS_SEED           954
 
+#ifdef ENABLE_MALICIOUS
 /**
- * RPS CS REQUEST CANCEL Message for the Client to cancel a request
+ * Turn RPS service malicious
  */
-#define GNUNET_MESSAGE_TYPE_RPS_CS_REQUEST_CANCEL 956
+#define GNUNET_MESSAGE_TYPE_RPS_ACT_MALICIOUS     955
+
+#endif /* ENABLE_MALICIOUS */
 
 /**
- * RPS CS SEED Message for the Client to seed peers into rps
+ * RPS client-service message to start a sub sampler
  */
-#define GNUNET_MESSAGE_TYPE_RPS_CS_SEED           957
+#define GNUNET_MESSAGE_TYPE_RPS_CS_SUB_START           956
 
-#ifdef ENABLE_MALICIOUS
 /**
- * Turn RPS service malicious
+ * RPS client-service message to stop a sub sampler
  */
-#define GNUNET_MESSAGE_TYPE_RPS_ACT_MALICIOUS     958
+#define GNUNET_MESSAGE_TYPE_RPS_CS_SUB_STOP            957
 
-#endif /* ENABLE_MALICIOUS */
+/* Debugging API continues at 1130 */
 
 /******************************************************************************/
 
@@ -2599,22 +2652,47 @@ extern "C"
  *
  * IDENTITY PROVIDER MESSAGE TYPES
  */
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE     961
+#define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE 961
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_STORE_RESPONSE 962
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_START 963
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP 964
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_NEXT 965
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT 966
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET 967
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT 968
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET 969
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT 970
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE  962
+#define GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET 971
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT     963
+#define GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT 972
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT  964
+#define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_START 973
 
+#define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_STOP 974
+
+#define GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_ITERATION_NEXT 975
 
 /**************************************************
  *
  * CREDENTIAL MESSAGE TYPES
  */
-#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY     971
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY     981
+
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT 982
 
-#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT 972
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_COLLECT 983
+
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_COLLECT_RESULT 984
 
 /******************************************************************************/
 
@@ -2641,7 +2719,7 @@ extern "C"
 /**
  * Send origin an ACK that the connection is complete
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK 1001
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK 1001
 
 /**
  * Notify that a connection is no longer valid
@@ -2656,49 +2734,62 @@ extern "C"
 /**
  * At some point, the route will spontaneously change TODO
  */
-#define GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED 1004
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_PATH_CHANGED_UNIMPLEMENTED 1004
 
 /**
  * Hop-by-hop, connection dependent ACK.
+ *
+ * @deprecated
  */
-#define GNUNET_MESSAGE_TYPE_CADET_ACK 1005
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK 1005
 
 /**
- * Poll for a hop-by-hop ACK.
+ * We do not bother with ACKs for
+ * #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED messages, but we instead
+ * poll for one if we got nothing for a while and start to be worried.
+ *
+ * @deprecated
  */
-#define GNUNET_MESSAGE_TYPE_CADET_POLL 1006
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL 1006
 
 /**
- * Key exchange encapsulation.
+ * Axolotl key exchange.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_KX 1007
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX 1007
 
 /**
  * Axolotl encrypted data.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED 1008
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED 1008
+
+/**
+ * Axolotl key exchange response with authentication.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX_AUTH 1009
+
+
 
 /**********************************  Channel  *********************************/
 
 /**
  * Payload data (inside an encrypted tunnel).
  */
-#define GNUNET_MESSAGE_TYPE_CADET_DATA 1010
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA 1010
 
 /**
  * Confirm payload data end-to-end.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_DATA_ACK 1011
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK 1011
 
 /**
  * Announce connection is still alive (direction sensitive).
  */
-#define GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE 1012
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_KEEPALIVE 1012
 
 /**
  * Ask the cadet service to create a new channel.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE 1013
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN 1013
 
 /**
  * Ask the cadet service to destroy a channel.
@@ -2708,12 +2799,14 @@ extern "C"
 /**
  * Confirm the creation of a channel
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK 1015
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK 1015
 
 /**
  * Reject the creation of a channel
+ *
+ * @deprecated
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK 1016
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED 1016
 
 /***********************************  Local  **********************************/
 
@@ -2737,6 +2830,16 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE 1023
 
+/**
+ * Ask the cadet service to create a new channel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE 1024
+
+/**
+ * Tell client that a channel was destroyed.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_DESTROY 1025
+
 /**********************************  Monitor  *********************************/
 
 
@@ -2785,6 +2888,11 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP 1038
 
+/**
+ * End of local information about all peers known to the service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER_END 1039
+
 /********************************  Application  *******************************/
 
 /**
@@ -2829,7 +2937,7 @@ extern "C"
 /**
  * Message to ask NAT service to request autoconfiguration.
  */
-#define GNUNET_MESSAGE_TYPE_NAT_REQUEST_AUTO_CFG 1067
+#define GNUNET_MESSAGE_TYPE_NAT_AUTO_REQUEST_CFG 1067
 
 /**
  * Message from NAT service with the autoconfiguration result.
@@ -2837,8 +2945,69 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_NAT_AUTO_CFG_RESULT 1068
 
 
+/* 1080-1109 reserved for TMCG (Heiko Stamer, see gnunet-developers, January 2017) */
+
+
+/******************************************************************************/
+/***********************************  AUCTION  ********************************/
+/******************************************************************************/
+
+/**
+ * Client wants to create a new auction.
+ */
+#define GNUNET_MESSAGE_TYPE_AUCTION_CLIENT_CREATE 1110
+
+/**
+ * Client wants to join an existing auction.
+ */
+#define GNUNET_MESSAGE_TYPE_AUCTION_CLIENT_JOIN 1111
+
+/**
+ * Service reports the auction outcome to the client.
+ */
+#define GNUNET_MESSAGE_TYPE_AUCTION_CLIENT_OUTCOME 1112
+
+
+
+/******************************************************************************/
+/*********************************  RPS DEBUG  ********************************/
+/******************************************************************************/
+
+/**
+ * @brief Request updates of the view
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_REQUEST 1130
+
+/**
+ * @brief Send update of the view
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_REPLY   1131
+
+/**
+ * @brief Cancel getting updates of the view
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_CANCEL  1132
+
+
+/**
+ * @brief Request biased input stream
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_REQUEST 1133
+
+/**
+ * @brief Send peer of biased stream
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_REPLY   1134
+
+/**
+ * @brief Cancel getting biased strem
+ */
+#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_CANCEL  1135
+
+
+
 /**
- * Next available: 1080
+ * Next available: 1200
  */