From b8038c99a15dd3f33cd8e3ee4d10110439f1dbea Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Thu, 12 Aug 2010 16:21:51 +0000 Subject: [PATCH] --- src/include/gnunet_dht_service.h | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index 5398b0ba1..16dea8d1f 100644 --- a/src/include/gnunet_dht_service.h +++ b/src/include/gnunet_dht_service.h @@ -304,6 +304,43 @@ GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle, GNUNET_SCHEDULER_Task cont, void *cont_cls); +/** + * Send a message to the DHT telling it to start issuing random GET + * requests every 'frequency' milliseconds. + * + * @param handle handle to the DHT service + * @param frequency delay (in milliseconds) between sending malicious messages + * @param cont continuation to call once the message is sent + * @param cont_cls closure for continuation + * + * @return GNUNET_YES if the control message was sent, GNUNET_NO if not + */ +int GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle, int frequency, GNUNET_SCHEDULER_Task cont, void *cont_cls); + +/** + * Send a message to the DHT telling it to start dropping + * all requests received. + * + * @param handle handle to the DHT service + * @param cont continuation to call once the message is sent + * @param cont_cls closure for continuation + * + * @return GNUNET_YES if the control message was sent, GNUNET_NO if not + */ +int GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle, GNUNET_SCHEDULER_Task cont, void *cont_cls); + +/** + * Send a message to the DHT telling it to start issuing random PUT + * requests every 'frequency' milliseconds. + * + * @param handle handle to the DHT service + * @param frequency delay (in milliseconds) between sending malicious messages + * @param cont continuation to call once the message is sent + * @param cont_cls closure for continuation + * + * @return GNUNET_YES if the control message was sent, GNUNET_NO if not + */ +int GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle, int frequency, GNUNET_SCHEDULER_Task cont, void *cont_cls); #if 0 /* keep Emacsens' auto-indent happy */ { -- 2.25.1