Merge branch 'master' of git+ssh://gnunet.org/gnunet
[oweals/gnunet.git] / src / include / gnunet_protocols.h
index 1d2a87691e3ae55d2599cd813fcc05c3919b6438..436adc5a4497cc5fd18e0b01c70b0066bf10f8cd 100644 (file)
@@ -56,6 +56,8 @@ extern "C"
 
 /**
  * Test if service is online.
+ *
+ * @deprecated!
  */
 #define GNUNET_MESSAGE_TYPE_TEST 1
 
@@ -117,6 +119,11 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_ARM_MONITOR 14
 
+/**
+ * Test if ARM service is online.
+ */
+#define GNUNET_MESSAGE_TYPE_ARM_TEST 15
+
 /*******************************************************************************
  * HELLO message types
  ******************************************************************************/
@@ -416,11 +423,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.
  */
@@ -1522,6 +1524,16 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT 501
 
+/**
+ * Reverse lookup
+ */
+#define GNUNET_MESSAGE_TYPE_GNS_REVERSE_LOOKUP 503
+
+/**
+ * Response to reverse lookup
+ */
+#define GNUNET_MESSAGE_TYPE_GNS_REVERSE_LOOKUP_RESULT 504
+
 
 /*******************************************************************************
  * CONSENSUS message types
@@ -1624,6 +1636,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.
@@ -1783,6 +1801,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
@@ -2029,7 +2067,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
@@ -2220,6 +2262,7 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_MULTICAST_PART_ACK 755
 
+// FIXME: this is never used!
 /**
  * Group terminated.
  */
@@ -2360,35 +2403,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
@@ -2575,99 +2621,151 @@ extern "C"
 
 #endif /* ENABLE_MALICIOUS */
 
-/*******************************************************************************/
+/******************************************************************************/
 
 
 /**************************************************
  *
  * IDENTITY PROVIDER MESSAGE TYPES
  */
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE     961
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE 961
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE  962
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_STORE_RESPONSE 962
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT     963
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_START 963
 
-#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT  964
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_STOP 964
 
-/*******************************************************************************/
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_ITERATION_NEXT 965
 
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ATTRIBUTE_RESULT 966
 
-/*******************************************************************************
- * CADET message types
- ******************************************************************************/
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_TICKET 967
 
-/**
- * Type of message used to transport messages throug a CADET-tunnel (LEGACY)
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_RESULT 968
+
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET 969
+
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_REVOKE_TICKET_RESULT 970
+
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET 971
+
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_CONSUME_TICKET_RESULT 972
+
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_START 973
+
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_STOP 974
+
+#define GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_TICKET_ITERATION_NEXT 975
+
+/**************************************************
+ *
+ * CREDENTIAL MESSAGE TYPES
  */
-#define GNUNET_MESSAGE_TYPE_CADET 1000
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY     981
 
-/**
- * Type of message used to send another peer which messages we want to receive
- * through a cadet-tunnel (LEGACY)
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT 982
+
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_COLLECT 983
+
+#define GNUNET_MESSAGE_TYPE_CREDENTIAL_COLLECT_RESULT 984
+
+/******************************************************************************/
+
+
+/******************************************************************************/
+/***********************************  CADET  **********************************/
+/******************************************************************************/
+/* CADET: message types 1000-1059
+ * 1000-1009 Connection-level Messages
+ * 1010-1019 Channel-level Messages
+ * 1020-1029 Local Client-Service
+ * 1030-1039 Local Service Monitoring
+ * 1040-1049 Application Data
+ * 1050-1059 Reserved
  */
-#define GNUNET_MESSAGE_TYPE_CADET_HELLO 1001
+
+/********************************  Connection  ********************************/
 
 /**
  * Request the creation of a connection
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE 1002
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE 1000
 
 /**
  * Send origin an ACK that the connection is complete
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK 1003
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK 1001
 
 /**
  * Notify that a connection is no longer valid
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN 1004
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN 1002
+
+/**
+ * Request the destuction of a connection
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY 1003
 
 /**
  * At some point, the route will spontaneously change TODO
  */
-#define GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED 1005
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_PATH_CHANGED_UNIMPLEMENTED 1004
 
 /**
- * Payload data (usually inside a encrypted tunnel).
+ * Hop-by-hop, connection dependent ACK.
+ *
+ * @deprecated
  */
-#define GNUNET_MESSAGE_TYPE_CADET_DATA 1006
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK 1005
 
 /**
- * Confirm payload data end-to-end.
+ * 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_DATA_ACK 1007
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL 1006
 
 /**
- * Key exchange encapsulation.
+ * Axolotl key exchange.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_KX 1008
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX 1007
 
 /**
- * Request the destuction of a connection
+ * Axolotl encrypted data.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY 1009
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED 1008
 
 /**
- * Hop-by-hop, connection dependent ACK.
+ * 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_ACK 1010
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA 1010
 
 /**
- * Poll for a hop-by-hop ACK.
+ * Confirm payload data end-to-end.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_POLL 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.
@@ -2677,98 +2775,178 @@ 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  **********************************/
 
 /**
- * Axolotl key exchange.
+ * Payload client <-> service
  */
-#define GNUNET_MESSAGE_TYPE_CADET_AX_KX 1017
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA 1020
 
 /**
- * Axolotl encrypted data.
+ * Local ACK for data.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_AX 1018
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK 1021
 
 /**
- * Payload client <-> service
+ * Start listening on a port.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA 1019
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN 1022
 
 /**
- * Local ACK for data.
+ * Stop listening on a port.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK 1020
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE 1023
 
 /**
- * Start listening on a port.
+ * Ask the cadet service to create a new channel.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN 1021
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE 1024
 
 /**
- * Stop listening on a port.
+ * Tell client that a channel was destroyed.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE 1022
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_DESTROY 1025
+
+/**********************************  Monitor  *********************************/
+
 
 /**
  * Local information about all channels of service.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS 1023
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS 1030
 
 /**
  * Local information of service about a specific channel.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL 1024
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL 1031
 
 /**
  * Local information about all tunnels of service.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS 1025
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS 1032
 
 /**
  * Local information of service about a specific tunnel.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL 1026
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL 1033
 
 /**
  * Local information about all connections of service.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 1027
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 1034
 
 /**
  * Local information of service about a specific connection.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION 1028
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION 1035
 
 /**
  * Local information about all peers known to the service.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS 1029
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS 1036
 
 /**
  * Local information of service about a specific peer.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER 1030
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER 1037
+
+/**
+ * Debug request.
+ */
+#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  *******************************/
 
 /**
  * Traffic (net-cat style) used by the Command Line Interface.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_CLI 1031
+#define GNUNET_MESSAGE_TYPE_CADET_CLI 1040
+
+/******************************************************************************/
+
+
+/******************************************************************************/
+/*************************************  NAT  **********************************/
+/******************************************************************************/
 
 /**
- * Debug request.
+ * Message to ask NAT service to register a client.
+ */
+#define GNUNET_MESSAGE_TYPE_NAT_REGISTER 1060
+
+/**
+ * Message to ask NAT service to handle a STUN packet.
+ */
+#define GNUNET_MESSAGE_TYPE_NAT_HANDLE_STUN 1061
+
+/**
+ * Message to ask NAT service to request connection reversal.
+ */
+#define GNUNET_MESSAGE_TYPE_NAT_REQUEST_CONNECTION_REVERSAL 1062
+
+/**
+ * Message to from NAT service notifying us that connection reversal
+ * was requested by another peer.
+ */
+#define GNUNET_MESSAGE_TYPE_NAT_CONNECTION_REVERSAL_REQUESTED 1063
+
+/**
+ * Message to from NAT service notifying us that one of our
+ * addresses changed.
  */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP 1032
+#define GNUNET_MESSAGE_TYPE_NAT_ADDRESS_CHANGE 1064
 
+/**
+ * Message to ask NAT service to request autoconfiguration.
+ */
+#define GNUNET_MESSAGE_TYPE_NAT_AUTO_REQUEST_CFG 1067
 
 /**
- * Next available: 1060
+ * Message from NAT service with the autoconfiguration result.
  */
+#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
+
+
+/**
+ * Next available: 1130
+ */
 
 
 /**