Distributed Hash Table. More...
Data Structures | |
struct | GNUNET_DHT_HopSignature |
Message signed by a peer when doing path tracking. More... | |
struct | GNUNET_DHT_PathElement |
A (signed) path tracking a block's flow through the DHT is represented by an array of path elements, each consisting of a peer on the path and a signature by which the peer affirms its routing decision. More... | |
Macros | |
#define | GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY |
Default republication frequency for stored data in the DHT. More... | |
#define | GNUNET_DHT_MAXIMUM_REPLICATION_LEVEL 16 |
Maximum allowed replication level for all requests. More... | |
Typedefs | |
typedef void(* | GNUNET_DHT_GetIterator) (void *cls, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *query_hash, const struct GNUNET_PeerIdentity *trunc_peer, const struct GNUNET_DHT_PathElement *get_path, unsigned int get_path_length, const struct GNUNET_DHT_PathElement *put_path, unsigned int put_path_length, enum GNUNET_BLOCK_Type type, size_t size, const void *data) |
Iterator called on each result obtained for a DHT operation that expects a reply. More... | |
typedef void(* | GNUNET_DHT_MonitorGetCB) (void *cls, enum GNUNET_DHT_RouteOption options, enum GNUNET_BLOCK_Type type, uint32_t hop_count, uint32_t desired_replication_level, const struct GNUNET_HashCode *key) |
Callback called on each GET request going through the DHT. More... | |
typedef void(* | GNUNET_DHT_MonitorGetRespCB) (void *cls, enum GNUNET_BLOCK_Type type, const struct GNUNET_PeerIdentity *trunc_peer, const struct GNUNET_DHT_PathElement *get_path, unsigned int get_path_length, const struct GNUNET_DHT_PathElement *put_path, unsigned int put_path_length, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const void *data, size_t size) |
Callback called on each GET reply going through the DHT. More... | |
typedef void(* | GNUNET_DHT_MonitorPutCB) (void *cls, enum GNUNET_DHT_RouteOption options, enum GNUNET_BLOCK_Type type, uint32_t hop_count, uint32_t desired_replication_level, const struct GNUNET_PeerIdentity *trunc_peer, unsigned int path_length, const struct GNUNET_DHT_PathElement *path, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const void *data, size_t size) |
Callback called on each PUT request going through the DHT. More... | |
typedef void(* | GNUNET_DHT_HelloGetCallback) (void *cls, const char *hello_url) |
Signature called with the result of a HELLO GET operation. More... | |
Enumerations | |
enum | GNUNET_DHT_RouteOption { GNUNET_DHT_RO_NONE = 0 , GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE = 1 , GNUNET_DHT_RO_RECORD_ROUTE = 2 , GNUNET_DHT_RO_FIND_APPROXIMATE = 4 , GNUNET_DHT_RO_TRUNCATED = 8 , GNUNET_DHT_RO_LAST_HOP = 32768 } |
Options for routing. More... | |
Functions | |
struct GNUNET_DHT_Handle * | GNUNET_DHT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned int ht_len) |
Initialize the connection with the DHT service. More... | |
void | GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle) |
Shutdown connection with the DHT service. More... | |
struct GNUNET_DHT_PutHandle * | GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const struct GNUNET_HashCode *key, uint32_t desired_replication_level, enum GNUNET_DHT_RouteOption options, enum GNUNET_BLOCK_Type type, size_t size, const void *data, struct GNUNET_TIME_Absolute exp, GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls) |
Perform a PUT operation storing data in the DHT. More... | |
void | GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph) |
Cancels a DHT PUT operation. More... | |
struct GNUNET_DHT_GetHandle * | GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle, enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode *key, uint32_t desired_replication_level, enum GNUNET_DHT_RouteOption options, const void *xquery, size_t xquery_size, GNUNET_DHT_GetIterator iter, void *iter_cls) |
Perform an asynchronous GET operation on the DHT identified. More... | |
void | GNUNET_DHT_get_filter_known_results (struct GNUNET_DHT_GetHandle *get_handle, unsigned int num_results, const struct GNUNET_HashCode *results) |
Tell the DHT not to return any of the following known results to this client. More... | |
void | GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle) |
Stop async DHT-get. More... | |
struct GNUNET_DHT_MonitorHandle * | GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle, enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode *key, GNUNET_DHT_MonitorGetCB get_cb, GNUNET_DHT_MonitorGetRespCB get_resp_cb, GNUNET_DHT_MonitorPutCB put_cb, void *cb_cls) |
Start monitoring the local DHT service. More... | |
void | GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle) |
Stop monitoring. More... | |
char * | GNUNET_DHT_pp2s (const struct GNUNET_DHT_PathElement *path, unsigned int path_len) |
Convert a peer path to a human-readable string. More... | |
unsigned int | GNUNET_DHT_verify_path (const void *data, size_t data_size, struct GNUNET_TIME_Absolute exp_time, const struct GNUNET_PeerIdentity *trunc_peer, const struct GNUNET_DHT_PathElement *put_path, unsigned int put_path_len, const struct GNUNET_DHT_PathElement *get_path, unsigned int get_path_len, const struct GNUNET_PeerIdentity *me) |
Verify signatures on a path consisting of put_path and get_path in reverse order (starting at the last element of the get_path). More... | |
struct GNUNET_DHT_HelloGetHandle * | GNUNET_DHT_hello_get (struct GNUNET_DHT_Handle *dht_handle, GNUNET_DHT_HelloGetCallback cb, void *cb_cls) |
Obtain HELLO URL of the DHT identified by dht_handle. More... | |
void | GNUNET_DHT_hello_get_cancel (struct GNUNET_DHT_HelloGetHandle *hgh) |
Cancel hello get operation. More... | |
void | GNUNET_DHT_hello_offer (struct GNUNET_DHT_Handle *dht_handle, const char *url, GNUNET_SCHEDULER_TaskCallback cb, void *cb_cls) |
Offer HELLO URL of the DHT identified by dht_handle. More... | |
Distributed Hash Table.
#define GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY |
Default republication frequency for stored data in the DHT.
Definition at line 59 of file gnunet_dht_service.h.
#define GNUNET_DHT_MAXIMUM_REPLICATION_LEVEL 16 |
Maximum allowed replication level for all requests.
Definition at line 66 of file gnunet_dht_service.h.
typedef void(* GNUNET_DHT_GetIterator) (void *cls, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *query_hash, const struct GNUNET_PeerIdentity *trunc_peer, const struct GNUNET_DHT_PathElement *get_path, unsigned int get_path_length, const struct GNUNET_DHT_PathElement *put_path, unsigned int put_path_length, enum GNUNET_BLOCK_Type type, size_t size, const void *data) |
Iterator called on each result obtained for a DHT operation that expects a reply.
cls | closure |
exp | when will this value expire |
query_hash | key of the query |
trunc_peer | peer where the path was truncated, or NULL if the path is complete |
get_path | peers on reply path (or NULL if not recorded) [0] = datastore's first neighbor, [length - 1] = local peer |
get_path_length | number of entries in get_path |
put_path | peers on the PUT path (or NULL if not recorded) [0] = origin, [length - 1] = datastore |
put_path_length | number of entries in put_path, note that the last signature will be all zeros as we did not forward and thus did not sign! |
type | type of the result |
size | number of bytes in data |
data | pointer to the result data |
Definition at line 288 of file gnunet_dht_service.h.
typedef void(* GNUNET_DHT_MonitorGetCB) (void *cls, enum GNUNET_DHT_RouteOption options, enum GNUNET_BLOCK_Type type, uint32_t hop_count, uint32_t desired_replication_level, const struct GNUNET_HashCode *key) |
Callback called on each GET request going through the DHT.
cls | Closure. |
options | Options, for instance RecordRoute, DemultiplexEverywhere. |
type | The type of data in the request. |
hop_count | Hop count so far. |
desired_replication_level | Desired replication level. |
key | Key of the requested data. |
Definition at line 371 of file gnunet_dht_service.h.
typedef void(* GNUNET_DHT_MonitorGetRespCB) (void *cls, enum GNUNET_BLOCK_Type type, const struct GNUNET_PeerIdentity *trunc_peer, const struct GNUNET_DHT_PathElement *get_path, unsigned int get_path_length, const struct GNUNET_DHT_PathElement *put_path, unsigned int put_path_length, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const void *data, size_t size) |
Callback called on each GET reply going through the DHT.
cls | Closure. |
type | The type of data in the result. |
trunc_peer | peer where the path was truncated, or NULL if the path is complete |
get_path | Peers on GET path (or NULL if not recorded). note that the last signature will be all zeros as we did not forward and thus did not sign! |
get_path_length | number of entries in get_path. |
put_path | peers on the PUT path (or NULL if not recorded). |
put_path_length | number of entries in get_path. |
exp | Expiration time of the data. |
key | Key of the data. |
data | Pointer to the result data. |
size | Number of bytes in data. |
Definition at line 397 of file gnunet_dht_service.h.
typedef void(* GNUNET_DHT_MonitorPutCB) (void *cls, enum GNUNET_DHT_RouteOption options, enum GNUNET_BLOCK_Type type, uint32_t hop_count, uint32_t desired_replication_level, const struct GNUNET_PeerIdentity *trunc_peer, unsigned int path_length, const struct GNUNET_DHT_PathElement *path, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const void *data, size_t size) |
Callback called on each PUT request going through the DHT.
cls | Closure. |
options | Options, for instance RecordRoute, DemultiplexEverywhere. |
type | The type of data in the request. |
hop_count | Hop count so far. |
desired_replication_level | Desired replication level. |
trunc_peer | peer where the path was truncated, or NULL if the path is complete |
path_length | number of entries in path (or 0 if not recorded). |
path | peers on the PUT path (or NULL if not recorded). note that the last signature will be all zeros as we did not forward and thus did not sign! |
exp | Expiration time of the data. |
key | Key under which data is to be stored. |
data | Pointer to the data carried. |
size | Number of bytes in data. |
Definition at line 429 of file gnunet_dht_service.h.
typedef void(* GNUNET_DHT_HelloGetCallback) (void *cls, const char *hello_url) |
Signature called with the result of a HELLO GET operation.
cls | closure |
hello_url | the resulting HELLO URL, NULL on error |
Definition at line 533 of file gnunet_dht_service.h.
Options for routing.
Definition at line 88 of file gnunet_dht_service.h.
struct GNUNET_DHT_Handle * GNUNET_DHT_connect | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg, |
unsigned int | ht_len | ||
) |
Initialize the connection with the DHT service.
cfg | configuration to use |
ht_len | size of the internal hash table to use for processing multiple GET/FIND requests in parallel |
Definition at line 1030 of file dht_api.c.
References cfg, GNUNET_VPN_Handle::cfg, GNUNET_CONTAINER_multihashmap_create(), GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_CRYPTO_random_u64(), GNUNET_DHT_disconnect(), GNUNET_new, GNUNET_NO, GNUNET_YES, handle, and try_connect().
Referenced by advertise_dns_exit(), dht_ca(), dht_connect(), GCD_init(), and run().
void GNUNET_DHT_disconnect | ( | struct GNUNET_DHT_Handle * | handle | ) |
Shutdown connection with the DHT service.
handle | connection to shut down |
Definition at line 1053 of file dht_api.c.
References GNUNET_DHT_PutHandle::cont, GNUNET_DHT_PutHandle::cont_cls, GNUNET_assert, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_size(), GNUNET_DHT_put_cancel(), GNUNET_free, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_cancel(), handle, and GNUNET_VPN_Handle::mq.
Referenced by cleanup(), cleanup_task(), dht_da(), dht_disconnect(), GCD_shutdown(), GNUNET_DHT_connect(), and shutdown_task().
struct GNUNET_DHT_PutHandle * GNUNET_DHT_put | ( | struct GNUNET_DHT_Handle * | handle, |
const struct GNUNET_HashCode * | key, | ||
uint32_t | desired_replication_level, | ||
enum GNUNET_DHT_RouteOption | options, | ||
enum GNUNET_BLOCK_Type | type, | ||
size_t | size, | ||
const void * | data, | ||
struct GNUNET_TIME_Absolute | exp, | ||
GNUNET_SCHEDULER_TaskCallback | cont, | ||
void * | cont_cls | ||
) |
Perform a PUT operation storing data in the DHT.
handle | handle to DHT service |
key | the key to store under |
desired_replication_level | estimate of how many nearest peers this request should reach |
options | routing options for this message |
type | type of the value |
size | number of bytes in data; must be less than 64k |
data | the data to store |
exp | desired expiration time for the value |
cont | continuation to call when done (transmitting request to service) You must not call GNUNET_DHT_disconnect in this continuation |
cont_cls | closure for cont |
Definition at line 1081 of file dht_api.c.
References GNUNET_DHT_PutHandle::cont, GNUNET_DHT_PutHandle::cont_cls, data, GNUNET_DHT_ClientPutMessage::desired_replication_level, GNUNET_DHT_PutHandle::dht_handle, env, GNUNET_DHT_PutHandle::env, GNUNET_DHT_ClientPutMessage::expiration, GNUNET_break, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_MAX_MESSAGE_SIZE, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT, GNUNET_MQ_msg_extra, GNUNET_MQ_notify_sent(), GNUNET_MQ_send(), GNUNET_new, GNUNET_TIME_absolute_hton(), handle, handle_put_cont(), key, GNUNET_DHT_ClientPutMessage::key, LOG, GNUNET_VPN_Handle::mq, options, GNUNET_DHT_ClientPutMessage::options, size, type, and GNUNET_DHT_ClientPutMessage::type.
Referenced by announce_id(), delayed_put(), do_dht_put(), initiate_put_from_pipe_trigger(), process_dht_put_content(), regex_iterator(), and run().
void GNUNET_DHT_put_cancel | ( | struct GNUNET_DHT_PutHandle * | ph | ) |
Cancels a DHT PUT operation.
Note that the PUT request may still go out over the network (we can't stop that); However, if the PUT has not yet been sent to the service, cancelling the PUT will stop this from happening (but there is no way for the user of this API to tell if that is the case). The only use for this API is to prevent a later call to 'cont' from GNUNET_DHT_put (e.g. because the system is shutting down).
ph | put operation to cancel ('cont' will no longer be called) |
Definition at line 1144 of file dht_api.c.
References GNUNET_DHT_PutHandle::dht_handle, GNUNET_DHT_PutHandle::env, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MQ_notify_sent(), and handle.
Referenced by cleanup(), do_dht_put(), do_disconnect(), do_shutdown(), GNUNET_DHT_disconnect(), GSF_put_done_(), handle_put_cont(), and shutdown_task().
struct GNUNET_DHT_GetHandle * GNUNET_DHT_get_start | ( | struct GNUNET_DHT_Handle * | handle, |
enum GNUNET_BLOCK_Type | type, | ||
const struct GNUNET_HashCode * | key, | ||
uint32_t | desired_replication_level, | ||
enum GNUNET_DHT_RouteOption | options, | ||
const void * | xquery, | ||
size_t | xquery_size, | ||
GNUNET_DHT_GetIterator | iter, | ||
void * | iter_cls | ||
) |
Perform an asynchronous GET operation on the DHT identified.
See also #GNUNET_BLOCK_evaluate.
handle | handle to the DHT service |
type | expected type of the response object |
key | the key to look up |
desired_replication_level | estimate of how many nearest peers this request should reach |
options | routing options for this message |
xquery | extended query data (can be NULL, depending on type) |
xquery_size | number of bytes in xquery |
iter | function to call on each result |
iter_cls | closure for iter |
Definition at line 1160 of file dht_api.c.
References GNUNET_DHT_ClientGetMessage::desired_replication_level, GNUNET_DHT_GetHandle::desired_replication_level, GNUNET_DHT_GetHandle::dht_handle, GNUNET_break, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE, GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_malloc, GNUNET_MAX_MESSAGE_SIZE, GNUNET_memcpy, handle, GNUNET_DHT_GetHandle::iter, GNUNET_DHT_GetHandle::iter_cls, key, GNUNET_DHT_GetHandle::key, LOG, GNUNET_VPN_Handle::mq, options, GNUNET_DHT_GetHandle::options, send_get(), type, GNUNET_DHT_GetHandle::type, GNUNET_DHT_GetHandle::unique_id, and GNUNET_DHT_GetHandle::xquery_size.
Referenced by delayed_get(), GCD_search(), GSF_dht_lookup_(), regex_find_path(), REGEX_INTERNAL_search(), regex_next_edge(), run(), and start_dht_request().
void GNUNET_DHT_get_filter_known_results | ( | struct GNUNET_DHT_GetHandle * | get_handle, |
unsigned int | num_results, | ||
const struct GNUNET_HashCode * | results | ||
) |
Tell the DHT not to return any of the following known results to this client.
get_handle | get operation for which results should be filtered |
num_results | number of results to be blocked that are provided in this call (size of the results array) |
results | array of hash codes over the data of the results to be blocked |
Definition at line 1209 of file dht_api.c.
References GNUNET_DHT_GetHandle::dht_handle, get_handle, GNUNET_array_grow, GNUNET_memcpy, GNUNET_DHT_Handle::mq, results, GNUNET_DHT_GetHandle::seen_results, GNUNET_DHT_GetHandle::seen_results_end, GNUNET_DHT_GetHandle::seen_results_size, and send_get_known_results().
Referenced by GSF_dht_lookup_(), and GSF_pending_request_update_().
void GNUNET_DHT_get_stop | ( | struct GNUNET_DHT_GetHandle * | get_handle | ) |
Stop async DHT-get.
Frees associated resources.
get_handle | GET operation to stop. |
Definition at line 1233 of file dht_api.c.
References GNUNET_DHT_GetHandle::dht_handle, env, get_handle, GNUNET_array_grow, GNUNET_assert, GNUNET_CONTAINER_multihashmap_remove(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_h2s(), GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_YES, handle, GNUNET_DHT_ClientGetStopMessage::key, GNUNET_DHT_GetHandle::key, LOG, GNUNET_VPN_Handle::mq, GNUNET_DHT_ClientGetStopMessage::reserved, GNUNET_DHT_GetHandle::seen_results, GNUNET_DHT_GetHandle::seen_results_end, GNUNET_DHT_ClientGetStopMessage::unique_id, and GNUNET_DHT_GetHandle::unique_id.
Referenced by cancel_get(), clean_request(), cleanup(), cleanup_task(), do_shutdown(), GCD_search_stop(), get_iter(), get_result_iterator(), GNS_resolver_lookup_cancel(), GSF_dht_lookup_(), GSF_pending_request_cancel_(), handle_dht_response(), and regex_cancel_dht_get().
struct GNUNET_DHT_MonitorHandle * GNUNET_DHT_monitor_start | ( | struct GNUNET_DHT_Handle * | handle, |
enum GNUNET_BLOCK_Type | type, | ||
const struct GNUNET_HashCode * | key, | ||
GNUNET_DHT_MonitorGetCB | get_cb, | ||
GNUNET_DHT_MonitorGetRespCB | get_resp_cb, | ||
GNUNET_DHT_MonitorPutCB | put_cb, | ||
void * | cb_cls | ||
) |
Start monitoring the local DHT service.
handle | Handle to the DHT service. |
type | Type of blocks that are of interest. |
key | Key of data of interest, NULL for all. |
get_cb | Callback to process monitored get messages. |
get_resp_cb | Callback to process monitored get response messages. |
put_cb | Callback to process monitored put messages. |
cb_cls | Closure for callbacks |
Definition at line 1266 of file dht_api.c.
References GNUNET_DHT_MonitorHandle::cb_cls, get_cb(), GNUNET_DHT_MonitorHandle::get_resp_cb, GNUNET_CONTAINER_DLL_insert, GNUNET_new, handle, key, mh, GNUNET_VPN_Handle::mq, put_cb(), send_monitor_start(), and type.
Referenced by run().
void GNUNET_DHT_monitor_stop | ( | struct GNUNET_DHT_MonitorHandle * | handle | ) |
Stop monitoring.
On return handle will no longer be valid, caller must not use it anymore.
handle | The handle to the monitor request returned by GNUNET_DHT_monitor_start(). |
Definition at line 1298 of file dht_api.c.
References env, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MESSAGE_TYPE_DHT_MONITOR_STOP, GNUNET_MQ_msg, GNUNET_MQ_send(), handle, m, mh, and GNUNET_VPN_Handle::mq.
Referenced by cleanup_task().
char * GNUNET_DHT_pp2s | ( | const struct GNUNET_DHT_PathElement * | path, |
unsigned int | path_len | ||
) |
Convert a peer path to a human-readable string.
path | array of path elements to convert to a string |
path_len | length of the path array |
Definition at line 1326 of file dht_api.c.
References GNUNET_assert, GNUNET_i2s(), GNUNET_malloc, and GNUNET_snprintf().
Referenced by process_client_result().
unsigned int GNUNET_DHT_verify_path | ( | const void * | data, |
size_t | data_size, | ||
struct GNUNET_TIME_Absolute | exp_time, | ||
const struct GNUNET_PeerIdentity * | trunc_peer, | ||
const struct GNUNET_DHT_PathElement * | put_path, | ||
unsigned int | put_path_len, | ||
const struct GNUNET_DHT_PathElement * | get_path, | ||
unsigned int | get_path_len, | ||
const struct GNUNET_PeerIdentity * | me | ||
) |
Verify signatures on a path consisting of put_path and get_path in reverse order (starting at the last element of the get_path).
Note that the last signature on the path is never verified as that is the slot where our peer (me) would need to sign.
data | payload (the block) |
data_size | number of bytes in data |
exp_time | expiration time of data |
trunc_peer | peer which signature was broken or where the path was truncated, NULL if path is not truncated |
get_path | array of path elements to verify |
get_path_len | length of the get_path array |
put_path | array of path elements to verify |
put_path_len | length of the put_path array |
me | our own peer identity (needed to verify the last element) |
Definition at line 1349 of file dht_api.c.
References data, data_size, GNUNET_break_op, GNUNET_CRYPTO_eddsa_verify, GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_log, GNUNET_OK, GNUNET_SIGNATURE_PURPOSE_DHT_HOP, GNUNET_TIME_absolute_hton(), GNUNET_DHT_HopSignature::h_data, me, GNUNET_DHT_HopSignature::pred, GNUNET_DHT_PathElement::pred, GNUNET_PeerIdentity::public_key, GNUNET_CRYPTO_EccSignaturePurpose::purpose, GNUNET_DHT_HopSignature::purpose, GNUNET_DHT_PathElement::sig, GNUNET_DHT_HopSignature::succ, and zero.
Referenced by forward_reply(), GDS_CLIENTS_handle_reply(), GDS_helper_put_message_get_size(), GDS_NEIGHBOURS_handle_reply(), get_result_iterator(), handle_dht_p2p_put(), and handle_dht_p2p_result().
struct GNUNET_DHT_HelloGetHandle * GNUNET_DHT_hello_get | ( | struct GNUNET_DHT_Handle * | dht_handle, |
GNUNET_DHT_HelloGetCallback | cb, | ||
void * | cb_cls | ||
) |
Obtain HELLO URL of the DHT identified by dht_handle.
dht_handle | DHT to query |
cb | function to call with the result |
cb_cls | closure for cb |
Definition at line 1440 of file dht_api.c.
References GNUNET_DHT_HelloGetHandle::cb, GNUNET_DHT_HelloGetHandle::cb_cls, dht_handle, GNUNET_DHT_HelloGetHandle::dht_handle, env, GNUNET_CONTAINER_DLL_insert, GNUNET_MESSAGE_TYPE_DHT_CLIENT_HELLO_GET, GNUNET_MQ_msg, GNUNET_MQ_send(), and GNUNET_new.
Referenced by run().
void GNUNET_DHT_hello_get_cancel | ( | struct GNUNET_DHT_HelloGetHandle * | hgh | ) |
Cancel hello get operation.
[in] | hgh | operation to cancel. |
Definition at line 1464 of file dht_api.c.
References dht_handle, GNUNET_DHT_HelloGetHandle::dht_handle, GNUNET_CONTAINER_DLL_remove, and GNUNET_free.
Referenced by cleanup_task(), and handle_client_hello().
void GNUNET_DHT_hello_offer | ( | struct GNUNET_DHT_Handle * | dht_handle, |
const char * | url, | ||
GNUNET_SCHEDULER_TaskCallback | cb, | ||
void * | cb_cls | ||
) |
Offer HELLO URL of the DHT identified by dht_handle.
Callback may be invoked once, only way to cancel is to disconnect dht_handle.
dht_handle | DHT to query |
url | URL with a HELLO to offer to the DHT |
cb | function called when done |
cb_cls | closure for cb |
Definition at line 1476 of file dht_api.c.
References dht_handle, env, GNUNET_MESSAGE_TYPE_DHT_CLIENT_HELLO_URL, GNUNET_MQ_msg_extra, GNUNET_MQ_notify_sent(), and GNUNET_MQ_send().
Referenced by run().