api
authorChristian Grothoff <christian@grothoff.org>
Thu, 21 Jan 2010 14:13:43 +0000 (14:13 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 21 Jan 2010 14:13:43 +0000 (14:13 +0000)
src/transport/gnunet-service-transport_blacklist.c
src/transport/gnunet-service-transport_blacklist.h

index a1b13f33ecc1ce1249a4970bba3cee9d5d3a8e3e..c2f837fbbb75b3b9da60bb58b2c45084878be6d4 100644 (file)
@@ -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,
index 95a86dc9aa987e6554b8637a25be89feed23085d..cce1013c152985ac283b505d1f312d929182fab0 100644 (file)
@@ -1,4 +1,4 @@
-*
+/*
      This file is part of GNUnet.
      (C) 2010 Christian Grothoff (and other contributing authors)
 
 #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 */