conversation service implementation More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_signatures.h"
#include "gnunet_cadet_service.h"
#include "conversation.h"
Go to the source code of this file.
Data Structures | |
struct | Channel |
A struct Channel represents a cadet channel, which is a P2P connection to another conversation service. More... | |
struct | Line |
A struct Line connects a local client with cadet channels. More... | |
Macros | |
#define | RING_TIMEOUT GNUNET_TIME_UNIT_DAYS |
How long is our signature on a call valid? Needs to be long enough for time zone differences and network latency to not matter. More... | |
Enumerations | |
enum | ChannelStatus { CS_CALLEE_INIT , CS_CALLEE_RINGING , CS_CALLEE_CONNECTED , CS_CALLEE_SHUTDOWN , CS_CALLER_CALLING , CS_CALLER_CONNECTED , CS_CALLER_SHUTDOWN } |
The possible connection status. More... | |
Functions | |
static struct Channel * | find_channel_by_line (struct Line *line, uint32_t cid) |
Given a cid, find the corresponding channel given a line. More... | |
static void | handle_client_pickup_message (void *cls, const struct ClientPhonePickupMessage *msg) |
Function to handle a pickup request message from the client. More... | |
static void | clean_up_channel (struct Channel *ch) |
Channel went down, notify client and free data structure. More... | |
static void | destroy_line_cadet_channels (struct Channel *ch) |
Destroy a channel. More... | |
static void | mq_done_finish_caller_shutdown (void *cls) |
We are done signalling shutdown to the other peer. More... | |
static void | handle_client_hangup_message (void *cls, const struct ClientPhoneHangupMessage *msg) |
Function to handle a hangup request message from the client. More... | |
static void | handle_client_suspend_message (void *cls, const struct ClientPhoneSuspendMessage *msg) |
Function to handle a suspend request message from the client. More... | |
static void | handle_client_resume_message (void *cls, const struct ClientPhoneResumeMessage *msg) |
Function to handle a resume request message from the client. More... | |
static void | channel_audio_sent_notify (void *cls) |
Transmission of audio data via cadet channel finished. More... | |
static int | check_client_audio_message (void *cls, const struct ClientAudioMessage *msg) |
Function to check audio data from the client. More... | |
static void | handle_client_audio_message (void *cls, const struct ClientAudioMessage *msg) |
Function to handle audio data from the client. More... | |
static enum GNUNET_GenericReturnValue | check_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg) |
Function to handle a ring message incoming over cadet. More... | |
static void | handle_cadet_ring_message (void *cls, const struct CadetPhoneRingMessage *msg) |
Function to handle a ring message incoming over cadet. More... | |
static void | handle_cadet_hangup_message (void *cls, const struct CadetPhoneHangupMessage *message) |
Function to handle a hangup message incoming over cadet. More... | |
static void | handle_cadet_pickup_message (void *cls, const struct CadetPhonePickupMessage *message) |
Function to handle a pickup message incoming over cadet. More... | |
static void | handle_cadet_suspend_message (void *cls, const struct CadetPhoneSuspendMessage *message) |
Function to handle a suspend message incoming over cadet. More... | |
static void | handle_cadet_resume_message (void *cls, const struct CadetPhoneResumeMessage *msg) |
Function to handle a resume message incoming over cadet. More... | |
static int | check_cadet_audio_message (void *cls, const struct CadetAudioMessage *msg) |
Function to check an audio message incoming over cadet. More... | |
static void | handle_cadet_audio_message (void *cls, const struct CadetAudioMessage *msg) |
Function to handle an audio message incoming over cadet. More... | |
static void | inbound_end (void *cls, const struct GNUNET_CADET_Channel *channel) |
Function called whenever an inbound channel is destroyed. More... | |
static enum GNUNET_GenericReturnValue | check_client_call_message (void *cls, const struct ClientCallMessage *msg) |
Function to handle call request from the client. More... | |
static void | handle_client_call_message (void *cls, const struct ClientCallMessage *msg) |
Function to handle call request from the client. More... | |
static void * | inbound_channel (void *cls, struct GNUNET_CADET_Channel *channel, const struct GNUNET_PeerIdentity *initiator) |
Method called whenever another peer has added us to a channel the other peer initiated. More... | |
static void * | client_connect_cb (void *cls, struct GNUNET_SERVICE_Client *client, struct GNUNET_MQ_Handle *mq) |
A client connected. More... | |
static void | client_disconnect_cb (void *cls, struct GNUNET_SERVICE_Client *client, void *app_ctx) |
A client disconnected. More... | |
static void | handle_client_register_message (void *cls, const struct ClientPhoneRegisterMessage *msg) |
Function to register a phone. More... | |
static void | do_shutdown (void *cls) |
Shutdown nicely. More... | |
static void | run (void *cls, const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_SERVICE_Handle *service) |
Main function that will be run by the scheduler. More... | |
GNUNET_SERVICE_MAIN (GNUNET_OS_project_data_gnunet(), "conversation", GNUNET_SERVICE_OPTION_NONE, &run, &client_connect_cb, &client_disconnect_cb, NULL, GNUNET_MQ_hd_fixed_size(client_register_message, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER, struct ClientPhoneRegisterMessage, NULL), GNUNET_MQ_hd_fixed_size(client_pickup_message, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP, struct ClientPhonePickupMessage, NULL), GNUNET_MQ_hd_fixed_size(client_suspend_message, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND, struct ClientPhoneSuspendMessage, NULL), GNUNET_MQ_hd_fixed_size(client_resume_message, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME, struct ClientPhoneResumeMessage, NULL), GNUNET_MQ_hd_fixed_size(client_hangup_message, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP, struct ClientPhoneHangupMessage, NULL), GNUNET_MQ_hd_var_size(client_call_message, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL, struct ClientCallMessage, NULL), GNUNET_MQ_hd_var_size(client_audio_message, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO, struct ClientAudioMessage, NULL), GNUNET_MQ_handler_end()) | |
Define "main" method using service macro. More... | |
Variables | |
static const struct GNUNET_CONFIGURATION_Handle * | cfg |
Our configuration. More... | |
static struct GNUNET_CADET_Handle * | cadet |
Handle for cadet. More... | |
static struct GNUNET_PeerIdentity | my_identity |
Identity of this peer. More... | |
conversation service implementation
Definition in file gnunet-service-conversation.c.
#define RING_TIMEOUT GNUNET_TIME_UNIT_DAYS |
How long is our signature on a call valid? Needs to be long enough for time zone differences and network latency to not matter.
No strong need for it to be short, but we simply like all signatures to eventually expire.
Definition at line 40 of file gnunet-service-conversation.c.
enum ChannelStatus |
The possible connection status.
Definition at line 52 of file gnunet-service-conversation.c.
Given a cid, find the corresponding channel given a line.
line | a line to search |
cid | what to search for |
Definition at line 219 of file gnunet-service-conversation.c.
References ch, Channel::cid, and line.
Referenced by handle_client_audio_message().
|
static |
Function to handle a pickup request message from the client.
cls | the struct Line of the client from which the message is |
msg | the message from the client |
Definition at line 235 of file gnunet-service-conversation.c.
References ch, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, env, GNUNET_break, GNUNET_break_op, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), line, GNUNET_CADET_Channel::mq, and msg.
|
static |
Channel went down, notify client and free data structure.
ch | channel that went down |
Definition at line 304 of file gnunet-service-conversation.c.
References ch, ClientPhoneHangupMessage::cid, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, env, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP, GNUNET_MQ_msg, GNUNET_MQ_send(), and line.
Referenced by destroy_line_cadet_channels(), and inbound_end().
|
static |
Destroy a channel.
ch | channel to destroy. |
Definition at line 342 of file gnunet-service-conversation.c.
References ch, clean_up_channel(), GNUNET_CADET_channel_destroy(), GNUNET_ERROR_TYPE_DEBUG, and GNUNET_log.
Referenced by client_disconnect_cb(), handle_cadet_hangup_message(), handle_cadet_pickup_message(), handle_cadet_resume_message(), handle_cadet_ring_message(), and mq_done_finish_caller_shutdown().
|
static |
We are done signalling shutdown to the other peer.
Close down the channel.
cls | the struct Channel to reset/terminate |
Definition at line 361 of file gnunet-service-conversation.c.
References ch, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, destroy_line_cadet_channels(), and GNUNET_break.
Referenced by handle_cadet_pickup_message(), and handle_client_hangup_message().
|
static |
Function to handle a hangup request message from the client.
cls | the struct Line the hangup is for |
msg | the message from the client |
Definition at line 405 of file gnunet-service-conversation.c.
References ch, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP, GNUNET_MQ_msg, GNUNET_MQ_notify_sent(), GNUNET_MQ_send(), GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), line, GNUNET_CADET_Channel::mq, mq_done_finish_caller_shutdown(), and msg.
|
static |
Function to handle a suspend request message from the client.
cls | the struct Line the message is about |
msg | the message from the client |
Definition at line 476 of file gnunet-service-conversation.c.
References ch, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), GNUNET_YES, line, GNUNET_CADET_Channel::mq, and msg.
|
static |
Function to handle a resume request message from the client.
cls | the struct Line the message is about |
msg | the message from the client |
Definition at line 554 of file gnunet-service-conversation.c.
References ch, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), GNUNET_YES, line, GNUNET_CADET_Channel::mq, and msg.
|
static |
Transmission of audio data via cadet channel finished.
cls | the struct Channel we are transmitting for |
Definition at line 630 of file gnunet-service-conversation.c.
References ch.
Referenced by handle_client_audio_message().
|
static |
Function to check audio data from the client.
cls | the struct Line the message is about |
msg | the message from the client |
Definition at line 646 of file gnunet-service-conversation.c.
|
static |
Function to handle audio data from the client.
cls | the struct Line the message is about |
msg | the message from the client |
Definition at line 661 of file gnunet-service-conversation.c.
References ch, channel_audio_sent_notify(), CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, find_channel_by_line(), GNUNET_break, GNUNET_ERROR_TYPE_BULK, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO, GNUNET_MQ_msg_extra, GNUNET_MQ_notify_sent(), GNUNET_MQ_send(), GNUNET_MQ_send_cancel(), GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), GNUNET_YES, line, GNUNET_CADET_Channel::mq, msg, GNUNET_MessageHeader::size, and size.
|
static |
Function to handle a ring message incoming over cadet.
cls | closure, NULL |
msg | the incoming message |
Definition at line 736 of file gnunet-service-conversation.c.
References GNUNET_OK.
|
static |
Function to handle a ring message incoming over cadet.
cls | closure, NULL |
msg | the incoming message |
Definition at line 749 of file gnunet-service-conversation.c.
References ch, ClientPhoneRingMessage::cid, CS_CALLEE_INIT, CS_CALLEE_RINGING, destroy_line_cadet_channels(), env, CadetPhoneRingInfoPS::expiration_time, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_CRYPTO_read_public_key_from_buffer(), GNUNET_CRYPTO_read_signature_from_buffer(), GNUNET_CRYPTO_signature_verify, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_OK, GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING, GNUNET_SYSERR, GNUNET_TIME_absolute_get_remaining(), GNUNET_TIME_absolute_ntoh(), identity, ClientPhoneRingMessage::key_len, line, CadetPhoneRingInfoPS::line_port, msg, my_identity, CadetPhoneRingInfoPS::purpose, GNUNET_CRYPTO_EccSignaturePurpose::purpose, GNUNET_TIME_Relative::rel_value_us, GNUNET_CRYPTO_EccSignaturePurpose::size, and CadetPhoneRingInfoPS::target_peer.
|
static |
Function to handle a hangup message incoming over cadet.
cls | closure, our struct Channel * |
message | the incoming message |
Definition at line 835 of file gnunet-service-conversation.c.
References ch, ClientPhoneHangupMessage::cid, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, destroy_line_cadet_channels(), env, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP, GNUNET_MQ_msg, GNUNET_MQ_send(), line, and status.
|
static |
Function to handle a pickup message incoming over cadet.
cls | closure, our struct Channel * |
message | the incoming message |
Definition at line 884 of file gnunet-service-conversation.c.
References ch, ClientPhonePickedupMessage::cid, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, destroy_line_cadet_channels(), env, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP, GNUNET_MQ_msg, GNUNET_MQ_send(), line, and mq_done_finish_caller_shutdown().
|
static |
Function to handle a suspend message incoming over cadet.
cls | closure, our struct Channel * |
message | the incoming message |
Definition at line 936 of file gnunet-service-conversation.c.
References ch, ClientPhoneSuspendMessage::cid, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, env, GNUNET_break_op, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_YES, and line.
|
static |
Function to handle a resume message incoming over cadet.
cls | closure, our struct Channel * |
msg | the incoming message |
Definition at line 989 of file gnunet-service-conversation.c.
References ch, ClientPhoneResumeMessage::cid, CS_CALLEE_CONNECTED, CS_CALLEE_INIT, CS_CALLEE_RINGING, CS_CALLEE_SHUTDOWN, CS_CALLER_CALLING, CS_CALLER_CONNECTED, CS_CALLER_SHUTDOWN, destroy_line_cadet_channels(), env, GNUNET_break, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, GNUNET_YES, line, and msg.
|
static |
Function to check an audio message incoming over cadet.
cls | closure, our struct Channel * |
msg | the incoming message |
Definition at line 1051 of file gnunet-service-conversation.c.
|
static |
Function to handle an audio message incoming over cadet.
cls | closure, our struct Channel * |
msg | the incoming message |
Definition at line 1066 of file gnunet-service-conversation.c.
References ch, ClientAudioMessage::cid, env, GNUNET_CADET_receive_done(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_YES, GNUNET_CADET_Channel::mq, msg, and GNUNET_MessageHeader::size.
|
static |
Function called whenever an inbound channel is destroyed.
Should clean up any associated state.
cls | closure (set from GNUNET_CADET_connect) |
channel | connection to the other end (henceforth invalid) |
Definition at line 1104 of file gnunet-service-conversation.c.
References ch, Channel::channel, clean_up_channel(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, and GNUNET_log.
Referenced by handle_client_call_message(), and handle_client_register_message().
|
static |
Function to handle call request from the client.
cls | the struct Line the message is about |
msg | the message from the client |
Definition at line 1123 of file gnunet-service-conversation.c.
References GNUNET_OK.
|
static |
Function to handle call request from the client.
cls | the struct Line the message is about |
msg | the message from the client |
Definition at line 1136 of file gnunet-service-conversation.c.
References cadet, ch, CS_CALLER_CALLING, CadetPhoneRingInfoPS::expiration_time, CadetPhoneRingMessage::expiration_time, GNUNET_assert, GNUNET_break_op, GNUNET_CADET_channel_create(), GNUNET_CADET_get_mq(), GNUNET_CONTAINER_DLL_insert, GNUNET_CRYPTO_key_get_public(), GNUNET_CRYPTO_public_key_get_length(), GNUNET_CRYPTO_read_private_key_from_buffer(), GNUNET_CRYPTO_sign, GNUNET_CRYPTO_signature_get_length(), GNUNET_CRYPTO_write_public_key_to_buffer(), GNUNET_CRYPTO_write_signature_to_buffer(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND, GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_hd_var_size, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_new, GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING, GNUNET_SYSERR, GNUNET_TIME_absolute_hton(), GNUNET_TIME_relative_to_absolute(), inbound_end(), CadetPhoneRingMessage::key_len, line, CadetPhoneRingInfoPS::line_port, GNUNET_CADET_Channel::mq, msg, CadetPhoneRingInfoPS::purpose, GNUNET_CRYPTO_EccSignaturePurpose::purpose, RING_TIMEOUT, CadetPhoneRingMessage::sig_len, GNUNET_CRYPTO_EccSignaturePurpose::size, and CadetPhoneRingInfoPS::target_peer.
|
static |
Method called whenever another peer has added us to a channel the other peer initiated.
cls | the struct Line receiving a connection |
channel | new handle to the channel |
initiator | peer that started the channel |
Definition at line 1236 of file gnunet-service-conversation.c.
References ch, Channel::channel, CS_CALLEE_INIT, GNUNET_CADET_get_mq(), GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_new, line, and GNUNET_CADET_Channel::mq.
Referenced by handle_client_register_message().
|
static |
A client connected.
Initialize the struct Line
data structure.
cls | closure, NULL |
client | identification of the client |
mq | message queue for client |
struct Line
for the client Definition at line 1267 of file gnunet-service-conversation.c.
References Line::client, GNUNET_new, line, and mq.
|
static |
A client disconnected.
Remove all of its data structure entries.
cls | closure, NULL |
client | identification of the client |
app_ctx | our struct Line * for client |
Definition at line 1289 of file gnunet-service-conversation.c.
References ch, destroy_line_cadet_channels(), GNUNET_CADET_close_port(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, and line.
|
static |
Function to register a phone.
cls | the struct Line of the client from which the message is |
msg | the message from the client |
Definition at line 1321 of file gnunet-service-conversation.c.
References _, cadet, GNUNET_CADET_open_port(), GNUNET_ERROR_TYPE_WARNING, GNUNET_h2s(), GNUNET_log, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING, GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND, GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_hd_var_size, GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), inbound_channel(), inbound_end(), line, and msg.
|
static |
Shutdown nicely.
cls | closure, NULL |
Definition at line 1378 of file gnunet-service-conversation.c.
References cadet, GNUNET_MQ_MessageHandler::cls, and GNUNET_CADET_disconnect().
Referenced by run().
|
static |
Main function that will be run by the scheduler.
cls | closure |
c | configuration |
service | service handle |
Definition at line 1397 of file gnunet-service-conversation.c.
References cadet, cfg, GNUNET_MQ_MessageHandler::cls, do_shutdown(), GNUNET_assert, GNUNET_break, GNUNET_CADET_connect(), GNUNET_CRYPTO_get_peer_identity(), GNUNET_OK, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), my_identity, and service.
Define "main" method using service macro.
|
static |
Our configuration.
Definition at line 197 of file gnunet-service-conversation.c.
Referenced by run().
|
static |
Handle for cadet.
Definition at line 202 of file gnunet-service-conversation.c.
Referenced by connect_tunnel(), do_shutdown(), handle_client_call_message(), handle_client_register_message(), open_srv_room(), and run().
|
static |
Identity of this peer.
Definition at line 207 of file gnunet-service-conversation.c.
Referenced by handle_cadet_ring_message(), and run().