library to access the blacklisting functions of the transport service More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_arm_service.h"
#include "gnunet_hello_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_transport_service.h"
#include "transport.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TRANSPORT_Blacklist |
Handle for blacklisting requests. More... | |
Functions | |
static void | reconnect (struct GNUNET_TRANSPORT_Blacklist *br) |
Establish blacklist connection to transport service. More... | |
static void | handle_query (void *cls, const struct BlacklistMessage *bm) |
Handle blacklist queries. More... | |
static void | mq_error_handler (void *cls, enum GNUNET_MQ_Error error) |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue. More... | |
struct GNUNET_TRANSPORT_Blacklist * | GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_TRANSPORT_BlacklistCallback cb, void *cb_cls) |
Install a blacklist callback. More... | |
void | GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br) |
Abort the blacklist. More... | |
library to access the blacklisting functions of the transport service
Definition in file transport_api_blacklist.c.
|
static |
Establish blacklist connection to transport service.
br | overall handle |
Definition at line 120 of file transport_api_blacklist.c.
References GNUNET_TRANSPORT_Blacklist::cfg, env, GNUNET_CLIENT_connect(), GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT, GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY, GNUNET_MQ_destroy(), GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_msg, GNUNET_MQ_send(), handlers, GNUNET_TRANSPORT_Blacklist::mq, and mq_error_handler().
Referenced by GNUNET_TRANSPORT_blacklist(), and mq_error_handler().
|
static |
Handle blacklist queries.
cls | our overall handle |
bm | query |
Definition at line 78 of file transport_api_blacklist.c.
References GNUNET_TRANSPORT_Blacklist::cb, GNUNET_TRANSPORT_Blacklist::cb_cls, env, GNUNET_break, GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY, GNUNET_MQ_msg, GNUNET_MQ_send(), BlacklistMessage::is_allowed, GNUNET_TRANSPORT_Blacklist::mq, BlacklistMessage::peer, and res.
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
cls | closure with the struct GNUNET_TRANSPORT_Blacklist * |
error | error code |
Definition at line 105 of file transport_api_blacklist.c.
References reconnect().
Referenced by reconnect().