GNUnet MESSENGER service. More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet-service-messenger_message_kind.h"
#include "gnunet-service-messenger_member_session.h"
#include "gnunet-service-messenger_tunnel.h"
#include "messenger_api_message.h"
Go to the source code of this file.
Functions | |
int | recv_message_info (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received info message to change the current member id to the one generated by the host connected to. More... | |
int | recv_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received peer message to link it to its origin tunnel if the peer identity matches. More... | |
int | recv_message_request (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received request message by checking for the requested message and forwarding it back if the message was found. More... | |
GNUnet MESSENGER service.
Definition in file gnunet-service-messenger_message_recv.h.
int recv_message_info | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SrvTunnel * | tunnel, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received info message to change the current member id to the one generated by the host connected to.
(all current tunnels will be informed about the id change)
[in,out] | room | Room of the message |
[in,out] | tunnel | Receiving connection |
[in] | message | INFO-Message |
[in] | hash | Hash of the message |
Definition at line 78 of file gnunet-service-messenger_message_recv.c.
References GNUNET_MESSENGER_SrvRoom::basement, GNUNET_MESSENGER_Message::body, check_srv_room_peer_status(), contains_list_tunnels(), create_message_info(), disconnect_tunnel(), get_srv_handle_ego(), get_srv_room_member_store(), get_tunnel_messenger_version(), get_tunnel_peer_identity(), GNUNET_NO, GNUNET_OK, GNUNET_YES, GNUNET_MESSENGER_SrvRoom::host, GNUNET_MESSENGER_MessageBody::info, iterate_forward_members(), iterate_store_members(), GNUNET_MESSENGER_MessageInfo::messenger_version, peer, GNUNET_MESSENGER_MemberStore::room, send_tunnel_message(), and update_tunnel_messenger_version().
Referenced by handle_tunnel_message().
int recv_message_peer | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SrvTunnel * | tunnel, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received peer message to link it to its origin tunnel if the peer identity matches.
(the peer message and the member id can potentially be linked to the tunnel)
[in,out] | room | Room of the message |
[in,out] | tunnel | Receiving connection |
[in] | message | PEER-Message |
[in] | hash | Hash of the message |
Definition at line 117 of file gnunet-service-messenger_message_recv.c.
References GNUNET_MESSENGER_Message::body, GNUNET_memcmp, GNUNET_memcpy, GNUNET_new, GNUNET_PEER_resolve(), GNUNET_YES, GNUNET_MESSENGER_MessagePeer::peer, GNUNET_MESSENGER_MessageBody::peer, GNUNET_MESSENGER_SrvTunnel::peer, peer, and GNUNET_MESSENGER_SrvTunnel::peer_message.
Referenced by handle_tunnel_message().
int recv_message_request | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SrvTunnel * | tunnel, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received request message by checking for the requested message and forwarding it back if the message was found.
(this can also cause this peer to send a new request instead of only forwarding the received one)
[in,out] | room | Room of the message |
[in,out] | tunnel | Receiving connection |
[in] | message | REQUEST-Message |
[in] | hash | Hash of the message |
Definition at line 164 of file gnunet-service-messenger_message_recv.c.
References GNUNET_MESSENGER_Message::body, callback_found_message(), check_member_session_history(), get_member_session_of(), get_srv_room_member_store(), get_store_member_of(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, GNUNET_NO, GNUNET_YES, GNUNET_MESSENGER_MessageRequest::hash, GNUNET_MESSENGER_MemberSession::member, GNUNET_MESSENGER_MessageBody::request, request_srv_room_message(), and GNUNET_MESSENGER_MemberStore::room.
Referenced by handle_tunnel_message().