Go to the source code of this file.
Functions | |
static void | handle_member_session_switch (struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
void | handle_message_join (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent join message to make changes of current member information. More... | |
void | handle_message_leave (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent leave message to make changes of current member information. More... | |
void | handle_message_key (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent key message to change the key of a member and rearrange the contacts accordingly. More... | |
void | handle_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent peer message to make changes of the basement in the room. More... | |
void | handle_message_id (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent id message to change a members id. More... | |
void | handle_message_miss (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent miss message to drop a peer from the basement in the room. More... | |
void | handle_message_delete (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent delete message to delete a specific message from the store. More... | |
void | handle_message_connection (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent connection message to update connection information about a peer. More... | |
void | handle_message_subscribe (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SenderSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received or sent subscribe message to subscribe a member to a discourse. More... | |
|
static |
Definition at line 31 of file gnunet-service-messenger_message_handle.c.
References add_member_session(), GNUNET_assert, GNUNET_MESSENGER_MemberSession::member, GNUNET_MESSENGER_MemberSession::next, and switch_member_session().
Referenced by handle_message_id(), and handle_message_key().
void handle_message_join | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent join message to make changes of current member information.
(add matching member and clear member info)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | JOIN-Message |
[in] | hash | Hash of the message |
Definition at line 47 of file gnunet-service-messenger_message_handle.c.
References GNUNET_MESSENGER_Message::body, get_srv_room_key(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_OK, GNUNET_sh2s(), GNUNET_TIME_absolute_ntoh(), GNUNET_MESSENGER_Message::header, GNUNET_MESSENGER_MessageBody::join, GNUNET_MESSENGER_MessageJoin::key, GNUNET_MESSENGER_SenderSession::member, reset_member_session(), GNUNET_MESSENGER_MessageHeader::sender_id, solve_srv_room_member_collisions(), and GNUNET_MESSENGER_MessageHeader::timestamp.
Referenced by callback_room_handle_message().
void handle_message_leave | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent leave message to make changes of current member information.
(remove matching member and clear member info)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | LEAVE-Message |
[in] | hash | Hash of the message |
Definition at line 69 of file gnunet-service-messenger_message_handle.c.
References close_member_session(), get_srv_room_key(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, GNUNET_sh2s(), GNUNET_MESSENGER_Message::header, GNUNET_MESSENGER_SenderSession::member, and GNUNET_MESSENGER_MessageHeader::sender_id.
Referenced by callback_room_handle_message().
void handle_message_key | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent key message to change the key of a member and rearrange the contacts accordingly.
(move the member in the contacts and change its key)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | KEY-Message |
[in] | hash | Hash of the message |
Definition at line 83 of file gnunet-service-messenger_message_handle.c.
References handle_member_session_switch(), and GNUNET_MESSENGER_SenderSession::member.
Referenced by callback_room_handle_message().
void handle_message_peer | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent peer message to make changes of the basement in the room.
(add a new peer to the basement and restructure connections based on updated list of peers)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | PEER-Message |
[in] | hash | Hash of the message |
Definition at line 93 of file gnunet-service-messenger_message_handle.c.
References add_to_list_tunnels(), GNUNET_MESSENGER_SrvRoom::basement, GNUNET_MESSENGER_Message::body, contains_list_tunnels(), get_srv_room_peer_store(), GNUNET_memcmp, GNUNET_NO, GNUNET_YES, GNUNET_MESSENGER_MessagePeer::peer, GNUNET_MESSENGER_MessageBody::peer, GNUNET_MESSENGER_SenderSession::peer, GNUNET_MESSENGER_SrvRoom::peer_message, rebuild_srv_room_basement_structure(), and update_store_peer().
Referenced by callback_room_handle_message().
void handle_message_id | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent id message to change a members id.
(change id of matching member)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | ID-Message |
[in] | hash | Hash of the message |
Definition at line 115 of file gnunet-service-messenger_message_handle.c.
References GNUNET_MESSENGER_Message::body, get_member_session_public_key(), GNUNET_TIME_absolute_ntoh(), handle_member_session_switch(), GNUNET_MESSENGER_Message::header, GNUNET_MESSENGER_MessageId::id, GNUNET_MESSENGER_MessageBody::id, GNUNET_MESSENGER_SenderSession::member, solve_srv_room_member_collisions(), and GNUNET_MESSENGER_MessageHeader::timestamp.
Referenced by callback_room_handle_message().
void handle_message_miss | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent miss message to drop a peer from the basement in the room.
(remove a peer from the basement and restructure connections based on updated list of peers)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | MISS-Message |
[in] | hash | Hash of the message |
Definition at line 132 of file gnunet-service-messenger_message_handle.c.
References GNUNET_MESSENGER_SrvRoom::basement, GNUNET_MESSENGER_Message::body, find_list_tunnels(), get_srv_room_peer_store(), GNUNET_memcmp, GNUNET_NO, GNUNET_MESSENGER_MessageBody::miss, GNUNET_MESSENGER_MessageMiss::peer, GNUNET_MESSENGER_SenderSession::peer, GNUNET_MESSENGER_SrvRoom::peer_message, rebuild_srv_room_basement_structure(), remove_from_list_tunnels(), and update_store_peer().
Referenced by callback_room_handle_message().
void handle_message_delete | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent delete message to delete a specific message from the store.
(remove a message from the store of a room under a given delay)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | DELETE-Message |
[in] | hash | Hash of the message |
Definition at line 159 of file gnunet-service-messenger_message_handle.c.
References consensus-simulation::action, GNUNET_MESSENGER_Message::body, GNUNET_MESSENGER_MessageDelete::delay, delete_srv_room_message(), GNUNET_MESSENGER_MessageBody::deletion, GNUNET_TIME_absolute_add(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_difference(), GNUNET_TIME_absolute_ntoh(), GNUNET_TIME_relative_ntoh(), GNUNET_MESSENGER_MessageDelete::hash, GNUNET_MESSENGER_Message::header, GNUNET_MESSENGER_SenderSession::member, and GNUNET_MESSENGER_MessageHeader::timestamp.
Referenced by callback_room_handle_message().
void handle_message_connection | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent connection message to update connection information about a peer.
(update a peer in the basement)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | DELETE-Message |
[in] | hash | Hash of the message |
Definition at line 180 of file gnunet-service-messenger_message_handle.c.
References GNUNET_MESSENGER_SrvRoom::basement, GNUNET_MESSENGER_Message::body, GNUNET_MESSENGER_MessageBody::connection, GNUNET_MESSENGER_ListTunnel::connection, find_list_tunnels(), and GNUNET_MESSENGER_SenderSession::peer.
Referenced by callback_room_handle_message().
void handle_message_subscribe | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SenderSession * | session, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received or sent subscribe message to subscribe a member to a discourse.
(subscribe a member to a discourse)
[in,out] | room | Room of the message |
[in,out] | session | Sender session |
[in] | message | SUBSCRIBE-Message |
[in] | hash | Hash of the message |
Definition at line 198 of file gnunet-service-messenger_message_handle.c.
References add_member_subscription(), GNUNET_MESSENGER_Message::body, cleanup_srv_room_discourse_messages(), create_subscription(), GNUNET_MESSENGER_MessageSubscribe::discourse, GNUNET_MESSENGER_Subscription::discourse, duration, get_member_subscription(), GNUNET_TIME_absolute_ntoh(), GNUNET_TIME_relative_ntoh(), GNUNET_MESSENGER_Message::header, GNUNET_MESSENGER_MemberSession::member, GNUNET_MESSENGER_SenderSession::member, GNUNET_MESSENGER_Subscription::member, GNUNET_MESSENGER_MessageBody::subscribe, GNUNET_MESSENGER_MessageSubscribe::time, GNUNET_MESSENGER_MessageHeader::timestamp, timestamp(), update_subscription(), and update_subscription_timing().
Referenced by callback_room_handle_message().