GNUnet  0.11.x
identity.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2013 GNUnet e.V.
4 
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.
9 
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.
14 
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/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
28 #ifndef IDENTITY_H
29 #define IDENTITY_H
30 
31 #include "gnunet_common.h"
32 
37 {
42 
47 
52 
56  char *name;
57 
61  void *ctx;
62 
67 };
68 
69 
70 
71 
73 
74 
81 {
85  struct GNUNET_MessageHeader header;
86 
91  uint32_t result_code GNUNET_PACKED;
92 
93  /* followed by 0-terminated error message (on error) */
94 };
95 
96 
100 struct LookupMessage
101 {
106  struct GNUNET_MessageHeader header;
107 
108  /* followed by 0-terminated ego name */
109 };
110 
111 
116 {
120  struct GNUNET_MessageHeader header;
121 
126  uint16_t name_len GNUNET_PACKED;
127 
131  uint16_t end_of_list GNUNET_PACKED;
132 
136  struct GNUNET_IDENTITY_PrivateKey private_key;
137 
138  /* followed by 0-terminated ego name */
139 };
140 
141 
147 {
151  struct GNUNET_MessageHeader header;
152 
156  uint16_t name_len GNUNET_PACKED;
157 
162 
163 
164  /* followed by 0-terminated service name */
165 };
166 
167 
173 {
177  struct GNUNET_MessageHeader header;
178 
182  uint16_t name_len GNUNET_PACKED;
183 
188 
192  struct GNUNET_IDENTITY_PrivateKey private_key;
193 
194  /* followed by 0-terminated service name */
195 };
196 
197 
203 {
207  struct GNUNET_MessageHeader header;
208 
212  uint16_t name_len GNUNET_PACKED;
213 
218 
222  struct GNUNET_IDENTITY_PrivateKey private_key;
223 
224  /* followed by 0-terminated identity name */
225 };
226 
227 
233 {
237  struct GNUNET_MessageHeader header;
238 
242  uint16_t old_name_len GNUNET_PACKED;
243 
247  uint16_t new_name_len GNUNET_PACKED;
248 
249  /* followed by 0-terminated old name */
250  /* followed by 0-terminated new name */
251 };
252 
253 
259 {
263  struct GNUNET_MessageHeader header;
264 
268  uint16_t name_len GNUNET_PACKED;
269 
274 
275  /* followed by 0-terminated name */
276 };
277 
279 
280 
281 #endif
Message from client to GNS service to lookup records.
Definition: gns.h:36
Used from service to client as a result to the GET_DEFAULT message, used from client to service to SE...
Definition: identity.h:172
Client requests renaming of an identity.
Definition: identity.h:232
struct GNUNET_IDENTITY_PublicKey pub
The identity key pair.
Definition: identity.h:46
A private key for an identity as per LSD0001.
char * name
Current name associated with this ego.
Definition: identity.h:56
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
Handle for an ego.
Definition: identity.h:36
Client requests creation of an identity.
Definition: identity.h:202
struct GNUNET_IDENTITY_PrivateKey pk
The identity key pair.
Definition: identity.h:51
A 512-bit hashcode.
struct GNUNET_HashCode id
Hash of the private key of this ego.
Definition: identity.h:41
Client requests deletion of an identity.
Definition: identity.h:258
void * ctx
Client context associated with this ego.
Definition: identity.h:61
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
An identity key as per LSD0001.
#define GNUNET_PACKED
gcc-ism to get packed structs.
bool pub_initialized
Set to true once pub was initialized.
Definition: identity.h:66
Header for all communications.
Client requests knowledge about default identity for a subsystem from identity service.
Definition: identity.h:146
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
static unsigned long long reserved
How much space have we currently reserved?
Answer from service to client about last operation; GET_DEFAULT maybe answered with this message on f...
Definition: identity.h:80
Service informs client about status of a pseudonym.
Definition: identity.h:115