dummy
[oweals/gnunet.git] / src / include / gnunet_protocols.h
index 59db0cd78af18cc28558c17f0ff0c4efb88bf77b..6d8693d5b10f6215fb8abdf8e754e66970ed86cd 100644 (file)
@@ -36,7 +36,7 @@ extern "C"
 #endif
 
 /*******************************************************************************
- * UTIL message types 
+ * UTIL message types
  ******************************************************************************/
 
 /**
@@ -44,8 +44,13 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_TEST 1
 
+/**
+ * Dummy messages for testing / benchmarking.
+ */
+#define GNUNET_MESSAGE_TYPE_DUMMY 2
+
 /*******************************************************************************
- * RESOLVER message types 
+ * RESOLVER message types
  ******************************************************************************/
 
 /**
@@ -59,7 +64,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 5
 
 /*******************************************************************************
- * ARM message types 
+ * ARM message types
  ******************************************************************************/
 
 /**
@@ -100,7 +105,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK 14
 
 /*******************************************************************************
- * HELLO message types 
+ * HELLO message types
  ******************************************************************************/
 
 /**
@@ -110,7 +115,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_HELLO 16
 
 /*******************************************************************************
- * FRAGMENTATION message types 
+ * FRAGMENTATION message types
  ******************************************************************************/
 
 /**
@@ -126,7 +131,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_FRAGMENT_ACK 19
 
 /*******************************************************************************
- * TRANSPORT message types 
+ * TRANSPORT message types
  ******************************************************************************/
 
 /**
@@ -242,7 +247,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 39
 
 /*******************************************************************************
- * Transport-WLAN message types 
+ * Transport-WLAN message types
  ******************************************************************************/
 
 /**
@@ -269,7 +274,7 @@ extern "C"
 
 
 /*******************************************************************************
- * Transport-DV message types 
+ * Transport-DV message types
  ******************************************************************************/
 
 /**
@@ -313,7 +318,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50
 
 /*******************************************************************************
- * Transport-UDP message types 
+ * Transport-UDP message types
  ******************************************************************************/
 
 /**
@@ -327,7 +332,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_ACK 57
 
 /*******************************************************************************
- * Transport-TCP message types 
+ * Transport-TCP message types
  ******************************************************************************/
 
 /**
@@ -347,7 +352,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ATS 62
 
 /*******************************************************************************
- * NAT message types 
+ * NAT message types
  ******************************************************************************/
 
 /**
@@ -356,7 +361,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_NAT_TEST 63
 
 /*******************************************************************************
- * CORE message types 
+ * CORE message types
  ******************************************************************************/
 
 /**
@@ -401,17 +406,6 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 71
 
-/**
- * Request from client to "configure" P2P connection.
- */
-#define GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO 72
-
-/**
- * Response from server about (possibly updated) P2P
- * connection configuration.
- */
-#define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 73
-
 /**
  * Request from client to transmit message.
  */
@@ -428,10 +422,6 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_CORE_SEND 76
 
-/**
- * Request from client asking to connect to a peer.
- */
-#define GNUNET_MESSAGE_TYPE_CORE_REQUEST_CONNECT 77
 
 /**
  * Request for peer iteration from CORE service.
@@ -484,7 +474,7 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP 87
 
 /*******************************************************************************
- * DATASTORE message types 
+ * DATASTORE message types
  ******************************************************************************/
 
 /**
@@ -554,7 +544,7 @@ extern "C"
 
 
 /*******************************************************************************
- * FS message types 
+ * FS message types
  ******************************************************************************/
 
 /**
@@ -621,89 +611,48 @@ extern "C"
 
 
 /*******************************************************************************
- * DHT message types 
+ * DHT message types
  ******************************************************************************/
 
 /**
- * Local DHT route request type
+ * Client wants to store item in DHT.
  */
-#define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142
+#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT 142
 
 /**
- * Local generic DHT route result type
+ * Client wants to lookup item in DHT.
  */
-#define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143
+#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET 143
 
 /**
- * P2P DHT route request type
+ * Client wants to stop search in DHT.
  */
-#define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE 144
+#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP 144
 
 /**
- * P2P DHT route result type
+ * Service returns result to client.
  */
-#define GNUNET_MESSAGE_TYPE_DHT_P2P_ROUTE_RESULT 145
+#define GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT 145
 
 /**
- * Local generic DHT message stop type
+ * Peer is storing data in DHT.
  */
-#define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_STOP 146
+#define GNUNET_MESSAGE_TYPE_DHT_P2P_PUT 146
 
 /**
- * Local and P2P DHT PUT message
- * (encapsulated in DHT_ROUTE message)
+ * Peer tries to find data in DHT.
  */
-#define GNUNET_MESSAGE_TYPE_DHT_PUT 147
+#define GNUNET_MESSAGE_TYPE_DHT_P2P_GET 147
 
 /**
- * Local and P2P DHT GET message
- * (encapsulated in DHT_ROUTE message)
+ * Data is returned to peer from DHT.
  */
-#define GNUNET_MESSAGE_TYPE_DHT_GET 148
+#define GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT 148
 
-/**
- * Local and P2P DHT Get result message
- */
-#define GNUNET_MESSAGE_TYPE_DHT_GET_RESULT 149
-
-/**
- * Local and P2P DHT find peer message
- */
-#define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER 150
 
-/**
- * Local and P2P DHT find peer result message
- */
-#define GNUNET_MESSAGE_TYPE_DHT_FIND_PEER_RESULT 151
-
-/**
- * P2P DHT PING request type
- */
-#define GNUNET_MESSAGE_TYPE_DHT_P2P_PING 152
-
-/**
- * DHT Control message type, for telling the
- * DHT to alter its current operation somehow.
- */
-#define GNUNET_MESSAGE_TYPE_DHT_CONTROL 153
-
-/**
- * Local control message type, tells peer to start
- * issuing malicious GET requests.
- */
-#define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_GET 154
-
-/**
- * Local control message type, tells peer to start
- * issuing malicious PUT requests.
- */
-#define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_PUT 155
-
-/**
- * Local control message type, tells peer to start
- * dropping all requests.
- */
-#define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_DROP  156
+/*******************************************************************************
+ * HOSTLIST message types
+ ******************************************************************************/
 
 /**
  * Hostlist advertisement message
@@ -712,7 +661,7 @@ extern "C"
 
 
 /*******************************************************************************
- * STATISTICS message types 
+ * STATISTICS message types
  ******************************************************************************/
 
 /**
@@ -748,7 +697,7 @@ extern "C"
 
 
 /*******************************************************************************
- * VPN message types 
+ * VPN message types
  ******************************************************************************/
 
 /**
@@ -759,56 +708,56 @@ extern "C"
 /**
  * Type of messages containing an UDP packet for a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_UDP 186
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP 186
 
 /**
  * Type of messages containing an UDP packet from a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK 187
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK 187
 
 /**
  * Type of messages containing an TCP packet for a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_TCP 188
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP 188
 
 /**
  * Type of messages containing an TCP packet from a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_TCP_BACK 189
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP_BACK 189
 
 /**
  * Type of messages containing an UDP packet for a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_UDP 190
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP 190
 
 /**
  * Type of messages containing an UDP packet from a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_UDP_BACK 191
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP_BACK 191
 
 /**
  * Type of messages containing an TCP packet for a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_TCP 192
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP 192
 
 /**
  * Type of messages containing an TCP packet from a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_TCP_BACK 193
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP_BACK 193
 
 
 /*******************************************************************************
- * VPN-DNS message types 
+ * VPN-DNS message types
  ******************************************************************************/
 
 /**
  * Type of messages to query the local service-dns
  */
-#define GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS 205
+#define GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_QUERY_DNS 205
 /**
  * Type of messages the local service-dns responds with
  */
-#define GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS 206
+#define GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_RESPONSE_DNS 206
 /**
  * Type of messages to instruct the local service-dns to rehijack the dns
  */
@@ -816,11 +765,11 @@ extern "C"
 /**
  * Type of messages to send a DNS-query to another peer
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS 208
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_QUERY_DNS 208
 /**
  * Type of messages to send a DNS-answer to another peer
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS 209
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_ANSWER_DNS 209
 
 
 
@@ -851,9 +800,9 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_MESH_PATH_CHANGE            257
 
 /**
- * Request the addition to a new branch to a path
+ * Notify that a connection of a path is no longer valid
  */
-#define GNUNET_MESSAGE_TYPE_MESH_PATH_ADD               258
+#define GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN            258
 
 /**
  * At some point, the route will spontaneously change
@@ -872,7 +821,6 @@ extern "C"
 
 /**
  * Transport data back in the mesh (end->origin)
- * (not sure if this is the right way, should be some other solution)
  */
 #define GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN              262
 
@@ -881,6 +829,21 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_MESH_PATH_ACK               263
 
+/**
+ * Avoid path timeouts
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE         264
+
+/**
+ * Request the destuction of a path
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_PATH_DESTROY           265
+
+/**
+ * Request the destruction of a whole tunnel
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY         266
+
 /**
  * We need flow control
  */
@@ -904,38 +867,22 @@ extern "C"
 /**
  * Ask the mesh service to add a peer to an existing tunnel
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_ADD 275
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD         275
 
 /**
  * Ask the mesh service to remove a peer from a tunnel
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_DEL 276
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DEL         276
 
 /**
  * Ask the mesh service to add a peer offering a service to an existing tunnel
  */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_BY_TYPE     277
-
-/**
- * Ask the mesh service to cancel a peer connection request
- */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT_PEER_CANCEL      278
-
-/**
- * Notify a mesh client that a peer has connected to a tunnel
- */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED           279
-
-/**
- * Notify a mesh client that a peer has disconnected from a tunnel
- */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DISCONNECTED        280
-
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD_BY_TYPE 277
 
 /**
  * 640kb should be enough for everybody
  */
-#define GNUNET_MESSAGE_TYPE_MESH_RESERVE_END   288
+#define GNUNET_MESSAGE_TYPE_MESH_RESERVE_END            288
 
 
 
@@ -1059,7 +1006,77 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 334
 
+/*******************************************************************************
+ * ATS message types
+ ******************************************************************************/
+
+/**
+ * Type of the 'struct ClientStartMessage' sent by clients to ATS to
+ * identify the type of the client.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_START 340
+
+/**
+ * Type of the 'struct RequestAddressMessage' sent by clients to ATS
+ * to request an address to help connect.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_REQUEST_ADDRESS 341
+
+/**
+ * Type of the 'struct AddressUpdateMessage' sent by clients to ATS
+ * to inform ATS about performance changes.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE 342
+
+/**
+ * Type of the 'struct AddressDestroyedMessage' sent by clients to ATS
+ * to inform ATS about an address being unavailable.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_DESTROYED 343
+
+/**
+ * Type of the 'struct AddressSuggestionMessage' sent by ATS to clients
+ * to suggest switching to a different address.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION 344
+
+/**
+ * Type of the 'struct PeerInformationMessage' sent by ATS to clients
+ * to inform about QoS for a particular connection.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION 345
+
+/**
+ * Type of the 'struct ReservationRequestMessage' sent by clients to ATS
+ * to ask for inbound bandwidth reservations.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST 346
+
+/**
+ * Type of the 'struct ReservationResultMessage' sent by ATS to clients
+ * in response to a reservation request.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT 347
+
+/**
+ * Type of the 'struct ChangePreferenceMessage' sent by clients to ATS
+ * to ask for allocation preference changes.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE 348
 
+/**
+ * Type of the 'struct SessionReleaseMessage' sent by ATS to client
+ * to confirm that a session ID was destroyed.
+ */
+#define GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE 349
+
+
+/*******************************************************************************
+ * 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
+ * extension).
+ ******************************************************************************/
 
 /**
  * Type used to match 'all' message types.