-sync for bart
[oweals/gnunet.git] / src / fs / gnunet-service-fs_mesh_client.c
1 /*
2      This file is part of GNUnet.
3      (C) 2012, 2013 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      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      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file fs/gnunet-service-fs_mesh_client.c
23  * @brief non-anonymous file-transfer
24  * @author Christian Grothoff
25  *
26  * TODO:
27  * - PORT is set to old application type, unsure if we should keep
28  *   it that way (fine for now)
29  */
30 #include "platform.h"
31 #include "gnunet_constants.h"
32 #include "gnunet_util_lib.h"
33 #include "gnunet_mesh_service.h"
34 #include "gnunet_protocols.h"
35 #include "gnunet_applications.h"
36 #include "gnunet-service-fs.h"
37 #include "gnunet-service-fs_indexing.h"
38 #include "gnunet-service-fs_mesh.h"
39
40
41 /**
42  * After how long do we reset connections without replies?
43  */
44 #define CLIENT_RETRY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
45
46
47 /** 
48  * Handle for a mesh to another peer.
49  */
50 struct MeshHandle;
51
52
53 /**
54  * Handle for a request that is going out via mesh API.
55  */
56 struct GSF_MeshRequest
57 {
58
59   /**
60    * DLL.
61    */
62   struct GSF_MeshRequest *next;
63
64   /**
65    * DLL.
66    */
67   struct GSF_MeshRequest *prev;
68
69   /**
70    * Which mesh is this request associated with?
71    */
72   struct MeshHandle *mh;
73
74   /**
75    * Function to call with the result.
76    */
77   GSF_MeshReplyProcessor proc;
78
79   /**
80    * Closure for 'proc'
81    */
82   void *proc_cls;
83
84   /**
85    * Query to transmit to the other peer.
86    */
87   struct GNUNET_HashCode query;
88
89   /**
90    * Desired type for the reply.
91    */
92   enum GNUNET_BLOCK_Type type;
93
94   /**
95    * Did we transmit this request already? YES if we are
96    * in the 'waiting_map', NO if we are in the 'pending' DLL.
97    */
98   int was_transmitted;
99 };
100
101
102 /** 
103  * Handle for a mesh to another peer.
104  */
105 struct MeshHandle
106 {
107   /**
108    * Head of DLL of pending requests on this mesh.
109    */
110   struct GSF_MeshRequest *pending_head;
111
112   /**
113    * Tail of DLL of pending requests on this mesh.
114    */
115   struct GSF_MeshRequest *pending_tail;
116
117   /**
118    * Map from query to 'struct GSF_MeshRequest's waiting for
119    * a reply.
120    */
121   struct GNUNET_CONTAINER_MultiHashMap *waiting_map;
122
123   /**
124    * Tunnel to the other peer.
125    */
126   struct GNUNET_MESH_Tunnel *tunnel;
127
128   /**
129    * Handle for active write operation, or NULL.
130    */ 
131   struct GNUNET_MESH_TransmitHandle *wh;
132
133   /**
134    * Which peer does this mesh go to?
135    */ 
136   struct GNUNET_PeerIdentity target;
137
138   /**
139    * Task to kill inactive meshs (we keep them around for
140    * a few seconds to give the application a chance to give
141    * us another query).
142    */
143   GNUNET_SCHEDULER_TaskIdentifier timeout_task;
144
145   /**
146    * Task to reset meshs that had errors (asynchronously,
147    * as we may not be able to do it immediately during a
148    * callback from the mesh API).
149    */
150   GNUNET_SCHEDULER_TaskIdentifier reset_task;
151
152 };
153
154
155 /**
156  * Mesh tunnel for creating outbound tunnels.
157  */
158 static struct GNUNET_MESH_Handle *mesh_handle;
159
160 /**
161  * Map from peer identities to 'struct MeshHandles' with mesh
162  * tunnels to those peers.
163  */
164 static struct GNUNET_CONTAINER_MultiHashMap *mesh_map;
165
166
167 /* ********************* client-side code ************************* */
168
169
170 /**
171  * Transmit pending requests via the mesh.
172  *
173  * @param mh mesh to process
174  */
175 static void
176 transmit_pending (struct MeshHandle *mh);
177
178
179 /**
180  * Iterator called on each entry in a waiting map to 
181  * move it back to the pending list.
182  *
183  * @param cls the 'struct MeshHandle'
184  * @param key the key of the entry in the map (the query)
185  * @param value the 'struct GSF_MeshRequest' to move to pending
186  * @return GNUNET_YES (continue to iterate)
187  */
188 static int
189 move_to_pending (void *cls,
190                  const struct GNUNET_HashCode *key,
191                  void *value)
192 {
193   struct MeshHandle *mh = cls;
194   struct GSF_MeshRequest *sr = value;
195   
196   GNUNET_assert (GNUNET_YES ==
197                  GNUNET_CONTAINER_multihashmap_remove (mh->waiting_map,
198                                                        key,
199                                                        value));
200   GNUNET_CONTAINER_DLL_insert (mh->pending_head,
201                                mh->pending_tail,
202                                sr);
203   sr->was_transmitted = GNUNET_NO;
204   return GNUNET_YES;
205 }
206
207
208 /**
209  * We had a serious error, tear down and re-create mesh from scratch.
210  *
211  * @param mh mesh to reset
212  */
213 static void
214 reset_mesh (struct MeshHandle *mh)
215 {
216   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
217               "Resetting mesh tunnel to %s\n",
218               GNUNET_i2s (&mh->target));
219   GNUNET_mesh_handle_destroy (mh->tunnel);
220   GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map,
221                                          &move_to_pending,
222                                          mh);
223   mh->tunnel = GNUNET_mesh_handle_create (mesh_handle,
224                                           mh,
225                                           &mh->target,
226                                           GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER,
227                                           GNUNET_YES,
228                                           GNUNET_YES);
229 }
230
231
232 /**
233  * Task called when it is time to destroy an inactive mesh tunnel.
234  *
235  * @param cls the 'struct MeshHandle' to tear down
236  * @param tc scheduler context, unused
237  */
238 static void
239 mesh_timeout (void *cls,
240               const struct GNUNET_SCHEDULER_TaskContext *tc)
241 {
242   struct MeshHandle *mh = cls;
243   struct GNUNET_Mesh_Handle *tun;
244
245   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
246               "Timeout on mesh tunnel to %s\n",
247               GNUNET_i2s (&mh->target));
248   mh->timeout_task = GNUNET_SCHEDULER_NO_TASK;
249   tun = mh->tunnel;
250   mh->tunnel = NULL;
251   GNUNET_mesh_handle_destroy (tun);
252 }
253
254
255 /**
256  * Task called when it is time to reset an mesh.
257  *
258  * @param cls the 'struct MeshHandle' to tear down
259  * @param tc scheduler context, unused
260  */
261 static void
262 reset_mesh_task (void *cls,
263                  const struct GNUNET_SCHEDULER_TaskContext *tc)
264 {
265   struct MeshHandle *mh = cls;
266
267   mh->reset_task = GNUNET_SCHEDULER_NO_TASK;
268   reset_mesh (mh);
269 }
270
271
272 /**
273  * We had a serious error, tear down and re-create mesh from scratch,
274  * but do so asynchronously.
275  *
276  * @param mh mesh to reset
277  */
278 static void
279 reset_mesh_async (struct MeshHandle *mh)
280 {
281   if (GNUNET_SCHEDULER_NO_TASK != mh->reset_task)
282     GNUNET_SCHEDULER_cancel (mh->reset_task);
283   mh->reset_task = GNUNET_SCHEDULER_add_now (&reset_mesh_task,
284                                              mh);
285 }
286
287
288 /**
289  * Functions of this signature are called whenever we are ready to transmit
290  * query via a mesh.
291  *
292  * @param cls the struct MeshHandle for which we did the write call
293  * @param size the number of bytes that can be written to 'buf'
294  * @param buf where to write the message
295  * @return number of bytes written to 'buf'
296  */
297 static size_t
298 transmit_sqm (void *cls,
299               size_t size,
300               void *buf)
301 {
302   struct MeshHandle *mh = cls;
303   struct MeshQueryMessage sqm;
304   struct GSF_MeshRequest *sr;
305
306   mh->wh = NULL;
307   if (NULL == buf)
308   {
309     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
310                 "Mesh tunnel to %s failed during transmission attempt, rebuilding\n",
311                 GNUNET_i2s (&mh->target));
312     reset_mesh (mh);
313     return 0;
314   }
315   sr = mh->pending_head;
316   if (NULL == sr)
317     return 0;
318   GNUNET_assert (size >= sizeof (struct MeshQueryMessage));
319   GNUNET_CONTAINER_DLL_remove (mh->pending_head,
320                                mh->pending_tail,
321                                sr);
322   GNUNET_assert (GNUNET_OK ==
323                  GNUNET_CONTAINER_multihashmap_put (mh->waiting_map,
324                                                     &sr->query,
325                                                     sr,
326                                                     GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
327   sr->was_transmitted = GNUNET_YES;
328   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
329               "Sending query for %s via mesh to %s\n",
330               GNUNET_h2s (&sr->query),
331               GNUNET_i2s (&mh->target));
332   sqm.header.size = htons (sizeof (sqm));
333   sqm.header.type = htons (GNUNET_MESSAGE_TYPE_FS_MESH_QUERY);
334   sqm.type = htonl (sr->type);
335   sqm.query = sr->query;
336   memcpy (buf, &sqm, sizeof (sqm));
337   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
338               "Successfully transmitted %u bytes via mesh to %s\n",
339               (unsigned int) size,
340               GNUNET_i2s (&mh->target));
341   transmit_pending (mh);
342   return sizeof (sqm);
343 }
344           
345
346 /**
347  * Transmit pending requests via the mesh.
348  *
349  * @param mh mesh to process
350  */
351 static void
352 transmit_pending (struct MeshHandle *mh)
353 {
354   if (NULL != mh->wh)
355     return;
356   mh->wh = GNUNET_MESH_notify_transmit_ready (mh->tunnel, GNUNET_YES /* allow cork */,
357                                               GNUNET_TIME_UNIT_FOREVER_REL,
358                                               sizeof (struct MeshQueryMessage),
359                                               &transmit_sqm, mh);
360 }
361
362
363 /**
364  * Closure for 'handle_reply'.
365  */
366 struct HandleReplyClosure
367 {
368
369   /**
370    * Reply payload.
371    */ 
372   const void *data;
373
374   /**
375    * Expiration time for the block.
376    */
377   struct GNUNET_TIME_Absolute expiration;
378
379   /**
380    * Number of bytes in 'data'.
381    */
382   size_t data_size;
383
384   /** 
385    * Type of the block.
386    */
387   enum GNUNET_BLOCK_Type type;
388   
389   /**
390    * Did we have a matching query?
391    */
392   int found;
393 };
394
395
396 /**
397  * Iterator called on each entry in a waiting map to 
398  * process a result.
399  *
400  * @param cls the 'struct HandleReplyClosure'
401  * @param key the key of the entry in the map (the query)
402  * @param value the 'struct GSF_MeshRequest' to handle result for
403  * @return GNUNET_YES (continue to iterate)
404  */
405 static int
406 handle_reply (void *cls,
407               const struct GNUNET_HashCode *key,
408               void *value)
409 {
410   struct HandleReplyClosure *hrc = cls;
411   struct GSF_MeshRequest *sr = value;
412   
413   sr->proc (sr->proc_cls,
414             hrc->type,
415             hrc->expiration,
416             hrc->data_size,
417             hrc->data);
418   GSF_mesh_query_cancel (sr);
419   hrc->found = GNUNET_YES;
420   return GNUNET_YES;
421 }
422
423
424 /**
425  * Functions with this signature are called whenever a complete reply
426  * is received.
427  *
428  * @param cls closure with the 'struct MeshHandle'
429  * @param tunnel tunnel handle
430  * @param tunnel_ctx tunnel context
431  * @param message the actual message
432  * @return GNUNET_OK on success, GNUNET_SYSERR to stop further processing
433  */
434 static int
435 reply_cb (void *cls,
436           struct GNUNET_Mesh_Handle *tunnel,
437           void **tunnel_ctx,
438           const struct GNUNET_MessageHeader *message)
439 {
440   struct MeshHandle *mh = *tunnel_ctx;
441   const struct MeshReplyMessage *srm;
442   struct HandleReplyClosure hrc;
443   uint16_t msize;
444   enum GNUNET_BLOCK_Type type;
445   struct GNUNET_HashCode query;
446
447   msize = ntohs (message->size);
448   if (sizeof (struct MeshReplyMessage) > msize)
449   {
450     GNUNET_break_op (0);
451     reset_mesh_async (mh);
452     return GNUNET_SYSERR;
453   }
454   srm = (const struct MeshReplyMessage *) message;
455   msize -= sizeof (struct MeshReplyMessage);
456   type = (enum GNUNET_BLOCK_Type) ntohl (srm->type);
457   if (GNUNET_YES !=
458       GNUNET_BLOCK_get_key (GSF_block_ctx,
459                             type,
460                             &srm[1], msize, &query))
461   {
462     GNUNET_break_op (0); 
463     reset_mesh_async (mh);
464     return GNUNET_SYSERR;
465   }
466   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
467               "Received reply `%s' via mesh from peer %s\n",
468               GNUNET_h2s (&query),
469               GNUNET_i2s (&mh->target));
470   GNUNET_MESH_receive_done (tunnel);
471   GNUNET_STATISTICS_update (GSF_stats,
472                             gettext_noop ("# replies received via mesh"), 1,
473                             GNUNET_NO);
474   hrc.data = &srm[1];
475   hrc.data_size = msize;
476   hrc.expiration = GNUNET_TIME_absolute_ntoh (srm->expiration);
477   hrc.type = type;
478   hrc.found = GNUNET_NO;
479   GNUNET_CONTAINER_multihashmap_get_multiple (mh->waiting_map,
480                                               &query,
481                                               &handle_reply,
482                                               &hrc);
483   if (GNUNET_NO == hrc.found)
484   {
485     GNUNET_STATISTICS_update (GSF_stats,
486                               gettext_noop ("# replies received via mesh dropped"), 1,
487                               GNUNET_NO);
488     return GNUNET_OK;
489   }
490   return GNUNET_OK;
491 }
492
493
494 /**
495  * Get (or create) a mesh to talk to the given peer.
496  *
497  * @param target peer we want to communicate with
498  */
499 static struct MeshHandle *
500 get_mesh (const struct GNUNET_PeerIdentity *target)
501 {
502   struct MeshHandle *mh;
503
504   mh = GNUNET_CONTAINER_multihashmap_get (mesh_map,
505                                           &target->hashPubKey);
506   if (NULL != mh)
507   {
508     if (GNUNET_SCHEDULER_NO_TASK != mh->timeout_task)
509     {
510       GNUNET_SCHEDULER_cancel (mh->timeout_task);
511       mh->timeout_task = GNUNET_SCHEDULER_NO_TASK;
512     }
513     return mh;
514   }
515   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
516               "Creating mesh tunnel to %s\n",
517               GNUNET_i2s (target));
518   mh = GNUNET_new (struct MeshHandle);
519   mh->reset_task = GNUNET_SCHEDULER_add_delayed (CLIENT_RETRY_TIMEOUT,
520                                                  &reset_mesh_task,
521                                                  mh);
522   mh->waiting_map = GNUNET_CONTAINER_multihashmap_create (16, GNUNET_YES);
523   mh->target = *target;
524   mh->tunnel = GNUNET_mesh_handle_create (mesh_handle,
525                                           mh,
526                                           &mh->target,
527                                           GNUNET_APPLICATION_TYPE_FS_BLOCK_TRANSFER,
528                                           GNUNET_NO,
529                                           GNUNET_YES);
530   GNUNET_assert (GNUNET_OK ==
531                  GNUNET_CONTAINER_multihashmap_put (mesh_map,
532                                                     &mh->target.hashPubKey,
533                                                     mh,
534                                                     GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
535   return mh;
536 }
537
538
539 /**
540  * Look for a block by directly contacting a particular peer.
541  *
542  * @param target peer that should have the block
543  * @param query hash to query for the block
544  * @param type desired type for the block
545  * @param proc function to call with result
546  * @param proc_cls closure for 'proc'
547  * @return handle to cancel the operation
548  */
549 struct GSF_MeshRequest *
550 GSF_mesh_query (const struct GNUNET_PeerIdentity *target,
551                 const struct GNUNET_HashCode *query,
552                 enum GNUNET_BLOCK_Type type,
553                 GSF_MeshReplyProcessor proc, void *proc_cls)
554 {
555   struct MeshHandle *mh;
556   struct GSF_MeshRequest *sr;
557
558   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
559               "Preparing to send query for %s via mesh to %s\n",
560               GNUNET_h2s (query),
561               GNUNET_i2s (target));
562   mh = get_mesh (target);
563   sr = GNUNET_new (struct GSF_MeshRequest);
564   sr->mh = mh;
565   sr->proc = proc;
566   sr->proc_cls = proc_cls;
567   sr->type = type;
568   sr->query = *query;
569   GNUNET_CONTAINER_DLL_insert (mh->pending_head,
570                                mh->pending_tail,
571                                sr);
572   transmit_pending (mh);
573   return sr;
574 }
575
576
577 /**
578  * Cancel an active request; must not be called after 'proc'
579  * was calld.
580  *
581  * @param sr request to cancel
582  */
583 void
584 GSF_mesh_query_cancel (struct GSF_MeshRequest *sr)
585 {
586   struct MeshHandle *mh = sr->mh;
587
588   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
589               "Cancelled query for %s via mesh to %s\n",
590               GNUNET_h2s (&sr->query),
591               GNUNET_i2s (&sr->mh->target));
592   if (GNUNET_YES == sr->was_transmitted)
593     GNUNET_assert (GNUNET_OK ==
594                    GNUNET_CONTAINER_multihashmap_remove (mh->waiting_map,
595                                                          &sr->query,
596                                                          sr));
597   else
598     GNUNET_CONTAINER_DLL_remove (mh->pending_head,
599                                  mh->pending_tail,
600                                  sr);
601   GNUNET_free (sr);
602   if ( (0 == GNUNET_CONTAINER_multihashmap_size (mh->waiting_map)) &&
603        (NULL == mh->pending_head) )
604     mh->timeout_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
605                                                      &mesh_timeout,
606                                                      mh);
607 }
608
609
610 /**
611  * Iterator called on each entry in a waiting map to 
612  * call the 'proc' continuation and release associated
613  * resources.
614  *
615  * @param cls the 'struct MeshHandle'
616  * @param key the key of the entry in the map (the query)
617  * @param value the 'struct GSF_MeshRequest' to clean up
618  * @return GNUNET_YES (continue to iterate)
619  */
620 static int
621 free_waiting_entry (void *cls,
622                     const struct GNUNET_HashCode *key,
623                     void *value)
624 {
625   struct GSF_MeshRequest *sr = value;
626
627   sr->proc (sr->proc_cls, GNUNET_BLOCK_TYPE_ANY,
628             GNUNET_TIME_UNIT_FOREVER_ABS,
629             0, NULL);
630   GSF_mesh_query_cancel (sr);
631   return GNUNET_YES;
632 }
633
634
635 /**
636  * Function called by mesh when a client disconnects.
637  * Cleans up our 'struct MeshClient' of that tunnel.
638  *
639  * @param cls NULL
640  * @param tunnel tunnel of the disconnecting client
641  * @param tunnel_ctx our 'struct MeshClient' 
642  */
643 static void
644 cleaner_cb (void *cls,
645             const struct GNUNET_Mesh_Handle *tunnel,
646             void *tunnel_ctx)
647 {
648   struct MeshHandle *mh = tunnel_ctx;
649   struct GSF_MeshRequest *sr;
650
651   mh->tunnel = NULL;
652   while (NULL != (sr = mh->pending_head))
653   {
654     sr->proc (sr->proc_cls, GNUNET_BLOCK_TYPE_ANY,
655               GNUNET_TIME_UNIT_FOREVER_ABS,
656               0, NULL);
657     GSF_mesh_query_cancel (sr);
658   }
659   GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map,
660                                          &free_waiting_entry,
661                                          mh);
662   if (NULL != mh->wh)
663     GNUNET_MESH_notify_transmit_ready_cancel (mh->wh);
664   if (GNUNET_SCHEDULER_NO_TASK != mh->timeout_task)
665     GNUNET_SCHEDULER_cancel (mh->timeout_task);
666   if (GNUNET_SCHEDULER_NO_TASK != mh->reset_task)
667     GNUNET_SCHEDULER_cancel (mh->reset_task);
668   GNUNET_assert (GNUNET_OK ==
669                  GNUNET_CONTAINER_multihashmap_remove (mesh_map,
670                                                        &mh->target.hashPubKey,
671                                                        mh));
672   GNUNET_CONTAINER_multihashmap_destroy (mh->waiting_map);
673   GNUNET_free (mh);
674 }
675
676
677 /**
678  * Initialize subsystem for non-anonymous file-sharing.
679  */
680 void
681 GSF_mesh_start_client ()
682 {
683   static const struct GNUNET_MESH_MessageHandler handlers[] = {
684     { &reply_cb, GNUNET_MESSAGE_TYPE_FS_MESH_REPLY, 0 },
685     { NULL, 0, 0 }
686   };
687
688   mesh_map = GNUNET_CONTAINER_multihashmap_create (16, GNUNET_YES);
689   mesh_handle = GNUNET_MESH_connect (GSF_cfg,
690                                      NULL,
691                                      NULL,
692                                      &cleaner_cb,
693                                      handlers,
694                                      NULL);
695 }
696
697
698 /**
699  * Function called on each active meshs to shut them down.
700  *
701  * @param cls NULL
702  * @param key target peer, unused
703  * @param value the 'struct MeshHandle' to destroy
704  * @return GNUNET_YES (continue to iterate)
705  */
706 static int
707 release_meshs (void *cls,
708                const struct GNUNET_HashCode *key,
709                void *value)
710 {
711   struct MeshHandle *mh = value;
712   struct GNUNET_Mesh_Handle *tun;
713
714   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
715               "Timeout on mesh tunnel to %s\n",
716               GNUNET_i2s (&mh->target));
717   tun = mh->tunnel;
718   mh->tunnel = NULL;
719   if (NULL != tun)
720     GNUNET_mesh_handle_destroy (tun);
721   return GNUNET_YES;
722 }
723
724
725 /**
726  * Shutdown subsystem for non-anonymous file-sharing.
727  */
728 void
729 GSF_mesh_stop_client ()
730 {
731   GNUNET_CONTAINER_multihashmap_iterate (mesh_map,
732                                          &release_meshs,
733                                          NULL);
734   GNUNET_CONTAINER_multihashmap_destroy (mesh_map);
735   mesh_map = NULL;
736   if (NULL != mesh_handle)
737   {
738     GNUNET_MESH_disconnect (mesh_handle);
739     mesh_handle = NULL;
740   }
741 }
742
743
744 /* end of gnunet-service-fs_mesh_client.c */