aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-13 12:22:24 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-13 12:22:24 +0000
commit0533836d3bc6d2e6404bf8397b6de71c0d156bbf (patch)
treef70db34a1e761c673a3a5b5735dbe4366e34e6ac /src/dht/gnunet-service-dht.c
parentf1ea48fe60c83c43fcaae99b50aa9f6b651f9897 (diff)
downloadgnunet-0533836d3bc6d2e6404bf8397b6de71c0d156bbf.tar.gz
gnunet-0533836d3bc6d2e6404bf8397b6de71c0d156bbf.zip
dce
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r--src/dht/gnunet-service-dht.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index 117ea860e..53f22cf3f 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -86,7 +86,8 @@
86#define DHT_MAX_RECENT (1024 * 16) 86#define DHT_MAX_RECENT (1024 * 16)
87 87
88/** 88/**
89 * Default time to wait to send messages on behalf of other peers. 89 * How long do we wait at most when queueing messages with core
90 * that we are sending on behalf of other peers.
90 */ 91 */
91#define DHT_DEFAULT_P2P_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 92#define DHT_DEFAULT_P2P_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
92 93
@@ -98,7 +99,7 @@
98/** 99/**
99 * How long to keep recent requests around by default. 100 * How long to keep recent requests around by default.
100 */ 101 */
101#define DEFAULT_RECENT_REMOVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) 102#define DEFAULT_RECENT_REMOVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
102 103
103/** 104/**
104 * Default time to wait to send find peer messages sent by the dht service. 105 * Default time to wait to send find peer messages sent by the dht service.
@@ -116,12 +117,6 @@
116#define DHT_DEFAULT_FIND_PEER_REPLICATION 4 117#define DHT_DEFAULT_FIND_PEER_REPLICATION 4
117 118
118/** 119/**
119 * Default options for find peer requests sent by the dht service.
120 */
121#define DHT_DEFAULT_FIND_PEER_OPTIONS GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE
122/*#define DHT_DEFAULT_FIND_PEER_OPTIONS GNUNET_DHT_RO_NONE*/
123
124/**
125 * How long at least to wait before sending another find peer request. 120 * How long at least to wait before sending another find peer request.
126 */ 121 */
127#define DHT_MINIMUM_FIND_PEER_INTERVAL GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 2) 122#define DHT_MINIMUM_FIND_PEER_INTERVAL GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 2)
@@ -157,9 +152,6 @@
157 */ 152 */
158#define DEFAULT_MALICIOUS_PUT_FREQUENCY GNUNET_TIME_UNIT_SECONDS 153#define DEFAULT_MALICIOUS_PUT_FREQUENCY GNUNET_TIME_UNIT_SECONDS
159 154
160
161#define DHT_DEFAULT_PING_DELAY GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 1)
162
163/** 155/**
164 * How many time differences between requesting a core send and 156 * How many time differences between requesting a core send and
165 * the actual callback to remember. 157 * the actual callback to remember.
@@ -204,6 +196,7 @@ struct P2PPendingMessage
204 196
205}; 197};
206 198
199
207/** 200/**
208 * Per-peer information. 201 * Per-peer information.
209 */ 202 */
@@ -3313,7 +3306,8 @@ route_message (const struct GNUNET_MessageHeader *msg,
3313 recent_req = GNUNET_CONTAINER_heap_peek (recent.minHeap); 3306 recent_req = GNUNET_CONTAINER_heap_peek (recent.minHeap);
3314 GNUNET_assert (recent_req != NULL); 3307 GNUNET_assert (recent_req != NULL);
3315 GNUNET_SCHEDULER_cancel (recent_req->remove_task); 3308 GNUNET_SCHEDULER_cancel (recent_req->remove_task);
3316 GNUNET_SCHEDULER_add_now (&remove_recent, recent_req); 3309 recent_req->remove_task =
3310 GNUNET_SCHEDULER_add_now (&remove_recent, recent_req);
3317 } 3311 }
3318 3312
3319 forward_count = 0; 3313 forward_count = 0;
@@ -3762,7 +3756,7 @@ send_find_peer_message (void *cls,
3762 GNUNET_ntohll (GNUNET_CRYPTO_random_u64 3756 GNUNET_ntohll (GNUNET_CRYPTO_random_u64
3763 (GNUNET_CRYPTO_QUALITY_STRONG, UINT64_MAX)); 3757 (GNUNET_CRYPTO_QUALITY_STRONG, UINT64_MAX));
3764 msg_ctx.replication = DHT_DEFAULT_FIND_PEER_REPLICATION; 3758 msg_ctx.replication = DHT_DEFAULT_FIND_PEER_REPLICATION;
3765 msg_ctx.msg_options = DHT_DEFAULT_FIND_PEER_OPTIONS; 3759 msg_ctx.msg_options = GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE;
3766 msg_ctx.network_size = log_of_network_size_estimate; 3760 msg_ctx.network_size = log_of_network_size_estimate;
3767 msg_ctx.peer = &my_identity; 3761 msg_ctx.peer = &my_identity;
3768 msg_ctx.importance = DHT_DEFAULT_FIND_PEER_IMPORTANCE; 3762 msg_ctx.importance = DHT_DEFAULT_FIND_PEER_IMPORTANCE;