#include "gnunet-service-messenger_tunnel.h"
Go to the source code of this file.
Functions | |
enum GNUNET_GenericReturnValue | 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... | |
enum GNUNET_GenericReturnValue | 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... | |
enum GNUNET_GenericReturnValue | recv_message_miss (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) |
Handles a received miss message to react to activity in the basement of a room. More... | |
enum GNUNET_GenericReturnValue | 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... | |
enum GNUNET_GenericReturnValue 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 101 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(), forward_tunnel_message(), get_srv_room_member_store(), get_srv_room_message_store(), get_store_message(), get_tunnel_messenger_version(), get_tunnel_peer_identity(), GNUNET_NO, GNUNET_OK, GNUNET_YES, GNUNET_MESSENGER_ListTunnel::hash, GNUNET_MESSENGER_ListTunnels::head, GNUNET_MESSENGER_SrvRoom::host, GNUNET_MESSENGER_MessageBody::info, iterate_forward_members(), iterate_store_members(), msg, GNUNET_MESSENGER_ListTunnel::next, send_tunnel_message(), GNUNET_MESSENGER_SrvRoom::service, and update_tunnel_messenger_version().
Referenced by handle_tunnel_message().
enum GNUNET_GenericReturnValue 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 161 of file gnunet-service-messenger_message_recv.c.
References GNUNET_MESSENGER_SrvRoom::basement, 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, GNUNET_MESSENGER_SrvTunnel::peer_message, and update_to_list_tunnels().
Referenced by handle_tunnel_message().
enum GNUNET_GenericReturnValue recv_message_miss | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_SrvTunnel * | tunnel, | ||
const struct GNUNET_MESSENGER_Message * | message, | ||
const struct GNUNET_HashCode * | hash | ||
) |
Handles a received miss message to react to activity in the basement of a room.
(the miss message can cause automatic opening of the room)
[in,out] | room | Room of the message |
[in,out] | tunnel | Receiving connection |
[in] | message | MISS-Message |
[in] | hash | Hash of the message |
Definition at line 184 of file gnunet-service-messenger_message_recv.c.
References GNUNET_MESSENGER_SrvRoom::basement, count_of_tunnels(), GNUNET_YES, open_srv_room(), service, and GNUNET_MESSENGER_SrvRoom::service.
Referenced by handle_tunnel_message().
enum GNUNET_GenericReturnValue 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 236 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, and request_srv_room_message().
Referenced by handle_tunnel_message().