check
[oweals/gnunet.git] / src / include / gnunet_dht_service.h
index 18eab8a9f28ff90c815ada48a516cbfa3ad364d5..e57dd718c607bcb769ac8d7ecf3fb14d787c1928 100644 (file)
@@ -106,7 +106,12 @@ enum GNUNET_DHT_RouteOption
      * We should keep track of the route that the message
      * took in the P2P network.
      */
-    GNUNET_DHT_RO_RECORD_ROUTE = 2
+    GNUNET_DHT_RO_RECORD_ROUTE = 2,
+
+    /**
+     * Possible message option for query key randomization.
+     */
+    GNUNET_DHT_RO_BART = 4
   };
 
 
@@ -290,16 +295,15 @@ GNUNET_DHT_find_peer_stop (struct GNUNET_DHT_FindPeerHandle *find_peer_handle);
  *
  * @param cls closure
  * @param key key that was used
- * @param get_path NULL-terminated array of pointers
- *                 to the peers on reverse GET path (or NULL if not recorded)
- * @param put_path NULL-terminated array of pointers
+ * @param outgoing_path NULL-terminated array of pointers
+ *                      to the peers on reverse outgoing
+ *                      path (or NULL if not recorded)
  *                 to the peers on the PUT path (or NULL if not recorded)
  * @param reply response
  */
 typedef void (*GNUNET_DHT_ReplyProcessor)(void *cls,
                                          const GNUNET_HashCode *key,
-                                         const struct GNUNET_PeerIdentity * const *get_path,
-                                         const struct GNUNET_PeerIdentity * const *put_path,
+                                         const struct GNUNET_PeerIdentity * const *outgoing_path,
                                           const struct GNUNET_MessageHeader *reply);
 
 
@@ -380,9 +384,13 @@ GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
  * all requests received.
  *
  * @param handle handle to the DHT service
+ * @param cont continuation to call when done (transmitting request to service)
+ * @param cont_cls closure for cont
+ *
  */
 void 
-GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle);
+GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle, GNUNET_SCHEDULER_Task cont,
+    void *cont_cls);
 
 
 /**
@@ -390,11 +398,14 @@ GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle);
  * requests every 'frequency' milliseconds.
  *
  * @param handle handle to the DHT service
- * @param frequency delay (in milliseconds) between sending malicious messages
+ * @param frequency delay between sending malicious messages
+ * @param cont continuation to call when done (transmitting request to service)
+ * @param cont_cls closure for cont
  */
 void 
 GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
-                                struct GNUNET_TIME_Relative frequency);
+         struct GNUNET_TIME_Relative frequency, GNUNET_SCHEDULER_Task cont,
+          void *cont_cls);
 
 
 /**
@@ -403,10 +414,13 @@ GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
  *
  * @param handle handle to the DHT service
  * @param frequency delay between sending malicious messages
+ * @param cont continuation to call when done (transmitting request to service)
+ * @param cont_cls closure for cont
  */
-void 
-GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle, 
-                                struct GNUNET_TIME_Relative frequency);
+void
+GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle,
+         struct GNUNET_TIME_Relative frequency, GNUNET_SCHEDULER_Task cont,
+          void *cont_cls);
 
 
 #endif