GNUnet 0.22.2
gnunet-service-messenger_member.c
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2020--2024 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 */
26#include "platform.h"
28
30
31#include "messenger_api_util.h"
32
35 const struct GNUNET_ShortHashCode *id)
36{
37 struct GNUNET_MESSENGER_Member *member;
38
40
41 member = GNUNET_new (struct GNUNET_MESSENGER_Member);
42 member->store = store;
43
44 if (id)
45 GNUNET_memcpy (&(member->id), id, sizeof(member->id));
46 else if (GNUNET_YES != generate_free_member_id (&(member->id),
47 store->members))
48 {
49 GNUNET_free (member);
50 return NULL;
51 }
52
55
56 return member;
57}
58
59
62 const struct GNUNET_HashCode *key,
63 void *value)
64{
65 struct GNUNET_MESSENGER_MemberSession *session;
66
68
69 session = value;
70
71 destroy_member_session (session);
72 return GNUNET_YES;
73}
74
75
78 const struct GNUNET_ShortHashCode *key,
79 void *value)
80{
81 struct GNUNET_MESSENGER_Subscription *subscription;
82
84
85 subscription = value;
86
87 destroy_subscription (subscription);
88 return GNUNET_YES;
89}
90
91
92void
94{
96
101
104
106}
107
108
109const struct GNUNET_ShortHashCode*
111{
112 GNUNET_assert (member);
113
114 return &(member->id);
115}
116
117
120 const char *filename)
121{
122 struct GNUNET_MESSENGER_Member *member;
123
124 GNUNET_assert ((cls) && (filename));
125
126 member = cls;
127
129 {
130 char *directory;
131
132 GNUNET_asprintf (&directory, "%s%c", filename, DIR_SEPARATOR);
133
134 load_member_session (member, directory);
135 GNUNET_free (directory);
136 }
137
138 return GNUNET_OK;
139}
140
141
142void
144 const char *directory)
145{
147 struct GNUNET_MESSENGER_Member *member;
148 char *config_file;
149
150 GNUNET_assert ((store) && (directory));
151
152 GNUNET_asprintf (&config_file, "%s%s", directory, "member.cfg");
153
154 member = NULL;
155
157 goto free_config;
158
159 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Load member configuration: %s\n",
161
163
164 if (! cfg)
165 goto free_config;
166
168 {
170
171 if (GNUNET_OK != GNUNET_CONFIGURATION_get_data (cfg, "member", "id", &id,
172 sizeof(id)))
173 goto destroy_config;
174
175 member = add_store_member (store, &id);
176 }
177
178destroy_config:
180
181free_config:
183
184 if (! member)
185 return;
186
187 {
188 char *scan_dir;
189 GNUNET_asprintf (&scan_dir, "%s%s%c", directory, "sessions", DIR_SEPARATOR);
190
193
195 }
196}
197
198
201 const struct GNUNET_HashCode *key,
202 void *value)
203{
204 const char *sessions_directory;
205 char *load_dir;
206
207 GNUNET_assert ((cls) && (key));
208
209 sessions_directory = cls;
210
211 GNUNET_asprintf (&load_dir, "%s%s%c", sessions_directory, GNUNET_h2s (key),
213
214 {
215 struct GNUNET_MESSENGER_MemberSession *session;
216
218
219 session = value;
220
222 load_member_session_next (session, load_dir);
223 }
224
225 GNUNET_free (load_dir);
226 return GNUNET_YES;
227}
228
229
230void
232 const char *directory)
233{
234 char *load_dir;
235
236 GNUNET_assert ((member) && (directory));
237
238 GNUNET_asprintf (&load_dir, "%s%s%c", directory, "sessions", DIR_SEPARATOR);
239
241 iterate_load_next_session, load_dir);
242
243 GNUNET_free (load_dir);
244}
245
246
249 const struct GNUNET_HashCode *key,
250 void *value)
251{
252 const char *sessions_directory;
253 char *save_dir;
254
255 GNUNET_assert ((cls) && (key));
256
257 sessions_directory = cls;
258
259 GNUNET_asprintf (&save_dir, "%s%s%c", sessions_directory, GNUNET_h2s (key),
261
262 {
263 struct GNUNET_MESSENGER_MemberSession *session;
264
266
267 session = value;
268
269 if ((GNUNET_YES == GNUNET_DISK_directory_test (save_dir, GNUNET_NO)) ||
271 save_member_session (session, save_dir);
272 }
273
274 GNUNET_free (save_dir);
275 return GNUNET_YES;
276}
277
278
279void
281 const char *directory)
282{
284 char *config_file;
285 char *id_data;
286
287 GNUNET_assert ((member) && (directory));
288
289 GNUNET_asprintf (&config_file, "%s%s", directory, "member.cfg");
290
291 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Save member configuration: %s\n",
293
295
296 if (! cfg)
297 goto free_config;
298
299 id_data = GNUNET_STRINGS_data_to_string_alloc (&(member->id),
300 sizeof(member->id));
301
302 if (id_data)
303 {
304 GNUNET_CONFIGURATION_set_value_string (cfg, "member", "id", id_data);
305
306 GNUNET_free (id_data);
307 }
308
311
312free_config:
314
315 {
316 char *save_dir;
317 GNUNET_asprintf (&save_dir, "%s%s%c", directory, "sessions", DIR_SEPARATOR);
318
319 if ((GNUNET_YES == GNUNET_DISK_directory_test (save_dir, GNUNET_NO)) ||
322 iterate_save_session, save_dir);
323
324 GNUNET_free (save_dir);
325 }
326}
327
328
329static void
332{
333 GNUNET_assert ((session) && (next));
334
335 if (session == next)
336 return;
337
338 if (next->next)
339 sync_session_contact_from_next (session, next->next);
340 else
341 session->contact = next->contact;
342}
343
344
347 const struct GNUNET_HashCode *key,
348 void *value)
349{
350 struct GNUNET_MESSENGER_MemberSession *session;
351
353
354 session = value;
355
356 if (session->next)
357 sync_session_contact_from_next (session, session->next);
358
359 return GNUNET_YES;
360}
361
362
363void
365{
367
370}
371
372
376{
377 struct GNUNET_HashCode hash;
378
379 GNUNET_assert ((member) && (public_key));
380
381 GNUNET_CRYPTO_hash (public_key, sizeof(*public_key), &hash);
382
383 return GNUNET_CONTAINER_multihashmap_get (member->sessions, &hash);
384}
385
386
388{
390 const struct GNUNET_HashCode *hash;
391
393};
394
397 const struct GNUNET_HashCode *key,
398 void *value)
399{
401 struct GNUNET_MESSENGER_MemberSession *session;
402
403 GNUNET_assert ((cls) && (value));
404
405 search = cls;
406 session = value;
407
408 if (GNUNET_OK != verify_member_session_as_sender (session, search->message,
409 search->hash))
410 return GNUNET_YES;
411
412 search->match = session;
413 return GNUNET_NO;
414}
415
416
420{
421 struct GNUNET_MESSENGER_MemberSession *session;
422
424
426
427 if (session)
428 return session;
429
431
432 if (session)
433 add_member_session (member, session);
434
435 return session;
436}
437
438
441 const struct GNUNET_MESSENGER_Message *message,
442 const struct GNUNET_HashCode *hash)
443{
444 GNUNET_assert ((member) && (message) && (hash) &&
445 (0 == GNUNET_memcmp (&(member->id),
446 &(message->header.sender_id))));
447
448 if (GNUNET_MESSENGER_KIND_JOIN == message->header.kind)
449 return try_member_session (member, &(message->body.join.key));
450
451 {
453
454 search.message = message;
455 search.hash = hash;
456
457 search.match = NULL;
459 iterate_search_session, &search);
460
461 return search.match;
462 }
463}
464
465
466void
468 struct GNUNET_MESSENGER_MemberSession *session)
469{
470 const struct GNUNET_CRYPTO_PublicKey *public_key;
471 struct GNUNET_HashCode hash;
472
473 if (! session)
474 return;
475
476 GNUNET_assert ((member) && (session->member == member));
477
478 public_key = get_member_session_public_key (session);
479 GNUNET_CRYPTO_hash (public_key, sizeof(*public_key), &hash);
480
482 member->sessions, &hash, session,
485 "Adding a member session failed: %s\n",
486 GNUNET_h2s (&hash));
487}
488
489
490void
492 struct GNUNET_MESSENGER_MemberSession *session)
493{
494 const struct GNUNET_CRYPTO_PublicKey *public_key;
495 struct GNUNET_HashCode hash;
496
497 GNUNET_assert ((member) && (session) && (session->member == member));
498
499 public_key = get_member_session_public_key (session);
500 GNUNET_CRYPTO_hash (public_key, sizeof(*public_key), &hash);
501
503 &hash, session))
505 "Removing a member session failed: %s\n",
506 GNUNET_h2s (&hash));
507}
508
509
511{
513 void *cls;
514};
515
518 const struct GNUNET_HashCode *key,
519 void *value)
520{
522 struct GNUNET_MESSENGER_MemberSession *session;
523
524 GNUNET_assert ((cls) && (value));
525
526 iterate = cls;
527 session = value;
528
529 return iterate->it (iterate->cls, get_member_session_public_key (session),
530 session);
531}
532
533
534int
537 void *cls)
538{
540
541 GNUNET_assert ((member) && (member->sessions) && (it));
542
543 iterate.it = it;
544 iterate.cls = cls;
545
548 &iterate);
549}
550
551
552void
554 struct GNUNET_MESSENGER_Subscription *subscription)
555{
556 const struct GNUNET_ShortHashCode *discourse;
557
558 GNUNET_assert ((member) && (member->subscriptions) && (subscription));
559
560 discourse = get_subscription_discourse (subscription);
561
563 member->subscriptions, discourse, subscription,
566 "Adding a member subscription failed: %s\n",
567 GNUNET_sh2s (discourse));
568}
569
570
571void
573 struct GNUNET_MESSENGER_Subscription *subscription)
574{
575 const struct GNUNET_ShortHashCode *discourse;
576
577 GNUNET_assert ((member) && (member->subscriptions) && (subscription));
578
579 discourse = get_subscription_discourse (subscription);
580
582 ,
583 discourse,
584 subscription))
586 "Removing a member subscription failed: %s\n",
587 GNUNET_sh2s (discourse));
588}
589
590
593 const struct GNUNET_ShortHashCode *discourse)
594{
596
598}
599
600
601int
604 void *cls)
605{
606 GNUNET_assert ((member) && (member->subscriptions) && (it));
607
609 (
611 it,
612 cls);
613}
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:108
static char * config_file
Set to the name of the config file used.
Definition: gnunet-arm.c:83
struct GNUNET_HashCode key
The key used in the DHT.
static char * filename
static struct GNUNET_IDENTITY_Handle * id
Handle to IDENTITY.
static char * value
Value of the record to add/remove.
static enum GNUNET_GenericReturnValue iterate_member_sessions_it(void *cls, const struct GNUNET_HashCode *key, void *value)
void add_member_subscription(struct GNUNET_MESSENGER_Member *member, struct GNUNET_MESSENGER_Subscription *subscription)
Adds a given subscription to a member.
const struct GNUNET_ShortHashCode * get_member_id(const struct GNUNET_MESSENGER_Member *member)
Returns the current id of a given member.
void remove_member_session(struct GNUNET_MESSENGER_Member *member, struct GNUNET_MESSENGER_MemberSession *session)
Removes a given member session from its member.
struct GNUNET_MESSENGER_MemberSession * get_member_session_of(struct GNUNET_MESSENGER_Member *member, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Returns the member session of a member using a public key which can verify the signature of a given m...
static void sync_session_contact_from_next(struct GNUNET_MESSENGER_MemberSession *session, struct GNUNET_MESSENGER_MemberSession *next)
static struct GNUNET_MESSENGER_MemberSession * try_member_session(struct GNUNET_MESSENGER_Member *member, const struct GNUNET_CRYPTO_PublicKey *public_key)
void save_member(struct GNUNET_MESSENGER_Member *member, const char *directory)
Saves data from a member into a directory which can be load to restore the member completely.
static enum GNUNET_GenericReturnValue iterate_sync_session_contact(void *cls, const struct GNUNET_HashCode *key, void *value)
void destroy_member(struct GNUNET_MESSENGER_Member *member)
Destroys a member and frees its memory fully.
struct GNUNET_MESSENGER_MemberSession * get_member_session(const struct GNUNET_MESSENGER_Member *member, const struct GNUNET_CRYPTO_PublicKey *public_key)
Returns the member session of a member identified by a given public key.
struct GNUNET_MESSENGER_Subscription * get_member_subscription(struct GNUNET_MESSENGER_Member *member, const struct GNUNET_ShortHashCode *discourse)
Returns the active subscription of a given member to a selected discourse.
static enum GNUNET_GenericReturnValue iterate_destroy_subscription(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static enum GNUNET_GenericReturnValue iterate_destroy_session(void *cls, const struct GNUNET_HashCode *key, void *value)
struct GNUNET_MESSENGER_Member * create_member(struct GNUNET_MESSENGER_MemberStore *store, const struct GNUNET_ShortHashCode *id)
Creates and allocates a new member of a room with an optionally defined or random id.
void remove_member_subscription(struct GNUNET_MESSENGER_Member *member, struct GNUNET_MESSENGER_Subscription *subscription)
Removes a given subscription from a member.
void load_member_next_sessions(const struct GNUNET_MESSENGER_Member *member, const char *directory)
Loads data about next sessions from a directory into an empty loaded member which does not contain a ...
static enum GNUNET_GenericReturnValue iterate_load_next_session(void *cls, const struct GNUNET_HashCode *key, void *value)
void add_member_session(struct GNUNET_MESSENGER_Member *member, struct GNUNET_MESSENGER_MemberSession *session)
Adds a given member session to its member.
void sync_member_contacts(struct GNUNET_MESSENGER_Member *member)
Synchronizes contacts between all sessions from a given member and other sessions which are linked to...
int iterate_member_subscriptions(struct GNUNET_MESSENGER_Member *member, GNUNET_MESSENGER_SubscriptionIteratorCallback it, void *cls)
Iterate through all subscriptions of a given member and call the provided iterator callback with a se...
int iterate_member_sessions(struct GNUNET_MESSENGER_Member *member, GNUNET_MESSENGER_MemberIteratorCallback it, void *cls)
Iterate through all member sessions currently connected to a given member and call the provided itera...
void load_member(struct GNUNET_MESSENGER_MemberStore *store, const char *directory)
Loads data from a directory into a new allocated and created member of a store if the required inform...
static enum GNUNET_GenericReturnValue callback_scan_for_sessions(void *cls, const char *filename)
static enum GNUNET_GenericReturnValue iterate_search_session(void *cls, const struct GNUNET_HashCode *key, void *value)
static enum GNUNET_GenericReturnValue iterate_save_session(void *cls, const struct GNUNET_HashCode *key, void *value)
enum GNUNET_GenericReturnValue(* GNUNET_MESSENGER_SubscriptionIteratorCallback)(void *cls, const struct GNUNET_ShortHashCode *discourse, struct GNUNET_MESSENGER_Subscription *subscribtion)
void destroy_member_session(struct GNUNET_MESSENGER_MemberSession *session)
Destroys a member session and frees its memory fully.
const struct GNUNET_CRYPTO_PublicKey * get_member_session_public_key(const struct GNUNET_MESSENGER_MemberSession *session)
Returns the public key of a given member session.
void load_member_session_next(struct GNUNET_MESSENGER_MemberSession *session, const char *directory)
Loads the connection from one session to another through the next attribute.
void load_member_session(struct GNUNET_MESSENGER_Member *member, const char *directory)
Loads data from a directory into a new allocated and created member session of a member if the requir...
void save_member_session(struct GNUNET_MESSENGER_MemberSession *session, const char *directory)
Saves data from a member session into a directory which can be load to restore the member session com...
struct GNUNET_MESSENGER_MemberSession * create_member_session(struct GNUNET_MESSENGER_Member *member, const struct GNUNET_CRYPTO_PublicKey *pubkey)
Creates and allocates a new member session of a member with a given public key.
enum GNUNET_GenericReturnValue verify_member_session_as_sender(const struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Verifies a given member session as sender of a selected message and its hash.
struct GNUNET_MESSENGER_Member * add_store_member(struct GNUNET_MESSENGER_MemberStore *store, const struct GNUNET_ShortHashCode *id)
Adds a member to a store under a specific id and returns it on success.
enum GNUNET_GenericReturnValue(* GNUNET_MESSENGER_MemberIteratorCallback)(void *cls, const struct GNUNET_CRYPTO_PublicKey *public_key, struct GNUNET_MESSENGER_MemberSession *session)
const struct GNUNET_ShortHashCode * get_subscription_discourse(const struct GNUNET_MESSENGER_Subscription *subscribtion)
void destroy_subscription(struct GNUNET_MESSENGER_Subscription *subscribtion)
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_data(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, void *buf, size_t buf_size)
Get Crockford32-encoded fixed-size binary data from a configuration.
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create(const struct GNUNET_OS_ProjectData *pd)
Create a new configuration object.
void GNUNET_CONFIGURATION_set_value_string(struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, const char *value)
Set a configuration value that should be a string.
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_parse(struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename)
Parse a configuration file, add all of the options in the file to the configuration environment.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_write(struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename)
Write configuration file.
enum GNUNET_GenericReturnValue GNUNET_DISK_file_test(const char *fil)
Check that fil corresponds to a filename (of a file that exists and that is not a directory).
Definition: disk.c:506
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_test(const char *fil, int is_readable)
Test if fil is a directory and listable.
Definition: disk.c:427
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_create(const char *dir)
Implementation of "mkdir -p".
Definition: disk.c:520
int GNUNET_DISK_directory_scan(const char *dir_name, GNUNET_FileNameCallback callback, void *callback_cls)
Scan a directory for files.
Definition: disk.c:811
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
Definition: crypto_hash.c:41
int GNUNET_CONTAINER_multihashmap_iterate(struct GNUNET_CONTAINER_MultiHashMap *map, GNUNET_CONTAINER_MultiHashMapIteratorCallback it, void *it_cls)
Iterate over all entries in the map.
enum GNUNET_GenericReturnValue(* GNUNET_CONTAINER_ShortmapIterator)(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
Iterator over hash map entries.
void * GNUNET_CONTAINER_multihashmap_get(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Given a key find a value in the map matching the key.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_remove(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, const void *value)
Remove the given key-value pair from the map.
struct GNUNET_CONTAINER_MultiShortmap * GNUNET_CONTAINER_multishortmap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multishortmap_put(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
void * GNUNET_CONTAINER_multishortmap_get(const struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key)
Given a key find a value in the map matching the key.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
int GNUNET_CONTAINER_multishortmap_iterate(struct GNUNET_CONTAINER_MultiShortmap *map, GNUNET_CONTAINER_ShortmapIterator it, void *it_cls)
Iterate over all entries in the map.
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
void GNUNET_CONTAINER_multishortmap_destroy(struct GNUNET_CONTAINER_MultiShortmap *map)
Destroy a hash map.
int GNUNET_CONTAINER_multishortmap_remove(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, const void *value)
Remove the given key-value pair from the map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST
, ' bother checking if a value already exists (faster than GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE...
#define GNUNET_log(kind,...)
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
GNUNET_GenericReturnValue
Named constants for return values.
@ GNUNET_OK
@ GNUNET_YES
@ GNUNET_NO
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
const char * GNUNET_sh2s(const struct GNUNET_ShortHashCode *shc)
Convert a short hash value to a string (for printing debug messages).
const char * GNUNET_h2s(const struct GNUNET_HashCode *hc)
Convert a hash value to a string (for printing debug messages).
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_DEBUG
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
@ GNUNET_MESSENGER_KIND_JOIN
The join kind.
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_gnunet(void)
Return default project data used by 'libgnunetutil' for GNUnet.
char * GNUNET_STRINGS_data_to_string_alloc(const void *buf, size_t size)
Return the base32crockford encoding of the given buffer.
Definition: strings.c:787
enum GNUNET_GenericReturnValue generate_free_member_id(struct GNUNET_ShortHashCode *id, const struct GNUNET_CONTAINER_MultiShortmap *members)
Tries to generate an unused member id and store it into the id parameter.
#define DIR_SEPARATOR
Definition: platform.h:165
An identity key as per LSD0001.
A 512-bit hashcode.
GNUNET_MESSENGER_MemberIteratorCallback it
const struct GNUNET_MESSENGER_Message * message
struct GNUNET_MESSENGER_MemberSession * match
struct GNUNET_MESSENGER_MemberSession * next
struct GNUNET_CONTAINER_MultiShortmap * members
struct GNUNET_CONTAINER_MultiHashMap * sessions
struct GNUNET_CONTAINER_MultiShortmap * subscriptions
struct GNUNET_MESSENGER_MemberStore * store
struct GNUNET_ShortHashCode id
struct GNUNET_MESSENGER_MessageJoin join
enum GNUNET_MESSENGER_MessageKind kind
The kind of the message.
struct GNUNET_ShortHashCode sender_id
The senders id inside of the room the message was sent in.
struct GNUNET_CRYPTO_PublicKey key
The senders public key to verify its signatures.
struct GNUNET_MESSENGER_MessageHeader header
Header.
struct GNUNET_MESSENGER_MessageBody body
Body.
A 256-bit hashcode.