GNUnet  0.10.x
Macros | Functions | Variables
gnunet-service-dht.h File Reference

GNUnet DHT globals. More...

#include "gnunet_util_lib.h"
#include "gnunet_statistics_service.h"
#include "gnunet_transport_service.h"
#include "gnunet_block_lib.h"
Include dependency graph for gnunet-service-dht.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUG_DHT   GNUNET_EXTRA_LOGGING
 

Functions

void GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration, const struct GNUNET_HashCode *key, unsigned int get_path_length, const struct GNUNET_PeerIdentity *get_path, unsigned int put_path_length, const struct GNUNET_PeerIdentity *put_path, enum GNUNET_BLOCK_Type type, size_t data_size, const void *data)
 Handle a reply we've received from another peer. More...
 
void GDS_CLIENTS_process_get (uint32_t options, enum GNUNET_BLOCK_Type type, uint32_t hop_count, uint32_t desired_replication_level, unsigned int path_length, const struct GNUNET_PeerIdentity *path, const struct GNUNET_HashCode *key)
 Check if some client is monitoring GET messages and notify them in that case. More...
 
void GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type, const struct GNUNET_PeerIdentity *get_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int put_path_length, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const void *data, size_t size)
 Check if some client is monitoring GET RESP messages and notify them in that case. More...
 
void GDS_CLIENTS_process_put (uint32_t options, enum GNUNET_BLOCK_Type type, uint32_t hop_count, uint32_t desired_replication_level, unsigned int path_length, const struct GNUNET_PeerIdentity *path, struct GNUNET_TIME_Absolute exp, const struct GNUNET_HashCode *key, const void *data, size_t size)
 Check if some client is monitoring PUT messages and notify them in that case. More...
 

Variables

const struct GNUNET_CONFIGURATION_HandleGDS_cfg
 Configuration we use. More...
 
struct GNUNET_SERVICE_HandleGDS_service
 Handle for the service. More...
 
struct GNUNET_BLOCK_ContextGDS_block_context
 Our handle to the BLOCK library. More...
 
struct GNUNET_STATISTICS_HandleGDS_stats
 Handle for the statistics service. More...
 
struct GNUNET_MessageHeaderGDS_my_hello
 Our HELLO. More...
 

Detailed Description

GNUnet DHT globals.

Author
Christian Grothoff

Definition in file gnunet-service-dht.h.

Macro Definition Documentation

◆ DEBUG_DHT

#define DEBUG_DHT   GNUNET_EXTRA_LOGGING

Definition at line 34 of file gnunet-service-dht.h.

Function Documentation

◆ GDS_CLIENTS_handle_reply()

void GDS_CLIENTS_handle_reply ( struct GNUNET_TIME_Absolute  expiration,
const struct GNUNET_HashCode key,
unsigned int  get_path_length,
const struct GNUNET_PeerIdentity get_path,
unsigned int  put_path_length,
const struct GNUNET_PeerIdentity put_path,
enum GNUNET_BLOCK_Type  type,
size_t  data_size,
const void *  data 
)

Handle a reply we've received from another peer.

If the reply matches any of our pending queries, forward it to the respective client(s).

Parameters
expirationwhen will the reply expire
keythe query this reply is for
get_path_lengthnumber of peers in get_path
get_pathpath the reply took on get
put_path_lengthnumber of peers in put_path
put_pathpath the reply took on put
typetype of the reply
data_sizenumber of bytes in data
dataapplication payload data

Definition at line 1146 of file gnunet-service-dht_clients.c.

References data, ForwardReplyContext::data, data_size, ForwardReplyContext::data_size, expiration, ForwardReplyContext::expiration, forward_reply(), ForwardReplyContext::get_path, ForwardReplyContext::get_path_length, gettext_noop, GNUNET_break, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_get_multiple(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_MAX_MESSAGE_SIZE, GNUNET_NO, GNUNET_STATISTICS_update(), LOG, ForwardReplyContext::put_path, ForwardReplyContext::put_path_length, ClientQueryRecord::type, and ForwardReplyContext::type.

Referenced by handle_dht_local_put(), handle_dht_p2p_put(), handle_local_result(), and process_reply_with_path().

1155 {
1156  struct ForwardReplyContext frc;
1157  size_t msize;
1158 
1159  msize = sizeof (struct GNUNET_DHT_ClientResultMessage) + data_size +
1160  (get_path_length + put_path_length) * sizeof (struct GNUNET_PeerIdentity);
1161  if (msize >= GNUNET_MAX_MESSAGE_SIZE)
1162  {
1163  GNUNET_break (0);
1164  return;
1165  }
1167  key))
1168  {
1170  "No matching client for reply for key %s\n",
1171  GNUNET_h2s (key));
1173  gettext_noop ("# REPLIES ignored for CLIENTS (no match)"),
1174  1,
1175  GNUNET_NO);
1176  return; /* no matching request, fast exit! */
1177  }
1178  frc.expiration = expiration;
1179  frc.get_path = get_path;
1180  frc.put_path = put_path;
1181  frc.data = data;
1182  frc.data_size = data_size;
1183  frc.get_path_length = get_path_length;
1184  frc.put_path_length = put_path_length;
1185  frc.type = type;
1187  "Forwarding reply for key %s to client\n",
1188  GNUNET_h2s (key));
1190  key,
1191  &forward_reply,
1192  &frc);
1193 
1194 }
Closure for forward_reply()
static char * expiration
Credential TTL.
uint32_t put_path_length
Number of peers recorded in the outgoing path from source to the storgage location of this message...
Definition: dht.h:163
struct GNUNET_STATISTICS_Handle * GDS_stats
Handle for the statistics service.
static struct GNUNET_CONTAINER_MultiHashMap * forward_map
Hashmap for fast key based lookup, maps keys to struct ClientQueryRecord entries. ...
#define GNUNET_NO
Definition: gnunet_common.h:81
const char * GNUNET_h2s(const struct GNUNET_HashCode *hc)
Convert a hash value to a string (for printing debug messages).
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
void * GNUNET_CONTAINER_multihashmap_get(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Given a key find a value in the map matching the key.
#define LOG(kind,...)
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message...
The identity of the host (wraps the signing key of the peer).
uint32_t get_path_length
The number of peer identities recorded from the storage location to this peer.
Definition: dht.h:169
int GNUNET_CONTAINER_multihashmap_get_multiple(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, GNUNET_CONTAINER_HashMapIterator it, void *it_cls)
Iterate over all entries in the map that match a particular key.
static int forward_reply(void *cls, const struct GNUNET_HashCode *key, void *value)
Iterator over hash map entries that send a given reply to each of the matching clients.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
uint32_t data
The data value.
static size_t data_size
Number of bytes in data.
Reply to a GET send from the service to a client.
Definition: dht.h:147
#define gettext_noop(String)
Definition: gettext.h:69
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GDS_CLIENTS_process_get()

void GDS_CLIENTS_process_get ( uint32_t  options,
enum GNUNET_BLOCK_Type  type,
uint32_t  hop_count,
uint32_t  desired_replication_level,
unsigned int  path_length,
const struct GNUNET_PeerIdentity path,
const struct GNUNET_HashCode key 
)

Check if some client is monitoring GET messages and notify them in that case.

Parameters
optionsOptions, for instance RecordRoute, DemultiplexEverywhere.
typeThe type of data in the request.
hop_countHop count so far.
path_lengthnumber of entries in path (or 0 if not recorded).
pathpeers on the GET path (or NULL if not recorded).
desired_replication_levelDesired replication level.
keyKey of the requested data.

Definition at line 1210 of file gnunet-service-dht_clients.c.

References ClientMonitorRecord::ch, GNUNET_DHT_MonitorGetMessage::desired_replication_level, env, GNUNET_DHT_MonitorGetMessage::get_path_length, GNUNET_array_append, GNUNET_BLOCK_TYPE_ANY, GNUNET_free_non_null, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_DHT_MonitorGetMessage::hop_count, ClientMonitorRecord::key, GNUNET_DHT_MonitorGetMessage::key, ClientQueryRecord::key, m, ClientHandle::mq, ClientMonitorRecord::next, GNUNET_DHT_MonitorGetMessage::options, ClientMonitorRecord::type, and GNUNET_DHT_MonitorGetMessage::type.

Referenced by handle_dht_local_get(), and handle_dht_p2p_get().

1217 {
1218  struct ClientMonitorRecord *m;
1219  struct ClientHandle **cl;
1220  unsigned int cl_size;
1221 
1222  cl = NULL;
1223  cl_size = 0;
1224  for (m = monitor_head; NULL != m; m = m->next)
1225  {
1226  if ( ( (GNUNET_BLOCK_TYPE_ANY == m->type) ||
1227  (m->type == type) ) &&
1228  ( (NULL == m->key) ||
1229  (0 == memcmp (key,
1230  m->key,
1231  sizeof(struct GNUNET_HashCode))) ) )
1232  {
1233  struct GNUNET_MQ_Envelope *env;
1234  struct GNUNET_DHT_MonitorGetMessage *mmsg;
1235  struct GNUNET_PeerIdentity *msg_path;
1236  size_t msize;
1237  unsigned int i;
1238 
1239  /* Don't send duplicates */
1240  for (i = 0; i < cl_size; i++)
1241  if (cl[i] == m->ch)
1242  break;
1243  if (i < cl_size)
1244  continue;
1245  GNUNET_array_append (cl,
1246  cl_size,
1247  m->ch);
1248 
1249  msize = path_length * sizeof (struct GNUNET_PeerIdentity);
1250  env = GNUNET_MQ_msg_extra (mmsg,
1251  msize,
1253  mmsg->options = htonl(options);
1254  mmsg->type = htonl(type);
1255  mmsg->hop_count = htonl(hop_count);
1256  mmsg->desired_replication_level = htonl(desired_replication_level);
1257  mmsg->get_path_length = htonl(path_length);
1258  mmsg->key = *key;
1259  msg_path = (struct GNUNET_PeerIdentity *) &mmsg[1];
1260  GNUNET_memcpy (msg_path,
1261  path,
1262  path_length * sizeof (struct GNUNET_PeerIdentity));
1263  GNUNET_MQ_send (m->ch->mq,
1264  env);
1265  }
1266  }
1267  GNUNET_free_non_null (cl);
1268 }
struct ClientHandle * ch
Client to notify of these requests.
uint32_t options
Message options, actually an &#39;enum GNUNET_DHT_RouteOption&#39; value.
Definition: dht.h:340
struct GNUNET_HashCode * key
Key of data of interest, NULL for all.
Any type of block, used as a wildcard when searching.
static struct ClientMonitorRecord * monitor_head
List of active monitoring requests.
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
struct ClientMonitorRecord * next
Next element in DLL.
#define GNUNET_free_non_null(ptr)
Free the memory pointed to by ptr if ptr is not NULL.
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:99
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct...
Definition: gnunet_mq_lib.h:52
enum GNUNET_BLOCK_Type type
Type of blocks that are of interest.
#define GNUNET_memcpy(dst, src, n)
struct GNUNET_HashCode key
The key to store the value under.
Definition: dht.h:366
A 512-bit hashcode.
#define GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET
Receive information about transiting GETs.
Struct containing information about a client, handle to connect to it, and any pending messages that ...
struct GNUNET_HashCode key
The key used in the DHT.
uint32_t get_path_length
Number of peers recorded in the outgoing path from source to the storage location of this message...
Definition: dht.h:361
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
struct GNUNET_MQ_Handle * mq
The message queue to this client.
uint32_t desired_replication_level
Replication level for this message.
Definition: dht.h:355
#define GNUNET_array_append(arr, size, element)
Append an element to a list (growing the list by one).
The identity of the host (wraps the signing key of the peer).
Struct containing paremeters of monitoring requests.
uint32_t type
The type of data in the request.
Definition: dht.h:345
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Message to monitor get requests going through peer, DHT service -> clients.
Definition: dht.h:330
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:353
uint32_t hop_count
Hop count.
Definition: dht.h:350
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GDS_CLIENTS_process_get_resp()

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

Check if some client is monitoring GET RESP messages and notify them in that case.

Parameters
typeThe type of data in the result.
get_pathPeers on GET path (or NULL if not recorded).
get_path_lengthnumber of entries in get_path.
put_pathpeers on the PUT path (or NULL if not recorded).
put_path_lengthnumber of entries in get_path.
expExpiration time of the data.
keyKey of the data.
dataPointer to the result data.
sizeNumber of bytes in data.
typeThe type of data in the result.
get_pathPeers on GET path (or NULL if not recorded).
get_path_lengthnumber of entries in get_path.
put_pathpeers on the PUT path (or NULL if not recorded).
put_path_lengthnumber of entries in get_path.
expExpiration time of the data.
keyKey of the data.
dataPointer to the result data.
sizeNumber of bytes in data.

Definition at line 1286 of file gnunet-service-dht_clients.c.

References ClientMonitorRecord::ch, env, GNUNET_DHT_MonitorGetRespMessage::expiration_time, GNUNET_DHT_MonitorGetRespMessage::get_path_length, GNUNET_array_append, GNUNET_BLOCK_TYPE_ANY, GNUNET_free_non_null, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_TIME_absolute_hton(), ClientMonitorRecord::key, GNUNET_DHT_MonitorGetRespMessage::key, ClientQueryRecord::key, m, ClientHandle::mq, ClientMonitorRecord::next, GNUNET_DHT_MonitorGetRespMessage::put_path_length, size, ClientMonitorRecord::type, and GNUNET_DHT_MonitorGetRespMessage::type.

Referenced by process_reply_with_path().

1295 {
1296  struct ClientMonitorRecord *m;
1297  struct ClientHandle **cl;
1298  unsigned int cl_size;
1299 
1300  cl = NULL;
1301  cl_size = 0;
1302  for (m = monitor_head; NULL != m; m = m->next)
1303  {
1304  if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
1305  (NULL == m->key ||
1306  memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
1307  {
1308  struct GNUNET_MQ_Envelope *env;
1309  struct GNUNET_DHT_MonitorGetRespMessage *mmsg;
1310  struct GNUNET_PeerIdentity *path;
1311  size_t msize;
1312  unsigned int i;
1313 
1314  /* Don't send duplicates */
1315  for (i = 0; i < cl_size; i++)
1316  if (cl[i] == m->ch)
1317  break;
1318  if (i < cl_size)
1319  continue;
1320  GNUNET_array_append (cl,
1321  cl_size,
1322  m->ch);
1323 
1324  msize = size;
1325  msize += (get_path_length + put_path_length)
1326  * sizeof (struct GNUNET_PeerIdentity);
1327  env = GNUNET_MQ_msg_extra (mmsg,
1328  msize,
1330  mmsg->type = htonl(type);
1331  mmsg->put_path_length = htonl(put_path_length);
1332  mmsg->get_path_length = htonl(get_path_length);
1334  mmsg->key = *key;
1335  path = (struct GNUNET_PeerIdentity *) &mmsg[1];
1336  GNUNET_memcpy (path,
1337  put_path,
1338  put_path_length * sizeof (struct GNUNET_PeerIdentity));
1339  GNUNET_memcpy (path,
1340  get_path,
1341  get_path_length * sizeof (struct GNUNET_PeerIdentity));
1342  GNUNET_memcpy (&path[get_path_length],
1343  data,
1344  size);
1345  GNUNET_MQ_send (m->ch->mq,
1346  env);
1347  }
1348  }
1349  GNUNET_free_non_null (cl);
1350 }
struct ClientHandle * ch
Client to notify of these requests.
struct GNUNET_HashCode * key
Key of data of interest, NULL for all.
Any type of block, used as a wildcard when searching.
static struct ClientMonitorRecord * monitor_head
List of active monitoring requests.
uint32_t get_path_length
Length of the GET path that follows (if tracked).
Definition: dht.h:395
struct GNUNET_HashCode key
The key of the corresponding GET request.
Definition: dht.h:405
struct ClientMonitorRecord * next
Next element in DLL.
#define GNUNET_free_non_null(ptr)
Free the memory pointed to by ptr if ptr is not NULL.
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:99
uint32_t put_path_length
Length of the PUT path that follows (if tracked).
Definition: dht.h:390
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct...
Definition: gnunet_mq_lib.h:52
enum GNUNET_BLOCK_Type type
Type of blocks that are of interest.
#define GNUNET_memcpy(dst, src, n)
A 512-bit hashcode.
Struct containing information about a client, handle to connect to it, and any pending messages that ...
struct GNUNET_HashCode key
The key used in the DHT.
static unsigned int size
Size of the "table".
Definition: peer.c:67
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
struct GNUNET_MQ_Handle * mq
The message queue to this client.
#define GNUNET_array_append(arr, size, element)
Append an element to a list (growing the list by one).
The identity of the host (wraps the signing key of the peer).
#define GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP
Receive information about transiting GET responses.
Struct containing paremeters of monitoring requests.
uint32_t type
Content type.
Definition: dht.h:385
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:353
struct GNUNET_TIME_AbsoluteNBO expiration_time
When does the content expire?
Definition: dht.h:400
uint32_t data
The data value.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
Definition: time.c:654
Message to monitor get results going through peer, DHT service -> clients.
Definition: dht.h:375
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GDS_CLIENTS_process_put()

void GDS_CLIENTS_process_put ( uint32_t  options,
enum GNUNET_BLOCK_Type  type,
uint32_t  hop_count,
uint32_t  desired_replication_level,
unsigned int  path_length,
const struct GNUNET_PeerIdentity path,
struct GNUNET_TIME_Absolute  exp,
const struct GNUNET_HashCode key,
const void *  data,
size_t  size 
)

Check if some client is monitoring PUT messages and notify them in that case.

Parameters
optionsOptions, for instance RecordRoute, DemultiplexEverywhere.
typeThe type of data in the request.
hop_countHop count so far.
path_lengthnumber of entries in path (or 0 if not recorded).
pathpeers on the PUT path (or NULL if not recorded).
desired_replication_levelDesired replication level.
expExpiration time of the data.
keyKey under which data is to be stored.
dataPointer to the data carried.
sizeNumber of bytes in data.

Definition at line 1369 of file gnunet-service-dht_clients.c.

References ClientMonitorRecord::ch, GNUNET_DHT_MonitorPutMessage::desired_replication_level, env, GNUNET_DHT_MonitorPutMessage::expiration_time, GNUNET_array_append, GNUNET_BLOCK_TYPE_ANY, GNUNET_free_non_null, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_TIME_absolute_hton(), GNUNET_DHT_MonitorPutMessage::hop_count, ClientMonitorRecord::key, GNUNET_DHT_MonitorPutMessage::key, ClientQueryRecord::key, m, ClientHandle::mq, ClientMonitorRecord::next, GNUNET_DHT_MonitorPutMessage::options, GNUNET_DHT_MonitorPutMessage::put_path_length, size, ClientMonitorRecord::type, and GNUNET_DHT_MonitorPutMessage::type.

Referenced by handle_dht_local_put(), and handle_dht_p2p_put().

1379 {
1380  struct ClientMonitorRecord *m;
1381  struct ClientHandle **cl;
1382  unsigned int cl_size;
1383 
1384  cl = NULL;
1385  cl_size = 0;
1386  for (m = monitor_head; NULL != m; m = m->next)
1387  {
1388  if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
1389  (NULL == m->key ||
1390  memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
1391  {
1392  struct GNUNET_MQ_Envelope *env;
1393  struct GNUNET_DHT_MonitorPutMessage *mmsg;
1394  struct GNUNET_PeerIdentity *msg_path;
1395  size_t msize;
1396  unsigned int i;
1397 
1398  /* Don't send duplicates */
1399  for (i = 0; i < cl_size; i++)
1400  if (cl[i] == m->ch)
1401  break;
1402  if (i < cl_size)
1403  continue;
1404  GNUNET_array_append (cl,
1405  cl_size,
1406  m->ch);
1407 
1408  msize = size;
1409  msize += path_length * sizeof (struct GNUNET_PeerIdentity);
1410  env = GNUNET_MQ_msg_extra (mmsg,
1411  msize,
1413  mmsg->options = htonl(options);
1414  mmsg->type = htonl(type);
1415  mmsg->hop_count = htonl(hop_count);
1416  mmsg->desired_replication_level = htonl (desired_replication_level);
1417  mmsg->put_path_length = htonl (path_length);
1418  mmsg->key = *key;
1420  msg_path = (struct GNUNET_PeerIdentity *) &mmsg[1];
1421  GNUNET_memcpy (msg_path,
1422  path,
1423  path_length * sizeof (struct GNUNET_PeerIdentity));
1424  GNUNET_memcpy (&msg_path[path_length],
1425  data,
1426  size);
1427  GNUNET_MQ_send (m->ch->mq,
1428  env);
1429  }
1430  }
1431  GNUNET_free_non_null (cl);
1432 }
struct ClientHandle * ch
Client to notify of these requests.
uint32_t hop_count
Hop count so far.
Definition: dht.h:254
struct GNUNET_HashCode * key
Key of data of interest, NULL for all.
#define GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT
Receive information about transiting PUTs.
Any type of block, used as a wildcard when searching.
static struct ClientMonitorRecord * monitor_head
List of active monitoring requests.
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
uint32_t desired_replication_level
Replication level for this message.
Definition: dht.h:259
struct ClientMonitorRecord * next
Next element in DLL.
uint32_t type
The type of data in the request.
Definition: dht.h:249
#define GNUNET_free_non_null(ptr)
Free the memory pointed to by ptr if ptr is not NULL.
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:99
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct...
Definition: gnunet_mq_lib.h:52
enum GNUNET_BLOCK_Type type
Type of blocks that are of interest.
#define GNUNET_memcpy(dst, src, n)
Message to monitor put requests going through peer, DHT service -> clients.
Definition: dht.h:234
struct GNUNET_TIME_AbsoluteNBO expiration_time
How long should this data persist?
Definition: dht.h:270
A 512-bit hashcode.
Struct containing information about a client, handle to connect to it, and any pending messages that ...
struct GNUNET_HashCode key
The key used in the DHT.
static unsigned int size
Size of the "table".
Definition: peer.c:67
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
struct GNUNET_MQ_Handle * mq
The message queue to this client.
uint32_t put_path_length
Number of peers recorded in the outgoing path from source to the storage location of this message...
Definition: dht.h:265
#define GNUNET_array_append(arr, size, element)
Append an element to a list (growing the list by one).
The identity of the host (wraps the signing key of the peer).
Struct containing paremeters of monitoring requests.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:353
uint32_t options
Message options, actually an &#39;enum GNUNET_DHT_RouteOption&#39; value.
Definition: dht.h:244
uint32_t data
The data value.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
Definition: time.c:654
struct GNUNET_HashCode key
The key to store the value under.
Definition: dht.h:275
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ GDS_cfg

const struct GNUNET_CONFIGURATION_Handle* GDS_cfg

Configuration we use.

Configuration we use.

Definition at line 234 of file gnunet-service-dht_clients.c.

Referenced by GDS_DATACACHE_init(), GDS_HELLO_init(), GDS_NEIGHBOURS_init(), GDS_NSE_init(), run(), and try_connect().

◆ GDS_service

struct GNUNET_SERVICE_Handle* GDS_service

Handle for the service.

Definition at line 229 of file gnunet-service-dht_clients.c.

Referenced by core_init(), and run().

◆ GDS_block_context

struct GNUNET_BLOCK_Context* GDS_block_context

◆ GDS_stats

struct GNUNET_STATISTICS_Handle* GDS_stats

◆ GDS_my_hello

struct GNUNET_MessageHeader* GDS_my_hello

Our HELLO.

Definition at line 45 of file gnunet-service-dht.c.

Referenced by handle_find_peer().