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 * Number of bytes of private key data that follow, in NBO.
79 uint16_t pk_len GNUNET_PACKED;
81 /* followed by private key */
83 /* followed by 0-terminated identity name */
90 * Client requests knowledge about default identity for
91 * a subsystem from identity service.
93 struct GNUNET_IDENTITY_GetDefaultMessage
96 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT
98 struct GNUNET_MessageHeader header;
101 * Number of bytes in service name string including 0-termination, in NBO.
103 uint16_t name_len GNUNET_PACKED;
108 uint16_t reserved GNUNET_PACKED;
111 /* followed by 0-terminated service name */
117 * Used from service to client as a result to the GET_DEFAULT
118 * message, used from client to service to SET_DEFAULT.
120 struct GNUNET_IDENTITY_SetDefaultMessage
123 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
125 struct GNUNET_MessageHeader header;
128 * Number of bytes in service name string including 0-termination, in NBO.
130 uint16_t name_len GNUNET_PACKED;
133 * Number of bytes of private key data that follow, in NBO.
135 uint16_t pk_len GNUNET_PACKED;
137 /* followed by private key */
139 /* followed by 0-terminated service name */
145 * Client requests creation of an identity. Service
146 * will respond with a result code.
148 struct GNUNET_IDENTITY_CreateRequestMessage
151 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_CREATE
153 struct GNUNET_MessageHeader header;
156 * Number of bytes in identity name string including 0-termination, in NBO.
158 uint16_t name_len GNUNET_PACKED;
161 * Number of bytes of private key data that follow, in NBO.
163 uint16_t pk_len GNUNET_PACKED;
165 /* followed by private key */
167 /* followed by 0-terminated identity name */
173 * Client requests renaming of an identity. Service
174 * will respond with a result code.
176 struct GNUNET_IDENTITY_RenameMessage
179 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_RENAME
181 struct GNUNET_MessageHeader header;
184 * Number of characters in the old name including 0-termination, in NBO.
186 uint16_t old_name_len GNUNET_PACKED;
189 * Number of characters in the new name including 0-termination, in NBO.
191 uint16_t new_name_len GNUNET_PACKED;
193 /* followed by 0-terminated old name */
194 /* followed by 0-terminated new name */
199 * Client requests deletion of an identity. Service
200 * will respond with a result code.
202 struct GNUNET_IDENTITY_DeleteMessage
205 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_DELETE
207 struct GNUNET_MessageHeader header;
210 * Number of characters in the name including 0-termination, in NBO.
212 uint16_t name_len GNUNET_PACKED;
217 uint16_t reserved GNUNET_PACKED;
219 /* followed by 0-terminated name */
225 GNUNET_NETWORK_STRUCT_END