diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-01-21 14:13:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-01-21 14:13:43 +0000 |
commit | d0bd8557ee2be2102a4c2f1e8584f6fabef8a598 (patch) | |
tree | 54fee7a5d0f57c3b6f384189f35636120a7fcde6 /src/transport/gnunet-service-transport_blacklist.h | |
parent | 870241ba37a9180fd334a6843ee37ec76a23aa9c (diff) | |
download | gnunet-d0bd8557ee2be2102a4c2f1e8584f6fabef8a598.tar.gz gnunet-d0bd8557ee2be2102a4c2f1e8584f6fabef8a598.zip |
api
Diffstat (limited to 'src/transport/gnunet-service-transport_blacklist.h')
-rw-r--r-- | src/transport/gnunet-service-transport_blacklist.h | 52 |
1 files changed, 51 insertions, 1 deletions
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 @@ | |||
1 | * | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2010 Christian Grothoff (and other contributing authors) | 3 | (C) 2010 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
@@ -28,3 +28,53 @@ | |||
28 | #include "gnunet_service_lib.h" | 28 | #include "gnunet_service_lib.h" |
29 | #include "transport.h" | 29 | #include "transport.h" |
30 | 30 | ||
31 | #ifndef GNUNET_SERVICE_TRANSPORT_BLACKLIST_H | ||
32 | #define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H | ||
33 | |||
34 | /** | ||
35 | * Handle a request to blacklist a peer. | ||
36 | * | ||
37 | * @param cls closure (always NULL) | ||
38 | * @param client identification of the client | ||
39 | * @param message the actual message | ||
40 | */ | ||
41 | void | ||
42 | GNUNET_TRANSPORT_handle_blacklist (void *cls, | ||
43 | struct GNUNET_SERVER_Client *client, | ||
44 | const struct GNUNET_MessageHeader *message); | ||
45 | |||
46 | |||
47 | /** | ||
48 | * Handle a request for notification of blacklist changes. | ||
49 | * | ||
50 | * @param cls closure (always NULL) | ||
51 | * @param client identification of the client | ||
52 | * @param message the actual message | ||
53 | */ | ||
54 | void | ||
55 | GNUNET_TRANSPORT_handle_blacklist_notify (void *cls, | ||
56 | struct GNUNET_SERVER_Client *client, | ||
57 | const struct GNUNET_MessageHeader *message); | ||
58 | |||
59 | |||
60 | /** | ||
61 | * Is the given peer currently blacklisted? | ||
62 | * | ||
63 | * @param id identity of the peer | ||
64 | * @return GNUNET_YES if the peer is blacklisted, GNUNET_NO if not | ||
65 | */ | ||
66 | int | ||
67 | GNUNET_TRANSPORT_blacklist_check (const struct GNUNET_PeerIdentity *id); | ||
68 | |||
69 | |||
70 | /** | ||
71 | * Initialize the blacklisting subsystem. | ||
72 | * | ||
73 | * @param s scheduler to use | ||
74 | */ | ||
75 | void | ||
76 | GNUNET_TRANSPORT_blacklist_init (struct GNUNET_SCHEDULER_Handle *s); | ||
77 | |||
78 | |||
79 | #endif | ||
80 | /* end of gnunet-service-transport_blacklist.h */ | ||