GNUnet  0.11.x
Data Structures | Macros | Functions | Variables
gnunet-service-cadet_dht.c File Reference

Information we track per peer. More...

#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_dht_service.h"
#include "gnunet_statistics_service.h"
#include "gnunet-service-cadet.h"
#include "gnunet-service-cadet_dht.h"
#include "gnunet-service-cadet_hello.h"
#include "gnunet-service-cadet_peer.h"
#include "gnunet-service-cadet_paths.h"
Include dependency graph for gnunet-service-cadet_dht.c:

Go to the source code of this file.

Data Structures

struct  GCD_search_handle
 Handle for DHT searches. More...
 

Macros

#define STARTUP_DELAY
 How long do we wait before first announcing our presence to the DHT. More...
 
#define CHANGE_DELAY
 How long do we wait after we get an updated HELLO before publishing? Allows for the HELLO to be updated again quickly, for example in case multiple addresses changed and we got a partial update. More...
 
#define LOG(level, ...)   GNUNET_log_from (level, "cadet-dht", __VA_ARGS__)
 

Functions

static void dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const struct GNUNET_PeerIdentity *get_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int put_path_length, enum GNUNET_BLOCK_Type type, size_t size, const void *data)
 Function to process paths received for a new peer addition. More...
 
static void announce_id (void *cls)
 Periodically announce self id in the DHT. More...
 
void GCD_hello_update ()
 Function called by the HELLO subsystem whenever OUR hello changes. More...
 
void GCD_init (const struct GNUNET_CONFIGURATION_Handle *c)
 Initialize the DHT subsystem. More...
 
void GCD_shutdown (void)
 Shut down the DHT subsystem. More...
 
struct GCD_search_handleGCD_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...
 

Variables

static struct GNUNET_DHT_Handledht_handle
 Handle to use DHT. More...
 
static struct GNUNET_TIME_Relative id_announce_time
 How often to PUT own ID in the DHT. More...
 
static unsigned long long dht_replication_level
 DHT replication level, see DHT API: GNUNET_DHT_get_start(), GNUNET_DHT_put(). More...
 
static struct GNUNET_SCHEDULER_Taskannounce_id_task
 Task to periodically announce itself in the network. More...
 
static struct GNUNET_TIME_Relative announce_delay
 Delay for the next ID announce. More...
 

Detailed Description

Information we track per peer.

Author
Bartlomiej Polot
Christian Grothoff

Definition in file gnunet-service-cadet_dht.c.

Macro Definition Documentation

◆ STARTUP_DELAY

#define STARTUP_DELAY
Value:
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
Definition: time.c:442
#define GNUNET_TIME_UNIT_MILLISECONDS
One millisecond.

How long do we wait before first announcing our presence to the DHT.

Used to wait for our HELLO to be available. Note that we also get notifications when our HELLO is ready, so this is just the maximum we wait for the first notification.

Definition at line 43 of file gnunet-service-cadet_dht.c.

Referenced by GCD_init().

◆ CHANGE_DELAY

#define CHANGE_DELAY
Value:
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
Definition: time.c:442
#define GNUNET_TIME_UNIT_MILLISECONDS
One millisecond.

How long do we wait after we get an updated HELLO before publishing? Allows for the HELLO to be updated again quickly, for example in case multiple addresses changed and we got a partial update.

Definition at line 51 of file gnunet-service-cadet_dht.c.

Referenced by GCD_hello_update().

◆ LOG

#define LOG (   level,
  ... 
)    GNUNET_log_from (level, "cadet-dht", __VA_ARGS__)

Function Documentation

◆ dht_get_id_handler()

static void dht_get_id_handler ( void *  cls,
struct GNUNET_TIME_Absolute  exp,
const struct GNUNET_HashCode key,
const struct GNUNET_PeerIdentity get_path,
unsigned int  get_path_length,
const struct GNUNET_PeerIdentity put_path,
unsigned int  put_path_length,
enum GNUNET_BLOCK_Type  type,
size_t  size,
const void *  data 
)
static

Function to process paths received for a new peer addition.

The recorded paths form the initial tunnel, which can be optimized later. Called on each result obtained for the DHT search.

Parameters
clsclosure
expwhen will this value expire
keykey of the result
get_pathpath of the get request
get_path_lengthlenght of get_path
put_pathpath of the put request
put_path_lengthlength of the put_path
typetype of the result
sizenumber of bytes in data
datapointer to the result data

Definition at line 113 of file gnunet-service-cadet_dht.c.

References data, GCP_2s(), GCP_get(), GCP_set_hello(), GCPP_try_path_from_dht(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELLO_size(), GNUNET_YES, GNUNET_HELLO_Message::header, LOG, peer, and GNUNET_MessageHeader::size.

Referenced by GCD_search().

122 {
123  const struct GNUNET_HELLO_Message *hello = data;
124  struct CadetPeer *peer;
125 
126  GCPP_try_path_from_dht (get_path,
127  get_path_length,
128  put_path,
129  put_path_length);
130  if ((size >= sizeof(struct GNUNET_HELLO_Message)) &&
131  (ntohs (hello->header.size) == size) &&
132  (size == GNUNET_HELLO_size (hello)))
133  {
134  peer = GCP_get (&put_path[0],
135  GNUNET_YES);
137  "Got HELLO for %s\n",
138  GCP_2s (peer));
139  GCP_set_hello (peer,
140  hello);
141  }
142 }
Peer description.
A HELLO message is used to exchange information about transports with other peers.
void GCP_set_hello(struct CadetPeer *cp, const struct GNUNET_HELLO_Message *hello)
We got a HELLO for a peer, remember it, and possibly trigger adequate actions (like trying to connect...
#define LOG(level,...)
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format...
void GCPP_try_path_from_dht(const struct GNUNET_PeerIdentity *get_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int put_path_length)
Create a peer path based on the result of a DHT lookup.
const char * GCP_2s(const struct CadetPeer *cp)
Get the static string for a peer ID.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
static unsigned int size
Size of the "table".
Definition: peer.c:67
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_HELLO.
struct CadetPeer * GCP_get(const struct GNUNET_PeerIdentity *peer_id, int create)
Retrieve the CadetPeer stucture associated with the peer.
uint16_t GNUNET_HELLO_size(const struct GNUNET_HELLO_Message *hello)
Return the size of the given HELLO message.
Definition: hello.c:652
#define GNUNET_YES
Definition: gnunet_common.h:77
uint32_t data
The data value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ announce_id()

static void announce_id ( void *  cls)
static

Periodically announce self id in the DHT.

Parameters
clsclosure

Definition at line 151 of file gnunet-service-cadet_dht.c.

References announce_delay, dht_replication_level, GCH_get_mine(), GNUNET_BLOCK_TYPE_DHT_HELLO, GNUNET_DHT_put(), GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, GNUNET_DHT_RO_RECORD_ROUTE, GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELLO_get_last_expiration(), GNUNET_HELLO_size(), GNUNET_memcpy, GNUNET_NO, GNUNET_SCHEDULER_add_delayed(), GNUNET_STATISTICS_update(), GNUNET_TIME_absolute_add(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_remaining(), GNUNET_TIME_relative_max(), GNUNET_TIME_relative_min(), GNUNET_TIME_STD_BACKOFF, GNUNET_TIME_UNIT_SECONDS, id_announce_time, LOG, my_full_id, size, and stats.

Referenced by GCD_hello_update(), and GCD_init().

152 {
153  struct GNUNET_HashCode phash;
154  const struct GNUNET_HELLO_Message *hello;
155  size_t size;
157  struct GNUNET_TIME_Relative next_put;
158 
159  hello = GCH_get_mine ();
160  size = (NULL != hello) ? GNUNET_HELLO_size (hello) : 0;
161  if (0 == size)
162  {
166  }
167  else
168  {
171  }
172 
173  /* Call again in id_announce_time, unless HELLO expires first,
174  * but wait at least 1s. */
175  next_put
177  next_put
178  = GNUNET_TIME_relative_min (next_put,
180  next_put
181  = GNUNET_TIME_relative_max (next_put,
184  = GNUNET_SCHEDULER_add_delayed (next_put,
185  &announce_id,
186  cls);
188  "# DHT announce",
189  1,
190  GNUNET_NO);
191  memset (&phash,
192  0,
193  sizeof(phash));
194  GNUNET_memcpy (&phash,
195  &my_full_id,
196  sizeof(my_full_id));
198  "Announcing my HELLO (%u bytes) in the DHT\n",
199  size);
200  GNUNET_DHT_put (dht_handle, /* DHT handle */
201  &phash, /* Key to use */
202  dht_replication_level, /* Replication level */
204  | GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, /* DHT options */
205  GNUNET_BLOCK_TYPE_DHT_HELLO, /* Block type */
206  size, /* Size of the data */
207  (const char *) hello, /* Data itself */
208  expiration, /* Data expiration */
209  NULL, /* Continuation */
210  NULL); /* Continuation closure */
211 }
static struct GNUNET_SCHEDULER_Task * announce_id_task
Task to periodically announce itself in the network.
We should keep track of the route that the message took in the P2P network.
A HELLO message is used to exchange information about transports with other peers.
static struct GNUNET_TIME_Relative id_announce_time
How often to PUT own ID in the DHT.
#define LOG(level,...)
struct GNUNET_TIME_Relative GNUNET_TIME_relative_max(struct GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2)
Return the maximum of two relative time values.
Definition: time.c:287
struct GNUNET_PeerIdentity my_full_id
Local peer own ID.
#define GNUNET_TIME_UNIT_SECONDS
One second.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
static struct GNUNET_DHT_Handle * dht_handle
Handle to use DHT.
#define GNUNET_NO
Definition: gnunet_common.h:78
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Add a given relative duration to the given start time.
Definition: time.c:395
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1253
struct GNUNET_STATISTICS_Handle * stats
Handle to the statistics service.
const struct GNUNET_HELLO_Message * GCH_get_mine(void)
Get own hello message.
static void announce_id(void *cls)
Periodically announce self id in the DHT.
Type of a block that contains a HELLO for a peer (for DHT and CADET find-peer operations).
A 512-bit hashcode.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:118
struct GNUNET_TIME_Relative GNUNET_TIME_relative_min(struct GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2)
Return the minimum of two relative time values.
Definition: time.c:272
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.
Definition: dht_api.c:966
static unsigned int size
Size of the "table".
Definition: peer.c:67
#define GNUNET_TIME_STD_BACKOFF(r)
Perform our standard exponential back-off calculation, starting at 1 ms and then going by a factor of...
static struct GNUNET_TIME_Relative announce_delay
Delay for the next ID announce.
static unsigned long long dht_replication_level
DHT replication level, see DHT API: GNUNET_DHT_get_start(), GNUNET_DHT_put().
uint16_t GNUNET_HELLO_size(const struct GNUNET_HELLO_Message *hello)
Return the size of the given HELLO message.
Definition: hello.c:652
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining(struct GNUNET_TIME_Absolute future)
Given a timestamp in the future, how much time remains until then?
Definition: time.c:331
Time for absolute times used by GNUnet, in microseconds.
struct GNUNET_TIME_Absolute GNUNET_HELLO_get_last_expiration(const struct GNUNET_HELLO_Message *msg)
When does the last address in the given HELLO expire?
Definition: hello.c:892
Each peer along the way should look at 'enc' (otherwise only the k-peers closest to the key should lo...
Time for relative time used by GNUnet, in microseconds.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GCD_hello_update()

void GCD_hello_update ( void  )

Function called by the HELLO subsystem whenever OUR hello changes.

Re-triggers the DHT PUT immediately.

Definition at line 219 of file gnunet-service-cadet_dht.c.

References announce_id(), CHANGE_DELAY, GNUNET_SCHEDULER_add_delayed(), and GNUNET_SCHEDULER_cancel().

Referenced by got_hello().

220 {
221  if (NULL == announce_id_task)
222  return; /* too early */
226  &announce_id,
227  NULL);
228 }
static struct GNUNET_SCHEDULER_Task * announce_id_task
Task to periodically announce itself in the network.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1253
static void announce_id(void *cls)
Periodically announce self id in the DHT.
#define CHANGE_DELAY
How long do we wait after we get an updated HELLO before publishing? Allows for the HELLO to be updat...
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:966
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GCD_init()

void GCD_init ( const struct GNUNET_CONFIGURATION_Handle c)

Initialize the DHT subsystem.

Parameters
cConfiguration.

Definition at line 237 of file gnunet-service-cadet_dht.c.

References announce_delay, announce_id(), 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().

238 {
239  if (GNUNET_OK !=
241  "CADET",
242  "DHT_REPLICATION_LEVEL",
244  {
246  "CADET",
247  "DHT_REPLICATION_LEVEL",
248  "USING DEFAULT");
250  }
251 
252  if (GNUNET_OK !=
254  "CADET",
255  "ID_ANNOUNCE_TIME",
257  {
259  "CADET",
260  "ID_ANNOUNCE_TIME",
261  "MISSING");
263  return;
264  }
265 
267  64);
268  GNUNET_break (NULL != dht_handle);
271  &announce_id,
272  NULL);
273 }
static struct GNUNET_SCHEDULER_Task * announce_id_task
Task to periodically announce itself in the network.
int GNUNET_CONFIGURATION_get_value_time(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, struct GNUNET_TIME_Relative *time)
Get a configuration value that should be a relative time.
int GNUNET_CONFIGURATION_get_value_number(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long *number)
Get a configuration value that should be a number.
static struct GNUNET_TIME_Relative id_announce_time
How often to PUT own ID in the DHT.
#define GNUNET_TIME_UNIT_SECONDS
One second.
static struct GNUNET_DHT_Handle * dht_handle
Handle to use DHT.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
void GNUNET_log_config_invalid(enum GNUNET_ErrorType kind, const char *section, const char *option, const char *required)
Log error message about invalid configuration option value.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:526
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1253
static void announce_id(void *cls)
Periodically announce self id in the DHT.
struct GNUNET_DHT_Handle * GNUNET_DHT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned int ht_len)
Initialize the connection with the DHT service.
Definition: dht_api.c:890
static struct GNUNET_TIME_Relative announce_delay
Delay for the next ID announce.
static unsigned long long dht_replication_level
DHT replication level, see DHT API: GNUNET_DHT_get_start(), GNUNET_DHT_put().
#define STARTUP_DELAY
How long do we wait before first announcing our presence to the DHT.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GCD_shutdown()

void GCD_shutdown ( void  )

Shut down the DHT subsystem.

Definition at line 280 of file gnunet-service-cadet_dht.c.

References GNUNET_DHT_disconnect(), and GNUNET_SCHEDULER_cancel().

Referenced by shutdown_rest().

281 {
282  if (NULL != dht_handle)
283  {
285  dht_handle = NULL;
286  }
287  if (NULL != announce_id_task)
288  {
290  announce_id_task = NULL;
291  }
292 }
static struct GNUNET_SCHEDULER_Task * announce_id_task
Task to periodically announce itself in the network.
static struct GNUNET_DHT_Handle * dht_handle
Handle to use DHT.
void GNUNET_DHT_disconnect(struct GNUNET_DHT_Handle *handle)
Shutdown connection with the DHT service.
Definition: dht_api.c:918
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:966
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GCD_search()

struct GCD_search_handle* GCD_search ( const struct GNUNET_PeerIdentity peer_id)

Search DHT for paths to peeR_id.

Parameters
peer_idpeer to search for
Returns
handle to abort search

Definition at line 302 of file gnunet-service-cadet_dht.c.

References dht_get_id_handler(), dht_replication_level, GCD_search_handle::dhtget, 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, and stats.

Referenced by consider_peer_activate(), and GCP_path_entry_remove().

303 {
304  struct GNUNET_HashCode phash;
305  struct GCD_search_handle *h;
306 
308  "# DHT search",
309  1,
310  GNUNET_NO);
311  memset (&phash,
312  0,
313  sizeof(phash));
314  GNUNET_memcpy (&phash,
315  peer_id,
316  sizeof(*peer_id));
317 
318  h = GNUNET_new (struct GCD_search_handle);
319  h->dhtget = GNUNET_DHT_get_start (dht_handle, /* handle */
320  GNUNET_BLOCK_TYPE_DHT_HELLO, /* type */
321  &phash, /* key to search */
322  dht_replication_level, /* replication level */
325  NULL, /* xquery */
326  0, /* xquery bits */
328  h);
330  "Starting DHT GET for peer %s (%p)\n",
331  GNUNET_i2s (peer_id),
332  h);
333  return h;
334 }
We should keep track of the route that the message took in the P2P network.
Handle for DHT searches.
#define LOG(level,...)
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
static struct GNUNET_DHT_Handle * dht_handle
Handle to use DHT.
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_new(type)
Allocate a struct or union of the given type.
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:99
struct GNUNET_STATISTICS_Handle * stats
Handle to the statistics service.
Type of a block that contains a HELLO for a peer (for DHT and CADET find-peer operations).
A 512-bit hashcode.
static void dht_get_id_handler(void *cls, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const struct GNUNET_PeerIdentity *get_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int put_path_length, enum GNUNET_BLOCK_Type type, size_t size, const void *data)
Function to process paths received for a new peer addition.
struct GNUNET_DHT_GetHandle * dhtget
DHT_GET handle.
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.
Definition: dht_api.c:1067
static unsigned long long dht_replication_level
DHT replication level, see DHT API: GNUNET_DHT_get_start(), GNUNET_DHT_put().
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
Each peer along the way should look at 'enc' (otherwise only the k-peers closest to the key should lo...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GCD_search_stop()

void GCD_search_stop ( struct GCD_search_handle h)

Stop DHT search started with GCD_search().

Parameters
hhandle to search to stop

Definition at line 343 of file gnunet-service-cadet_dht.c.

References GCD_search_handle::dhtget, GNUNET_DHT_get_stop(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, and LOG.

Referenced by consider_peer_activate(), destroy_peer(), and GCP_path_entry_add().

344 {
346  "Stopping DHT GET %p\n",
347  h);
349  GNUNET_free (h);
350 }
#define LOG(level,...)
void GNUNET_DHT_get_stop(struct GNUNET_DHT_GetHandle *get_handle)
Stop async DHT-get.
Definition: dht_api.c:1155
struct GNUNET_DHT_GetHandle * dhtget
DHT_GET handle.
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ dht_handle

struct GNUNET_DHT_Handle* dht_handle
static

Handle to use DHT.

Definition at line 73 of file gnunet-service-cadet_dht.c.

◆ id_announce_time

struct GNUNET_TIME_Relative id_announce_time
static

How often to PUT own ID in the DHT.

Definition at line 78 of file gnunet-service-cadet_dht.c.

Referenced by announce_id(), and GCD_init().

◆ dht_replication_level

unsigned long long dht_replication_level
static

DHT replication level, see DHT API: GNUNET_DHT_get_start(), GNUNET_DHT_put().

Definition at line 83 of file gnunet-service-cadet_dht.c.

Referenced by announce_id(), GCD_init(), and GCD_search().

◆ announce_id_task

struct GNUNET_SCHEDULER_Task* announce_id_task
static

Task to periodically announce itself in the network.

Definition at line 88 of file gnunet-service-cadet_dht.c.

◆ announce_delay

struct GNUNET_TIME_Relative announce_delay
static

Delay for the next ID announce.

Definition at line 93 of file gnunet-service-cadet_dht.c.

Referenced by announce_id(), and GCD_init().