GNUnet  0.10.x
fs_test_lib.c
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010, 2011, 2012 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 
29 #include "platform.h"
30 #include "fs_api.h"
31 #include "fs_test_lib.h"
32 
33 
34 #define CONTENT_LIFETIME GNUNET_TIME_UNIT_HOURS
35 
36 
45 
50 
55 
60 
65 
69  uint32_t publish_seed;
70 
75 
80 
85 
89  uint64_t size;
90 
94  uint32_t anonymity;
95 
99  unsigned int verbose;
100 
104  int do_index;
105 };
106 
107 
116 
121 
125  struct GNUNET_TESTING_Daemon *daemon;
126 
131 
136 
141 
146 
151 
155  uint64_t size;
156 
160  uint32_t anonymity;
161 
165  uint32_t download_seed;
166 
170  unsigned int verbose;
171 };
172 
173 
180 static void
181 report_uri(void *cls)
182 {
183  struct TestPublishOperation *po = cls;
184 
188  po->publish_uri,
189  (GNUNET_YES == po->do_index)
190  ? po->publish_tmp_file
191  : NULL);
193  if ((GNUNET_YES != po->do_index) &&
194  (NULL != po->publish_tmp_file))
197  GNUNET_free(po);
198 }
199 
200 
206 static void
207 publish_timeout(void *cls)
208 {
209  struct TestPublishOperation *po = cls;
210 
211  po->publish_timeout_task = NULL;
213  "Timeout while trying to publish data\n");
216  po->publish_cont(po->publish_cont_cls, NULL, NULL);
219  GNUNET_free(po);
220 }
221 
222 
229 static void *
230 publish_progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info)
231 {
232  struct TestPublishOperation *po = cls;
233 
234  switch (info->status)
235  {
238  po->publish_timeout_task = NULL;
239  po->publish_uri =
240  GNUNET_FS_uri_dup(info->value.publish.specifics.completed.chk_uri);
242  po);
243  break;
244 
246  if (po->verbose)
247  GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Publishing at %llu/%llu bytes\n",
248  (unsigned long long)info->value.publish.completed,
249  (unsigned long long)info->value.publish.size);
250  break;
251 
253  break;
254 
256  if (po->verbose)
257  GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Download at %llu/%llu bytes\n",
258  (unsigned long long)info->value.download.completed,
259  (unsigned long long)info->value.download.size);
260  break;
261 
262  default:
263  break;
264  }
265  return NULL;
266 }
267 
268 
279 static size_t
280 file_generator(void *cls,
281  uint64_t offset,
282  size_t max,
283  void *buf,
284  char **emsg)
285 {
286  uint32_t *publish_seed = cls;
287  uint64_t pos;
288  uint8_t *cbuf = buf;
289  int mod;
290 
291  if (emsg != NULL)
292  *emsg = NULL;
293  if (buf == NULL)
294  return 0;
295  for (pos = 0; pos < 8; pos++)
296  cbuf[pos] = (uint8_t)(offset >> pos * 8);
297  for (pos = 8; pos < max; pos++)
298  {
299  mod = (255 - (offset / 1024 / 32));
300  if (mod == 0)
301  mod = 1;
302  cbuf[pos] = (uint8_t)((offset * (*publish_seed)) % mod);
303  }
304  return max;
305 }
306 
307 
317 static void *
319  const struct GNUNET_CONFIGURATION_Handle *cfg)
320 {
321  struct TestPublishOperation *po = cls;
322 
323  return GNUNET_FS_start(cfg,
324  "fs-test-publish",
325  &publish_progress_cb, po,
328 }
329 
330 
337 static void
339  void *op_result)
340 {
341  struct GNUNET_FS_Handle *fs = op_result;
342 
343  GNUNET_FS_stop(fs);
344 }
345 
346 
356 static void
359  void *ca_result,
360  const char *emsg)
361 {
362  struct TestPublishOperation *po = cls;
363  struct GNUNET_FS_FileInformation *fi;
364  struct GNUNET_DISK_FileHandle *fh;
365  char *em;
366  uint64_t off;
367  char buf[DBLOCK_SIZE];
368  size_t bsize;
369  struct GNUNET_FS_BlockOptions bo;
370 
371  if (NULL == ca_result)
372  {
373  GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to FS for publishing: %s\n", emsg);
375  NULL, NULL);
377  GNUNET_free(po);
378  return;
379  }
380  po->fs = ca_result;
381 
383  bo.anonymity_level = po->anonymity;
384  bo.content_priority = 42;
385  bo.replication_level = 1;
386  if (GNUNET_YES == po->do_index)
387  {
388  po->publish_tmp_file = GNUNET_DISK_mktemp("fs-test-publish-index");
389  GNUNET_assert(po->publish_tmp_file != NULL);
395  GNUNET_assert(NULL != fh);
396  off = 0;
397  while (off < po->size)
398  {
399  bsize = GNUNET_MIN(sizeof(buf), po->size - off);
400  emsg = NULL;
401  GNUNET_assert(bsize == file_generator(&po->publish_seed, off, bsize, buf, &em));
402  GNUNET_assert(em == NULL);
403  GNUNET_assert(bsize == GNUNET_DISK_file_write(fh, buf, bsize));
404  off += bsize;
405  }
408  po->publish_tmp_file,
409  NULL, NULL, po->do_index,
410  &bo);
411  GNUNET_assert(NULL != fi);
412  }
413  else
414  {
416  po->size,
418  NULL, NULL,
419  po->do_index, &bo);
420  GNUNET_assert(NULL != fi);
421  }
422  po->publish_context =
423  GNUNET_FS_publish_start(po->fs, fi, NULL, NULL, NULL,
425 }
426 
427 
443 void
445  struct GNUNET_TIME_Relative timeout, uint32_t anonymity,
446  int do_index, uint64_t size, uint32_t seed,
447  unsigned int verbose,
448  GNUNET_FS_TEST_UriContinuation cont, void *cont_cls)
449 {
450  struct TestPublishOperation *po;
451 
452  po = GNUNET_new(struct TestPublishOperation);
453  po->publish_cont = cont;
454  po->publish_cont_cls = cont_cls;
455  po->publish_seed = seed;
456  po->anonymity = anonymity;
457  po->size = size;
458  po->verbose = verbose;
459  po->do_index = do_index;
461  peer,
462  "fs",
464  po,
467  po);
470 }
471 
472 
473 /* ************************** download ************************ */
474 
475 
481 static void
483 {
484  struct TestDownloadOperation *dop = cls;
485 
487  "Timeout while trying to download file\n");
488  dop->download_timeout_task = NULL;
490  GNUNET_YES);
492  dop->download_cont_cls);
495  GNUNET_free(dop);
496 }
497 
498 
504 static void
505 report_success(void *cls)
506 {
507  struct TestDownloadOperation *dop = cls;
508 
510  GNUNET_YES);
512  dop->download_cont_cls);
515  GNUNET_free(dop);
516 }
517 
518 
525 static void *
527  const struct GNUNET_FS_ProgressInfo *info)
528 {
529  struct TestDownloadOperation *dop = cls;
530 
531  switch (info->status)
532  {
534  if (dop->verbose)
536  "Download at %llu/%llu bytes\n",
537  (unsigned long long)info->value.download.completed,
538  (unsigned long long)info->value.download.size);
539  break;
540 
543  dop->download_timeout_task = NULL;
545  break;
546 
549  break;
550 
551  /* FIXME: monitor data correctness during download progress */
552  /* FIXME: do performance reports given sufficient verbosity */
553  /* FIXME: advance timeout task to "immediate" on error */
554  default:
555  break;
556  }
557  return NULL;
558 }
559 
560 
570 static void *
572  const struct GNUNET_CONFIGURATION_Handle *cfg)
573 {
574  struct TestPublishOperation *po = cls;
575 
576  return GNUNET_FS_start(cfg,
577  "fs-test-download",
581 }
582 
583 
593 static void
596  void *ca_result,
597  const char *emsg)
598 {
599  struct TestDownloadOperation *dop = cls;
600 
601  dop->fs = ca_result;
602  GNUNET_assert(NULL != dop->fs);
603  dop->download_context =
604  GNUNET_FS_download_start(dop->fs, dop->uri, NULL, NULL, NULL, 0, dop->size,
606  NULL, NULL);
607 }
608 
609 
623 void
626  uint32_t anonymity, uint32_t seed,
627  const struct GNUNET_FS_Uri *uri, unsigned int verbose,
628  GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
629 {
630  struct TestDownloadOperation *dop;
631 
632  dop = GNUNET_new(struct TestDownloadOperation);
633  dop->uri = GNUNET_FS_uri_dup(uri);
635  dop->verbose = verbose;
636  dop->anonymity = anonymity;
637  dop->download_cont = cont;
638  dop->download_cont_cls = cont_cls;
639  dop->download_seed = seed;
640 
642  peer,
643  "fs",
645  dop,
648  dop);
649  dop->download_timeout_task =
651 }
652 
653 
654 /* end of fs_test_lib.c */
struct GNUNET_TIME_Absolute expiration_time
At what time should the block expire? Data blocks (DBLOCKS and IBLOCKS) may still be used even if the...
struct GNUNET_FS_Handle * fs
Handle to the file sharing context using this daemon.
Definition: fs_test_lib.c:49
struct GNUNET_TESTING_Daemon * daemon
Handle to the daemon via testing.
Definition: fs_test_lib.c:125
static void report_uri(void *cls)
Task scheduled to report on the completion of our publish operation.
Definition: fs_test_lib.c:181
char * publish_tmp_file
Name of the temporary file used, or NULL for none.
Definition: fs_test_lib.c:84
static void * publish_connect_adapter(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect adapter for publishing operation.
Definition: fs_test_lib.c:318
int do_index
Are we testing indexing? (YES: index, NO: insert, SYSERR: simulate)
Definition: fs_test_lib.c:104
Create file if it doesn&#39;t exist.
void * publish_cont_cls
Closure for publish_cont.
Definition: fs_test_lib.c:59
uint32_t publish_seed
Seed for file generation.
Definition: fs_test_lib.c:69
void GNUNET_FS_publish_stop(struct GNUNET_FS_PublishContext *pc)
Stop an upload.
Definition: fs_publish.c:1555
Context for controlling a download.
Definition: fs_api.h:1722
int GNUNET_DISK_file_close(struct GNUNET_DISK_FileHandle *h)
Close an open file.
Definition: disk.c:1339
void(* GNUNET_FS_TEST_UriContinuation)(void *cls, const struct GNUNET_FS_Uri *uri, const char *fn)
Function signature.
Definition: fs_test_lib.h:46
void GNUNET_FS_TEST_download(struct GNUNET_TESTBED_Peer *peer, struct GNUNET_TIME_Relative timeout, uint32_t anonymity, uint32_t seed, const struct GNUNET_FS_Uri *uri, unsigned int verbose, GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
Perform test download.
Definition: fs_test_lib.c:624
Notification that we are making progress sharing a file structure.
struct GNUNET_FS_PublishContext * GNUNET_FS_publish_start(struct GNUNET_FS_Handle *h, struct GNUNET_FS_FileInformation *fi, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const char *nid, const char *nuid, enum GNUNET_FS_PublishOptions options)
Publish a file or directory.
Definition: fs_publish.c:1428
Master context for most FS operations.
Definition: fs_api.h:1056
uint64_t size
Size of the file.
Definition: fs_test_lib.c:155
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:246
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static int op_result(struct GNUNET_OP_Handle *h, uint64_t op_id, int64_t result_code, const void *data, uint16_t data_size, void **ctx, uint8_t cancel)
Remove an operation, and call its result callback (unless it was cancelled).
Definition: op.c:243
struct GNUNET_FS_ProgressInfo::@28::@30 download
Values for all "GNUNET_FS_STATUS_DOWNLOAD_*" events.
Last option in the VARARG list.
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_from_file(struct GNUNET_FS_Handle *h, void *client_info, const char *filename, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_CONTAINER_MetaData *meta, int do_index, const struct GNUNET_FS_BlockOptions *bo)
Create an entry for a file in a publish-structure.
uint32_t anonymity
Anonymity level used.
Definition: fs_test_lib.c:160
GNUNET_SCHEDULER_TaskCallback download_cont
Function to call when download is done.
Definition: fs_test_lib.c:130
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
struct GNUNET_FS_PublishContext * publish_context
Context for current publishing operation.
Definition: fs_test_lib.c:74
#define GNUNET_free_non_null(ptr)
Free the memory pointed to by ptr if ptr is not NULL.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
Information for a file or directory that is about to be published.
Definition: fs_api.h:219
void GNUNET_FS_stop(struct GNUNET_FS_Handle *h)
Close our connection with the file-sharing service.
Definition: fs_api.c:3215
struct GNUNET_FS_Uri * uri
URI to download.
Definition: fs_test_lib.c:140
GNUNET_FS_TEST_UriContinuation publish_cont
Function to call when upload is done.
Definition: fs_test_lib.c:54
struct GNUNET_FS_DownloadContext * GNUNET_FS_download_start(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri, const struct GNUNET_CONTAINER_MetaData *meta, const char *filename, const char *tempname, uint64_t offset, uint64_t length, uint32_t anonymity, enum GNUNET_FS_DownloadOptions options, void *cctx, struct GNUNET_FS_DownloadContext *parent)
Download parts of a file.
Definition: fs_download.c:2145
struct GNUNET_FS_Uri * GNUNET_FS_uri_dup(const struct GNUNET_FS_Uri *uri)
Duplicate URI.
Definition: fs_uri.c:995
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
Opaque handle to an abstract operation to be executed by the testing framework.
struct GNUNET_FS_Handle * GNUNET_FS_start(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *client_name, GNUNET_FS_ProgressCallback upcb, void *upcb_cls, enum GNUNET_FS_Flags flags,...)
Setup a connection to the file-sharing service.
Definition: fs_api.c:3140
No special flags set.
static void publish_timeout(void *cls)
Task scheduled to run when publish operation times out.
Definition: fs_test_lib.c:207
struct GNUNET_FS_Uri * publish_uri
Result URI.
Definition: fs_test_lib.c:79
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
uint32_t anonymity_level
At which anonymity level should the block be shared? (0: no anonymity, 1: normal GAP, >1: with cover traffic).
struct GNUNET_TESTBED_Operation * fs_op
Handle for the operation to connect to the peer&#39;s &#39;fs&#39; service.
Definition: fs_test_lib.c:44
struct GNUNET_TESTBED_Operation * GNUNET_TESTBED_service_connect(void *op_cls, struct GNUNET_TESTBED_Peer *peer, const char *service_name, GNUNET_TESTBED_ServiceConnectCompletionCallback cb, void *cb_cls, GNUNET_TESTBED_ConnectAdapter ca, GNUNET_TESTBED_DisconnectAdapter da, void *cada_cls)
Connect to a service offered by the given peer.
Notification that this download completed.
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:1237
union GNUNET_FS_ProgressInfo::@28 value
Values that depend on the event type.
char * GNUNET_DISK_mktemp(const char *t)
Create an (empty) temporary file on disk.
Definition: disk.c:465
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
Definition: gnunet-arm.c:114
Notification that we are making progress sharing a directory.
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
Definition: disk.c:817
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1264
int GNUNET_DISK_directory_remove(const char *filename)
Remove all files in a directory (rm -rf).
Definition: disk.c:1026
enum GNUNET_FS_Status status
Specific status code (determines the event type).
#define GNUNET_MIN(a, b)
Definition: gnunet_common.h:80
void GNUNET_FS_TEST_publish(struct GNUNET_TESTBED_Peer *peer, struct GNUNET_TIME_Relative timeout, uint32_t anonymity, int do_index, uint64_t size, uint32_t seed, unsigned int verbose, GNUNET_FS_TEST_UriContinuation cont, void *cont_cls)
Publish a file at the given peer.
Definition: fs_test_lib.c:444
void GNUNET_FS_download_stop(struct GNUNET_FS_DownloadContext *dc, int do_delete)
Stop a download (aborts if download is incomplete).
Definition: fs_download.c:2332
struct GNUNET_FS_ProgressInfo::@28::@29 publish
Values for all "GNUNET_FS_STATUS_PUBLISH_*" events.
static char buf[2048]
No options (use defaults for everything).
uint32_t anonymity
Anonymity level used.
Definition: fs_test_lib.c:94
static int fh
Handle to the unique file.
void GNUNET_TESTBED_operation_done(struct GNUNET_TESTBED_Operation *operation)
This function is used to signal that the event information (struct GNUNET_TESTBED_EventInformation) f...
Definition: testbed_api.c:2037
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
Definition: fs_uri.c:675
Handle for controlling a publication process.
Definition: fs_api.h:1165
static unsigned int bsize
Handle for a publishing operation started for testing FS.
Definition: fs_test_lib.c:40
unsigned int verbose
Verbosity level of the current operation.
Definition: fs_test_lib.c:99
unsigned int verbose
Verbosity level of the current operation.
Definition: fs_test_lib.c:170
#define DBLOCK_SIZE
Size of the individual blocks used for file-sharing.
Definition: fs.h:40
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
Notification that this download is no longer actively being pursued (back in the queue).
uint32_t download_seed
Seed for download verification.
Definition: fs_test_lib.c:165
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
Notification about progress with this download.
static void publish_fs_connect_complete_cb(void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg)
Callback to be called when testbed has connected to the fs service.
Definition: fs_test_lib.c:357
Open the file for writing.
Notification that this download is now actively being pursued (as opposed to waiting in the queue)...
Settings for publishing a block (which may of course also apply to an entire directory or file)...
Notification that we completed sharing a file structure.
struct GNUNET_TESTBED_Operation * fs_op
Handle for the operation to connect to the peer&#39;s &#39;fs&#39; service.
Definition: fs_test_lib.c:115
static void * download_connect_adapter(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect adapter for download operation.
Definition: fs_test_lib.c:571
static void * publish_progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info)
Progress callback for file-sharing events while publishing.
Definition: fs_test_lib.c:230
uint32_t replication_level
How often should we try to migrate the block to other peers? Only used if "CONTENT_PUSHING" is set to...
static void fs_disconnect_adapter(void *cls, void *op_result)
Adapter function called to destroy connection to file-sharing service.
Definition: fs_test_lib.c:338
struct GNUNET_SCHEDULER_Task * publish_timeout_task
Task to abort publishing (timeout).
Definition: fs_test_lib.c:64
uint64_t size
Size of the file.
Definition: fs_test_lib.c:89
uint64_t GNUNET_FS_uri_chk_get_file_size(const struct GNUNET_FS_Uri *uri)
What is the size of the file that this URI refers to?
Definition: fs_uri.c:1368
configuration data
Definition: configuration.c:83
shared definitions for the FS library
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:162
#define GNUNET_log(kind,...)
Entry in list of pending tasks.
Definition: scheduler.c:131
uint32_t content_priority
How important is it for us to store the block? If we run out of space, the highest-priority, non-expired blocks will be kept.
struct GNUNET_FS_Handle * fs
Handle to the file sharing context using this daemon.
Definition: fs_test_lib.c:120
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_from_reader(struct GNUNET_FS_Handle *h, void *client_info, uint64_t length, GNUNET_FS_DataReader reader, void *reader_cls, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_CONTAINER_MetaData *meta, int do_index, const struct GNUNET_FS_BlockOptions *bo)
Create an entry for a file in a publish-structure.
void * download_cont_cls
Closure for download_cont.
Definition: fs_test_lib.c:135
#define GNUNET_YES
Definition: gnunet_common.h:77
struct GNUNET_SCHEDULER_Task * download_timeout_task
Task to abort downloading (timeout).
Definition: fs_test_lib.c:145
Handle for a download operation started for testing FS.
Definition: fs_test_lib.c:111
#define CONTENT_LIFETIME
Definition: fs_test_lib.c:34
static void download_timeout(void *cls)
Task scheduled to run when download operation times out.
Definition: fs_test_lib.c:482
struct GNUNET_FS_DownloadContext * download_context
Context for current download operation.
Definition: fs_test_lib.c:150
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:139
static size_t file_generator(void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
Generate test data for publishing test.
Definition: fs_test_lib.c:280
static void download_fs_connect_complete_cb(void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg)
Callback to be called when testbed has connected to the fs service.
Definition: fs_test_lib.c:594
A peer controlled by the testing framework.
No options (use defaults for everything).
struct GNUNET_DISK_FileHandle * GNUNET_DISK_file_open(const char *fn, enum GNUNET_DISK_OpenFlags flags, enum GNUNET_DISK_AccessPermissions perm)
Open a file.
Definition: disk.c:1262
static void * download_progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info)
Progress callback for file-sharing events while downloading.
Definition: fs_test_lib.c:526
Handle used to access files (and pipes).
library routines for testing FS publishing and downloading; this code is limited to flat files and no...
static void report_success(void *cls)
Task scheduled to report on the completion of our download operation.
Definition: fs_test_lib.c:505
#define GNUNET_free(ptr)
Wrapper around free.
Argument given to the progress callback with information about what is going on.
Time for relative time used by GNUnet, in microseconds.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:956