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 {
41  struct GNUNET_HashCode id;
42 
47 
52 
56  char *name;
57 
61  void *ctx;
62 
67 };
68 
69 
70 
71 
73 
74 
81 {
86 
92 
93  /* followed by 0-terminated error message (on error) */
94 };
95 
96 
100 struct LookupMessage
101 {
107 
108  /* followed by 0-terminated ego name */
109 };
110 
111 
116 {
121 
127 
132 
137 
138  /* followed by 0-terminated ego name */
139 };
140 
141 
147 {
152 
157 
162 
163 
164  /* followed by 0-terminated service name */
165 };
166 
167 
173 {
178 
183 
188 
193 
194  /* followed by 0-terminated service name */
195 };
196 
197 
203 {
208 
213 
218 
223 
224  /* followed by 0-terminated identity name */
225 };
226 
227 
233 {
238 
243 
248 
249  /* followed by 0-terminated old name */
250  /* followed by 0-terminated new name */
251 };
252 
253 
259 {
264 
269 
274 
275  /* followed by 0-terminated name */
276 };
277 
279 
280 
281 #endif
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
Client requests creation of an identity.
Definition: identity.h:203
uint16_t name_len
Number of bytes in identity name string including 0-termination, in NBO.
Definition: identity.h:212
struct GNUNET_IDENTITY_PrivateKey private_key
The private key.
Definition: identity.h:222
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_CREATE.
Definition: identity.h:207
uint16_t reserved
Always zero.
Definition: identity.h:217
Client requests deletion of an identity.
Definition: identity.h:259
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_DELETE.
Definition: identity.h:263
uint16_t name_len
Number of characters in the name including 0-termination, in NBO.
Definition: identity.h:268
uint16_t reserved
Always zero.
Definition: identity.h:273
A 512-bit hashcode.
Handle for an ego.
Definition: identity.h:37
void * ctx
Client context associated with this ego.
Definition: identity.h:61
bool pub_initialized
Set to true once pub was initialized.
Definition: identity.h:66
char * name
Current name associated with this ego.
Definition: identity.h:56
struct GNUNET_IDENTITY_PrivateKey pk
The identity key pair.
Definition: identity.h:51
struct GNUNET_IDENTITY_PublicKey pub
The identity key pair.
Definition: identity.h:46
struct GNUNET_HashCode id
Hash of the private key of this ego.
Definition: identity.h:41
A private key for an identity as per LSD0001.
An identity key as per LSD0001.
Header for all communications.
Client requests knowledge about default identity for a subsystem from identity service.
Definition: identity.h:147
uint16_t name_len
Number of bytes in service name string including 0-termination, in NBO.
Definition: identity.h:156
uint16_t reserved
Always zero.
Definition: identity.h:161
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT.
Definition: identity.h:151
Message from client to GNS service to lookup records.
Definition: gns.h:37
struct GNUNET_MessageHeader header
Header of type GNUNET_MESSAGE_TYPE_GNS_LOOKUP.
Definition: gns.h:41
Client requests renaming of an identity.
Definition: identity.h:233
uint16_t old_name_len
Number of characters in the old name including 0-termination, in NBO.
Definition: identity.h:242
uint16_t new_name_len
Number of characters in the new name including 0-termination, in NBO.
Definition: identity.h:247
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_RENAME.
Definition: identity.h:237
Answer from service to client about last operation; GET_DEFAULT maybe answered with this message on f...
Definition: identity.h:81
uint32_t result_code
Status code for the last operation, in NBO.
Definition: identity.h:91
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE.
Definition: identity.h:85
Used from service to client as a result to the GET_DEFAULT message, used from client to service to SE...
Definition: identity.h:173
uint16_t reserved
Always zero.
Definition: identity.h:187
uint16_t name_len
Number of bytes in service name string including 0-termination, in NBO.
Definition: identity.h:182
struct GNUNET_IDENTITY_PrivateKey private_key
The private key.
Definition: identity.h:192
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT.
Definition: identity.h:177
Service informs client about status of a pseudonym.
Definition: identity.h:116
struct GNUNET_IDENTITY_PrivateKey private_key
The private key.
Definition: identity.h:136
uint16_t end_of_list
Usually GNUNET_NO, GNUNET_YES to signal end of list.
Definition: identity.h:131
uint16_t name_len
Number of bytes in ego name string including 0-termination, in NBO; 0 if the ego was deleted.
Definition: identity.h:126
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE.
Definition: identity.h:120