2 * This file is part of GNUnet
3 * (C) 2013 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 psycstore/gnunet-service-psycstore.c
23 * @brief PSYCstore service
24 * @author Gabor X Toth
25 * @author Christian Grothoff
31 #include "gnunet_util_lib.h"
32 #include "gnunet_constants.h"
33 #include "gnunet_protocols.h"
34 #include "gnunet_statistics_service.h"
35 #include "gnunet_psycstore_service.h"
36 #include "gnunet_psycstore_plugin.h"
37 #include "psycstore.h"
41 * Handle to our current configuration.
43 static const struct GNUNET_CONFIGURATION_Handle *cfg;
46 * Handle to the statistics service.
48 static struct GNUNET_STATISTICS_Handle *stats;
51 * Notification context, simplifies client broadcasts.
53 static struct GNUNET_SERVER_NotificationContext *nc;
58 static struct GNUNET_PSYCSTORE_PluginFunctions *db;
61 * Name of the database plugin
63 static char *db_lib_name;
67 * Task run during shutdown.
73 shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
77 GNUNET_SERVER_notification_context_destroy (nc);
82 GNUNET_STATISTICS_destroy (stats, GNUNET_NO);
85 GNUNET_break (NULL == GNUNET_PLUGIN_unload (db_lib_name, db));
86 GNUNET_free (db_lib_name);
92 * Send a result code back to the client.
95 * Client that should receive the result code.
99 * Operation ID in network byte order.
101 * Error message to include (or NULL for none).
104 send_result_code (struct GNUNET_SERVER_Client *client, uint64_t op_id,
105 int64_t result_code, const char *err_msg)
107 struct OperationResult *res;
108 size_t err_len = 0; // FIXME: maximum length
111 err_len = strlen (err_msg) + 1;
112 res = GNUNET_malloc (sizeof (struct OperationResult) + err_len);
113 res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_CODE);
114 res->header.size = htons (sizeof (struct OperationResult) + err_len);
115 res->result_code = GNUNET_htonll (result_code - INT64_MIN);
118 memcpy (&res[1], err_msg, err_len);
119 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
120 "Sending result to client: %" PRId64 " (%s)\n",
121 result_code, err_msg);
122 GNUNET_SERVER_notification_context_add (nc, client);
123 GNUNET_SERVER_notification_context_unicast (nc, client, &res->header,
131 MEMBERSHIP_TEST_NOT_NEEDED = 0,
132 MEMBERSHIP_TEST_NEEDED = 1,
133 MEMBERSHIP_TEST_DONE = 2,
134 } MessageMembershipTest;
139 struct GNUNET_SERVER_Client *client;
142 * Channel's public key.
144 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
147 * Slave's public key.
149 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key;
157 * Membership test result.
159 int membership_test_result;
162 * Do membership test with @a slave_key before returning fragment?
163 * @see enum MessageMembershipTest
165 uint8_t membership_test;
170 send_fragment (void *cls, struct GNUNET_MULTICAST_MessageHeader *msg,
171 enum GNUNET_PSYCSTORE_MessageFlags flags)
173 struct SendClosure *sc = cls;
174 struct FragmentResult *res;
176 if (MEMBERSHIP_TEST_NEEDED == sc->membership_test)
178 sc->membership_test = MEMBERSHIP_TEST_DONE;
179 sc->membership_test_result
180 = db->membership_test (db->cls, &sc->channel_key, &sc->slave_key,
181 GNUNET_ntohll (msg->message_id));
182 switch (sc->membership_test_result)
193 size_t msg_size = ntohs (msg->header.size);
195 res = GNUNET_malloc (sizeof (struct FragmentResult) + msg_size);
196 res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_FRAGMENT);
197 res->header.size = htons (sizeof (struct FragmentResult) + msg_size);
198 res->op_id = sc->op_id;
199 res->psycstore_flags = htonl (flags);
200 memcpy (&res[1], msg, msg_size);
201 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
202 "Sending fragment %ld to client\n",
203 GNUNET_ntohll (msg->fragment_id));
205 GNUNET_SERVER_notification_context_add (nc, sc->client);
206 GNUNET_SERVER_notification_context_unicast (nc, sc->client, &res->header,
214 send_state_var (void *cls, const char *name,
215 const void *value, size_t value_size)
217 struct SendClosure *sc = cls;
218 struct StateResult *res;
219 size_t name_size = strlen (name) + 1;
221 /* FIXME: split up value into 64k chunks */
223 res = GNUNET_malloc (sizeof (struct StateResult) + name_size + value_size);
224 res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_STATE);
225 res->header.size = htons (sizeof (struct StateResult) + name_size + value_size);
226 res->op_id = sc->op_id;
227 res->name_size = htons (name_size);
228 memcpy (&res[1], name, name_size);
229 memcpy ((char *) &res[1] + name_size, value, value_size);
230 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
231 "Sending state variable %s to client\n", name);
232 GNUNET_SERVER_notification_context_add (nc, sc->client);
233 GNUNET_SERVER_notification_context_unicast (nc, sc->client, &res->header,
241 handle_membership_store (void *cls,
242 struct GNUNET_SERVER_Client *client,
243 const struct GNUNET_MessageHeader *msg)
245 const struct MembershipStoreRequest *req =
246 (const struct MembershipStoreRequest *) msg;
248 int ret = db->membership_store (db->cls, &req->channel_key, &req->slave_key,
250 GNUNET_ntohll (req->announced_at),
251 GNUNET_ntohll (req->effective_since),
252 GNUNET_ntohll (req->group_generation));
254 if (ret != GNUNET_OK)
255 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
256 _("Failed to store membership information!\n"));
258 send_result_code (client, req->op_id, ret, NULL);
259 GNUNET_SERVER_receive_done (client, GNUNET_OK);
264 handle_membership_test (void *cls,
265 struct GNUNET_SERVER_Client *client,
266 const struct GNUNET_MessageHeader *msg)
268 const struct MembershipTestRequest *req =
269 (const struct MembershipTestRequest *) msg;
271 int ret = db->membership_test (db->cls, &req->channel_key, &req->slave_key,
272 GNUNET_ntohll (req->message_id));
279 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
280 _("Failed to test membership!\n"));
283 send_result_code (client, req->op_id, ret, NULL);
284 GNUNET_SERVER_receive_done (client, GNUNET_OK);
289 handle_fragment_store (void *cls,
290 struct GNUNET_SERVER_Client *client,
291 const struct GNUNET_MessageHeader *msg)
293 const struct FragmentStoreRequest *req =
294 (const struct FragmentStoreRequest *) msg;
296 int ret = db->fragment_store (db->cls, &req->channel_key,
297 (const struct GNUNET_MULTICAST_MessageHeader *)
298 &req[1], ntohl (req->psycstore_flags));
300 if (ret != GNUNET_OK)
301 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
302 _("Failed to store fragment!\n"));
304 send_result_code (client, req->op_id, ret, NULL);
305 GNUNET_SERVER_receive_done (client, GNUNET_OK);
310 handle_fragment_get (void *cls,
311 struct GNUNET_SERVER_Client *client,
312 const struct GNUNET_MessageHeader *msg)
314 const struct FragmentGetRequest *
315 req = (const struct FragmentGetRequest *) msg;
317 sc = { .op_id = req->op_id, .client = client,
318 .channel_key = req->channel_key, .slave_key = req->slave_key,
319 .membership_test = req->do_membership_test };
322 uint64_t ret_frags = 0;
323 uint64_t first_fragment_id = GNUNET_ntohll (req->first_fragment_id);
324 uint64_t last_fragment_id = GNUNET_ntohll (req->last_fragment_id);
325 uint64_t limit = GNUNET_ntohll (req->fragment_limit);
328 ret = db->fragment_get (db->cls, &req->channel_key,
329 first_fragment_id, last_fragment_id,
330 &ret_frags, &send_fragment, &sc);
332 ret = db->fragment_get_latest (db->cls, &req->channel_key, limit,
333 &ret_frags, &send_fragment, &sc);
339 if (MEMBERSHIP_TEST_DONE == sc.membership_test)
341 switch (sc.membership_test_result)
347 ret = GNUNET_PSYCSTORE_MEMBERSHIP_TEST_FAILED;
357 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
358 _("Failed to get fragment!\n"));
360 send_result_code (client, req->op_id, (ret < 0) ? ret : ret_frags, NULL);
361 GNUNET_SERVER_receive_done (client, GNUNET_OK);
366 handle_message_get (void *cls,
367 struct GNUNET_SERVER_Client *client,
368 const struct GNUNET_MessageHeader *msg)
370 const struct MessageGetRequest *
371 req = (const struct MessageGetRequest *) msg;
373 sc = { .op_id = req->op_id, .client = client,
374 .channel_key = req->channel_key, .slave_key = req->slave_key,
375 .membership_test = req->do_membership_test };
378 uint64_t ret_frags = 0;
379 uint64_t first_message_id = GNUNET_ntohll (req->first_message_id);
380 uint64_t last_message_id = GNUNET_ntohll (req->last_message_id);
381 uint64_t limit = GNUNET_ntohll (req->message_limit);
384 ret = db->message_get (db->cls, &req->channel_key,
385 first_message_id, last_message_id,
386 &ret_frags, &send_fragment, &sc);
388 ret = db->message_get_latest (db->cls, &req->channel_key, limit,
389 &ret_frags, &send_fragment, &sc);
397 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
398 _("Failed to get message!\n"));
401 send_result_code (client, req->op_id, (ret < 0) ? ret : ret_frags, NULL);
402 GNUNET_SERVER_receive_done (client, GNUNET_OK);
407 handle_message_get_fragment (void *cls,
408 struct GNUNET_SERVER_Client *client,
409 const struct GNUNET_MessageHeader *msg)
411 const struct MessageGetFragmentRequest *
412 req = (const struct MessageGetFragmentRequest *) msg;
414 sc = { .op_id = req->op_id, .client = client,
415 .channel_key = req->channel_key, .slave_key = req->slave_key,
416 .membership_test = req->do_membership_test };
418 int ret = db->message_get_fragment (db->cls, &req->channel_key,
419 GNUNET_ntohll (req->message_id),
420 GNUNET_ntohll (req->fragment_offset),
421 &send_fragment, &sc);
428 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
429 _("Failed to get message fragment!\n"));
432 send_result_code (client, req->op_id, ret, NULL);
433 GNUNET_SERVER_receive_done (client, GNUNET_OK);
438 handle_counters_get (void *cls,
439 struct GNUNET_SERVER_Client *client,
440 const struct GNUNET_MessageHeader *msg)
442 const struct OperationRequest *req = (const struct OperationRequest *) msg;
443 struct CountersResult res = { {0} };
445 int ret = db->counters_message_get (db->cls, &req->channel_key,
446 &res.max_fragment_id, &res.max_message_id,
447 &res.max_group_generation);
451 ret = db->counters_state_get (db->cls, &req->channel_key,
452 &res.max_state_message_id);
456 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
457 _("Failed to get master counters!\n"));
460 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS);
461 res.header.size = htons (sizeof (res));
462 res.result_code = htonl (ret - INT32_MIN);
463 res.op_id = req->op_id;
464 res.max_fragment_id = GNUNET_htonll (res.max_fragment_id);
465 res.max_message_id = GNUNET_htonll (res.max_message_id);
466 res.max_group_generation = GNUNET_htonll (res.max_group_generation);
467 res.max_state_message_id = GNUNET_htonll (res.max_state_message_id);
469 GNUNET_SERVER_notification_context_add (nc, client);
470 GNUNET_SERVER_notification_context_unicast (nc, client, &res.header,
473 GNUNET_SERVER_receive_done (client, GNUNET_OK);
477 /* FIXME: stop processing further state modify messages after an error */
479 handle_state_modify (void *cls,
480 struct GNUNET_SERVER_Client *client,
481 const struct GNUNET_MessageHeader *msg)
483 const struct StateModifyRequest *req
484 = (const struct StateModifyRequest *) msg;
486 int ret = GNUNET_SYSERR;
487 const char *name = (const char *) &req[1];
488 uint16_t name_size = ntohs (req->name_size);
490 if (name_size <= 2 || '\0' != name[name_size - 1])
492 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
493 _("Tried to set invalid state variable name!\n"));
500 if (req->flags & STATE_OP_FIRST)
502 ret = db->state_modify_begin (db->cls, &req->channel_key,
503 GNUNET_ntohll (req->message_id),
504 GNUNET_ntohll (req->state_delta));
506 if (ret != GNUNET_OK)
508 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
509 _("Failed to begin modifying state!\n"));
515 case GNUNET_ENV_OP_ASSIGN:
516 ret = db->state_modify_set (db->cls, &req->channel_key,
517 (const char *) &req[1],
518 name + ntohs (req->name_size),
519 ntohs (req->header.size) - sizeof (*req)
520 - ntohs (req->name_size));
524 ret = GNUNET_ENV_operation ((const char *) &req[1],
525 current_value, current_value_size,
526 req->oper, name + ntohs (req->name_size),
527 ntohs (req->header.size) - sizeof (*req)
528 - ntohs (req->name_size), &value, &value_size);
531 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
532 _("Unknown operator: %c\n"), req->oper);
536 if (GNUNET_OK == ret && req->flags & STATE_OP_LAST)
538 ret = db->state_modify_end (db->cls, &req->channel_key,
539 GNUNET_ntohll (req->message_id));
540 if (ret != GNUNET_OK)
541 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
542 _("Failed to end modifying state!\n"));
545 send_result_code (client, req->op_id, ret, NULL);
546 GNUNET_SERVER_receive_done (client, GNUNET_OK);
550 /* FIXME: stop processing further state sync messages after an error */
552 handle_state_sync (void *cls,
553 struct GNUNET_SERVER_Client *client,
554 const struct GNUNET_MessageHeader *msg)
556 const struct StateSyncRequest *req
557 = (const struct StateSyncRequest *) msg;
559 int ret = GNUNET_SYSERR;
560 const char *name = (const char *) &req[1];
561 uint16_t name_size = ntohs (req->name_size);
563 if (name_size <= 2 || '\0' != name[name_size - 1])
565 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
566 _("Tried to set invalid state variable name!\n"));
573 if (req->flags & STATE_OP_FIRST)
575 ret = db->state_sync_begin (db->cls, &req->channel_key);
577 if (ret != GNUNET_OK)
579 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
580 _("Failed to begin synchronizing state!\n"));
584 ret = db->state_sync_set (db->cls, &req->channel_key, name,
585 name + ntohs (req->name_size),
586 ntohs (req->header.size) - sizeof (*req)
587 - ntohs (req->name_size));
590 if (GNUNET_OK == ret && req->flags & STATE_OP_LAST)
592 ret = db->state_sync_end (db->cls, &req->channel_key,
593 GNUNET_ntohll (req->message_id));
594 if (ret != GNUNET_OK)
595 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
596 _("Failed to end synchronizing state!\n"));
599 send_result_code (client, req->op_id, ret, NULL);
600 GNUNET_SERVER_receive_done (client, GNUNET_OK);
605 handle_state_reset (void *cls,
606 struct GNUNET_SERVER_Client *client,
607 const struct GNUNET_MessageHeader *msg)
609 const struct OperationRequest *req =
610 (const struct OperationRequest *) msg;
612 int ret = db->state_reset (db->cls, &req->channel_key);
614 if (ret != GNUNET_OK)
615 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
616 _("Failed to reset state!\n"));
618 send_result_code (client, req->op_id, ret, NULL);
619 GNUNET_SERVER_receive_done (client, GNUNET_OK);
624 handle_state_hash_update (void *cls,
625 struct GNUNET_SERVER_Client *client,
626 const struct GNUNET_MessageHeader *msg)
628 const struct OperationRequest *req =
629 (const struct OperationRequest *) msg;
631 int ret = db->state_reset (db->cls, &req->channel_key);
633 if (ret != GNUNET_OK)
634 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
635 _("Failed to reset state!\n"));
637 send_result_code (client, req->op_id, ret, NULL);
638 GNUNET_SERVER_receive_done (client, GNUNET_OK);
643 handle_state_get (void *cls,
644 struct GNUNET_SERVER_Client *client,
645 const struct GNUNET_MessageHeader *msg)
647 const struct OperationRequest *req =
648 (const struct OperationRequest *) msg;
650 struct SendClosure sc = { .op_id = req->op_id, .client = client };
651 int64_t ret = GNUNET_SYSERR;
652 const char *name = (const char *) &req[1];
653 uint16_t name_size = ntohs (req->header.size) - sizeof (*req);
655 if (name_size <= 2 || '\0' != name[name_size - 1])
657 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
658 _("Tried to get invalid state variable name!\n"));
663 ret = db->state_get (db->cls, &req->channel_key, name,
664 &send_state_var, &sc);
665 if (GNUNET_NO == ret && name_size >= 5) /* min: _a_b\0 */
667 char *p, *n = GNUNET_malloc (name_size);
668 memcpy (n, name, name_size);
669 while (&n[1] < (p = strrchr (n, '_')) && GNUNET_NO == ret)
672 ret = db->state_get (db->cls, &req->channel_key, n,
673 &send_state_var, &sc);
684 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
685 _("Failed to get state variable!\n"));
688 send_result_code (client, req->op_id, ret, NULL);
689 GNUNET_SERVER_receive_done (client, GNUNET_OK);
694 handle_state_get_prefix (void *cls,
695 struct GNUNET_SERVER_Client *client,
696 const struct GNUNET_MessageHeader *msg)
698 const struct OperationRequest *req =
699 (const struct OperationRequest *) msg;
701 struct SendClosure sc = { .op_id = req->op_id, .client = client };
702 int64_t ret = GNUNET_SYSERR;
703 const char *name = (const char *) &req[1];
704 uint16_t name_size = ntohs (req->header.size) - sizeof (*req);
706 if (name_size <= 1 || '\0' != name[name_size - 1])
708 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
709 _("Tried to get invalid state variable name!\n"));
714 ret = db->state_get_prefix (db->cls, &req->channel_key, name,
715 &send_state_var, &sc);
723 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
724 _("Failed to get state variable!\n"));
727 send_result_code (client, req->op_id, ret, NULL);
728 GNUNET_SERVER_receive_done (client, GNUNET_OK);
733 * Initialize the PSYCstore service.
735 * @param cls Closure.
736 * @param server The initialized server.
737 * @param c Configuration to use.
740 run (void *cls, struct GNUNET_SERVER_Handle *server,
741 const struct GNUNET_CONFIGURATION_Handle *c)
743 static const struct GNUNET_SERVER_MessageHandler handlers[] = {
744 { &handle_membership_store, NULL,
745 GNUNET_MESSAGE_TYPE_PSYCSTORE_MEMBERSHIP_STORE,
746 sizeof (struct MembershipStoreRequest) },
748 { &handle_membership_test, NULL,
749 GNUNET_MESSAGE_TYPE_PSYCSTORE_MEMBERSHIP_TEST,
750 sizeof (struct MembershipTestRequest) },
752 { &handle_fragment_store, NULL,
753 GNUNET_MESSAGE_TYPE_PSYCSTORE_FRAGMENT_STORE, 0, },
755 { &handle_fragment_get, NULL,
756 GNUNET_MESSAGE_TYPE_PSYCSTORE_FRAGMENT_GET,
757 sizeof (struct FragmentGetRequest) },
759 { &handle_message_get, NULL,
760 GNUNET_MESSAGE_TYPE_PSYCSTORE_MESSAGE_GET,
761 sizeof (struct MessageGetRequest) },
763 { &handle_message_get_fragment, NULL,
764 GNUNET_MESSAGE_TYPE_PSYCSTORE_MESSAGE_GET_FRAGMENT,
765 sizeof (struct MessageGetFragmentRequest) },
767 { &handle_counters_get, NULL,
768 GNUNET_MESSAGE_TYPE_PSYCSTORE_COUNTERS_GET,
769 sizeof (struct OperationRequest) },
771 { &handle_state_modify, NULL,
772 GNUNET_MESSAGE_TYPE_PSYCSTORE_STATE_MODIFY, 0 },
774 { &handle_state_sync, NULL,
775 GNUNET_MESSAGE_TYPE_PSYCSTORE_STATE_SYNC, 0 },
777 { &handle_state_reset, NULL,
778 GNUNET_MESSAGE_TYPE_PSYCSTORE_STATE_RESET,
779 sizeof (struct OperationRequest) },
781 { &handle_state_hash_update, NULL,
782 GNUNET_MESSAGE_TYPE_PSYCSTORE_STATE_HASH_UPDATE,
783 sizeof (struct StateHashUpdateRequest) },
785 { &handle_state_get, NULL,
786 GNUNET_MESSAGE_TYPE_PSYCSTORE_STATE_GET, 0 },
788 { &handle_state_get_prefix, NULL,
789 GNUNET_MESSAGE_TYPE_PSYCSTORE_STATE_GET_PREFIX, 0 },
796 /* Loading database plugin */
799 GNUNET_CONFIGURATION_get_value_string (cfg, "psycstore", "database",
802 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No database backend configured\n");
806 GNUNET_asprintf (&db_lib_name, "libgnunet_plugin_psycstore_%s", database);
807 db = GNUNET_PLUGIN_load (db_lib_name, (void *) cfg);
808 GNUNET_free (database);
812 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
813 "Could not load database backend `%s'\n",
815 GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
819 stats = GNUNET_STATISTICS_create ("psycstore", cfg);
820 GNUNET_SERVER_add_handlers (server, handlers);
821 nc = GNUNET_SERVER_notification_context_create (server, 1);
822 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
828 * The main function for the service.
830 * @param argc number of arguments from the command line
831 * @param argv command line arguments
832 * @return 0 ok, 1 on error
835 main (int argc, char *const *argv)
838 GNUNET_SERVICE_run (argc, argv, "psycstore",
839 GNUNET_SERVICE_OPTION_NONE,
840 &run, NULL)) ? 0 : 1;
844 /* end of gnunet-service-psycstore.c */