42 uint32_t *members_count)
46 uint32_t allocation_count;
79 members[count++] = contact;
81 *members_count = count;
88 if ((previous) && (previous->
members))
94 if (previous->
members[count] == contact)
108 members[count] = previous->
members[count];
110 if (count < allocation_count)
111 members[count++] = contact;
113 *members_count = count;
128 if ((previous) && (previous->
members) && (contact))
143 if (previous->
members[index] != contact)
144 members[count++] = previous->
members[index];
146 *members_count = count;
181 if (! allocation_count)
184 if (allocation_count > duplicates)
185 allocation_count -= duplicates;
187 allocation_count = 1;
204 for (duplicates = 0; duplicates < prev0->
members_count; duplicates++
223 else if ((prev0) && (! prev1) && (prev0->
members))
243 else if ((! prev0) && (prev1) && (prev1->
members))
431 uint32_t *members_count)
435 uint32_t allocation_count;
468 members[count++] = member;
477 *members_count = count;
585 announcement =
value;
674 uint32_t members_count;
682 epoch->
room, &(epoch->
hash), &members_count);
752 if (! epoch->private_key)
779 else if (count <
max)
800 announcement =
value;
819 announcement =
value;
900 else if (count <
max)
1062 if (
epoch == previous)
1069 announcement = NULL;
1071 if ((! announcement) ||
1077 return announcement;
1099 if (
epoch == previous)
1119 if (previous == other)
1128 group = other_group;
1154 result = strcmp (key_string, str);
1210 if (contact == entry->
sender)
1312 if (contact == epoch->
members[i])
1325 uint32_t members_count;
1332 announced = membership?
1335 if (members_count <= announced)
1340 if (position > announced)
1341 position -= announced;
1345 return (0.0 + position) / (members_count - announced);
1482 if (group == subgroup)
1607 main_announcement, &(
1690 if (! group_message)
1724 if (! group_message)
1755 if (! proposal_group)
1776 announcement =
value;
static struct GNUNET_TIME_Relative timeout
User defined timestamp for completing operations.
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
static int result
Global testing status.
static unsigned int epochs
-e option.
enum GNUNET_GenericReturnValue update_room_message(struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
void GNUNET_CRYPTO_ecdhe_key_create(struct GNUNET_CRYPTO_EcdhePrivateKey *pk)
Create a new private key.
int GNUNET_CRYPTO_hash_cmp(const struct GNUNET_HashCode *h1, const struct GNUNET_HashCode *h2)
Compare function for HashCodes, producing a total ordering of all hashcodes.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_contains(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Check if the map contains any value under the given key (including values that are NULL).
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.
void GNUNET_CONTAINER_multishortmap_iterator_destroy(struct GNUNET_CONTAINER_MultiShortmapIterator *iter)
Destroy a multishortmap iterator.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_iterator_next(struct GNUNET_CONTAINER_MultiHashMapIterator *iter, struct GNUNET_HashCode *key, const void **value)
Retrieve the next element from the hash map at the iterator's position.
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.
struct GNUNET_CONTAINER_MultiShortmapIterator * GNUNET_CONTAINER_multishortmap_iterator_create(const struct GNUNET_CONTAINER_MultiShortmap *map)
Create an iterator for a multihashmap.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multishortmap_iterator_next(struct GNUNET_CONTAINER_MultiShortmapIterator *iter, struct GNUNET_ShortHashCode *key, const void **value)
Retrieve the next element from the hash map at the iterator's position.
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_get_multiple(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, GNUNET_CONTAINER_ShortmapIterator it, void *it_cls)
Iterate over all entries in the map that match a particular key.
unsigned int GNUNET_CONTAINER_multihashmap_clear(struct GNUNET_CONTAINER_MultiHashMap *map)
Remove all entries from the map.
void GNUNET_CONTAINER_multihashmap_iterator_destroy(struct GNUNET_CONTAINER_MultiHashMapIterator *iter)
Destroy a multihashmap iterator.
unsigned int GNUNET_CONTAINER_multishortmap_size(const struct GNUNET_CONTAINER_MultiShortmap *map)
Get the number of key-value pairs in the 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.
struct GNUNET_CONTAINER_MultiHashMapIterator * GNUNET_CONTAINER_multihashmap_iterator_create(const struct GNUNET_CONTAINER_MultiHashMap *map)
Create an iterator for a multihashmap.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST
, ' bother checking if a value already exists (faster than GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE...
#define GNUNET_is_zero(a)
Check that memory in a is all zeros.
char * GNUNET_CRYPTO_public_key_to_string(const struct GNUNET_CRYPTO_PublicKey *key)
Creates a (Base32) string representation of the public key.
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
#define GNUNET_UNUSED
gcc-ism to document unused arguments
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
GNUNET_GenericReturnValue
Named constants for return values.
@ GNUNET_SCHEDULER_PRIORITY_HIGH
Run with high priority (important requests).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
@ GNUNET_MESSENGER_KIND_LEAVE
The leave kind.
@ GNUNET_MESSENGER_KIND_JOIN
The join kind.
@ GNUNET_MESSENGER_KIND_MERGE
The merge kind.
@ GNUNET_MESSENGER_KIND_GROUP
The group kind.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed_with_priority(struct GNUNET_TIME_Relative delay, enum GNUNET_SCHEDULER_Priority priority, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_zero_(void)
Return relative time of 0ms.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_zero_(void)
Return absolute time of 0ms.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining(struct GNUNET_TIME_Absolute future)
Given a timestamp in the future, how much time remains until then?
bool GNUNET_TIME_relative_is_zero(struct GNUNET_TIME_Relative rel)
Test if rel is zero.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Add a given relative duration to the given start time.
void enqueue_message_to_room(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *epoch, struct GNUNET_MESSENGER_Message *message, struct GNUNET_MESSENGER_Message *transcript, enum GNUNET_GenericReturnValue sync)
Enqueus a message and its optional transcript for sending it to a given room and epoch.
void require_message_from_room(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Requires a specific message in a given room which can be identified by its hash.
uint32_t get_epoch_member_position(const struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Contact *contact)
Returns the index position of a specific contact inside a given epoch in relation to its list of memb...
void invalidate_epoch_keys_by_member(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Contact *contact)
Invalidates all announced epoch and group keys by a specific contact inside a given epoch.
const struct GNUNET_TIME_Relative get_epoch_private_key_timeout(const struct GNUNET_MESSENGER_Epoch *epoch)
Returns the current relative timeout for the private key (ECDHE) of a given epoch that limits the usa...
static int compare_member_public_keys(const char *key_string, const struct GNUNET_CRYPTO_PublicKey *key)
static const struct GNUNET_MESSENGER_Contact ** get_members_of_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *epoch, uint32_t *members_count)
static const struct GNUNET_MESSENGER_Contact ** get_members_of_new_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *epoch, uint32_t *members_count)
uint32_t get_epoch_size(const struct GNUNET_MESSENGER_Epoch *epoch)
Returns the amount of members by a given epoch or zero as long as it's not fully initialized yet.
struct GNUNET_MESSENGER_Epoch * create_new_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Creates and allocates a new epoch in a given room which can be identified by a specific hash.
void cancel_epoch_proposal_group(struct GNUNET_MESSENGER_Epoch *epoch)
Cancels the current proposal of a new group from a given epoch.
static enum GNUNET_GenericReturnValue is_epoch_member_in_room_graph(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *epoch, const struct GNUNET_MESSENGER_Contact *contact, struct GNUNET_CONTAINER_MultiHashMap *map)
static enum GNUNET_GenericReturnValue is_other_epoch_group_better(const struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_MESSENGER_EpochGroup *other)
struct GNUNET_MESSENGER_Epoch * create_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Creates and allocates an epoch in a given room which can be identified by a specific hash.
static enum GNUNET_GenericReturnValue it_find_valid_group_with_most_members(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
struct GNUNET_MESSENGER_EpochGroup * get_epoch_group(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier, enum GNUNET_GenericReturnValue valid)
Returns the epoch group of a given epoch using a specific unique identifier or NULL.
static enum GNUNET_GenericReturnValue iterate_destroy_announcement(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static enum GNUNET_GenericReturnValue iterate_destroy_group(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
const struct GNUNET_MESSENGER_EpochAnnouncement * get_epoch_previous_announcement(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier)
Returns the epoch announcement of a previous epoch from a given epoch using a specific announcement i...
void update_epoch_announcement(struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Updates the main announcement of a given epoch, looking into replacing the current main announcement ...
static enum GNUNET_GenericReturnValue it_find_valid_announcement_with_most_members(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
enum GNUNET_GenericReturnValue delay_epoch_message_for_its_members(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_HashCode *hash)
Adds a message with a given hash to a list that can be delayed in processing for the members of a spe...
static void set_epoch_proposing(struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_TIME_Relative timeout)
const struct GNUNET_MESSENGER_EpochGroup * get_epoch_previous_group(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier)
Returns the epoch group of a previous epoch from a given epoch using a specific group identifier.
static enum GNUNET_GenericReturnValue it_handle_epoch_message_delayed(void *cls, const struct GNUNET_HashCode *key, void *value)
enum GNUNET_GenericReturnValue is_epoch_member(const struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Contact *contact)
Returns whether a specific contact is member of a given epoch.
void set_epoch_proposal_group(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_HashCode *hash)
Sets the current group of proposal for a given epoch to the group specified by a message identified b...
const struct GNUNET_CRYPTO_EcdhePrivateKey * get_epoch_private_key(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_TIME_Relative timeout)
Returns the asymmetric private key (ECDHE) from a handle for a given epoch that can be used for HPKE ...
void destroy_epoch(struct GNUNET_MESSENGER_Epoch *epoch)
Destroys an epoch and frees its memory fully from the client API.
static enum GNUNET_GenericReturnValue is_epoch_subgroup_of_any_group(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_EpochGroup *subgroup)
struct GNUNET_MESSENGER_EpochAnnouncement * get_epoch_announcement(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier, enum GNUNET_GenericReturnValue valid)
Returns the epoch announcement of a given epoch using a specific unique identifier or NULL.
void reset_epoch_size(struct GNUNET_MESSENGER_Epoch *epoch)
Resets the amount of members by a given epoch to recalculate the exact amount.
static enum GNUNET_GenericReturnValue is_other_epoch_announcement_better(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_EpochAnnouncement *other)
static enum GNUNET_GenericReturnValue is_epoch_member_in_room(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *epoch, const struct GNUNET_MESSENGER_Contact *contact)
static enum GNUNET_GenericReturnValue iterate_epoch_announcement_invalidation(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static void on_epoch_proposal_timeout(void *cls)
static void add_following_epoch(struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_MESSENGER_Epoch *follow)
void propose_epoch_group(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_TIME_Relative timeout)
Tries to propose a new group inside a given epoch that will automatically be formed by using the clie...
static enum GNUNET_GenericReturnValue it_find_group_with_most_members(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
double get_epoch_position_factor(const struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Contact *contact, const struct GNUNET_MESSENGER_EpochMembership *membership)
Returns a relative member positon of a specific contact inside a given epoch in relation to its list ...
void send_epoch_message(const struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_MESSENGER_Message *message)
Sends a created and allocated message in a room of a given epoch enforcing the message gets interpret...
enum GNUNET_GenericReturnValue is_epoch_member_in_any_group(struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Contact *contact)
const struct GNUNET_MESSENGER_EpochGroup * get_epoch_proposal_group(struct GNUNET_MESSENGER_Epoch *epoch)
Returns the current group of proposal for a given epoch.
static void setup_following_epochs_of_previous(struct GNUNET_MESSENGER_Epoch *epoch)
static enum GNUNET_GenericReturnValue it_find_announcement_with_most_members(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
void update_epoch_group(struct GNUNET_MESSENGER_Epoch *epoch, struct GNUNET_MESSENGER_EpochGroup *group)
Updates the main group of a given epoch, looking into replacing the current main group with a specifi...
static enum GNUNET_GenericReturnValue is_epoch_sender_in_room(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *epoch, const struct GNUNET_MESSENGER_Contact *contact)
static enum GNUNET_GenericReturnValue is_epoch_proposing(const struct GNUNET_MESSENGER_Epoch *epoch)
static enum GNUNET_GenericReturnValue iterate_epoch_group_invalidation(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
static enum GNUNET_GenericReturnValue it_move_epoch_groups_from_previous_epoch(void *cls, const struct GNUNET_ShortHashCode *key, void *value)
enum GNUNET_GenericReturnValue is_epoch_previous_of_other(const struct GNUNET_MESSENGER_Epoch *epoch, const struct GNUNET_MESSENGER_Epoch *other)
Returns whether a given epoch is the epoch before some other epoch.
enum GNUNET_GenericReturnValue get_epoch_announcement_member_hash(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement, struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue other)
Provides an announcement hash of a member from a given epoch announcement.
struct GNUNET_MESSENGER_EpochAnnouncement * create_epoch_announcement(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier, enum GNUNET_GenericReturnValue valid)
Creates and allocates a new epoch announcement for a given epoch using a specific announcement identi...
const struct GNUNET_CRYPTO_SymmetricSessionKey * get_epoch_announcement_key(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns the secret key of a given epoch announcement or NULL.
void destroy_epoch_announcement(struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Destroys a given epoch announcement and frees its resources.
void invalidate_epoch_announcement(struct GNUNET_MESSENGER_EpochAnnouncement *announcement, const struct GNUNET_MESSENGER_Contact *contact)
Invalidates a given epoch announcement by a specific contact.
enum GNUNET_GenericReturnValue is_epoch_announcement_announced(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns whether the client has announced being part of a given epoch announcement owning its secret k...
uint32_t get_epoch_announcement_members_count(const struct GNUNET_MESSENGER_EpochAnnouncement *announcement)
Returns the current amount of members of a given epoch announcement.
enum GNUNET_GenericReturnValue send_epoch_group_announcement(struct GNUNET_MESSENGER_EpochGroup *group)
Tries to send an announcement message by the client for a given epoch group using its secret key.
enum GNUNET_GenericReturnValue is_epoch_group_announced(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns whether the client has announced being part of a given epoch group owning its secret key.
enum GNUNET_GenericReturnValue is_epoch_group_compatible(const struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_MESSENGER_Epoch *epoch)
Returns whether a given epoch group is compatible with a specific epoch with its members.
enum GNUNET_GenericReturnValue is_epoch_group_proposal(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns whether a given epoch group is the current proposal of the client.
void invalidate_epoch_group(struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_MESSENGER_Contact *contact)
Invalidates a given epoch group by a specific contact.
uint32_t get_epoch_group_members_count(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns the current amount of members of a given epoch group.
enum GNUNET_GenericReturnValue is_epoch_group_subgroup_of(const struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_MESSENGER_EpochGroup *other)
Returns whether a given epoch group is subgroup of a specific other group.
enum GNUNET_GenericReturnValue send_epoch_group(struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_HashCode *initiator_event, const struct GNUNET_HashCode *partner_event, struct GNUNET_TIME_Relative timeout)
Tries to send a group message by the client for a given epoch group to propose it forming a group out...
struct GNUNET_MESSENGER_EpochGroup * create_epoch_group(struct GNUNET_MESSENGER_Epoch *epoch, const union GNUNET_MESSENGER_EpochIdentifier *identifier, uint32_t level, enum GNUNET_GenericReturnValue valid)
Creates and allocates a new epoch group for a given epoch using a specific group identifier or NULL a...
void destroy_epoch_group(struct GNUNET_MESSENGER_EpochGroup *group)
Destroys a given epoch group and frees its resources.
enum GNUNET_GenericReturnValue is_epoch_group_member(const struct GNUNET_MESSENGER_EpochGroup *group, const struct GNUNET_MESSENGER_Contact *contact)
Returns whether a specific contact is confirmed member of a given epoch group.
enum GNUNET_GenericReturnValue is_epoch_group_completed(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns whether a given epoch group is complete in terms of confirmed announcements from its members.
uint32_t get_epoch_group_level(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns the group level of a given epoch group.
const struct GNUNET_CRYPTO_SymmetricSessionKey * get_epoch_group_key(const struct GNUNET_MESSENGER_EpochGroup *group)
Returns the secret key of a given epoch group or NULL.
enum GNUNET_GenericReturnValue get_epoch_group_member_hash(const struct GNUNET_MESSENGER_EpochGroup *group, struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue other)
Provides an announcement hash of a member from a given epoch group.
uint32_t get_epoch_membership_count(const struct GNUNET_MESSENGER_EpochMembership *membership)
Returns the current amount of individual members inside a given epoch membership.
struct GNUNET_TIME_Relative get_message_timeout(const struct GNUNET_MESSENGER_Message *message)
Return the relative timeout of the content from a given message that controls when a delayed handling...
struct GNUNET_MESSENGER_Epoch * get_room_message_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns the epoch of a local message with a given hash in a room.
struct GNUNET_MESSENGER_Contact * get_room_sender(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns a messages sender locally stored from a map for a given hash in a room.
const struct GNUNET_MESSENGER_Message * get_room_message(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Returns a message locally stored from a map for a given hash in a room.
struct GNUNET_MESSENGER_Epoch * get_room_epoch(struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue recent)
Returns the epoch in a given room from a specific epoch hash that represents the exact message the ep...
static struct GNUNET_CONTAINER_MultiPeerMap * map
Peermap of PeerIdentities to "struct PeerEntry" (for fast lookup).
Cursor into a multihashmap.
Internal representation of the hash map.
Cursor into a multishortmap.
Private ECC key encoded for transmission.
An identity key as per LSD0001.
enum GNUNET_GenericReturnValue valid
struct GNUNET_MESSENGER_Epoch * epoch
union GNUNET_MESSENGER_EpochIdentifier identifier
enum GNUNET_GenericReturnValue valid
struct GNUNET_MESSENGER_Epoch * epoch
union GNUNET_MESSENGER_EpochIdentifier identifier
struct GNUNET_MESSENGER_Room * room
struct GNUNET_CONTAINER_MultiHashMap * waiting
struct GNUNET_CONTAINER_MultiShortmap * announcements
struct GNUNET_MESSENGER_Epoch ** following
struct GNUNET_MESSENGER_EpochGroup * main_group
struct GNUNET_SCHEDULER_Task * proposal_timeout
struct GNUNET_CONTAINER_MultiShortmap * nonces
struct GNUNET_TIME_Absolute private_key_expiration
struct GNUNET_MESSENGER_EpochAnnouncement * main_announcement
struct GNUNET_CRYPTO_EcdhePrivateKey * private_key
struct GNUNET_CONTAINER_MultiShortmap * groups
const struct GNUNET_MESSENGER_Contact ** members
struct GNUNET_TIME_Absolute proposal_expiration
struct GNUNET_HashCode proposal_hash
struct GNUNET_HashCode hash
enum GNUNET_GenericReturnValue group_keys
struct GNUNET_MESSENGER_MessageGroup group
struct GNUNET_MESSENGER_MessageMerge merge
struct GNUNET_MESSENGER_MessageLeave leave
struct GNUNET_MESSENGER_MessageJoin join
union GNUNET_MESSENGER_EpochIdentifier identifier
The identifier of the group in an epoch.
struct GNUNET_HashCode epoch
The previous epoch the message was sent from.
struct GNUNET_HashCode epoch
The previous epoch the message was sent from.
struct GNUNET_HashCode previous
The hash of a second previous message.
struct GNUNET_HashCode epochs[2]
The previous epochs the message was sent from.
struct GNUNET_MESSENGER_MessageHeader header
Header.
struct GNUNET_MESSENGER_MessageBody body
Body.
struct GNUNET_HashCode epoch
struct GNUNET_MESSENGER_Contact * sender
struct GNUNET_MESSENGER_Handle * handle
struct GNUNET_CONTAINER_MultiShortmap * members
struct GNUNET_CONTAINER_MultiHashMap * messages
Time for relative time used by GNUnet, in microseconds.
An epoch identifier unifies an epoch identifier code and its 256bit hash representation.
struct GNUNET_ShortHashCode hash
struct GNUNET_MESSENGER_EpochIdentifierCode code