struct GNUNET_MQ_Envelope * env
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static struct GNUNET_CADET_MessageHandler handlers[]
Handlers, for diverse services.
Helper library for handling HELLOs.
Constants for network protocols.
struct GNUNET_MQ_Handle * GNUNET_CLIENT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *service_name, const struct GNUNET_MQ_MessageHandler *handlers, GNUNET_MQ_ErrorHandler error_handler, void *error_handler_cls)
Create a message queue to connect to a GNUnet service.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
GNUNET_MQ_Error
Error codes for the queue.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY
Reply from blacklisting client (answer to blacklist query).
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT
Register a client that wants to do blacklisting.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY
Query to a blacklisting client (is this peer blacklisted)?
int(* GNUNET_TRANSPORT_BlacklistCallback)(void *cls, const struct GNUNET_PeerIdentity *pid)
Function that decides if a connection is acceptable or not.
struct GNUNET_TRANSPORT_Blacklist * GNUNET_TRANSPORT_blacklist(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_TRANSPORT_BlacklistCallback cb, void *cb_cls)
Install a blacklist callback.
void GNUNET_TRANSPORT_blacklist_cancel(struct GNUNET_TRANSPORT_Blacklist *br)
Abort the blacklist.
Change in blacklisting (either request or notification, depending on which direction it is going).
uint32_t is_allowed
0 for the query, GNUNET_OK (allowed) or GNUNET_SYSERR (disallowed) for the response.
struct GNUNET_PeerIdentity peer
Which peer is being blacklisted or queried?
Handle to a message queue.
Message handler for a specific message type.
Handle for blacklisting requests.
struct GNUNET_MQ_Handle * mq
Connection to transport service.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration to use.
void * cb_cls
Closure for cb.
GNUNET_TRANSPORT_BlacklistCallback cb
Function to call for determining if a peer is allowed to communicate with us.
common internal definitions for transport service
static void handle_query(void *cls, const struct BlacklistMessage *bm)
Handle blacklist queries.
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 c...
static void reconnect(struct GNUNET_TRANSPORT_Blacklist *br)
Establish blacklist connection to transport service.