GNUnet DHT tracking of requests for routing replies. More...
Go to the source code of this file.
Functions | |
| void | GDS_ROUTING_process (const struct GNUNET_DATACACHE_Block *bd, const struct GNUNET_HashCode *query_hash, unsigned int get_path_length, const struct GNUNET_DHT_PathElement *get_path) |
| Handle a reply (route to origin). | |
| void | GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender, enum GNUNET_BLOCK_Type type, struct GNUNET_BLOCK_Group *bg, enum GNUNET_DHT_RouteOption options, const struct GNUNET_HashCode *key, const void *xquery, size_t xquery_size) |
| Add a new entry to our routing table. | |
| void | GDS_ROUTING_init (void) |
| Initialize routing subsystem. | |
| void | GDS_ROUTING_done (void) |
| Shutdown routing subsystem. | |
GNUnet DHT tracking of requests for routing replies.
Definition in file gnunet-service-dht_routing.h.
| void GDS_ROUTING_process | ( | const struct GNUNET_DATACACHE_Block * | bd, |
| const struct GNUNET_HashCode * | query_hash, | ||
| unsigned int | get_path_length, | ||
| const struct GNUNET_DHT_PathElement * | get_path | ||
| ) |
Handle a reply (route to origin).
Only forwards the reply back to other peers waiting for it. Does not do local caching or forwarding to local clients. Essentially calls GDS_NEIGHBOURS_handle_reply() for all peers that sent us a matching request recently.
| bd | block details |
| query_hash | query used in the inquiry |
| get_path_length | number of entries in get_path |
| get_path | peers this reply has traversed so far (if tracked) |
Definition at line 255 of file gnunet-service-dht_routing.c.
References ProcessContext::bd, ProcessContext::get_path, ProcessContext::get_path_length, GNUNET_CONTAINER_multihashmap_get_multiple(), pc, process(), and recent_map.
Referenced by process_reply_with_path().
| void GDS_ROUTING_add | ( | const struct GNUNET_PeerIdentity * | sender, |
| enum GNUNET_BLOCK_Type | type, | ||
| struct GNUNET_BLOCK_Group * | bg, | ||
| enum GNUNET_DHT_RouteOption | options, | ||
| const struct GNUNET_HashCode * | key, | ||
| const void * | xquery, | ||
| size_t | xquery_size | ||
| ) |
Add a new entry to our routing table.
| sender | peer that originated the request | |
| type | type of the block | |
| bg | block group to evaluate replies, henceforth owned by routing | |
| options | options for processing | |
| key | key for the content | |
| xquery | extended query | |
| xquery_size | number of bytes in xquery | |
| sender | peer that originated the request | |
| type | type of the block | |
| [in] | bg | block group for filtering duplicate replies |
| options | options for processing | |
| key | key for the content | |
| xquery | extended query | |
| xquery_size | number of bytes in xquery |
Definition at line 346 of file gnunet-service-dht_routing.c.
References RecentRequest::bg, DHT_MAX_RECENT, expire_oldest_entry(), GDS_stats, GNUNET_CONTAINER_heap_get_size(), GNUNET_CONTAINER_heap_insert(), GNUNET_CONTAINER_multihashmap_get_multiple(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE, GNUNET_malloc, GNUNET_memcpy, GNUNET_NO, GNUNET_STATISTICS_update(), GNUNET_SYSERR, GNUNET_TIME_absolute_get(), RecentRequest::heap_node, key, RecentRequest::key, options, RecentRequest::options, RecentRequest::peer, recent_heap, recent_map, try_combine_recent(), type, RecentRequest::type, RecentRequest::xquery, and RecentRequest::xquery_size.
Referenced by handle_dht_p2p_get().
| void GDS_ROUTING_init | ( | void | ) |
Initialize routing subsystem.
Definition at line 402 of file gnunet-service-dht_routing.c.
References DHT_MAX_RECENT, GNUNET_CONTAINER_heap_create(), GNUNET_CONTAINER_HEAP_ORDER_MIN, GNUNET_CONTAINER_multihashmap_create(), GNUNET_NO, recent_heap, and recent_map.
Referenced by run().
| void GDS_ROUTING_done | ( | void | ) |
Shutdown routing subsystem.
Definition at line 414 of file gnunet-service-dht_routing.c.
References expire_oldest_entry(), GNUNET_assert, GNUNET_CONTAINER_heap_destroy(), GNUNET_CONTAINER_heap_get_size(), GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_size(), recent_heap, and recent_map.
Referenced by shutdown_task().