2 This file is part of GNUnet.
3 (C) 2011 Christian Grothoff (and other contributing authors)
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.
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.
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.
22 * @file fs/gnunet-service-fs_cp.c
23 * @brief API to handle 'connected peers'
24 * @author Christian Grothoff
27 #include "gnunet-service-fs.h"
28 #include "gnunet-service-fs_cp.h"
31 * How often do we flush trust values to disk?
33 #define TRUST_FLUSH_FREQ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
38 * Handle to cancel a transmission request.
40 struct GSF_PeerTransmitHandle
44 * Handle for an active request for transmission to this
45 * peer, or NULL (if core queue was full).
47 struct GNUNET_CORE_TransmitHandle *cth;
50 * Time when this transmission request was issued.
52 struct GNUNET_TIME_Absolute transmission_request_start_time;
55 * Timeout for this request.
57 struct GNUNET_TIME_Absolute timeout;
60 * Task called on timeout, or 0 for none.
62 GNUNET_SCHEDULER_TaskIdentifier timeout_task;
65 * Function to call to get the actual message.
67 GSF_GetMessageCallback gmc;
70 * Peer this request targets.
72 struct GSF_ConnectedPeer *cp;
80 * Size of the message to be transmitted.
85 * GNUNET_YES if this is a query, GNUNET_NO for content.
90 * Priority of this request.
100 struct GSF_ConnectedPeer
104 * Performance data for this peer.
106 struct GSF_PeerPerformanceData ppd;
109 * Time until when we blocked this peer from migrating
112 struct GNUNET_TIME_Absolute last_migration_block;
115 * Messages (replies, queries, content migration) we would like to
116 * send to this peer in the near future. Sorted by priority, head.
118 struct GSF_PeerTransmitHandle *pth_head;
121 * Messages (replies, queries, content migration) we would like to
122 * send to this peer in the near future. Sorted by priority, tail.
124 struct GSF_PeerTransmitHandle *pth_tail;
127 * Context of our GNUNET_CORE_peer_change_preference call (or NULL).
128 * NULL if we have successfully reserved 32k, otherwise non-NULL.
130 struct GNUNET_CORE_InformationRequestContext *irc;
133 * ID of delay task for scheduling transmission.
135 GNUNET_SCHEDULER_TaskIdentifier delayed_transmission_request_task; // FIXME: unused!
138 * Increase in traffic preference still to be submitted
139 * to the core service for this peer.
141 uint64_t inc_preference;
144 * Trust rating for this peer
149 * Trust rating for this peer on disk.
154 * The peer's identity.
159 * Which offset in "last_p2p_replies" will be updated next?
160 * (we go round-robin).
162 unsigned int last_p2p_replies_woff;
165 * Which offset in "last_client_replies" will be updated next?
166 * (we go round-robin).
168 unsigned int last_client_replies_woff;
171 * Current offset into 'last_request_times' ring buffer.
173 unsigned int last_request_times_off;
179 * Map from peer identities to 'struct GSF_ConnectPeer' entries.
181 static struct GNUNET_CONTAINER_MultiHashMap *cp_map;
185 * Where do we store trust information?
187 static char *trustDirectory;
191 * Get the filename under which we would store the GNUNET_HELLO_Message
192 * for the given host and protocol.
193 * @return filename of the form DIRECTORY/HOSTID
196 get_trust_filename (const struct GNUNET_PeerIdentity *id)
198 struct GNUNET_CRYPTO_HashAsciiEncoded fil;
201 GNUNET_CRYPTO_hash_to_enc (&id->hashPubKey, &fil);
202 GNUNET_asprintf (&fn, "%s%s%s", trustDirectory, DIR_SEPARATOR_STR, &fil);
208 * Find latency information in 'atsi'.
210 * @param atsi performance data
211 * @return connection latency
213 static struct GNUNET_TIME_Relative
214 get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi)
217 return GNUNET_TIME_UNIT_SECONDS;
218 while ( (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) &&
219 (ntohl (atsi->type) != GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY) )
221 if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR)
224 /* how can we not have latency data? */
225 return GNUNET_TIME_UNIT_SECONDS;
227 return GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
228 ntohl (atsi->value));
233 * Update the performance information kept for the given peer.
235 * @param cp peer record to update
236 * @param atsi transport performance data
239 update_atsi (struct GSF_ConnectedPeer *cp,
240 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
242 struct GNUNET_TIME_Relative latency;
244 latency = get_latency (atsi);
245 GNUNET_LOAD_value_set_decline (cp->transmission_delay,
247 /* LATER: merge atsi into cp's performance data (if we ever care...) */
252 * Core is ready to transmit to a peer, get the message.
254 * @param cls the 'struct GSF_PeerTransmitHandle' of the message
255 * @param size number of bytes core is willing to take
256 * @param buf where to copy the message
257 * @return number of bytes copied to buf
260 peer_transmit_ready_cb (void *cls,
264 struct GSF_PeerTransmitHandle *pth = cls;
265 struct GSF_ConnectedPeer *cp;
268 if (pth->timeout_task != GNUNET_SCHEDULER_NO_TASK)
270 GNUNET_SCHEDULER_cancel (pth->timeout_task);
271 pth->timeout_task = GNUNET_SCHEDULER_NO_TASK;
274 GNUNET_CONTAINER_DLL_remove (cp->pth_head,
279 cp->ppd.last_request_times[(cp->last_request_times_off++) % MAX_QUEUE_PER_PEER] = GNUNET_TIME_absolute_get ();
280 GNUNET_assert (0 < cp->ppd.pending_queries--);
284 GNUNET_assert (0 < cp->ppd.pending_replies--);
286 GNUNET_LOAD_update (cp->ppd.transmission_delay,
287 GNUNET_TIME_absolute_get_duration (pth->request_start_time).rel_value);
288 ret = pth->gmc (pth->gmc_cls,
296 * Function called by core upon success or failure of our bandwidth reservation request.
298 * @param cls the 'struct GSF_ConnectedPeer' of the peer for which we made the request
299 * @param peer identifies the peer
300 * @param bandwidth_out available amount of outbound bandwidth
301 * @param amount set to the amount that was actually reserved or unreserved;
302 * either the full requested amount or zero (no partial reservations)
303 * @param preference current traffic preference for the given peer
306 core_reserve_callback (void *cls,
307 const struct GNUNET_PeerIdentity * peer,
308 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
312 struct GSF_ConnectedPeer *cp = cls;
318 /* failed; retry! (how did we get here!?) */
319 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
320 _("Failed to reserve bandwidth to peer `%s'\n"),
322 ip = cp->inc_preference;
323 cp->inc_preference = 0;
324 cp->irc = GNUNET_CORE_peer_change_preference (core,
326 GNUNET_TIME_UNIT_FOREVER_REL,
327 GNUNET_BANDWIDTH_VALUE_MAX,
328 GNUNET_FS_DBLOCK_SIZE,
330 &core_reserve_callback,
335 if ( (NULL != pth) &&
338 /* reservation success, try transmission now! */
339 pth->cth = GNUNET_CORE_notify_transmit_ready (core,
341 GNUNET_TIME_absolute_get_remaining (pth->timeout),
344 &peer_transmit_ready_cb,
351 * A peer connected to us. Setup the connected peer
354 * @param peer identity of peer that connected
355 * @param atsi performance data for the connection
356 * @return handle to connected peer entry
358 struct GSF_ConnectedPeer *
359 GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer,
360 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
362 struct GSF_ConnectedPeer *cp;
365 struct GNUNET_TIME_Relative latency;
367 cp = GNUNET_malloc (sizeof (struct GSF_ConnectedPeer));
368 cp->transmission_delay = GNUNET_LOAD_value_init (latency);
369 cp->pid = GNUNET_PEER_intern (peer);
370 cp->transmission_delay = GNUNET_LOAD_value_init (0);
371 cp->irc = GNUNET_CORE_peer_change_preference (core,
373 GNUNET_TIME_UNIT_FOREVER_REL,
374 GNUNET_BANDWIDTH_VALUE_MAX,
375 GNUNET_FS_DBLOCK_SIZE,
377 &core_reserve_callback,
379 fn = get_trust_filename (peer);
380 if ((GNUNET_DISK_file_test (fn) == GNUNET_YES) &&
381 (sizeof (trust) == GNUNET_DISK_fn_read (fn, &trust, sizeof (trust))))
382 cp->disk_trust = cp->trust = ntohl (trust);
384 GNUNET_break (GNUNET_OK ==
385 GNUNET_CONTAINER_multihashmap_put (cp_map,
388 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
389 update_atsi (cp, atsi);
390 GSF_plan_notify_new_peer_ (cp);
396 * Handle P2P "MIGRATION_STOP" message.
398 * @param cls closure, always NULL
399 * @param other the other peer involved (sender or receiver, NULL
400 * for loopback messages where we are both sender and receiver)
401 * @param message the actual message
402 * @param atsi performance information
403 * @return GNUNET_OK to keep the connection open,
404 * GNUNET_SYSERR to close it (signal serious error)
407 GSF_handle_p2p_migration_stop_ (void *cls,
408 const struct GNUNET_PeerIdentity *other,
409 const struct GNUNET_MessageHeader *message,
410 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
412 struct GSF_ConnectedPeer *cp;
413 const struct MigrationStopMessage *msm;
415 msm = (const struct MigrationStopMessage*) message;
416 cp = GNUNET_CONTAINER_multihashmap_get (cp_map,
423 cp->ppd.migration_blocked = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_ntoh (msm->duration));
424 update_atsi (cp, atsi);
430 * Function called if there has been a timeout trying to satisfy
431 * a transmission request.
433 * @param cls the 'struct GSF_PeerTransmitHandle' of the request
434 * @param tc scheduler context
437 peer_transmit_timeout (void *cls,
438 const struct GNUNET_SCHEDULER_TaskContext *tc)
440 struct GSF_PeerTransmitHandle *pth = cls;
441 struct GSF_ConnectedPeer *cp;
443 pth->timeout_task = GNUNET_SCHEDULER_NO_TASK;
445 GNUNET_CONTAINER_DLL_remove (cp->pth_head,
449 GNUNET_assert (0 < cp->ppd.pending_queries--);
451 GNUNET_assert (0 < cp->ppd.pending_replies--);
452 GNUNET_LOAD_update (cp->ppd.transmission_delay,
454 pth->gmc (pth->gmc_cls,
461 * Transmit a message to the given peer as soon as possible.
462 * If the peer disconnects before the transmission can happen,
463 * the callback is invoked with a 'NULL' buffer.
465 * @param peer target peer
466 * @param is_query is this a query (GNUNET_YES) or content (GNUNET_NO)
467 * @param priority how important is this request?
468 * @param timeout when does this request timeout (call gmc with error)
469 * @param size number of bytes we would like to send to the peer
470 * @param gmc function to call to get the message
471 * @param gmc_cls closure for gmc
472 * @return handle to cancel request
474 struct GSF_PeerTransmitHandle *
475 GSF_peer_transmit_ (struct GSF_ConnectedPeer *peer,
478 struct GNUNET_TIME_Relative timeout,
480 GSF_GetMessageCallback gmc,
483 struct GSF_ConnectedPeer *cp;
484 struct GSF_PeerTransmitHandle *pth;
485 struct GSF_PeerTransmitHandle *pos;
486 struct GSF_PeerTransmitHandle *prev;
487 struct GNUNET_PeerIdentity target;
491 cp = GNUNET_CONTAINER_multihashmap_get (cp_map,
493 GNUNET_assert (NULL != cp);
494 pth = GNUNET_malloc (sizeof (struct GSF_PeerTransmitHandle));
495 pth->transmission_request_start_time = GNUNET_TIME_absolute_now ();
496 pth->timeout = GNUNET_TIME_relative_to_absolute (timeout);
498 pth->gmc_cls = gmc_cls;
500 pth->is_query = is_query;
501 pth->priority = priority;
503 /* insertion sort (by priority, descending) */
506 while ( (pos != NULL) &&
507 (pos->priority > priority) )
513 GNUNET_CONTAINER_DLL_insert_head (cp->pth_head,
517 GNUNET_CONTAINER_DLL_insert_after (cp->pth_head,
521 GNUNET_PEER_resolve (cp->pid,
525 /* query, need reservation */
528 /* reservation already done! */
529 is_ready = GNUNET_YES;
530 ip = cp->inc_preference;
531 cp->inc_preference = 0;
532 cp->irc = GNUNET_CORE_peer_change_preference (core,
534 GNUNET_TIME_UNIT_FOREVER_REL,
535 GNUNET_BANDWIDTH_VALUE_MAX,
536 GNUNET_FS_DBLOCK_SIZE,
538 &core_reserve_callback,
543 /* still waiting for reservation */
544 is_ready = GNUNET_NO;
549 /* no reservation needed for content */
550 is_ready = GNUNET_YES;
554 pth->cth = GNUNET_CORE_notify_transmit_ready (core,
559 &peer_transmit_ready_cb,
561 /* pth->cth could be NULL here, that's OK, we'll try again
564 if (pth->cth == NULL)
566 /* if we're waiting for reservation OR if we could not do notify_transmit_ready,
567 install a timeout task to be on the safe side */
568 pth->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout,
569 &peer_transmit_timeout,
577 * Cancel an earlier request for transmission.
579 * @param pth request to cancel
582 GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth)
584 struct GSF_PeerTransmitHandle *pth = cls;
585 struct GSF_ConnectedPeer *cp;
587 if (pth->timeout_task != GNUNET_SCHEDULER_NO_TASK)
589 GNUNET_SCHEDULER_cancel (pth->timeout_task);
590 pth->timeout_task = GNUNET_SCHEDULER_NO_TASK;
592 if (NULL != pth->cth)
594 GNUNET_CORE_notify_transmit_ready_cancel (pth->cth);
598 GNUNET_CONTAINER_DLL_remove (cp->pth_head,
602 GNUNET_assert (0 < cp->ppd.pending_queries--);
604 GNUNET_assert (0 < cp->ppd.pending_replies--);
610 * Report on receiving a reply; update the performance record of the given peer.
612 * @param cp responding peer (will be updated)
613 * @param request_time time at which the original query was transmitted
614 * @param request_priority priority of the original request
615 * @param initiator_client local client on responsible for query (or NULL)
616 * @param initiator_peer other peer responsible for query (or NULL)
619 GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
620 struct GNUNET_TIME_Absolute request_time,
621 uint32_t request_priority,
622 const struct GSF_LocalClient *initiator_client,
623 const struct GSF_ConnectedPeer *initiator_peer)
625 struct GNUNET_TIME_Relative delay;
628 delay = GNUNET_TIME_absolute_get_duration (request_time);
629 cp->ppd.avg_reply_delay = (cp->ppd.avg_reply_delay * (RUNAVG_DELAY_N-1) + delay.rel_value) / RUNAVG_DELAY_N;
630 cp->ppd.avg_priority = (cp->avg_priority * (RUNAVG_DELAY_N-1) + request_priority) / RUNAVG_DELAY_N;
631 if (NULL != initiator_client)
633 cp->ppd.last_client_replies[cp->last_client_replies_woff++ % CS2P_SUCCESS_LIST_SIZE] = initiator_client;
635 else if (NULL != initiator_peer)
637 GNUNET_PEER_change_rc (cp->ppd.last_p2p_replies[cp->last_p2p_replies_woff % P2P_SUCCESS_LIST_SIZE], -1);
638 cp->ppd.last_p2p_replies[cp->last_p2p_replies_woff++ % P2P_SUCCESS_LIST_SIZE] = initiator_peer->pid;
639 GNUNET_PEER_change_rc (initiator_peer->pid, 1);
647 * Method called whenever a given peer has a status change.
650 * @param peer peer identity this notification is about
651 * @param bandwidth_in available amount of inbound bandwidth
652 * @param bandwidth_out available amount of outbound bandwidth
653 * @param timeout absolute time when this peer will time out
654 * unless we see some further activity from it
655 * @param atsi status information
658 GSF_peer_status_handler_ (void *cls,
659 const struct GNUNET_PeerIdentity *peer,
660 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
661 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
662 struct GNUNET_TIME_Absolute timeout,
663 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
665 struct GSF_ConnectedPeer *cp;
667 cp = GNUNET_CONTAINER_multihashmap_get (cp_map,
669 GNUNET_assert (NULL != cp);
670 update_atsi (cp, atsi);
675 * A peer disconnected from us. Tear down the connected peer
679 * @param peer identity of peer that connected
682 GSF_peer_disconnect_handler_ (void *cls,
683 const struct GNUNET_PeerIdentity *peer)
685 struct GSF_ConnectedPeer *cp;
686 struct GSF_PeerTransmitHandle *pth;
688 cp = GNUNET_CONTAINER_multihashmap_get (cp_map,
690 GNUNET_assert (NULL != cp);
691 GNUNET_CONTAINER_multihashmap_remove (cp_map,
696 GNUNET_CORE_peer_change_preference_cancel (cp->irc);
699 GSF_plan_notify_peer_disconnect_ (cp);
700 GNUNET_LOAD_value_free (cp->ppd.transmission_delay);
701 GNUNET_PEER_decrement_rcs (cp->ppd.last_p2p_replies, P2P_SUCCESS_LIST_SIZE);
702 while (NULL != (pth = cp->pth_head))
706 GNUNET_CORE_notify_transmit_ready_cancel (pth->th);
709 GNUNET_CONTAINER_DLL_remove (cp->pth_head,
714 GNUNET_PEER_change_rc (cp->pid, -1);
720 * Closure for 'call_iterator'.
722 struct IterationContext
725 * Function to call on each entry.
727 GSF_ConnectedPeerIterator it;
737 * Function that calls the callback for each peer.
739 * @param cls the 'struct IterationContext*'
740 * @param key identity of the peer
741 * @param value the 'struct GSF_ConnectedPeer*'
742 * @return GNUNET_YES to continue iteration
745 call_iterator (void *cls,
746 const GNUNET_HashCode *key,
749 struct IterationContext *ic = cls;
750 struct GSF_ConnectedPeer *cp = value;
753 (const struct GNUNET_PeerIdentity*) key,
761 * Iterate over all connected peers.
763 * @param it function to call for each peer
764 * @param it_cls closure for it
767 GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it,
770 struct IterationContext ic;
774 GNUNET_CONTAINER_multihashmap_iterate (cp_map,
781 * Obtain the identity of a connected peer.
783 * @param cp peer to reserve bandwidth from
784 * @param id identity to set (written to)
787 GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
788 struct GNUNET_PeerIdentity *id)
790 GNUNET_PEER_resolve (cp->pid,
796 * Write host-trust information to a file - flush the buffer entry!
798 * @param cls closure, not used
799 * @param key host identity
800 * @param value the 'struct GSF_ConnectedPeer' to flush
801 * @return GNUNET_OK to continue iteration
804 flush_trust (void *cls,
805 const GNUNET_HashCode *key,
808 struct GSF_ConnectedPeer *cp = value;
811 struct GNUNET_PeerIdentity pid;
813 if (cp->trust == cp->disk_trust)
814 return GNUNET_OK; /* unchanged */
815 GNUNET_PEER_resolve (cp->pid,
817 fn = get_trust_filename (&pid);
820 if ((0 != UNLINK (fn)) && (errno != ENOENT))
821 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING |
822 GNUNET_ERROR_TYPE_BULK, "unlink", fn);
826 trust = htonl (cp->trust);
827 if (sizeof(uint32_t) == GNUNET_DISK_fn_write (fn, &trust,
829 GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE
830 | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ))
831 cp->disk_trust = cp->trust;
839 * Notify core about a preference we have for the given peer
840 * (to allocate more resources towards it). The change will
841 * be communicated the next time we reserve bandwidth with
842 * core (not instantly).
844 * @param cp peer to reserve bandwidth from
845 * @param pref preference change
848 GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
851 cp->inc_preference += pref;
856 * Call this method periodically to flush trust information to disk.
858 * @param cls closure, not used
859 * @param tc task context, not used
862 cron_flush_trust (void *cls,
863 const struct GNUNET_SCHEDULER_TaskContext *tc)
868 GNUNET_CONTAINER_multihashmap_iterate (cp_map,
873 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
875 GNUNET_SCHEDULER_add_delayed (TRUST_FLUSH_FREQ,
882 * Initialize peer management subsystem.
884 * @param cfg configuration to use
887 GSF_connected_peer_init_ (struct GNUNET_CONFIGURATION_Handle *cfg)
889 cp_map = GNUNET_CONTAINER_multihashmap_create (128);
890 GNUNET_assert (GNUNET_OK ==
891 GNUNET_CONFIGURATION_get_value_filename (cfg,
895 GNUNET_DISK_directory_create (trustDirectory);
896 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_HIGH,
897 &cron_flush_trust, NULL);
902 * Iterator to free peer entries.
904 * @param cls closure, unused
905 * @param key current key code
906 * @param value value in the hash map (peer entry)
907 * @return GNUNET_YES (we should continue to iterate)
910 clean_peer (void *cls,
911 const GNUNET_HashCode * key,
914 GSF_peer_disconnect_handler_ (NULL,
915 (const struct GNUNET_PeerIdentity*) key);
921 * Shutdown peer management subsystem.
924 GSF_connected_peer_done_ ()
926 cron_flush_trust (NULL, NULL);
927 GNUNET_CONTAINER_multihashmap_iterate (cp_map,
930 GNUNET_CONTAINER_multihashmap_destroy (cp_map);
932 GNUNET_free (trustDirectory);
933 trustDirectory = NULL;
938 * Iterator to remove references to LC entry.
940 * @param the 'struct GSF_LocalClient*' to look for
941 * @param key current key code
942 * @param value value in the hash map (peer entry)
943 * @return GNUNET_YES (we should continue to iterate)
946 clean_peer (void *cls,
947 const GNUNET_HashCode * key,
950 const struct GSF_LocalClient *lc = cls;
951 struct GSF_ConnectedPeer *cp = value;
954 for (i=0;i<CS2P_SUCCESS_LIST_SIZE;i++)
955 if (cp->ppd.last_client_replies[i] == lc)
956 cp->ppd.last_client_replies[i] = NULL;
962 * Notification that a local client disconnected. Clean up all of our
963 * references to the given handle.
965 * @param lc handle to the local client (henceforth invalid)
968 GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc)
970 GNUNET_CONTAINER_multihashmap_iterate (cp_map,
976 /* end of gnunet-service-fs_cp.c */