diff options
author | Supriti Singh <supritisingh08@gmail.com> | 2014-09-22 15:12:15 +0000 |
---|---|---|
committer | Supriti Singh <supritisingh08@gmail.com> | 2014-09-22 15:12:15 +0000 |
commit | 3a85995c4a7a48f7afae1c554e9df3547ca7db3f (patch) | |
tree | bf4d46b158a973e4900e4792e80e860b324c2a0a /src/include/gnunet_dht_service.h | |
parent | b97fc3b79ac05184f0928af8071e76dcbd8f99ea (diff) | |
download | gnunet-3a85995c4a7a48f7afae1c554e9df3547ca7db3f.tar.gz gnunet-3a85995c4a7a48f7afae1c554e9df3547ca7db3f.zip |
- Act malicious API complete
- Using multiple trails in PUT/GET
Diffstat (limited to 'src/include/gnunet_dht_service.h')
-rw-r--r-- | src/include/gnunet_dht_service.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index 31d66ccf0..7a147b437 100644 --- a/src/include/gnunet_dht_service.h +++ b/src/include/gnunet_dht_service.h | |||
@@ -393,14 +393,31 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle); | |||
393 | 393 | ||
394 | #if ENABLE_MALICIOUS | 394 | #if ENABLE_MALICIOUS |
395 | /** | 395 | /** |
396 | * Turn the DHT service to act malicious depending on @a flag | 396 | * Type of a Malicious continuation. You must not call |
397 | * #GNUNET_DHT_disconnect in this continuation. | ||
398 | * | ||
399 | * @param cls closure | ||
400 | * @param success #GNUNET_OK if the set malicious request was transmitted, | ||
401 | * #GNUNET_NO on timeout, | ||
402 | * #GNUNET_SYSERR on disconnect from service | ||
403 | * after the PUT message was transmitted | ||
404 | * (so we don't know if it was received or not) | ||
405 | */ | ||
406 | typedef void (*GNUNET_DHT_ActMaliciousContinuation)(void *cls, | ||
407 | int success); | ||
408 | |||
409 | /** | ||
410 | * Turn the DHT service to act malicious | ||
397 | * | 411 | * |
398 | * @param handle the DHT handle | 412 | * @param handle the DHT handle |
399 | * @param action 1 to make the service malicious; 0 to make it benign | 413 | * @param action 1 to make the service malicious; 0 to make it benign |
400 | FIXME: perhaps make this an enum of known malicious behaviors? | 414 | FIXME: perhaps make this an enum of known malicious behaviors? |
401 | */ | 415 | */ |
402 | void | 416 | struct GNUNET_DHT_ActMaliciousHandle * |
403 | GNUNET_DHT_malicious (struct GNUNET_DHT_Handle *handle, unsigned int action); | 417 | GNUNET_DHT_act_malicious (struct GNUNET_DHT_Handle *handle, |
418 | unsigned int action, | ||
419 | GNUNET_DHT_PutContinuation cont, | ||
420 | void *cont_cls); | ||
404 | #endif | 421 | #endif |
405 | 422 | ||
406 | 423 | ||