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.
52 uint32_t result_code GNUNET_PACKED;
54 /* followed by 0-terminated error message (on error) */
60 * Service informs client about status of a pseudonym.
62 struct GNUNET_IDENTITY_UpdateMessage
65 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE
67 struct GNUNET_MessageHeader header;
70 * Number of bytes in identity name string including 0-termination, in NBO;
71 * 0 if the identity was deleted.
73 uint16_t name_len GNUNET_PACKED;
78 uint16_t reserved GNUNET_PACKED;
81 * Public key of the identity that we provide an update about.
83 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private_key;
85 /* followed by 0-terminated identity name */
92 * Client requests knowledge about default identity for
93 * a subsystem from identity service.
95 struct GNUNET_IDENTITY_GetDefaultMessage
98 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT
100 struct GNUNET_MessageHeader header;
103 * Number of bytes in service name string including 0-termination, in NBO.
105 uint16_t name_len GNUNET_PACKED;
110 uint16_t reserved GNUNET_PACKED;
113 /* followed by 0-terminated service name */
119 * Used from service to client as a result to the GET_DEFAULT
120 * message, used from client to service to SET_DEFAULT.
122 struct GNUNET_IDENTITY_SetDefaultMessage
125 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
127 struct GNUNET_MessageHeader header;
130 * Number of bytes in service name string including 0-termination, in NBO.
132 uint16_t name_len GNUNET_PACKED;
137 uint16_t reserved GNUNET_PACKED;
140 * Public key of the identity to use.
142 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private_key;
144 /* followed by 0-terminated service name */
150 * Client requests creation of an identity. Service
151 * will respond with a result code.
153 struct GNUNET_IDENTITY_CreateRequestMessage
156 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_CREATE
158 struct GNUNET_MessageHeader header;
161 * Number of bytes in identity name string including 0-termination, in NBO.
163 uint16_t name_len GNUNET_PACKED;
168 uint16_t reserved GNUNET_PACKED;
171 * Public key of the identity to use.
173 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private_key;
175 /* followed by 0-terminated identity name */
181 * Client requests renaming of an identity. Service
182 * will respond with a result code.
184 struct GNUNET_IDENTITY_RenameMessage
187 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_RENAME
189 struct GNUNET_MessageHeader header;
192 * Number of characters in the old name including 0-termination, in NBO.
194 uint16_t old_name_len GNUNET_PACKED;
197 * Number of characters in the new name including 0-termination, in NBO.
199 uint16_t new_name_len GNUNET_PACKED;
201 /* followed by 0-terminated old name */
202 /* followed by 0-terminated new name */
207 * Client requests deletion of an identity. Service
208 * will respond with a result code.
210 struct GNUNET_IDENTITY_DeleteMessage
213 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_DELETE
215 struct GNUNET_MessageHeader header;
218 * Number of characters in the name including 0-termination, in NBO.
220 uint16_t name_len GNUNET_PACKED;
225 uint16_t reserved GNUNET_PACKED;
227 /* followed by 0-terminated name */
233 GNUNET_NETWORK_STRUCT_END