2 This file is part of GNUnet.
3 (C) 2009 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 namestore/gnunet-service-namestore.c
23 * @brief namestore for the GNUnet naming system
24 * @author Matthias Wachs
27 #include "gnunet_getopt_lib.h"
28 #include "gnunet_service_lib.h"
29 #include "gnunet_namestore_service.h"
30 #include "gnunet_namestore_plugin.h"
31 #include "namestore.h"
36 * A namestore operation.
38 struct GNUNET_NAMESTORE_ZoneIteration
40 struct GNUNET_NAMESTORE_ZoneIteration *next;
41 struct GNUNET_NAMESTORE_ZoneIteration *prev;
43 struct GNUNET_NAMESTORE_Client * client;
54 struct GNUNET_NAMESTORE_Client
56 struct GNUNET_NAMESTORE_Client *next;
57 struct GNUNET_NAMESTORE_Client *prev;
59 struct GNUNET_SERVER_Client * client;
61 struct GNUNET_NAMESTORE_ZoneIteration *op_head;
62 struct GNUNET_NAMESTORE_ZoneIteration *op_tail;
68 * Configuration handle.
70 const struct GNUNET_CONFIGURATION_Handle *GSN_cfg;
72 static struct GNUNET_NAMESTORE_PluginFunctions *GSN_database;
75 * Our notification context.
77 static struct GNUNET_SERVER_NotificationContext *snc;
79 static char *db_lib_name;
81 static struct GNUNET_NAMESTORE_Client *client_head;
82 static struct GNUNET_NAMESTORE_Client *client_tail;
86 * Task run during shutdown.
92 cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
94 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping namestore service\n");
96 struct GNUNET_NAMESTORE_ZoneIteration * no;
97 struct GNUNET_NAMESTORE_ZoneIteration * tmp;
98 struct GNUNET_NAMESTORE_Client * nc;
99 struct GNUNET_NAMESTORE_Client * next;
101 for (nc = client_head; nc != NULL; nc = next)
104 for (no = nc->op_head; no != NULL; no = tmp)
106 GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no);
111 GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc);
116 GNUNET_SERVER_notification_context_destroy (snc);
119 GNUNET_break (NULL == GNUNET_PLUGIN_unload (db_lib_name, GSN_database));
120 GNUNET_free (db_lib_name);
123 static struct GNUNET_NAMESTORE_Client *
124 client_lookup (struct GNUNET_SERVER_Client *client)
126 struct GNUNET_NAMESTORE_Client * nc;
128 GNUNET_assert (NULL != client);
130 for (nc = client_head; nc != NULL; nc = nc->next)
132 if (client == nc->client)
140 * Called whenever a client is disconnected. Frees our
141 * resources associated with that client.
144 * @param client identification of the client
147 client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client)
149 struct GNUNET_NAMESTORE_ZoneIteration * no;
150 struct GNUNET_NAMESTORE_Client * nc;
154 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client %p disconnected \n", client);
156 nc = client_lookup (client);
158 if ((NULL == client) || (NULL == nc))
161 for (no = nc->op_head; no != NULL; no = no->next)
163 GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no);
167 GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc);
171 static void handle_start (void *cls,
172 struct GNUNET_SERVER_Client * client,
173 const struct GNUNET_MessageHeader * message)
175 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client %p connected\n", client);
177 struct GNUNET_NAMESTORE_Client * nc = GNUNET_malloc (sizeof (struct GNUNET_NAMESTORE_Client));
179 GNUNET_SERVER_notification_context_add (snc, client);
180 GNUNET_CONTAINER_DLL_insert(client_head, client_tail, nc);
182 GNUNET_SERVER_receive_done (client, GNUNET_OK);
185 struct LookupNameContext
187 struct GNUNET_NAMESTORE_Client *nc;
189 uint32_t record_type;
194 handle_lookup_name_it (void *cls,
195 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key,
196 struct GNUNET_TIME_Absolute expire,
198 unsigned int rd_count,
199 const struct GNUNET_NAMESTORE_RecordData *rd,
200 const struct GNUNET_CRYPTO_RsaSignature *signature)
203 struct LookupNameContext *lnc = cls;
204 struct LookupNameResponseMessage *lnr_msg;
206 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key_tmp;
207 struct GNUNET_NAMESTORE_RecordData * rd_tmp;
209 struct GNUNET_CRYPTO_RsaSignature *signature_tmp;
211 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message\n", "NAMESTORE_LOOKUP_NAME_RESPONSE");
217 name_len = strlen(name) + 1;
219 int copied_elements = 0;
220 int contains_signature = 0;
223 /* count records to copy */
226 if (lnc->record_type != 0)
228 /* special record type needed */
229 for (c = 0; c < rd_count; c ++)
230 if (rd[c].record_type == lnc->record_type)
231 copied_elements++; /* found matching record */
234 copied_elements = rd_count;
237 if ((copied_elements == rd_count) && (signature != NULL))
238 contains_signature = GNUNET_YES;
240 r_size = sizeof (struct LookupNameResponseMessage) +
241 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) +
243 copied_elements * sizeof (struct GNUNET_NAMESTORE_RecordData) +
244 contains_signature * sizeof (struct GNUNET_CRYPTO_RsaSignature);
246 lnr_msg = GNUNET_malloc (r_size);
248 lnr_msg->header.type = ntohs (GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_NAME_RESPONSE);
249 lnr_msg->header.size = ntohs (r_size);
250 lnr_msg->op_id = htonl (lnc->id);
251 lnr_msg->rc_count = htonl (copied_elements);
252 lnr_msg->name_len = htons (name_len);
253 lnr_msg->expire = GNUNET_TIME_absolute_hton(expire);
254 lnr_msg->contains_sig = htons (contains_signature);
257 zone_key_tmp = (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *) &lnr_msg[1];
258 name_tmp = (char *) &zone_key_tmp[1];
259 rd_tmp = (struct GNUNET_NAMESTORE_RecordData *) &name_tmp[name_len];
260 signature_tmp = (struct GNUNET_CRYPTO_RsaSignature *) &rd_tmp[copied_elements];
262 if (zone_key != NULL)
263 memcpy (zone_key_tmp, zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
266 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded dummy;
267 memset (&dummy, '0', sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
268 memcpy (zone_key_tmp, &dummy, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
270 memcpy (name_tmp, name, name_len);
275 if (lnc->record_type != 0)
277 /* special record type needed */
278 for (c = 0; c < rd_count; c ++)
279 if (rd[c].record_type == lnc->record_type)
281 /* found matching record */
282 memcpy (&rd_tmp[copied_elements], &rd[c], rd_count * sizeof (struct GNUNET_NAMESTORE_RecordData));
287 memcpy (rd_tmp, rd, rd_count * sizeof (struct GNUNET_NAMESTORE_RecordData));
290 if (GNUNET_YES == contains_signature)
291 memcpy (signature_tmp, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature));
292 GNUNET_SERVER_notification_context_unicast (snc, lnc->nc->client, (const struct GNUNET_MessageHeader *) lnr_msg, GNUNET_NO);
294 GNUNET_free (lnr_msg);
297 static void handle_lookup_name (void *cls,
298 struct GNUNET_SERVER_Client * client,
299 const struct GNUNET_MessageHeader * message)
301 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "NAMESTORE_LOOKUP_NAME");
302 struct LookupNameContext lnc;
303 struct GNUNET_NAMESTORE_Client *nc;
304 GNUNET_HashCode name_hash;
311 if (ntohs (message->size) < sizeof (struct LookupNameMessage))
314 GNUNET_SERVER_receive_done (client, GNUNET_OK);
318 nc = client_lookup(client);
322 GNUNET_SERVER_receive_done (client, GNUNET_OK);
326 struct LookupNameMessage * ln_msg = (struct LookupNameMessage *) message;
327 id = ntohl (ln_msg->op_id);
328 name_len = ntohl (ln_msg->name_len);
329 type = ntohl (ln_msg->record_type);
331 if ((name_len == 0) || (name_len > 256))
334 GNUNET_SERVER_receive_done (client, GNUNET_OK);
338 name = GNUNET_malloc (name_len);
339 memcpy (name, &ln_msg[1], name_len);
340 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up record for name `%s'\n", name);
341 GNUNET_CRYPTO_hash(name, name_len-1, &name_hash);
344 /* do the actual lookup */
347 lnc.record_type = type;
348 GSN_database->iterate_records(GSN_database->cls, &ln_msg->zone, &ln_msg->zone, 0, &handle_lookup_name_it, &lnc);
350 GNUNET_SERVER_receive_done (client, GNUNET_OK);
353 static void handle_record_put (void *cls,
354 struct GNUNET_SERVER_Client * client,
355 const struct GNUNET_MessageHeader * message)
357 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "NAMESTORE_RECORD_PUT");
358 struct GNUNET_NAMESTORE_Client *nc;
359 struct GNUNET_TIME_Absolute expire;
360 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key;
361 struct GNUNET_NAMESTORE_RecordData *rd;
362 struct GNUNET_CRYPTO_RsaSignature *signature;
363 struct RecordPutResponseMessage rpr_msg;
370 int res = GNUNET_SYSERR;
372 if (ntohs (message->size) < sizeof (struct RecordPutMessage))
375 GNUNET_SERVER_receive_done (client, GNUNET_OK);
379 nc = client_lookup (client);
383 GNUNET_SERVER_receive_done (client, GNUNET_OK);
387 struct RecordPutMessage * rp_msg = (struct RecordPutMessage *) message;
388 id = ntohl (rp_msg->op_id);
389 name_len = ntohs (rp_msg->name_len);
390 rd_count = ntohl(rp_msg->rd_count);
391 msg_size = ntohs (message->size);
392 msg_size_exp = sizeof (struct RecordPutMessage) + sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) + name_len + rd_count * (sizeof (struct GNUNET_NAMESTORE_RecordData));
394 if (msg_size != msg_size_exp)
396 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Expected message %u size but message size is %u \n", msg_size_exp, msg_size);
398 GNUNET_SERVER_receive_done (client, GNUNET_OK);
403 if ((name_len == 0) || (name_len > 256))
406 GNUNET_SERVER_receive_done (client, GNUNET_OK);
410 zone_key = (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *) &rp_msg[1];
411 name = (char *) &zone_key[1];
412 expire = GNUNET_TIME_absolute_ntoh(rp_msg->expire);
413 signature = (struct GNUNET_CRYPTO_RsaSignature *) &rp_msg->signature;
414 rd = (struct GNUNET_NAMESTORE_RecordData *) &name[name_len];
416 /* Database operation */
417 res = GSN_database->put_records(GSN_database->cls,
424 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Putting record for name `%s': %s\n",
425 name, (res == GNUNET_OK) ? "OK" : "FAIL");
429 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message\n", "RECORD_PUT_RESPONSE");
430 rpr_msg.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_PUT_RESPONSE);
431 rpr_msg.op_id = rp_msg->op_id;
432 rpr_msg.header.size = htons (sizeof (struct RecordPutResponseMessage));
433 if (GNUNET_OK == res)
434 rpr_msg.op_result = htons (GNUNET_OK);
436 rpr_msg.op_result = htons (GNUNET_NO);
437 GNUNET_SERVER_notification_context_unicast (snc, nc->client, (const struct GNUNET_MessageHeader *) &rpr_msg, GNUNET_NO);
439 GNUNET_SERVER_receive_done (client, GNUNET_OK);
443 static void handle_record_create (void *cls,
444 struct GNUNET_SERVER_Client * client,
445 const struct GNUNET_MessageHeader * message)
447 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "NAMESTORE_RECORD_CREATE");
448 struct GNUNET_NAMESTORE_Client *nc;
449 struct RecordCreateResponseMessage rcr_msg;
455 int res = GNUNET_SYSERR;
457 if (ntohs (message->size) < sizeof (struct RecordCreateMessage))
460 GNUNET_SERVER_receive_done (client, GNUNET_OK);
464 nc = client_lookup(client);
468 GNUNET_SERVER_receive_done (client, GNUNET_OK);
472 struct RecordCreateMessage * rp_msg = (struct RecordCreateMessage *) message;
473 id = ntohl (rp_msg->op_id);
474 name_len = ntohs (rp_msg->name_len);
475 msg_size = ntohs (message->size);
476 msg_size_exp = sizeof (struct RecordCreateMessage) + name_len + sizeof (struct GNUNET_NAMESTORE_RecordData);
478 if (msg_size != msg_size_exp)
480 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Expected message %u size but message size is %u \n", msg_size_exp, msg_size);
482 GNUNET_SERVER_receive_done (client, GNUNET_OK);
487 if ((name_len == 0) || (name_len > 256))
490 GNUNET_SERVER_receive_done (client, GNUNET_OK);
498 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message\n", "RECORD_CREATE_RESPONSE");
499 rcr_msg.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_CREATE_RESPONSE);
500 rcr_msg.op_id = rp_msg->op_id;
501 rcr_msg.header.size = htons (sizeof (struct RecordCreateResponseMessage));
502 if (GNUNET_OK == res)
503 rcr_msg.op_result = htons (GNUNET_OK);
505 rcr_msg.op_result = htons (GNUNET_NO);
506 GNUNET_SERVER_notification_context_unicast (snc, nc->client, (const struct GNUNET_MessageHeader *) &rcr_msg, GNUNET_NO);
508 GNUNET_SERVER_receive_done (client, GNUNET_OK);
511 static void handle_record_remove (void *cls,
512 struct GNUNET_SERVER_Client * client,
513 const struct GNUNET_MessageHeader * message)
515 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "NAMESTORE_RECORD_REMOVE");
516 struct GNUNET_NAMESTORE_Client *nc;
517 struct RecordRemoveResponseMessage rrr_msg;
523 int res = GNUNET_SYSERR;
525 if (ntohs (message->size) < sizeof (struct RecordRemoveMessage))
528 GNUNET_SERVER_receive_done (client, GNUNET_OK);
532 nc = client_lookup(client);
536 GNUNET_SERVER_receive_done (client, GNUNET_OK);
540 struct RecordRemoveMessage * rp_msg = (struct RecordRemoveMessage *) message;
541 id = ntohl (rp_msg->op_id);
542 name_len = ntohs (rp_msg->name_len);
543 msg_size = ntohs (message->size);
544 msg_size_exp = sizeof (struct RecordRemoveMessage) + name_len + sizeof (struct GNUNET_NAMESTORE_RecordData);
546 if (msg_size != msg_size_exp)
548 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Expected message %u size but message size is %u \n", msg_size_exp, msg_size);
550 GNUNET_SERVER_receive_done (client, GNUNET_OK);
555 if ((name_len == 0) || (name_len > 256))
558 GNUNET_SERVER_receive_done (client, GNUNET_OK);
566 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message\n", "RECORD_REMOVE_RESPONSE");
567 rrr_msg.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_REMOVE_RESPONSE);
568 rrr_msg.op_id = rp_msg->op_id;
569 rrr_msg.header.size = htons (sizeof (struct RecordRemoveResponseMessage));
570 if (GNUNET_OK == res)
571 rrr_msg.op_result = htons (GNUNET_OK);
573 rrr_msg.op_result = htons (GNUNET_NO);
574 GNUNET_SERVER_notification_context_unicast (snc, nc->client, (const struct GNUNET_MessageHeader *) &rrr_msg, GNUNET_NO);
576 GNUNET_SERVER_receive_done (client, GNUNET_OK);
580 void zone_iteration_proc (void *cls,
581 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key,
582 struct GNUNET_TIME_Absolute expire,
584 unsigned int rd_count,
585 const struct GNUNET_NAMESTORE_RecordData *rd,
586 const struct GNUNET_CRYPTO_RsaSignature *signature)
588 struct ZoneIterationResponseMessage zir_msg;
589 struct GNUNET_NAMESTORE_ZoneIteration * zi = cls;
591 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message\n", "ZONE_ITERATION_RESPONSE");
592 zir_msg.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_RESPONSE);
593 zir_msg.op_id = htonl(zi->op_id);
594 zir_msg.header.size = htons (sizeof (struct ZoneIterationResponseMessage));
597 GNUNET_SERVER_notification_context_unicast (snc, zi->client->client, (const struct GNUNET_MessageHeader *) &zir_msg, GNUNET_NO);
600 static void handle_iteration_start (void *cls,
601 struct GNUNET_SERVER_Client * client,
602 const struct GNUNET_MessageHeader * message)
604 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ZONE_ITERATION_START");
606 struct ZoneIterationStartMessage * zis_msg = (struct ZoneIterationStartMessage *) message;
607 struct GNUNET_NAMESTORE_Client *nc;
608 struct GNUNET_NAMESTORE_ZoneIteration *zi;
610 nc = client_lookup(client);
614 GNUNET_SERVER_receive_done (client, GNUNET_OK);
618 zi = GNUNET_malloc (sizeof (struct GNUNET_NAMESTORE_ZoneIteration));
619 zi->op_id = ntohl (zis_msg->op_id);
623 GNUNET_CONTAINER_DLL_insert (nc->op_head, nc->op_tail, zi);
625 GSN_database->iterate_records (GSN_database->cls, &zis_msg->zone, NULL, zi->offset , &zone_iteration_proc, zi);
626 GNUNET_SERVER_receive_done (client, GNUNET_OK);
629 static void handle_iteration_stop (void *cls,
630 struct GNUNET_SERVER_Client * client,
631 const struct GNUNET_MessageHeader * message)
633 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ZONE_ITERATION_STOP");
636 static void handle_iteration_next (void *cls,
637 struct GNUNET_SERVER_Client * client,
638 const struct GNUNET_MessageHeader * message)
640 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ZONE_ITERATION_NEXT");
646 * Process template requests.
649 * @param server the initialized server
650 * @param cfg configuration to use
653 run (void *cls, struct GNUNET_SERVER_Handle *server,
654 const struct GNUNET_CONFIGURATION_Handle *cfg)
658 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting namestore service\n");
660 static const struct GNUNET_SERVER_MessageHandler handlers[] = {
661 {&handle_start, NULL,
662 GNUNET_MESSAGE_TYPE_NAMESTORE_START, sizeof (struct StartMessage)},
663 {&handle_lookup_name, NULL,
664 GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_NAME, 0},
665 {&handle_record_put, NULL,
666 GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_PUT, 0},
667 {&handle_record_create, NULL,
668 GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_CREATE, 0},
669 {&handle_record_remove, NULL,
670 GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_REMOVE, 0},
671 {&handle_iteration_start, NULL,
672 GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START, sizeof (struct ZoneIterationStartMessage)},
673 {&handle_iteration_stop, NULL,
674 GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP, 0},
675 {&handle_iteration_next, NULL,
676 GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT, 0},
682 /* Loading database plugin */
684 GNUNET_CONFIGURATION_get_value_string (cfg, "namestore", "database",
686 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No database backend configured\n");
688 GNUNET_asprintf (&db_lib_name, "libgnunet_plugin_namestore_%s", database);
689 GSN_database = GNUNET_PLUGIN_load (db_lib_name, (void *) GSN_cfg);
690 if (GSN_database == NULL)
691 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not load database backend `%s'\n",
693 GNUNET_free (database);
695 /* Configuring server handles */
696 GNUNET_SERVER_add_handlers (server, handlers);
697 snc = GNUNET_SERVER_notification_context_create (server, 16);
698 GNUNET_SERVER_disconnect_notify (server,
699 &client_disconnect_notification,
702 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task,
709 * The main function for the template service.
711 * @param argc number of arguments from the command line
712 * @param argv command line arguments
713 * @return 0 ok, 1 on error
716 main (int argc, char *const *argv)
719 GNUNET_SERVICE_run (argc, argv, "namestore",
720 GNUNET_SERVICE_OPTION_NONE, &run, NULL)) ? 0 : 1;
723 /* end of gnunet-service-namestore.c */