From: Christian Grothoff Date: Thu, 21 Jan 2010 14:13:43 +0000 (+0000) Subject: api X-Git-Tag: initial-import-from-subversion-38251~22902 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d0bd8557ee2be2102a4c2f1e8584f6fabef8a598;p=oweals%2Fgnunet.git api --- diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index a1b13f33e..c2f837fbb 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c @@ -150,6 +150,10 @@ shutdown_task (void *cls, /** * Handle a request to blacklist a peer. + * + * @param cls closure (always NULL) + * @param client identification of the client + * @param message the actual message */ void GNUNET_TRANSPORT_handle_blacklist (void *cls, @@ -161,6 +165,10 @@ GNUNET_TRANSPORT_handle_blacklist (void *cls, /** * Handle a request for notification of blacklist changes. + * + * @param cls closure (always NULL) + * @param client identification of the client + * @param message the actual message */ void GNUNET_TRANSPORT_handle_blacklist_notify (void *cls, diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h index 95a86dc9a..cce1013c1 100644 --- a/src/transport/gnunet-service-transport_blacklist.h +++ b/src/transport/gnunet-service-transport_blacklist.h @@ -1,4 +1,4 @@ -* +/* This file is part of GNUnet. (C) 2010 Christian Grothoff (and other contributing authors) @@ -28,3 +28,53 @@ #include "gnunet_service_lib.h" #include "transport.h" +#ifndef GNUNET_SERVICE_TRANSPORT_BLACKLIST_H +#define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H + +/** + * Handle a request to blacklist a peer. + * + * @param cls closure (always NULL) + * @param client identification of the client + * @param message the actual message + */ +void +GNUNET_TRANSPORT_handle_blacklist (void *cls, + struct GNUNET_SERVER_Client *client, + const struct GNUNET_MessageHeader *message); + + +/** + * Handle a request for notification of blacklist changes. + * + * @param cls closure (always NULL) + * @param client identification of the client + * @param message the actual message + */ +void +GNUNET_TRANSPORT_handle_blacklist_notify (void *cls, + struct GNUNET_SERVER_Client *client, + const struct GNUNET_MessageHeader *message); + + +/** + * Is the given peer currently blacklisted? + * + * @param id identity of the peer + * @return GNUNET_YES if the peer is blacklisted, GNUNET_NO if not + */ +int +GNUNET_TRANSPORT_blacklist_check (const struct GNUNET_PeerIdentity *id); + + +/** + * Initialize the blacklisting subsystem. + * + * @param s scheduler to use + */ +void +GNUNET_TRANSPORT_blacklist_init (struct GNUNET_SCHEDULER_Handle *s); + + +#endif +/* end of gnunet-service-transport_blacklist.h */