aboutsummaryrefslogtreecommitdiff
path: root/src/dht/dht.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-16 18:08:35 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-16 18:08:35 +0000
commit0144e13dfd781a9cfbe10860b6aa6e7659f7ff8f (patch)
tree4b8f271b434853ecb7cea43ad9f981a95fa6b354 /src/dht/dht.h
parenta39a2590b694e3801e3dc6737e2ed853ad9e599a (diff)
downloadgnunet-0144e13dfd781a9cfbe10860b6aa6e7659f7ff8f.tar.gz
gnunet-0144e13dfd781a9cfbe10860b6aa6e7659f7ff8f.zip
make 'obsolete' data structures conditionally compiled
Diffstat (limited to 'src/dht/dht.h')
-rw-r--r--src/dht/dht.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/dht/dht.h b/src/dht/dht.h
index 9ff41c56e..560266e29 100644
--- a/src/dht/dht.h
+++ b/src/dht/dht.h
@@ -30,6 +30,19 @@
30#define DEBUG_DHT GNUNET_NO 30#define DEBUG_DHT GNUNET_NO
31 31
32/** 32/**
33 * Add a unique ID to every request to make testing/profiling easier.
34 * Should NEVER be enabled in production and makes the DHT incompatible
35 * (since this changes the message format).
36 */
37#define HAVE_UID_FOR_TESTING GNUNET_YES
38
39/**
40 * Include a bf for replies? Should not be needed (see Mantis #1769), but if I remove
41 * this code it stops to work!?
42 */
43#define HAVE_REPLY_BLOOMFILTER GNUNET_YES
44
45/**
33 * Needs to be GNUNET_YES for logging to dhtlog to work! 46 * Needs to be GNUNET_YES for logging to dhtlog to work!
34 */ 47 */
35#define DEBUG_DHT_ROUTING GNUNET_YES 48#define DEBUG_DHT_ROUTING GNUNET_YES
@@ -147,8 +160,7 @@ struct GNUNET_DHT_StopMessage
147 160
148/** 161/**
149 * Generic DHT message, indicates that a route request 162 * Generic DHT message, indicates that a route request
150 * should be issued, if coming from a client. Shared 163 * should be issued.
151 * usage for api->server and P2P message passing.
152 */ 164 */
153struct GNUNET_DHT_RouteMessage 165struct GNUNET_DHT_RouteMessage
154{ 166{
@@ -265,10 +277,12 @@ struct GNUNET_DHT_P2PRouteMessage
265 */ 277 */
266 uint32_t outgoing_path_length GNUNET_PACKED; 278 uint32_t outgoing_path_length GNUNET_PACKED;
267 279
280#if HAVE_UID_FOR_TESTING
268 /** 281 /**
269 * Unique ID identifying this request 282 * Unique ID identifying this request (may not be set)
270 */ 283 */
271 uint64_t unique_id GNUNET_PACKED; 284 uint64_t unique_id GNUNET_PACKED;
285#endif
272 286
273 /** 287 /**
274 * Bloomfilter (for peer identities) to stop circular routes 288 * Bloomfilter (for peer identities) to stop circular routes
@@ -313,28 +327,25 @@ struct GNUNET_DHT_P2PRouteResultMessage
313 */ 327 */
314 uint32_t hop_count GNUNET_PACKED; 328 uint32_t hop_count GNUNET_PACKED;
315 329
330#if HAVE_UID_FOR_TESTING
316 /** 331 /**
317 * Unique ID identifying this request (may not be set) 332 * Unique ID identifying this request (may not be set)
318 */ 333 */
319 uint64_t unique_id GNUNET_PACKED; 334 uint64_t unique_id GNUNET_PACKED;
335#endif
320 336
337#if HAVE_REPLY_BLOOMFILTER
321 /** 338 /**
322 * Bloomfilter to stop circular routes 339 * Bloomfilter to stop circular routes
323 */ 340 */
324 char bloomfilter[DHT_BLOOM_SIZE]; 341 char bloomfilter[DHT_BLOOM_SIZE];
342#endif
325 343
326 /** 344 /**
327 * The key that was searched for 345 * The key that was searched for
328 */ 346 */
329 GNUNET_HashCode key; 347 GNUNET_HashCode key;
330 348
331#if FORWARD_UNKNOWN
332 /**
333 * Network size estimate
334 */
335 uint32_t network_size GNUNET_PACKED;
336#endif
337
338 /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */ 349 /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */
339 350
340 /* OUTGOING PATH */ 351 /* OUTGOING PATH */