![]() |
GNUnet
0.11.x
|
GNUnet DHT service. More...
#include "platform.h"
#include "gnunet_block_lib.h"
#include "gnunet_util_lib.h"
#include "gnunet_transport_service.h"
#include "gnunet_transport_hello_service.h"
#include "gnunet_hello_lib.h"
#include "gnunet_dht_service.h"
#include "gnunet_statistics_service.h"
#include "gnunet-service-dht.h"
#include "gnunet-service-dht_datacache.h"
#include "gnunet-service-dht_hello.h"
#include "gnunet-service-dht_neighbours.h"
#include "gnunet-service-dht_nse.h"
#include "gnunet-service-dht_routing.h"
#include "gnunet-service-dht_clients.c"
Go to the source code of this file.
Variables | |
struct GNUNET_MessageHeader * | GDS_my_hello |
Our HELLO. More... | |
static struct GNUNET_TRANSPORT_HelloGetHandle * | ghh |
Handle to get our current HELLO. More... | |
struct GNUNET_TIME_Relative | hello_expiration |
Hello address expiration. More... | |
GNUnet DHT service.
Definition in file gnunet-service-dht.c.
|
static |
Receive the HELLO from transport service, free current and replace if necessary.
cls | NULL |
message | HELLO message of peer |
Definition at line 69 of file gnunet-service-dht.c.
References GNUNET_free, GNUNET_malloc, GNUNET_memcpy, and GNUNET_MessageHeader::size.
Referenced by run().
|
static |
Task run during shutdown.
cls | unused |
Definition at line 86 of file gnunet-service-dht.c.
References GDS_block_context, GDS_CLIENTS_stop(), GDS_DATACACHE_done(), GDS_HELLO_done(), GDS_NEIGHBOURS_done(), GDS_NSE_done(), GDS_ROUTING_done(), GDS_stats, GNUNET_BLOCK_context_destroy(), GNUNET_free, GNUNET_STATISTICS_destroy(), GNUNET_TRANSPORT_hello_get_cancel(), and GNUNET_YES.
Referenced by run().
|
static |
Process dht requests.
cls | closure |
c | configuration to use |
service | the initialized service |
Definition at line 123 of file gnunet-service-dht.c.
References GDS_block_context, GDS_cfg, GDS_CLIENTS_init(), GDS_DATACACHE_init(), GDS_DHT_SERVICE_INIT, GDS_HELLO_init(), GDS_NEIGHBOURS_init(), GDS_NSE_init(), GDS_ROUTING_init(), GDS_service, GDS_stats, GNUNET_BLOCK_context_create(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION, GNUNET_OK, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SERVICE_suspend(), GNUNET_STATISTICS_create(), GNUNET_TRANSPORT_AC_GLOBAL, GNUNET_TRANSPORT_hello_get(), hello_expiration, process_hello(), service, and shutdown_task().
GNUNET_SERVICE_MAIN | ( | "dht" | , |
GNUNET_SERVICE_OPTION_NONE | , | ||
& | run, | ||
& | client_connect_cb, | ||
& | client_disconnect_cb, | ||
NULL | , | ||
GNUNET_MQ_hd_var_size(dht_local_put, GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT, struct GNUNET_DHT_ClientPutMessage, NULL) | , | ||
GNUNET_MQ_hd_var_size(dht_local_get, GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET, struct GNUNET_DHT_ClientGetMessage, NULL) | , | ||
GNUNET_MQ_hd_fixed_size(dht_local_get_stop, GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP, struct GNUNET_DHT_ClientGetStopMessage, NULL) | , | ||
GNUNET_MQ_hd_fixed_size(dht_local_monitor, GNUNET_MESSAGE_TYPE_DHT_MONITOR_START, struct GNUNET_DHT_MonitorStartStopMessage, NULL) | , | ||
GNUNET_MQ_hd_fixed_size(dht_local_monitor_stop, GNUNET_MESSAGE_TYPE_DHT_MONITOR_STOP, struct GNUNET_DHT_MonitorStartStopMessage, NULL) | , | ||
GNUNET_MQ_hd_var_size(dht_local_get_result_seen, GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_RESULTS_KNOWN, struct GNUNET_DHT_ClientGetResultSeenMessage, NULL) | , | ||
GNUNET_MQ_handler_end() | |||
) |
struct GNUNET_MessageHeader* GDS_my_hello |
|
static |
Handle to get our current HELLO.
Definition at line 50 of file gnunet-service-dht.c.
Referenced by GNUNET_TRANSPORT_hello_get(), and handle_hello().
struct GNUNET_TIME_Relative hello_expiration |