![]() |
GNUnet
0.11.x
|
GNUnet DHT tracking of requests for routing replies. More...
Go to the source code of this file.
Functions | |
void | GDS_ROUTING_process (enum GNUNET_BLOCK_Type type, struct GNUNET_TIME_Absolute expiration_time, const struct GNUNET_HashCode *key, unsigned int put_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *get_path, const void *data, size_t data_size) |
Handle a reply (route to origin). More... | |
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. More... | |
void | GDS_ROUTING_init (void) |
Initialize routing subsystem. More... | |
void | GDS_ROUTING_done (void) |
Shutdown routing subsystem. More... | |
GNUnet DHT tracking of requests for routing replies.
Definition in file gnunet-service-dht_routing.h.
void GDS_ROUTING_process | ( | enum GNUNET_BLOCK_Type | type, |
struct GNUNET_TIME_Absolute | expiration_time, | ||
const struct GNUNET_HashCode * | key, | ||
unsigned int | put_path_length, | ||
const struct GNUNET_PeerIdentity * | put_path, | ||
unsigned int | get_path_length, | ||
const struct GNUNET_PeerIdentity * | get_path, | ||
const void * | data, | ||
size_t | data_size | ||
) |
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.
type | type of the block |
expiration_time | when does the content expire |
key | key for the content |
put_path_length | number of entries in put_path |
put_path | peers the original PUT traversed (if tracked) |
get_path_length | number of entries in get_path |
get_path | peers this reply has traversed so far (if tracked) |
data | payload of the reply |
data_size | number of bytes in data |
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.
type | type of the block |
expiration_time | when does the content expire |
key | key for the content |
put_path_length | number of entries in put_path |
put_path | peers the original PUT traversed (if tracked) |
get_path_length | number of entries in get_path |
get_path | peers this reply has traversed so far (if tracked) |
data | payload of the reply |
data_size | number of bytes in data |
Definition at line 298 of file gnunet-service-dht_routing.c.
References data, ProcessContext::data, ProcessContext::data_size, data_size, ProcessContext::expiration_time, ProcessContext::get_path, ProcessContext::get_path_length, GNUNET_break, GNUNET_CONTAINER_multihashmap_get_multiple(), process(), ProcessContext::put_path, ProcessContext::put_path_length, RecentRequest::type, and ProcessContext::type.
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 |
options | options for processing |
key | key for the content |
xquery | extended query |
xquery_size | number of bytes in xquery |
reply_bf | bloomfilter to filter duplicates |
reply_bf_mutator | mutator for reply_bf |
Definition at line 409 of file gnunet-service-dht_routing.c.
References RecentRequest::bg, DHT_MAX_RECENT, expire_oldest_entry(), GDS_stats, gettext_noop, 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, RecentRequest::key, RecentRequest::options, RecentRequest::peer, try_combine_recent(), 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 463 of file gnunet-service-dht_routing.c.
References DHT_MAX_RECENT, GNUNET_CONTAINER_heap_create(), GNUNET_CONTAINER_HEAP_ORDER_MIN, GNUNET_CONTAINER_multihashmap_create(), and GNUNET_NO.
Referenced by run().
void GDS_ROUTING_done | ( | void | ) |
Shutdown routing subsystem.
Definition at line 475 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(), and GNUNET_CONTAINER_multihashmap_size().
Referenced by shutdown_task().