aboutsummaryrefslogtreecommitdiff
path: root/src/rps/rps_api.c
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-02-22 18:47:59 +0000
committerJulius Bünger <buenger@mytum.de>2015-02-22 18:47:59 +0000
commitdb554c393137201c6a5c846eee77b0f11882b18c (patch)
treeb00b33d73202222b08062d60022f6738d01624ec /src/rps/rps_api.c
parenta76817c408f2d8cf3b0b8619ff38f163ee882be6 (diff)
downloadgnunet-db554c393137201c6a5c846eee77b0f11882b18c.tar.gz
gnunet-db554c393137201c6a5c846eee77b0f11882b18c.zip
baseline for test with malicious peers
Diffstat (limited to 'src/rps/rps_api.c')
-rw-r--r--src/rps/rps_api.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c
index 4879fd6e9..42102eef7 100644
--- a/src/rps/rps_api.c
+++ b/src/rps/rps_api.c
@@ -235,7 +235,8 @@ GNUNET_RPS_request_peers (struct GNUNET_RPS_Handle *h, uint32_t n,
235 * @param ids the ids of the peers seeded 235 * @param ids the ids of the peers seeded
236 */ 236 */
237 void 237 void
238GNUNET_RPS_seed_ids (struct GNUNET_RPS_Handle *h, uint32_t n, 238GNUNET_RPS_seed_ids (struct GNUNET_RPS_Handle *h,
239 uint32_t n,
239 const struct GNUNET_PeerIdentity *ids) 240 const struct GNUNET_PeerIdentity *ids)
240{ 241{
241 uint32_t size_needed; 242 uint32_t size_needed;
@@ -289,6 +290,31 @@ GNUNET_RPS_seed_ids (struct GNUNET_RPS_Handle *h, uint32_t n,
289} 290}
290 291
291 292
293#if ENABLE_MALICIOUS
294/**
295 * Turn RPS service to act malicious.
296 *
297 * @param h handle to the rps service
298 * @param type which type of malicious peer to turn to.
299 * 0 Don't act malicious at all
300 * 1 Try to maximise representation
301 * 2 Try to partition the network
302 * (isolate one peer from the rest)
303 * @param n number of @a ids
304 * @param ids the ids of the malicious peers
305 * if @type is 2 the last id is the id of the
306 * peer to be isolated from the rest
307 */
308 void
309GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
310 uint32_t type,
311 uint32_t num_peers,
312 const struct GNUNET_PeerIdentity *ids)
313{
314}
315#endif
316
317
292/** 318/**
293 * Cancle an issued request. 319 * Cancle an issued request.
294 * 320 *