#include "gnunet-service-messenger_message_kind.h"
#include "gnunet-service-messenger_room.h"
#include "messenger_api_message.h"
Go to the source code of this file.
Functions | |
struct GNUNET_MESSENGER_Message * | create_message_info (struct GNUNET_MESSENGER_Service *service) |
Creates and allocates a new info message containing the hosts service peer identity and version. More... | |
struct GNUNET_MESSENGER_Message * | create_message_peer (struct GNUNET_MESSENGER_Service *service) |
Creates and allocates a new peer message containing a services peer identity. More... | |
struct GNUNET_MESSENGER_Message * | create_message_miss (const struct GNUNET_PeerIdentity *peer) |
Creates and allocates a new miss message containing the missing peer identity. More... | |
struct GNUNET_MESSENGER_Message * | create_message_merge (const struct GNUNET_HashCode *previous) |
Creates and allocates a new merge message containing the hash of a second previous message besides the regular previous message mentioned in a messages header. More... | |
struct GNUNET_MESSENGER_Message * | create_message_connection (const struct GNUNET_MESSENGER_SrvRoom *room) |
Creates and allocates a new connection message containing the amount of the peer's connections in a given room as well as flags from the peer about its connections. More... | |
struct GNUNET_MESSENGER_Message * create_message_info | ( | struct GNUNET_MESSENGER_Service * | service | ) |
Creates and allocates a new info message containing the hosts service peer identity and version.
(all values are stored as copy)
[in,out] | service | Service |
Definition at line 33 of file gnunet-service-messenger_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_MESSENGER_KIND_INFO, GNUNET_MESSENGER_VERSION, GNUNET_MESSENGER_MessageBody::info, GNUNET_MESSENGER_MessageInfo::messenger_version, and service.
Referenced by recv_message_info(), and send_room_info().
struct GNUNET_MESSENGER_Message * create_message_peer | ( | struct GNUNET_MESSENGER_Service * | service | ) |
Creates and allocates a new peer message containing a services peer identity.
(all values are stored as copy)
[in,out] | service | Service |
Definition at line 52 of file gnunet-service-messenger_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), destroy_message(), get_service_peer_identity(), GNUNET_MESSENGER_KIND_PEER, GNUNET_OK, GNUNET_MESSENGER_MessagePeer::peer, GNUNET_MESSENGER_MessageBody::peer, and service.
Referenced by open_srv_room().
struct GNUNET_MESSENGER_Message * create_message_miss | ( | const struct GNUNET_PeerIdentity * | peer | ) |
Creates and allocates a new miss message containing the missing peer identity.
(all values are stored as copy)
[in] | peer | Missing peer identity |
Definition at line 76 of file gnunet-service-messenger_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_memcpy, GNUNET_MESSENGER_KIND_MISS, GNUNET_MESSENGER_MessageBody::miss, and GNUNET_MESSENGER_MessageMiss::peer.
Referenced by callback_tunnel_disconnect(), and close_srv_room().
struct GNUNET_MESSENGER_Message * create_message_merge | ( | const struct GNUNET_HashCode * | previous | ) |
Creates and allocates a new merge message containing the hash of a second previous message besides the regular previous message mentioned in a messages header.
(all values are stored as copy)
[in] | previous | Hash of message |
Definition at line 98 of file gnunet-service-messenger_message_kind.c.
References GNUNET_MESSENGER_Message::body, create_message(), GNUNET_memcpy, GNUNET_MESSENGER_KIND_MERGE, GNUNET_MESSENGER_MessageBody::merge, and GNUNET_MESSENGER_MessageMerge::previous.
Referenced by callback_operation(), and merge_srv_room_last_messages().
struct GNUNET_MESSENGER_Message * create_message_connection | ( | const struct GNUNET_MESSENGER_SrvRoom * | room | ) |
Creates and allocates a new connection message containing the amount of the peer's connections in a given room as well as flags from the peer about its connections.
(all values are stored as copy)
[in] | room | Room |
Definition at line 118 of file gnunet-service-messenger_message_kind.c.
References GNUNET_MESSENGER_MessageConnection::amount, GNUNET_MESSENGER_Message::body, GNUNET_MESSENGER_MessageBody::connection, create_message(), GNUNET_MESSENGER_MessageConnection::flags, get_srv_room_amount_of_tunnels(), get_srv_room_connection_flags(), and GNUNET_MESSENGER_KIND_CONNECTION.
Referenced by close_service_room(), and send_message_peer().