Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix kademlia example which was broken on 32bits archs.
[simgrid.git] / examples / msg / kademlia / common.h
1 /* Copyright (c) 2012. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6 #ifndef _KADEMLIA_EXAMPLES_COMMON
7 #define _KADEMLIA_EXAMPLES_COMMON
8 #define max_join_trials 4
9
10 #define RECEIVE_TIMEOUT 1
11
12 #define ping_timeout 55
13 #define find_node_timeout 10
14 #define find_node_global_timeout 50
15
16 #define kademlia_alpha 3
17 #define bucket_size 20
18
19 #define identifier_size 32
20 #define max_answers_to_ask 20
21
22 #define random_lookup_interval 100
23
24 #define MAILBOX_NAME_SIZE (identifier_size / 4) /* hex encoded */
25
26 #define COMM_SIZE 1
27 #define COMP_SIZE 0
28
29 #define MAX_STEPS 10
30
31 #define JOIN_BUCKETS_QUERIES 5
32
33 #define RANDOM_LOOKUP_NODE 0
34
35
36 #endif                          /* _KADEMLIA_EXAMPLES_COMMON */