GNUnet  0.19.5
gnsrecord_misc.c
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009-2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
28 #include "gnunet_common.h"
29 #include "platform.h"
30 #include "gnunet_util_lib.h"
31 #include "gnunet_constants.h"
32 #include "gnunet_signatures.h"
33 #include "gnunet_arm_service.h"
34 #include "gnunet_gnsrecord_lib.h"
35 
36 
37 #define LOG(kind, ...) GNUNET_log_from (kind, "gnsrecord", __VA_ARGS__)
38 
39 char *
41 {
42  /*FIXME: We may want to follow RFC5890/RFC5891 */
43  return GNUNET_STRINGS_utf8_normalize (src);
44 }
45 
46 
48 GNUNET_GNSRECORD_label_check (const char*label, char **emsg)
49 {
50  if (NULL == label)
51  {
52  *emsg = GNUNET_strdup (_ ("Label is NULL which is not allowed\n"));
53  return GNUNET_NO;
54  }
55  if (0 != strchr (label, '.'))
56  {
57  *emsg = GNUNET_strdup (_ ("Label contains `.' which is not allowed\n"));
58  return GNUNET_NO;
59  }
60  return GNUNET_OK;
61 }
62 
63 
64 const char *
66 {
67  static char buf[sizeof(struct GNUNET_IDENTITY_PublicKey) * 8];
68  char *end;
69 
70  end = GNUNET_STRINGS_data_to_string ((const unsigned char *) z,
71  sizeof(struct
73  buf, sizeof(buf));
74  if (NULL == end)
75  {
76  GNUNET_break (0);
77  return NULL;
78  }
79  *end = '\0';
80  return buf;
81 }
82 
83 
95  const struct GNUNET_GNSRECORD_Data *b)
96 {
98  "Comparing records\n");
99  if (a->record_type != b->record_type)
100  {
102  "Record type %u != %u\n", a->record_type, b->record_type);
103  return GNUNET_NO;
104  }
105  if ((a->expiration_time != b->expiration_time) &&
106  ((a->expiration_time != 0) && (b->expiration_time != 0)))
107  {
109  "Expiration time %llu != %llu\n",
110  (unsigned long long) a->expiration_time,
111  (unsigned long long) b->expiration_time);
112  return GNUNET_NO;
113  }
116  {
118  "Flags %u (%u) != %u (%u)\n", a->flags,
121  return GNUNET_NO;
122  }
123  if (a->data_size != b->data_size)
124  {
126  "Data size %lu != %lu\n",
127  a->data_size,
128  b->data_size);
129  return GNUNET_NO;
130  }
131  if (0 != memcmp (a->data, b->data, a->data_size))
132  {
134  "Data contents do not match\n");
135  return GNUNET_NO;
136  }
138  "Records are equal\n");
139  return GNUNET_YES;
140 }
141 
142 
145  const struct
147  struct GNUNET_TIME_Absolute min)
148 {
150  struct GNUNET_TIME_Absolute at;
151  struct GNUNET_TIME_Relative rt;
152  struct GNUNET_TIME_Absolute at_shadow;
153  struct GNUNET_TIME_Relative rt_shadow;
154 
155  if (0 == rd_count)
158  for (unsigned int c = 0; c < rd_count; c++)
159  {
160  if (0 != (rd[c].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
161  {
162  rt.rel_value_us = rd[c].expiration_time;
164  }
165  else
166  {
167  at.abs_value_us = rd[c].expiration_time;
168  }
169 
170  for (unsigned int c2 = 0; c2 < rd_count; c2++)
171  {
172  /* Check for shadow record */
173  if ((c == c2) ||
174  (rd[c].record_type != rd[c2].record_type) ||
175  (0 == (rd[c2].flags & GNUNET_GNSRECORD_RF_SHADOW)))
176  continue;
177  /* We have a shadow record */
178  if (0 != (rd[c2].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
179  {
180  rt_shadow.rel_value_us = rd[c2].expiration_time;
181  at_shadow = GNUNET_TIME_relative_to_absolute (rt_shadow);
182  }
183  else
184  {
185  at_shadow.abs_value_us = rd[c2].expiration_time;
186  }
187  at = GNUNET_TIME_absolute_max (at,
188  at_shadow);
189  }
191  expire);
192  }
195  "Determined expiration time for block with %u records to be %s\n",
196  rd_count,
198  return expire;
199 }
200 
201 
208 int
210 {
211  struct GNUNET_TIME_Absolute at;
212 
214  return GNUNET_NO;
216  return (0 == GNUNET_TIME_absolute_get_remaining (at).rel_value_us) ?
218 }
219 
220 
231 const char *
233 {
234  static char ret[128];
235  char *pkeys;
236 
239  sizeof(ret),
240  "%s",
241  pkeys);
242  GNUNET_free (pkeys);
243  return ret;
244 }
245 
246 
256 int
259 {
260  if (GNUNET_OK !=
262  pkey))
263  return GNUNET_SYSERR;
264  return GNUNET_OK;
265 }
266 
267 
270  size_t data_size,
271  uint32_t type,
273 {
275  return GNUNET_SYSERR;
276  switch (type)
277  {
279  if (data_size > sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey))
280  return GNUNET_SYSERR;
281  memcpy (&key->ecdsa_key, data, data_size);
282  break;
284  if (data_size > sizeof (struct GNUNET_CRYPTO_EddsaPublicKey))
285  return GNUNET_SYSERR;
286  memcpy (&key->eddsa_key, data, data_size);
287  break;
288  default:
289  return GNUNET_NO;
290  }
291  key->type = htonl (type);
292 
293  return GNUNET_YES;
294 }
295 
296 
300  char **data,
301  size_t *data_size,
302  uint32_t *type)
303 {
304  char *tmp;
305  *type = ntohl (key->type);
307  if (0 == *data_size)
308  return GNUNET_SYSERR;
309  tmp = GNUNET_malloc (*data_size);
310  memcpy (tmp, ((char*) key) + sizeof (key->type), *data_size);
311  *data = tmp;
312  return GNUNET_OK;
313 }
314 
315 
318 {
319  switch (type)
320  {
323  return GNUNET_YES;
324  default:
325  return GNUNET_NO;
326  }
327 }
328 
329 
330 size_t
332 {
333  return ntohl (block->size);
334 }
335 
336 
339  GNUNET_GNSRECORD_Block *block)
340 {
341 
342  switch (ntohl (block->type))
343  {
345  return GNUNET_TIME_absolute_ntoh (block->ecdsa_block.expiration_time);
347  return GNUNET_TIME_absolute_ntoh (block->eddsa_block.expiration_time);
348  default:
349  GNUNET_break (0); /* Hopefully we never get here, but we might */
350  }
352 
353 }
354 
355 
358  struct GNUNET_HashCode *query)
359 {
360  switch (ntohl (block->type))
361  {
364  sizeof (block->ecdsa_block.derived_key),
365  query);
366  return GNUNET_OK;
369  sizeof (block->eddsa_block.derived_key),
370  query);
371  return GNUNET_OK;
372  default:
373  return GNUNET_SYSERR;
374  }
375  return GNUNET_SYSERR;
376 
377 }
378 
379 
383 {
385  "Got record of type %u\n",
386  rd->record_type);
387  switch (rd->record_type)
388  {
390  key->type = htonl (rd->record_type);
391  memcpy (&key->ecdsa_key, rd->data, sizeof (key->ecdsa_key));
392  return GNUNET_OK;
394  key->type = htonl (rd->record_type);
395  memcpy (&key->eddsa_key, rd->data, sizeof (key->eddsa_key));
396  return GNUNET_OK;
397  default:
398  return GNUNET_SYSERR;
399  }
400  return GNUNET_SYSERR;
401 
402 
403 }
404 
405 
407 GNUNET_GNSRECORD_normalize_record_set (const char *label,
408  const struct
410  unsigned int rd_count,
411  struct GNUNET_GNSRECORD_Data *
412  rd_public,
413  unsigned int *rd_count_public,
414  struct GNUNET_TIME_Absolute *expiry,
416  char **emsg)
417 {
418  struct GNUNET_TIME_Absolute now;
419  struct GNUNET_TIME_Absolute minimum_expiration;
420  int have_zone_delegation = GNUNET_NO;
421  int have_gns2dns = GNUNET_NO;
422  int have_other = GNUNET_NO;
423  int have_redirect = GNUNET_NO;
424  int have_empty_label = (0 == strcmp (GNUNET_GNS_EMPTY_LABEL_AT, label));
425  unsigned int rd_count_tmp;
426 
427  minimum_expiration = GNUNET_TIME_UNIT_ZERO_ABS;
428  now = GNUNET_TIME_absolute_get ();
429  rd_count_tmp = 0;
430  for (unsigned int i = 0; i < rd_count; i++)
431  {
432  /* Ignore private records for public record set */
434  (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE)))
435  {
437  "Filtering private record filter=%u...\n", filter);
438  continue;
439  }
440  /* Skip expired records */
441  if ((0 == (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) &&
442  (rd[i].expiration_time < now.abs_value_us))
443  {
445  "Filtering expired record...\n");
446  continue; /* record already expired, skip it */
447  }
448  /* Ignore the tombstone unless filter permits explicitly.
449  * Remember expiration time. */
450  if (GNUNET_GNSRECORD_TYPE_TOMBSTONE == rd[i].record_type)
451  {
452  minimum_expiration.abs_value_us = rd[i].expiration_time;
454  {
455  rd_public[rd_count_tmp] = rd[i];
456  rd_count_tmp++;
457  }
458  continue;
459  }
460  /* No NICK records unless empty label */
461  if (have_empty_label &&
462  (GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type))
463  continue;
464 
474  if (GNUNET_YES == GNUNET_GNSRECORD_is_zonekey_type (rd[i].record_type))
475  {
476  /* No delegation records under empty label*/
477  if (have_empty_label)
478  {
479  *emsg = GNUNET_strdup (_ (
480  "Zone delegation record not allowed in apex."));
481  return GNUNET_SYSERR;
482  }
483  if ((GNUNET_YES == have_other) ||
484  (GNUNET_YES == have_redirect) ||
485  (GNUNET_YES == have_gns2dns))
486  {
487  *emsg = GNUNET_strdup (_ (
488  "Zone delegation record set contains mutually exclusive records."));
489  return GNUNET_SYSERR;
490  }
491  have_zone_delegation = GNUNET_YES;
492  }
493  else if (GNUNET_GNSRECORD_TYPE_REDIRECT == rd[i].record_type)
494  {
495  if (GNUNET_YES == have_redirect)
496  {
497  *emsg = GNUNET_strdup (_ (
498  "Multiple REDIRECT records."));
499  return GNUNET_SYSERR;
500 
501  }
502  if ((GNUNET_YES == have_other) ||
503  (GNUNET_YES == have_zone_delegation) ||
504  (GNUNET_YES == have_gns2dns))
505  {
506  *emsg = GNUNET_strdup (_ (
507  "Redirection record set contains mutually exclusive records."));
508  return GNUNET_SYSERR;
509  }
510  /* No redirection records under empty label*/
511  if (have_empty_label)
512  {
513  *emsg = GNUNET_strdup (_ (
514  "Redirection records not allowed in apex."));
515  return GNUNET_SYSERR;
516  }
517  have_redirect = GNUNET_YES;
518  }
519  else if (GNUNET_GNSRECORD_TYPE_GNS2DNS == rd[i].record_type)
520  {
521  /* No gns2dns records under empty label*/
522  if (have_empty_label)
523  {
524  *emsg = GNUNET_strdup (_ (
525  "Redirection records not allowed in apex.."));
526  return GNUNET_SYSERR;
527  }
528  if ((GNUNET_YES == have_other) ||
529  (GNUNET_YES == have_redirect) ||
530  (GNUNET_YES == have_zone_delegation))
531  {
532  *emsg = GNUNET_strdup (_ (
533  "Redirection record set contains mutually exclusive records."));
534  return GNUNET_SYSERR;
535  }
536  have_gns2dns = GNUNET_YES;
537  }
538  else
539  {
540  /* Some other record.
541  * Not allowed for zone delegations or redirections */
542  if ((GNUNET_YES == have_zone_delegation) ||
543  (GNUNET_YES == have_redirect) ||
544  (GNUNET_YES == have_gns2dns))
545  {
546  *emsg = GNUNET_strdup (_ (
547  "Mutually exclusive records."));
548  return GNUNET_SYSERR;
549  }
550  have_other = GNUNET_YES;
551  }
552 
553  rd_public[rd_count_tmp] = rd[i];
554  /* Make sure critical record types are marked as such */
555  if (GNUNET_YES == GNUNET_GNSRECORD_is_critical (rd[i].record_type))
556  rd_public[rd_count_tmp].flags |= GNUNET_GNSRECORD_RF_CRITICAL;
557  rd_count_tmp++;
558  }
559 
560  *expiry = GNUNET_GNSRECORD_record_get_expiration_time (rd_count_tmp,
561  rd_public,
562  minimum_expiration);
563  *rd_count_public = rd_count_tmp;
564  return GNUNET_OK;
565 }
566 
567 
568 /* end of gnsrecord_misc.c */
#define GNUNET_GNSRECORD_TYPE_NICK
GNS zone nickname.
#define GNUNET_GNSRECORD_TYPE_TOMBSTONE
Record type to indicate a previously delete record (PRIVATE only)
#define GNUNET_GNSRECORD_TYPE_GNS2DNS
Delegation to DNS.
#define GNUNET_GNSRECORD_TYPE_REDIRECT
Redirection record.
#define GNUNET_GNSRECORD_TYPE_PKEY
WARNING: This header is generated! In order to add GNS record types, you must register them in GANA,...
#define GNUNET_GNSRECORD_TYPE_EDKEY
GNS zone delegation (EDKEY)
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_record_to_identity_key(const struct GNUNET_GNSRECORD_Data *rd, struct GNUNET_IDENTITY_PublicKey *key)
#define LOG(kind,...)
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
static size_t data_size
Number of bytes in data.
Definition: gnunet-abd.c:187
static int end
Set if we are to shutdown all services (including ARM).
Definition: gnunet-arm.c:34
struct GNUNET_HashCode key
The key used in the DHT.
static char * expire
DID Document expiration Date Attribut String.
Definition: gnunet-did.c:101
uint32_t data
The data value.
static char * pkey
Public key of the zone to look in, in ASCII.
static unsigned int rd_count
Number of records for currently parsed set.
static struct GNUNET_GNSRECORD_Data rd[50]
The record data under a single label.
static struct GNUNET_CONTAINER_BloomFilter * filter
Bloomfilter to quickly tell if we don't have the content.
static char buf[2048]
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
API that can be used to manipulate GNS record data.
char * GNUNET_GNSRECORD_string_normalize(const char *src)
Normalize a UTF-8 string to a GNS name.
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_label_check(const char *label, char **emsg)
Check label for invalid characters.
#define GNUNET_GNSRECORD_RF_RCMP_FLAGS
Include the record types generated from GANA.
@ GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION
This expiration time of the record is a relative time (not an absolute time).
@ GNUNET_GNSRECORD_RF_CRITICAL
This record is critical.
@ GNUNET_GNSRECORD_RF_SHADOW
This record should not be used unless all (other) records in the set with an absolute expiration time...
@ GNUNET_GNSRECORD_RF_PRIVATE
This is a private record of this peer and it should thus not be published.
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_identity_from_data(const char *data, size_t data_size, uint32_t type, struct GNUNET_IDENTITY_PublicKey *key)
Build a #GNUNET_GNSRECORD_PublicKey from zone delegation resource record data.
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_data_from_identity(const struct GNUNET_IDENTITY_PublicKey *key, char **data, size_t *data_size, uint32_t *type)
Create record data and size from an identity key.
struct GNUNET_TIME_Absolute GNUNET_GNSRECORD_record_get_expiration_time(unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd, struct GNUNET_TIME_Absolute min)
Returns the expiration time of the given block of records.
size_t GNUNET_GNSRECORD_block_get_size(const struct GNUNET_GNSRECORD_Block *block)
Returns the length of this block in bytes.
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_records_cmp(const struct GNUNET_GNSRECORD_Data *a, const struct GNUNET_GNSRECORD_Data *b)
Compares if two records are equal (ignoring flags such as authority, private and pending,...
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_query_from_block(const struct GNUNET_GNSRECORD_Block *block, struct GNUNET_HashCode *query)
Builds the query hash from a block.
int GNUNET_GNSRECORD_is_expired(const struct GNUNET_GNSRECORD_Data *rd)
Test if a given record is expired.
#define GNUNET_GNS_EMPTY_LABEL_AT
String we use to indicate an empty label (top-level entry in the zone).
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_is_critical(uint32_t type)
Check if this type is a critical record.
Definition: gnsrecord.c:247
int GNUNET_GNSRECORD_zkey_to_pkey(const char *zkey, struct GNUNET_IDENTITY_PublicKey *pkey)
Convert an absolute domain name to the respective public key.
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_is_zonekey_type(uint32_t type)
Check if this type is one of the supported GNS zone types.
const char * GNUNET_GNSRECORD_z2s(const struct GNUNET_IDENTITY_PublicKey *z)
Convert a zone to a string (for printing debug messages).
GNUNET_GNSRECORD_Filter
Filter for GNUNET_GNSRECORD_normalize_record_set().
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_normalize_record_set(const char *label, const struct GNUNET_GNSRECORD_Data *rd, unsigned int rd_count, struct GNUNET_GNSRECORD_Data *rd_public, unsigned int *rd_count_public, struct GNUNET_TIME_Absolute *expiry, enum GNUNET_GNSRECORD_Filter filter, char **emsg)
Normalize namestore records: Check for consistency and expirations.
struct GNUNET_TIME_Absolute GNUNET_GNSRECORD_block_get_expiration(const struct GNUNET_GNSRECORD_Block *block)
Returns the expiration of a block.
const char * GNUNET_GNSRECORD_pkey_to_zkey(const struct GNUNET_IDENTITY_PublicKey *pkey)
Convert public key to the respective absolute domain name in the ".zkey" pTLD.
@ GNUNET_GNSRECORD_FILTER_INCLUDE_MAINTENANCE
Include maintenance records (TOMBSTONE etc).
@ GNUNET_GNSRECORD_FILTER_OMIT_PRIVATE
Filter private records.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
Definition: crypto_hash.c:41
enum GNUNET_GenericReturnValue GNUNET_IDENTITY_public_key_from_string(const char *str, struct GNUNET_IDENTITY_PublicKey *key)
Parses a (Base32) string representation of the public key.
ssize_t GNUNET_IDENTITY_public_key_get_length(const struct GNUNET_IDENTITY_PublicKey *key)
Get the compacted length of a GNUNET_IDENTITY_PublicKey.
Definition: identity_api.c:830
char * GNUNET_IDENTITY_public_key_to_string(const struct GNUNET_IDENTITY_PublicKey *key)
Creates a (Base32) string representation of the public key.
#define GNUNET_log(kind,...)
GNUNET_GenericReturnValue
Named constants for return values.
@ GNUNET_OK
@ GNUNET_YES
@ GNUNET_NO
@ GNUNET_SYSERR
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
int GNUNET_snprintf(char *buf, size_t size, const char *format,...) __attribute__((format(printf
Like snprintf, just aborts if the buffer is of insufficient size.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
char * GNUNET_STRINGS_data_to_string(const void *data, size_t size, char *out, size_t out_size)
Convert binary data to ASCII encoding using CrockfordBase32.
Definition: strings.c:708
char * GNUNET_STRINGS_utf8_normalize(const char *input)
Normalize the utf-8 input string to NFC.
Definition: strings.c:429
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_zero_(void)
Return absolute time of 0ms.
Definition: time.c:142
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:405
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max(struct GNUNET_TIME_Absolute t1, struct GNUNET_TIME_Absolute t2)
Return the maximum of two absolute time values.
Definition: time.c:367
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:111
const char * GNUNET_STRINGS_absolute_time_to_string(struct GNUNET_TIME_Absolute t)
Like asctime, except for GNUnet time.
Definition: strings.c:616
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_ntoh(struct GNUNET_TIME_AbsoluteNBO a)
Convert absolute time from network byte order.
Definition: time.c:737
struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute(struct GNUNET_TIME_Relative rel)
Convert relative time to an absolute time in the future.
Definition: time.c:316
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min(struct GNUNET_TIME_Absolute t1, struct GNUNET_TIME_Absolute t2)
Return the minimum of two absolute time values.
Definition: time.c:359
#define GNUNET_TIME_UNIT_ZERO_ABS
Absolute time zero.
#define GNUNET_TIME_UNIT_FOREVER_ABS
Constant used to specify "forever".
#define min(x, y)
#define _(String)
GNU gettext support macro.
Definition: platform.h:178
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
Public ECC key (always for curve Ed25519) encoded in a format suitable for network transmission and E...
uint32_t type
The zone type (GNUNET_GNSRECORD_TYPE_PKEY)
struct GNUNET_GNSRECORD_EcdsaBlock ecdsa_block
struct GNUNET_GNSRECORD_EddsaBlock eddsa_block
uint32_t size
Size of the block.
uint32_t record_type
Type of the GNS/DNS record.
const void * data
Binary value stored in the DNS record.
size_t data_size
Number of bytes in data.
enum GNUNET_GNSRECORD_Flags flags
Flags for the record.
uint64_t expiration_time
Expiration time for the DNS record.
struct GNUNET_CRYPTO_EcdsaPublicKey derived_key
Derived key used for signing; hash of this is the query.
struct GNUNET_CRYPTO_EddsaPublicKey derived_key
Derived key used for signing; hash of this is the query.
A 512-bit hashcode.
An identity key as per LSD0001.
Time for absolute times used by GNUnet, in microseconds.
uint64_t abs_value_us
The actual value.
Time for relative time used by GNUnet, in microseconds.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model