aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_blacklist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport_blacklist.h')
-rw-r--r--src/transport/gnunet-service-transport_blacklist.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h
index 068556778..1a8bdebf4 100644
--- a/src/transport/gnunet-service-transport_blacklist.h
+++ b/src/transport/gnunet-service-transport_blacklist.h
@@ -27,6 +27,7 @@
27#define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H 27#define GNUNET_SERVICE_TRANSPORT_BLACKLIST_H
28 28
29#include "gnunet_statistics_service.h" 29#include "gnunet_statistics_service.h"
30#include "gnunet_ats_service.h"
30#include "gnunet_util_lib.h" 31#include "gnunet_util_lib.h"
31 32
32/** 33/**
@@ -99,12 +100,17 @@ struct GST_BlacklistCheck;
99 * 100 *
100 * @param cls closure 101 * @param cls closure
101 * @param peer identity of peer that was tested 102 * @param peer identity of peer that was tested
103 * @param address address associated with the request
104 * @param session session associated with the request
102 * @param result #GNUNET_OK if the connection is allowed, 105 * @param result #GNUNET_OK if the connection is allowed,
103 * #GNUNET_NO if not 106 * #GNUNET_NO if not,
107 * #GNUNET_SYSERR if operation was aborted
104 */ 108 */
105typedef void 109typedef void
106(*GST_BlacklistTestContinuation) (void *cls, 110(*GST_BlacklistTestContinuation) (void *cls,
107 const struct GNUNET_PeerIdentity *peer, 111 const struct GNUNET_PeerIdentity *peer,
112 const struct GNUNET_HELLO_Address *address,
113 struct Session *session,
108 int result); 114 int result);
109 115
110 116
@@ -115,13 +121,30 @@ typedef void
115 * @param transport_name name of the transport to test, never NULL 121 * @param transport_name name of the transport to test, never NULL
116 * @param cont function to call with result 122 * @param cont function to call with result
117 * @param cont_cls closure for @a cont 123 * @param cont_cls closure for @a cont
124 * @param address address to pass back to @a cont, can be NULL
125 * @param session session to pass back to @a cont, can be NULL
118 * @return handle to the blacklist check, NULL if the decision 126 * @return handle to the blacklist check, NULL if the decision
119 * was made instantly and @a cont was already called 127 * was made instantly and @a cont was already called
120 */ 128 */
121struct GST_BlacklistCheck * 129struct GST_BlacklistCheck *
122GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer, 130GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
123 const char *transport_name, 131 const char *transport_name,
124 GST_BlacklistTestContinuation cont, void *cont_cls); 132 GST_BlacklistTestContinuation cont,
133 void *cont_cls,
134 const struct GNUNET_HELLO_Address *address,
135 struct Session *session);
136
137
138/**
139 * Abort blacklist if @a address and @a session match.
140 *
141 * @param address address used to abort matching checks
142 * @param session session used to abort matching checks
143 */
144void
145GST_blacklist_abort_matching (const struct GNUNET_HELLO_Address *address,
146 struct Session *session);
147
125 148
126 149
127/** 150/**