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 1142 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().

1151 {
1152  struct ForwardReplyContext frc;
1153  size_t msize;
1154 
1155  msize = sizeof(struct GNUNET_DHT_ClientResultMessage) + data_size +
1157  if (msize >= GNUNET_MAX_MESSAGE_SIZE)
1158  {
1159  GNUNET_break(0);
1160  return;
1161  }
1163  key))
1164  {
1166  "No matching client for reply for key %s\n",
1167  GNUNET_h2s(key));
1169  gettext_noop("# REPLIES ignored for CLIENTS (no match)"),
1170  1,
1171  GNUNET_NO);
1172  return; /* no matching request, fast exit! */
1173  }
1174  frc.expiration = expiration;
1175  frc.get_path = get_path;
1176  frc.put_path = put_path;
1177  frc.data = data;
1178  frc.data_size = data_size;
1179  frc.get_path_length = get_path_length;
1180  frc.put_path_length = put_path_length;
1181  frc.type = type;
1183  "Forwarding reply for key %s to client\n",
1184  GNUNET_h2s(key));
1186  key,
1187  &forward_reply,
1188  &frc);
1189 }
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:156
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:78
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:162
int GNUNET_CONTAINER_multihashmap_get_multiple(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, GNUNET_CONTAINER_MulitHashMapIteratorCallback 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:141
#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 1205 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().

1212 {
1213  struct ClientMonitorRecord *m;
1214  struct ClientHandle **cl;
1215  unsigned int cl_size;
1216 
1217  cl = NULL;
1218  cl_size = 0;
1219  for (m = monitor_head; NULL != m; m = m->next)
1220  {
1221  if (((GNUNET_BLOCK_TYPE_ANY == m->type) ||
1222  (m->type == type)) &&
1223  ((NULL == m->key) ||
1224  (0 == memcmp(key,
1225  m->key,
1226  sizeof(struct GNUNET_HashCode)))))
1227  {
1228  struct GNUNET_MQ_Envelope *env;
1229  struct GNUNET_DHT_MonitorGetMessage *mmsg;
1230  struct GNUNET_PeerIdentity *msg_path;
1231  size_t msize;
1232  unsigned int i;
1233 
1234  /* Don't send duplicates */
1235  for (i = 0; i < cl_size; i++)
1236  if (cl[i] == m->ch)
1237  break;
1238  if (i < cl_size)
1239  continue;
1241  cl_size,
1242  m->ch);
1243 
1244  msize = path_length * sizeof(struct GNUNET_PeerIdentity);
1245  env = GNUNET_MQ_msg_extra(mmsg,
1246  msize,
1248  mmsg->options = htonl(options);
1249  mmsg->type = htonl(type);
1250  mmsg->hop_count = htonl(hop_count);
1251  mmsg->desired_replication_level = htonl(desired_replication_level);
1252  mmsg->get_path_length = htonl(path_length);
1253  mmsg->key = *key;
1254  msg_path = (struct GNUNET_PeerIdentity *)&mmsg[1];
1255  GNUNET_memcpy(msg_path,
1256  path,
1257  path_length * sizeof(struct GNUNET_PeerIdentity));
1258  GNUNET_MQ_send(m->ch->mq,
1259  env);
1260  }
1261  }
1263 }
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:326
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
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
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.
struct GNUNET_HashCode key
The key to store the value under.
Definition: dht.h:352
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:347
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:341
#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:331
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Message to monitor get requests going through peer, DHT service -> clients.
Definition: dht.h:317
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:351
uint32_t hop_count
Hop count.
Definition: dht.h:336
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 1281 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().

1290 {
1291  struct ClientMonitorRecord *m;
1292  struct ClientHandle **cl;
1293  unsigned int cl_size;
1294 
1295  cl = NULL;
1296  cl_size = 0;
1297  for (m = monitor_head; NULL != m; m = m->next)
1298  {
1299  if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
1300  (NULL == m->key ||
1301  memcmp(key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
1302  {
1303  struct GNUNET_MQ_Envelope *env;
1304  struct GNUNET_DHT_MonitorGetRespMessage *mmsg;
1305  struct GNUNET_PeerIdentity *path;
1306  size_t msize;
1307  unsigned int i;
1308 
1309  /* Don't send duplicates */
1310  for (i = 0; i < cl_size; i++)
1311  if (cl[i] == m->ch)
1312  break;
1313  if (i < cl_size)
1314  continue;
1316  cl_size,
1317  m->ch);
1318 
1319  msize = size;
1320  msize += (get_path_length + put_path_length)
1321  * sizeof(struct GNUNET_PeerIdentity);
1322  env = GNUNET_MQ_msg_extra(mmsg,
1323  msize,
1325  mmsg->type = htonl(type);
1326  mmsg->put_path_length = htonl(put_path_length);
1327  mmsg->get_path_length = htonl(get_path_length);
1329  mmsg->key = *key;
1330  path = (struct GNUNET_PeerIdentity *)&mmsg[1];
1331  GNUNET_memcpy(path,
1332  put_path,
1333  put_path_length * sizeof(struct GNUNET_PeerIdentity));
1334  GNUNET_memcpy(path,
1335  get_path,
1336  get_path_length * sizeof(struct GNUNET_PeerIdentity));
1337  GNUNET_memcpy(&path[get_path_length],
1338  data,
1339  size);
1340  GNUNET_MQ_send(m->ch->mq,
1341  env);
1342  }
1343  }
1345 }
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:379
struct GNUNET_HashCode key
The key of the corresponding GET request.
Definition: dht.h:389
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
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:374
#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.
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:66
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:369
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:351
struct GNUNET_TIME_AbsoluteNBO expiration_time
When does the content expire?
Definition: dht.h:384
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:655
Message to monitor get results going through peer, DHT service -> clients.
Definition: dht.h:360
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 1364 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().

1374 {
1375  struct ClientMonitorRecord *m;
1376  struct ClientHandle **cl;
1377  unsigned int cl_size;
1378 
1379  cl = NULL;
1380  cl_size = 0;
1381  for (m = monitor_head; NULL != m; m = m->next)
1382  {
1383  if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
1384  (NULL == m->key ||
1385  memcmp(key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
1386  {
1387  struct GNUNET_MQ_Envelope *env;
1388  struct GNUNET_DHT_MonitorPutMessage *mmsg;
1389  struct GNUNET_PeerIdentity *msg_path;
1390  size_t msize;
1391  unsigned int i;
1392 
1393  /* Don't send duplicates */
1394  for (i = 0; i < cl_size; i++)
1395  if (cl[i] == m->ch)
1396  break;
1397  if (i < cl_size)
1398  continue;
1400  cl_size,
1401  m->ch);
1402 
1403  msize = size;
1404  msize += path_length * sizeof(struct GNUNET_PeerIdentity);
1405  env = GNUNET_MQ_msg_extra(mmsg,
1406  msize,
1408  mmsg->options = htonl(options);
1409  mmsg->type = htonl(type);
1410  mmsg->hop_count = htonl(hop_count);
1411  mmsg->desired_replication_level = htonl(desired_replication_level);
1412  mmsg->put_path_length = htonl(path_length);
1413  mmsg->key = *key;
1415  msg_path = (struct GNUNET_PeerIdentity *)&mmsg[1];
1416  GNUNET_memcpy(msg_path,
1417  path,
1418  path_length * sizeof(struct GNUNET_PeerIdentity));
1419  GNUNET_memcpy(&msg_path[path_length],
1420  data,
1421  size);
1422  GNUNET_MQ_send(m->ch->mq,
1423  env);
1424  }
1425  }
1427 }
struct ClientHandle * ch
Client to notify of these requests.
uint32_t hop_count
Hop count so far.
Definition: dht.h:243
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:248
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
struct ClientMonitorRecord * next
Next element in DLL.
uint32_t type
The type of data in the request.
Definition: dht.h:238
#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.
Message to monitor put requests going through peer, DHT service -> clients.
Definition: dht.h:224
struct GNUNET_TIME_AbsoluteNBO expiration_time
How long should this data persist?
Definition: dht.h:259
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:66
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:254
#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:351
uint32_t options
Message options, actually an &#39;enum GNUNET_DHT_RouteOption&#39; value.
Definition: dht.h:233
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:655
struct GNUNET_HashCode key
The key to store the value under.
Definition: dht.h:264
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 227 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 222 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().