cadet api: client implementation of cadet service More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_constants.h"
#include "gnunet_cadet_service.h"
#include "cadet.h"
#include "cadet_protocol.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_CADET_ListTunnels |
Operation handle. More... | |
Functions | |
static void | handle_get_tunnels (void *cls, const struct GNUNET_CADET_LocalInfoTunnel *info) |
Process a local reply about info on all tunnels, pass info to the user. More... | |
static void | handle_get_tunnels_end (void *cls, const struct GNUNET_MessageHeader *msg) |
Process a local reply about info on all tunnels, pass info to the user. More... | |
static void | reconnect (void *cls) |
Reconnect to the service and try again. More... | |
static void | error_handler (void *cls, enum GNUNET_MQ_Error error) |
Function called on connection trouble. More... | |
struct GNUNET_CADET_ListTunnels * | GNUNET_CADET_list_tunnels (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CADET_TunnelsCB callback, void *callback_cls) |
Request information about tunnels of the running cadet peer. More... | |
void * | GNUNET_CADET_list_tunnels_cancel (struct GNUNET_CADET_ListTunnels *lt) |
Cancel a monitor request. More... | |
cadet api: client implementation of cadet service
Definition in file cadet_api_list_tunnels.c.
|
static |
Process a local reply about info on all tunnels, pass info to the user.
cls | a struct GNUNET_CADET_ListTunnels * |
info | Message itself. |
Definition at line 78 of file cadet_api_list_tunnels.c.
References GNUNET_CADET_TunnelDetails::channels, GNUNET_CADET_TunnelDetails::connections, GNUNET_CADET_TunnelDetails::cstate, GNUNET_CADET_TunnelDetails::estate, info, GNUNET_CADET_TunnelDetails::peer, GNUNET_CADET_ListTunnels::tunnels_cb, and GNUNET_CADET_ListTunnels::tunnels_cb_cls.
|
static |
Process a local reply about info on all tunnels, pass info to the user.
cls | a struct GNUNET_CADET_ListTunnels * |
msg | Message itself. |
Definition at line 101 of file cadet_api_list_tunnels.c.
References GNUNET_CADET_list_tunnels_cancel(), msg, GNUNET_CADET_ListTunnels::tunnels_cb, and GNUNET_CADET_ListTunnels::tunnels_cb_cls.
|
static |
Reconnect to the service and try again.
cls | a struct GNUNET_CADET_ListTunnels operation |
Definition at line 151 of file cadet_api_list_tunnels.c.
References GNUNET_CADET_ListTunnels::cfg, env, error_handler(), get_tunnels(), GNUNET_CLIENT_connect(), GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS, GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS_END, GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_TUNNELS, GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_msg, GNUNET_MQ_send(), handlers, GNUNET_CADET_ListTunnels::mq, msg, and GNUNET_CADET_ListTunnels::reconnect_task.
Referenced by error_handler(), and GNUNET_CADET_list_tunnels().
|
static |
Function called on connection trouble.
Reconnects.
cls | a struct GNUNET_CADET_ListTunnels |
error | error code from MQ |
Definition at line 130 of file cadet_api_list_tunnels.c.
References GNUNET_CADET_ListTunnels::backoff, GNUNET_MQ_destroy(), GNUNET_SCHEDULER_add_delayed(), GNUNET_TIME_randomized_backoff(), GNUNET_TIME_UNIT_MINUTES, GNUNET_CADET_ListTunnels::mq, reconnect(), and GNUNET_CADET_ListTunnels::reconnect_task.
Referenced by reconnect().