2 This file is part of GNUnet.
3 Copyright (C) 2013 GNUnet e.V.
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.
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.
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/>.
20 * @file identity/gnunet-service-identity.c
21 * @brief identity management service
22 * @author Christian Grothoff
24 * The purpose of this service is to manage private keys that
25 * represent the various egos/pseudonyms/identities of a GNUnet user.
28 * - auto-initialze default egos; maybe trigger default
29 * initializations (such as gnunet-gns-import.sh?)
32 #include "gnunet_util_lib.h"
33 #include "gnunet_constants.h"
34 #include "gnunet_protocols.h"
35 #include "gnunet_statistics_service.h"
36 #include "gnunet_identity_service.h"
41 * Information we keep about each ego.
47 * We keep egos in a DLL.
52 * We keep egos in a DLL.
57 * Private key of the ego.
59 struct GNUNET_CRYPTO_EcdsaPrivateKey *pk;
62 * String identifier for the ego.
70 * Handle to our current configuration.
72 static const struct GNUNET_CONFIGURATION_Handle *cfg;
75 * Handle to subsystem configuration which for each subsystem contains
76 * the name of the default ego.
78 static struct GNUNET_CONFIGURATION_Handle *subsystem_cfg;
81 * Handle to the statistics service.
83 static struct GNUNET_STATISTICS_Handle *stats;
86 * Notification context, simplifies client broadcasts.
88 static struct GNUNET_NotificationContext *nc;
91 * Directory where we store the identities.
93 static char *ego_directory;
96 * Configuration file name where subsystem information is kept.
98 static char *subsystem_cfg_file;
101 * Head of DLL of all egos.
103 static struct Ego *ego_head;
106 * Tail of DLL of all egos.
108 static struct Ego *ego_tail;
112 * Get the name of the file we use to store a given ego.
114 * @param ego ego for which we need the filename
115 * @return full filename for the given ego
118 get_ego_filename (struct Ego *ego)
122 GNUNET_asprintf (&filename,
131 * Called whenever a client is disconnected.
134 * @param client identification of the client
135 * @param app_ctx @a client
138 client_disconnect_cb (void *cls,
139 struct GNUNET_SERVICE_Client *client,
142 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
143 "Client %p disconnected\n",
149 * Add a client to our list of active clients.
152 * @param client client to add
153 * @param mq message queue for @a client
154 * @return internal namestore client structure for this client
157 client_connect_cb (void *cls,
158 struct GNUNET_SERVICE_Client *client,
159 struct GNUNET_MQ_Handle *mq)
165 * Task run during shutdown.
170 shutdown_task (void *cls)
176 GNUNET_notification_context_destroy (nc);
181 GNUNET_STATISTICS_destroy (stats, GNUNET_NO);
184 GNUNET_CONFIGURATION_destroy (subsystem_cfg);
185 subsystem_cfg = NULL;
186 GNUNET_free (subsystem_cfg_file);
187 subsystem_cfg_file = NULL;
188 GNUNET_free (ego_directory);
189 ego_directory = NULL;
190 while (NULL != (e = ego_head))
192 GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e);
194 GNUNET_free (e->identifier);
201 * Send a result code back to the client.
203 * @param client client that should receive the result code
204 * @param result_code code to transmit
205 * @param emsg error message to include (or NULL for none)
208 send_result_code (struct GNUNET_SERVICE_Client *client,
209 uint32_t result_code,
212 struct ResultCodeMessage *rcm;
213 struct GNUNET_MQ_Envelope *env;
219 elen = strlen (emsg) + 1;
220 env = GNUNET_MQ_msg_extra (rcm,
222 GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE);
223 rcm->result_code = htonl (result_code);
225 GNUNET_memcpy (&rcm[1], emsg, elen);
226 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
227 "Sending result %d (%s) to client\n",
230 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), env);
235 * Create an update message with information about the current state of an ego.
237 * @param ego ego to create message for
238 * @return corresponding update message
240 static struct GNUNET_MQ_Envelope *
241 create_update_message (struct Ego *ego)
243 struct UpdateMessage *um;
244 struct GNUNET_MQ_Envelope *env;
247 name_len = (NULL == ego->identifier) ? 0 : (strlen (ego->identifier) + 1);
248 env = GNUNET_MQ_msg_extra (um,
250 GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE);
251 um->name_len = htons (name_len);
252 um->end_of_list = htons (GNUNET_NO);
253 um->private_key = *ego->pk;
254 GNUNET_memcpy (&um[1], ego->identifier, name_len);
260 * Create a set default message with information about the current state of an ego.
262 * @param ego ego to create message for
263 * @param servicename name of the service to provide in the message
264 * @return corresponding set default message
266 static struct GNUNET_MQ_Envelope *
267 create_set_default_message (struct Ego *ego,
268 const char *servicename)
270 struct SetDefaultMessage *sdm;
271 struct GNUNET_MQ_Envelope *env;
274 name_len = (NULL == servicename) ? 0 : (strlen (servicename) + 1);
275 env = GNUNET_MQ_msg_extra (sdm,
277 GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT);
278 sdm->name_len = htons (name_len);
279 sdm->reserved = htons (0);
280 sdm->private_key = *ego->pk;
281 GNUNET_memcpy (&sdm[1], servicename, name_len);
287 * Handler for START message from client, sends information
288 * about all identities to the client immediately and
289 * adds the client to the notification context for future
293 * @param client who sent the message
294 * @param message the message received
297 handle_start_message (void *cls,
298 const struct GNUNET_MessageHeader *message)
300 struct UpdateMessage *ume;
301 struct GNUNET_SERVICE_Client *client = cls;
302 struct GNUNET_MQ_Envelope *env;
305 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
306 "Received START message from client\n");
307 GNUNET_SERVICE_client_mark_monitor (client);
308 GNUNET_SERVICE_client_disable_continue_warning (client);
309 GNUNET_notification_context_add (nc,
310 GNUNET_SERVICE_client_get_mq(client));
311 for (ego = ego_head; NULL != ego; ego = ego->next)
313 env = create_update_message (ego);
314 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq(client), env);
316 env = GNUNET_MQ_msg_extra (ume,
318 GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE);
319 ume->end_of_list = htons (GNUNET_YES);
320 ume->name_len = htons (0);
321 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq(client), env);
322 GNUNET_SERVICE_client_continue (client);
326 * Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT message
328 * @param cls client sending the message
329 * @param msg message of type `struct GetDefaultMessage`
330 * @return #GNUNET_OK if @a msg is well-formed
333 check_get_default_message (void *cls,
334 const struct GetDefaultMessage *msg)
340 size = ntohs (msg->header.size);
341 if (size <= sizeof (struct GetDefaultMessage))
344 return GNUNET_SYSERR;
346 name = (const char *) &msg[1];
347 name_len = ntohs (msg->name_len);
348 if ( (name_len + sizeof (struct GetDefaultMessage) != size) ||
349 (0 != ntohs (msg->reserved)) ||
350 ('\0' != name[name_len - 1]) )
353 return GNUNET_SYSERR;
360 * Handler for GET_DEFAULT message from client, returns
361 * default identity for some service.
364 * @param client who sent the message
365 * @param message the message received
368 handle_get_default_message (void *cls,
369 const struct GetDefaultMessage *gdm)
371 struct GNUNET_MQ_Envelope *env;
372 struct GNUNET_SERVICE_Client *client = cls;
378 name = (const char *) &gdm[1];
379 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
380 "Received GET_DEFAULT for service `%s' from client\n",
383 GNUNET_CONFIGURATION_get_value_string (subsystem_cfg,
385 "DEFAULT_IDENTIFIER",
388 send_result_code (client, 1, gettext_noop ("no default known"));
389 GNUNET_SERVICE_client_continue (client);
392 for (ego = ego_head; NULL != ego; ego = ego->next)
394 if (0 == strcmp (ego->identifier,
397 env = create_set_default_message (ego,
399 GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (client), env);
400 GNUNET_SERVICE_client_continue (client);
401 GNUNET_free (identifier);
405 GNUNET_free (identifier);
406 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
407 "Failed to find ego `%s'\n",
409 send_result_code (client, 1,
410 gettext_noop ("default configured, but ego unknown (internal error)"));
411 GNUNET_SERVICE_client_continue (client);
416 * Compare the given two private keys for equality.
418 * @param pk1 one private key
419 * @param pk2 another private key
420 * @return 0 if the keys are equal
423 key_cmp (const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk1,
424 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk2)
426 return memcmp (pk1, pk2, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey));
430 * Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT message
432 * @param cls client sending the message
433 * @param msg message of type `struct SetDefaultMessage`
434 * @return #GNUNET_OK if @a msg is well-formed
437 check_set_default_message (void *cls,
438 const struct SetDefaultMessage *msg)
444 size = ntohs (msg->header.size);
445 if (size <= sizeof (struct SetDefaultMessage))
448 return GNUNET_SYSERR;
450 name_len = ntohs (msg->name_len);
451 GNUNET_break (0 == ntohs (msg->reserved));
452 if (name_len + sizeof (struct SetDefaultMessage) != size)
455 return GNUNET_SYSERR;
457 str = (const char *) &msg[1];
458 if ('\0' != str[name_len - 1])
461 return GNUNET_SYSERR;
467 * Handler for SET_DEFAULT message from client, updates
468 * default identity for some service.
471 * @param client who sent the message
472 * @param message the message received
475 handle_set_default_message (void *cls,
476 const struct SetDefaultMessage *sdm)
479 struct GNUNET_SERVICE_Client *client = cls;
482 str = (const char *) &sdm[1];
483 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
484 "Received SET_DEFAULT for service `%s' from client\n",
486 for (ego = ego_head; NULL != ego; ego = ego->next)
488 if (0 == key_cmp (ego->pk,
491 GNUNET_CONFIGURATION_set_value_string (subsystem_cfg,
493 "DEFAULT_IDENTIFIER",
496 GNUNET_CONFIGURATION_write (subsystem_cfg,
498 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
499 _("Failed to write subsystem default identifier map to `%s'.\n"),
501 send_result_code (client, 0, NULL);
502 GNUNET_SERVICE_client_continue (client);
506 send_result_code (client, 1, _("Unknown ego specified for service (internal error)"));
507 GNUNET_SERVICE_client_continue (client);
512 * Send an updated message for the given ego to all listeners.
514 * @param ego ego to send the update for
517 notify_listeners (struct Ego *ego)
519 struct UpdateMessage *um;
522 name_len = (NULL == ego->identifier) ? 0 : (strlen (ego->identifier) + 1);
523 um = GNUNET_malloc (sizeof (struct UpdateMessage) + name_len);
524 um->header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE);
525 um->header.size = htons (sizeof (struct UpdateMessage) + name_len);
526 um->name_len = htons (name_len);
527 um->end_of_list = htons (GNUNET_NO);
528 um->private_key = *ego->pk;
529 GNUNET_memcpy (&um[1], ego->identifier, name_len);
530 GNUNET_notification_context_broadcast (nc,
537 * Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_CREATE message
539 * @param cls client sending the message
540 * @param msg message of type `struct CreateRequestMessage`
541 * @return #GNUNET_OK if @a msg is well-formed
544 check_create_message (void *cls,
545 const struct CreateRequestMessage *msg)
552 size = ntohs (msg->header.size);
553 if (size <= sizeof (struct CreateRequestMessage))
556 return GNUNET_SYSERR;
558 name_len = ntohs (msg->name_len);
559 GNUNET_break (0 == ntohs (msg->reserved));
560 if (name_len + sizeof (struct CreateRequestMessage) != size)
563 return GNUNET_SYSERR;
565 str = (const char *) &msg[1];
566 if ('\0' != str[name_len - 1])
569 return GNUNET_SYSERR;
575 * Handler for CREATE message from client, creates
579 * @param client who sent the message
580 * @param message the message received
583 handle_create_message (void *cls,
584 const struct CreateRequestMessage *crm)
586 struct GNUNET_SERVICE_Client *client = cls;
591 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
592 "Received CREATE message from client\n");
593 str = (const char *) &crm[1];
594 for (ego = ego_head; NULL != ego; ego = ego->next)
596 if (0 == strcmp (ego->identifier,
599 send_result_code (client, 1, gettext_noop ("identifier already in use for another ego"));
600 GNUNET_SERVICE_client_continue (client);
604 ego = GNUNET_new (struct Ego);
605 ego->pk = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
606 *ego->pk = crm->private_key;
607 ego->identifier = GNUNET_strdup (str);
608 GNUNET_CONTAINER_DLL_insert (ego_head,
611 send_result_code (client, 0, NULL);
612 fn = get_ego_filename (ego);
613 (void) GNUNET_DISK_directory_create_for_file (fn);
614 if (sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey) !=
615 GNUNET_DISK_fn_write (fn,
617 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey),
618 GNUNET_DISK_PERM_USER_READ |
619 GNUNET_DISK_PERM_USER_WRITE))
620 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
623 notify_listeners (ego);
624 GNUNET_SERVICE_client_continue (client);
629 * Closure for 'handle_ego_rename'.
636 const char *old_name;
641 const char *new_name;
645 * An ego was renamed; rename it in all subsystems where it is
646 * currently set as the default.
648 * @param cls the 'struct RenameContext'
649 * @param section a section in the configuration to process
652 handle_ego_rename (void *cls,
655 struct RenameContext *rc = cls;
659 GNUNET_CONFIGURATION_get_value_string (subsystem_cfg,
661 "DEFAULT_IDENTIFIER",
664 if (0 != strcmp (id, rc->old_name))
669 GNUNET_CONFIGURATION_set_value_string (subsystem_cfg,
671 "DEFAULT_IDENTIFIER",
677 * Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_RENAME message
679 * @param cls client sending the message
680 * @param msg message of type `struct RenameMessage`
681 * @return #GNUNET_OK if @a msg is well-formed
684 check_rename_message (void *cls,
685 const struct RenameMessage *msg)
688 uint16_t old_name_len;
689 uint16_t new_name_len;
690 const char *old_name;
691 const char *new_name;
693 size = ntohs (msg->header.size);
694 if (size <= sizeof (struct RenameMessage))
697 return GNUNET_SYSERR;
699 old_name_len = ntohs (msg->old_name_len);
700 new_name_len = ntohs (msg->new_name_len);
701 old_name = (const char *) &msg[1];
702 new_name = &old_name[old_name_len];
703 if ( (old_name_len + new_name_len + sizeof (struct RenameMessage) != size) ||
704 ('\0' != old_name[old_name_len - 1]) ||
705 ('\0' != new_name[new_name_len - 1]) )
708 return GNUNET_SYSERR;
716 * Handler for RENAME message from client, creates
720 * @param client who sent the message
721 * @param message the message received
724 handle_rename_message (void *cls,
725 const struct RenameMessage *rm)
727 uint16_t old_name_len;
729 const char *old_name;
730 const char *new_name;
731 struct RenameContext rename_ctx;
732 struct GNUNET_SERVICE_Client *client = cls;
736 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
737 "Received RENAME message from client\n");
738 old_name_len = ntohs (rm->old_name_len);
739 old_name = (const char *) &rm[1];
740 new_name = &old_name[old_name_len];
742 /* check if new name is already in use */
743 for (ego = ego_head; NULL != ego; ego = ego->next)
745 if (0 == strcmp (ego->identifier,
748 send_result_code (client, 1, gettext_noop ("target name already exists"));
749 GNUNET_SERVICE_client_continue (client);
754 /* locate old name and, if found, perform rename */
755 for (ego = ego_head; NULL != ego; ego = ego->next)
757 if (0 == strcmp (ego->identifier,
760 fn_old = get_ego_filename (ego);
761 GNUNET_free (ego->identifier);
762 rename_ctx.old_name = old_name;
763 rename_ctx.new_name = new_name;
764 GNUNET_CONFIGURATION_iterate_sections (subsystem_cfg,
768 GNUNET_CONFIGURATION_write (subsystem_cfg,
770 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
771 _("Failed to write subsystem default identifier map to `%s'.\n"),
773 ego->identifier = GNUNET_strdup (new_name);
774 fn_new = get_ego_filename (ego);
775 if (0 != RENAME (fn_old, fn_new))
776 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "rename", fn_old);
777 GNUNET_free (fn_old);
778 GNUNET_free (fn_new);
779 notify_listeners (ego);
780 send_result_code (client, 0, NULL);
781 GNUNET_SERVICE_client_continue (client);
786 /* failed to locate old name */
787 send_result_code (client, 1, gettext_noop ("no matching ego found"));
788 GNUNET_SERVICE_client_continue (client);
793 * An ego was removed, remove it from all subsystems where it is
794 * currently set as the default.
796 * @param cls name of the removed ego (const char *)
797 * @param section a section in the configuration to process
800 handle_ego_delete (void *cls,
803 const char *identifier = cls;
807 GNUNET_CONFIGURATION_get_value_string (subsystem_cfg,
809 "DEFAULT_IDENTIFIER",
812 if (0 != strcmp (id, identifier))
817 GNUNET_CONFIGURATION_set_value_string (subsystem_cfg,
819 "DEFAULT_IDENTIFIER",
825 * Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_DELETE message
827 * @param cls client sending the message
828 * @param msg message of type `struct DeleteMessage`
829 * @return #GNUNET_OK if @a msg is well-formed
832 check_delete_message (void *cls,
833 const struct DeleteMessage *msg)
839 size = ntohs (msg->header.size);
840 if (size <= sizeof (struct DeleteMessage))
843 return GNUNET_SYSERR;
845 name = (const char *) &msg[1];
846 name_len = ntohs (msg->name_len);
847 if ( (name_len + sizeof (struct DeleteMessage) != size) ||
848 (0 != ntohs (msg->reserved)) ||
849 ('\0' != name[name_len - 1]) )
852 return GNUNET_SYSERR;
859 * Handler for DELETE message from client, creates
863 * @param client who sent the message
864 * @param message the message received
867 handle_delete_message (void *cls,
868 const struct DeleteMessage *dm)
873 struct GNUNET_SERVICE_Client *client = cls;
875 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
876 "Received DELETE message from client\n");
877 name = (const char *) &dm[1];
878 for (ego = ego_head; NULL != ego; ego = ego->next)
880 if (0 == strcmp (ego->identifier,
883 GNUNET_CONTAINER_DLL_remove (ego_head,
886 GNUNET_CONFIGURATION_iterate_sections (subsystem_cfg,
890 GNUNET_CONFIGURATION_write (subsystem_cfg,
892 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
893 _("Failed to write subsystem default identifier map to `%s'.\n"),
895 fn = get_ego_filename (ego);
896 if (0 != UNLINK (fn))
897 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn);
899 GNUNET_free (ego->identifier);
900 ego->identifier = NULL;
901 notify_listeners (ego);
902 GNUNET_free (ego->pk);
904 send_result_code (client, 0, NULL);
905 GNUNET_SERVICE_client_continue (client);
910 send_result_code (client, 1, gettext_noop ("no matching ego found"));
911 GNUNET_SERVICE_client_continue (client);
916 * Process the given file from the "EGODIR". Parses the file
917 * and creates the respective 'struct Ego' in memory.
920 * @param filename name of the file to parse
921 * @return #GNUNET_OK to continue to iterate,
922 * #GNUNET_NO to stop iteration with no error,
923 * #GNUNET_SYSERR to abort iteration with error!
926 process_ego_file (void *cls,
927 const char *filename)
932 fn = strrchr (filename, (int) DIR_SEPARATOR);
938 ego = GNUNET_new (struct Ego);
939 ego->pk = GNUNET_CRYPTO_ecdsa_key_create_from_file (filename);
943 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
944 _("Failed to parse ego information in `%s'\n"),
948 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
951 ego->identifier = GNUNET_strdup (fn + 1);
952 GNUNET_CONTAINER_DLL_insert (ego_head,
960 * Handle network size estimate clients.
963 * @param server the initialized server
964 * @param c configuration to use
968 const struct GNUNET_CONFIGURATION_Handle *c,
969 struct GNUNET_SERVICE_Handle *service)
972 nc = GNUNET_notification_context_create (1);
974 GNUNET_CONFIGURATION_get_value_filename (cfg, "identity",
978 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "identity", "EGODIR");
979 GNUNET_SCHEDULER_shutdown ();
983 GNUNET_CONFIGURATION_get_value_filename (cfg, "identity",
985 &subsystem_cfg_file))
987 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "identity", "SUBSYSTEM_CFG");
988 GNUNET_SCHEDULER_shutdown ();
991 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
992 "Loading subsystem configuration `%s'\n",
994 subsystem_cfg = GNUNET_CONFIGURATION_create ();
996 GNUNET_DISK_file_test (subsystem_cfg_file)) &&
998 GNUNET_CONFIGURATION_parse (subsystem_cfg,
999 subsystem_cfg_file)) )
1001 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1002 _("Failed to parse subsystem identity configuration file `%s'\n"),
1003 subsystem_cfg_file);
1004 GNUNET_SCHEDULER_shutdown ();
1007 stats = GNUNET_STATISTICS_create ("identity", cfg);
1009 GNUNET_DISK_directory_create (ego_directory))
1011 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1012 _("Failed to create directory `%s' for storing egos\n"),
1015 GNUNET_DISK_directory_scan (ego_directory,
1018 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
1024 * Define "main" method using service macro.
1028 GNUNET_SERVICE_OPTION_NONE,
1031 &client_disconnect_cb,
1033 GNUNET_MQ_hd_fixed_size (start_message,
1034 GNUNET_MESSAGE_TYPE_IDENTITY_START,
1035 struct GNUNET_MessageHeader,
1037 GNUNET_MQ_hd_var_size (get_default_message,
1038 GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT,
1039 struct GetDefaultMessage,
1041 GNUNET_MQ_hd_var_size (set_default_message,
1042 GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT,
1043 struct SetDefaultMessage,
1045 GNUNET_MQ_hd_var_size (create_message,
1046 GNUNET_MESSAGE_TYPE_IDENTITY_CREATE,
1047 struct CreateRequestMessage,
1049 GNUNET_MQ_hd_var_size (rename_message,
1050 GNUNET_MESSAGE_TYPE_IDENTITY_RENAME,
1051 struct RenameMessage,
1053 GNUNET_MQ_hd_var_size (delete_message,
1054 GNUNET_MESSAGE_TYPE_IDENTITY_DELETE,
1055 struct DeleteMessage,
1057 GNUNET_MQ_handler_end());
1061 /* end of gnunet-service-identity.c */