GNUnet  0.20.0
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 
94 
98 struct LookupMessage
99 {
105 
106  /* followed by 0-terminated ego name */
107 };
108 
109 
114 {
119 
125 
130 
135 
140 
141  /* followed by 0-terminated ego name */
142  /* followed by the private key */
143 };
144 
145 
151 {
156 
161 
166 
167  /*
168  * Followed by the private key
169  * followed by 0-terminated identity name */
170 };
171 
172 
178 {
183 
188 
193 
194  /* followed by 0-terminated old name */
195  /* followed by 0-terminated new name */
196 };
197 
198 
204 {
209 
214 
219 
220  /* followed by 0-terminated name */
221 };
222 
224 
225 
226 #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:151
uint16_t name_len
Number of bytes in identity name string including 0-termination, in NBO.
Definition: identity.h:160
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_CREATE.
Definition: identity.h:155
uint16_t key_len
Key length.
Definition: identity.h:165
Client requests deletion of an identity.
Definition: identity.h:204
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_DELETE.
Definition: identity.h:208
uint16_t name_len
Number of characters in the name including 0-termination, in NBO.
Definition: identity.h:213
uint16_t reserved
Always zero.
Definition: identity.h:218
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.
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:178
uint16_t old_name_len
Number of characters in the old name including 0-termination, in NBO.
Definition: identity.h:187
uint16_t new_name_len
Number of characters in the new name including 0-termination, in NBO.
Definition: identity.h:192
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_RENAME.
Definition: identity.h:182
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
Service informs client about status of a pseudonym.
Definition: identity.h:114
uint16_t end_of_list
Usually GNUNET_NO, GNUNET_YES to signal end of list.
Definition: identity.h:129
uint16_t key_len
Key length.
Definition: identity.h:134
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:124
uint16_t reserved
Reserved (alignment)
Definition: identity.h:139
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE.
Definition: identity.h:118