1 /* Copyright (c) 2012, 2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef _KADEMLIA_EXAMPLES_COMMON
8 #define _KADEMLIA_EXAMPLES_COMMON
9 #define max_join_trials 4
11 #define RECEIVE_TIMEOUT 1
13 #define ping_timeout 55
14 #define find_node_timeout 10
15 #define find_node_global_timeout 50
17 #define kademlia_alpha 3
18 #define bucket_size 20
20 #define identifier_size 32
21 #define max_answers_to_ask 20
23 #define random_lookup_interval 100
25 #define MAILBOX_NAME_SIZE (identifier_size / 4) /* hex encoded */
32 #define JOIN_BUCKETS_QUERIES 5
34 #define RANDOM_LOOKUP_NODE 0
37 #endif /* _KADEMLIA_EXAMPLES_COMMON */