cadet service; dealing with DHT requests and results More...
Go to the source code of this file.
Functions | |
void | GCD_init (const struct GNUNET_CONFIGURATION_Handle *c) |
Initialize the DHT subsystem. More... | |
void | GCD_shutdown (void) |
Shut down the DHT subsystem. More... | |
void | GCD_hello_update (void) |
Function called by the HELLO subsystem whenever OUR hello changes. More... | |
struct GCD_search_handle * | GCD_search (const struct GNUNET_PeerIdentity *peer_id) |
Search DHT for paths to peeR_id. More... | |
void | GCD_search_stop (struct GCD_search_handle *h) |
Stop DHT search started with GCD_search(). More... | |
cadet service; dealing with DHT requests and results
All functions in this file should use the prefix GCD (Gnunet Cadet Dht)
Definition in file gnunet-service-cadet_dht.h.
void GCD_init | ( | const struct GNUNET_CONFIGURATION_Handle * | c | ) |
Initialize the DHT subsystem.
c | Configuration. |
Definition at line 235 of file gnunet-service-cadet_dht.c.
References announce_delay, announce_id(), announce_id_task, dht_handle, dht_replication_level, GNUNET_break, GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_DHT_connect(), GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_log_config_invalid(), GNUNET_OK, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_shutdown(), GNUNET_TIME_UNIT_SECONDS, id_announce_time, and STARTUP_DELAY.
Referenced by run().
void GCD_shutdown | ( | void | ) |
Shut down the DHT subsystem.
Definition at line 275 of file gnunet-service-cadet_dht.c.
References announce_id_task, dht_handle, GNUNET_DHT_disconnect(), and GNUNET_SCHEDULER_cancel().
Referenced by shutdown_rest().
void GCD_hello_update | ( | void | ) |
Function called by the HELLO subsystem whenever OUR hello changes.
Re-triggers the DHT PUT immediately.
Definition at line 222 of file gnunet-service-cadet_dht.c.
References announce_id(), announce_id_task, CHANGE_DELAY, GNUNET_SCHEDULER_add_delayed(), and GNUNET_SCHEDULER_cancel().
Referenced by got_hello().
struct GCD_search_handle * GCD_search | ( | const struct GNUNET_PeerIdentity * | peer_id | ) |
Search DHT for paths to peeR_id.
peer_id | peer to search for |
Definition at line 291 of file gnunet-service-cadet_dht.c.
References dht_get_id_handler(), dht_handle, dht_replication_level, GNUNET_BLOCK_TYPE_DHT_HELLO, GNUNET_DHT_get_start(), GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, GNUNET_DHT_RO_RECORD_ROUTE, GNUNET_ERROR_TYPE_DEBUG, GNUNET_i2s(), GNUNET_memcpy, GNUNET_new, GNUNET_NO, GNUNET_STATISTICS_update(), h, LOG, peer_id, and stats.
Referenced by consider_peer_activate(), and GCP_path_entry_remove().
void GCD_search_stop | ( | struct GCD_search_handle * | h | ) |
Stop DHT search started with GCD_search().
h | handle to search to stop |
Definition at line 327 of file gnunet-service-cadet_dht.c.
References GNUNET_DHT_get_stop(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, h, and LOG.
Referenced by consider_peer_activate(), destroy_peer(), and GCP_path_entry_add().