diff options
-rw-r--r-- | src/include/gnunet_dht_service.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index 5398b0ba14..16dea8d1fd 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 */ { |