diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-02-02 11:54:21 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-02-02 11:54:21 +0000 |
commit | 0aa66524bd2ef85668ba8de14792eb39480b59ba (patch) | |
tree | c84691a6fad3cbdbcc963e6194ba2b49971963a3 /src/dht/dht.h | |
parent | 3b3eb36e3a01c7046fe4c9a3c4bb7834d83442d6 (diff) | |
download | gnunet-0aa66524bd2ef85668ba8de14792eb39480b59ba.tar.gz gnunet-0aa66524bd2ef85668ba8de14792eb39480b59ba.zip |
path tracking commit, hopefully a fix for dht_api connect bug, needs tested
Diffstat (limited to 'src/dht/dht.h')
-rw-r--r-- | src/dht/dht.h | 70 |
1 files changed, 44 insertions, 26 deletions
diff --git a/src/dht/dht.h b/src/dht/dht.h index 4e8782bb5..1ea888093 100644 --- a/src/dht/dht.h +++ b/src/dht/dht.h | |||
@@ -199,18 +199,11 @@ struct GNUNET_DHT_RouteResultMessage | |||
199 | struct GNUNET_MessageHeader header; | 199 | struct GNUNET_MessageHeader header; |
200 | 200 | ||
201 | /** | 201 | /** |
202 | * Number of peers recorded in the "PUT" path. | 202 | * Number of peers recorded in the outgoing |
203 | * (original path message took during "PUT"). These | 203 | * path from source to the final destination |
204 | * peer identities follow this message. | 204 | * of this message. |
205 | */ | 205 | */ |
206 | uint16_t put_path_length GNUNET_PACKED; | 206 | uint32_t outgoing_path_length GNUNET_PACKED; |
207 | |||
208 | /** | ||
209 | * Number of peers recorded in the "GET" path | ||
210 | * (inverse of the path the GET message took). These | ||
211 | * peer identities follow this message. | ||
212 | */ | ||
213 | uint16_t get_path_length GNUNET_PACKED; | ||
214 | 207 | ||
215 | /** | 208 | /** |
216 | * Unique ID identifying this request (necessary for | 209 | * Unique ID identifying this request (necessary for |
@@ -223,11 +216,9 @@ struct GNUNET_DHT_RouteResultMessage | |||
223 | */ | 216 | */ |
224 | GNUNET_HashCode key; | 217 | GNUNET_HashCode key; |
225 | 218 | ||
226 | /* PUT path */ | ||
227 | |||
228 | /* GET path */ | ||
229 | |||
230 | /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */ | 219 | /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */ |
220 | |||
221 | /* OUTGOING path */ | ||
231 | }; | 222 | }; |
232 | 223 | ||
233 | 224 | ||
@@ -267,11 +258,11 @@ struct GNUNET_DHT_P2PRouteMessage | |||
267 | uint32_t network_size GNUNET_PACKED; | 258 | uint32_t network_size GNUNET_PACKED; |
268 | 259 | ||
269 | /** | 260 | /** |
270 | * Route path length; number of GNUNET_PeerIdentity's | 261 | * Generic route path length for a message in the |
271 | * copied to the end of this message (before the actual | 262 | * DHT that arrived at a peer and generated |
272 | * encapsulated message) | 263 | * a reply. Copied to the end of this message. |
273 | */ | 264 | */ |
274 | uint32_t route_path_length GNUNET_PACKED; | 265 | uint32_t outgoing_path_length GNUNET_PACKED; |
275 | 266 | ||
276 | /** | 267 | /** |
277 | * Unique ID identifying this request | 268 | * Unique ID identifying this request |
@@ -290,6 +281,8 @@ struct GNUNET_DHT_P2PRouteMessage | |||
290 | 281 | ||
291 | /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */ | 282 | /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */ |
292 | 283 | ||
284 | /* OUTGOING PATH */ | ||
285 | |||
293 | }; | 286 | }; |
294 | 287 | ||
295 | /** | 288 | /** |
@@ -307,7 +300,7 @@ struct GNUNET_DHT_P2PRouteResultMessage | |||
307 | * (inverse of the path the outgoing message took). | 300 | * (inverse of the path the outgoing message took). |
308 | * These peer identities follow this message. | 301 | * These peer identities follow this message. |
309 | */ | 302 | */ |
310 | uint16_t outgoing_path_length GNUNET_PACKED; | 303 | uint32_t outgoing_path_length GNUNET_PACKED; |
311 | 304 | ||
312 | /** | 305 | /** |
313 | * Message options | 306 | * Message options |
@@ -341,12 +334,9 @@ struct GNUNET_DHT_P2PRouteResultMessage | |||
341 | uint32_t network_size GNUNET_PACKED; | 334 | uint32_t network_size GNUNET_PACKED; |
342 | #endif | 335 | #endif |
343 | 336 | ||
344 | |||
345 | /* PUT path */ | ||
346 | |||
347 | /* GET path */ | ||
348 | |||
349 | /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */ | 337 | /* GNUNET_MessageHeader *enc actual DHT message, copied to end of this dealy do */ |
338 | |||
339 | /* OUTGOING PATH */ | ||
350 | }; | 340 | }; |
351 | 341 | ||
352 | 342 | ||
@@ -449,7 +439,13 @@ struct GNUNET_DHT_GetResultMessage | |||
449 | /** | 439 | /** |
450 | * The type for the data for the GET request | 440 | * The type for the data for the GET request |
451 | */ | 441 | */ |
452 | uint32_t type; | 442 | uint16_t type; |
443 | |||
444 | /** | ||
445 | * The number of peer identities appended to the end of this | ||
446 | * message. | ||
447 | */ | ||
448 | uint16_t put_path_length; | ||
453 | 449 | ||
454 | /** | 450 | /** |
455 | * When does this entry expire? | 451 | * When does this entry expire? |
@@ -458,5 +454,27 @@ struct GNUNET_DHT_GetResultMessage | |||
458 | 454 | ||
459 | }; | 455 | }; |
460 | 456 | ||
457 | /** | ||
458 | * Entry for inserting data into datacache from the DHT. | ||
459 | * Needed here so block library can verify entries that | ||
460 | * are shoveled into the DHT. | ||
461 | */ | ||
462 | struct DHTPutEntry | ||
463 | { | ||
464 | /** | ||
465 | * Size of data. | ||
466 | */ | ||
467 | uint16_t data_size; | ||
468 | |||
469 | /** | ||
470 | * Length of recorded path. | ||
471 | */ | ||
472 | uint16_t path_length; | ||
473 | |||
474 | /* PUT DATA */ | ||
475 | |||
476 | /* PATH ENTRIES */ | ||
477 | }; | ||
478 | |||
461 | 479 | ||
462 | #endif /* DHT_H_ */ | 480 | #endif /* DHT_H_ */ |