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 Liceidentity 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 Liceidentity for more details.
15 You should have received a copy of the GNU General Public Liceidentity
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 * @author Christian Grothoff
23 * @file identity/identity.h
25 * @brief Common type definitions for the identity
31 #include "gnunet_common.h"
34 GNUNET_NETWORK_STRUCT_BEGIN
38 * Answer from service to client about last operation;
39 * GET_DEFAULT maybe answered with this message on failure;
40 * CREATE and RENAME will always be answered with this message.
42 struct GNUNET_IDENTITY_ResultCodeMessage
45 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE
47 struct GNUNET_MessageHeader header;
50 * Status code for the last operation, in NBO.
51 * (currently not used).
53 uint32_t result_code GNUNET_PACKED;
55 /* followed by 0-terminated error message (on error) */
61 * Service informs client about status of a pseudonym.
63 struct GNUNET_IDENTITY_UpdateMessage
66 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE
68 struct GNUNET_MessageHeader header;
71 * Number of bytes in identity name string including 0-termination, in NBO;
72 * 0 if the identity was deleted.
74 uint16_t name_len GNUNET_PACKED;
77 * Usually #GNUNET_NO, #GNUNET_YES to signal end of list.
79 uint16_t end_of_list GNUNET_PACKED;
84 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
86 /* followed by 0-terminated identity name */
93 * Client requests knowledge about default identity for
94 * a subsystem from identity service.
96 struct GNUNET_IDENTITY_GetDefaultMessage
99 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT
101 struct GNUNET_MessageHeader header;
104 * Number of bytes in service name string including 0-termination, in NBO.
106 uint16_t name_len GNUNET_PACKED;
111 uint16_t reserved GNUNET_PACKED;
114 /* followed by 0-terminated service name */
120 * Used from service to client as a result to the GET_DEFAULT
121 * message, used from client to service to SET_DEFAULT.
123 struct GNUNET_IDENTITY_SetDefaultMessage
126 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
128 struct GNUNET_MessageHeader header;
131 * Number of bytes in service name string including 0-termination, in NBO.
133 uint16_t name_len GNUNET_PACKED;
138 uint16_t reserved GNUNET_PACKED;
143 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
145 /* followed by 0-terminated service name */
151 * Client requests creation of an identity. Service
152 * will respond with a result code.
154 struct GNUNET_IDENTITY_CreateRequestMessage
157 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_CREATE
159 struct GNUNET_MessageHeader header;
162 * Number of bytes in identity name string including 0-termination, in NBO.
164 uint16_t name_len GNUNET_PACKED;
169 uint16_t reserved GNUNET_PACKED;
174 struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
176 /* followed by 0-terminated identity name */
182 * Client requests renaming of an identity. Service
183 * will respond with a result code.
185 struct GNUNET_IDENTITY_RenameMessage
188 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_RENAME
190 struct GNUNET_MessageHeader header;
193 * Number of characters in the old name including 0-termination, in NBO.
195 uint16_t old_name_len GNUNET_PACKED;
198 * Number of characters in the new name including 0-termination, in NBO.
200 uint16_t new_name_len GNUNET_PACKED;
202 /* followed by 0-terminated old name */
203 /* followed by 0-terminated new name */
208 * Client requests deletion of an identity. Service
209 * will respond with a result code.
211 struct GNUNET_IDENTITY_DeleteMessage
214 * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_DELETE
216 struct GNUNET_MessageHeader header;
219 * Number of characters in the name including 0-termination, in NBO.
221 uint16_t name_len GNUNET_PACKED;
226 uint16_t reserved GNUNET_PACKED;
228 /* followed by 0-terminated name */
234 GNUNET_NETWORK_STRUCT_END