diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 13:26:19 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-28 13:26:19 +0000 |
commit | 80a7c5fe311c13c34411440a98d6d0398c7d3fe6 (patch) | |
tree | 2673db997a6a88e6f392afd06f0c8efbffb42087 /src/transport/gnunet-service-transport_blacklist.c | |
parent | 566fc18ca04fabe5bba4c697666bafa61b7fc000 (diff) | |
download | gnunet-80a7c5fe311c13c34411440a98d6d0398c7d3fe6.tar.gz gnunet-80a7c5fe311c13c34411440a98d6d0398c7d3fe6.zip |
docu
Diffstat (limited to 'src/transport/gnunet-service-transport_blacklist.c')
-rw-r--r-- | src/transport/gnunet-service-transport_blacklist.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index b1a0047f7..8599f6f24 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -21,7 +21,38 @@ | |||
21 | /** | 21 | /** |
22 | * @file transport/gnunet-service-transport_blacklist.c | 22 | * @file transport/gnunet-service-transport_blacklist.c |
23 | * @brief blacklisting implementation | 23 | * @brief blacklisting implementation |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff, Matthias Wachs |
25 | * @details This is the blacklisting component of transport service. With | ||
26 | * blacklisting it is possible to deny connections to specific peers of | ||
27 | * to use a specific plugin to a specific peer. Peers can be blacklisted using | ||
28 | * the configuration or a blacklist client can be asked. | ||
29 | * | ||
30 | * To blacklist peers using the configuration you have to add a section to your | ||
31 | * configuration containing the peer id of the peer to blacklist and the plugin | ||
32 | * if required. | ||
33 | * | ||
34 | * Example: | ||
35 | * To blacklist connections to P565... on peer AG2P... using tcp add: | ||
36 | * [transport-blacklist-AG2PHES1BARB9IJCPAMJTFPVJ5V3A72S3F2A8SBUB8DAQ2V0O3V8G6G2JU56FHGFOHMQVKBSQFV98TCGTC3RJ1NINP82G0RC00N1520] | ||
37 | * P565723JO1C2HSN6J29TAQ22MN6CI8HTMUU55T0FUQG4CMDGGEQ8UCNBKUMB94GC8R9G4FB2SF9LDOBAJ6AMINBP4JHHDD6L7VD801G = tcp | ||
38 | * | ||
39 | * To blacklist connections to P565... on peer AG2P... using all plugins add: | ||
40 | * [transport-blacklist-AG2PHES1BARB9IJCPAMJTFPVJ5V3A72S3F2A8SBUB8DAQ2V0O3V8G6G2JU56FHGFOHMQVKBSQFV98TCGTC3RJ1NINP82G0RC00N1520] | ||
41 | * P565723JO1C2HSN6J29TAQ22MN6CI8HTMUU55T0FUQG4CMDGGEQ8UCNBKUMB94GC8R9G4FB2SF9LDOBAJ6AMINBP4JHHDD6L7VD801G = | ||
42 | * | ||
43 | * You can also add a blacklist client usign the blacklist api. On a blacklist | ||
44 | * check, blacklisting first checks internally if the peer is blacklisted and | ||
45 | * if not, it asks the blacklisting clients. Clients are asked if it is OK to | ||
46 | * connect to a peer ID, the plugin is omitted. | ||
47 | * | ||
48 | * On blacklist check for (peer, plugin) | ||
49 | * - Do we have a local blacklist entry for this peer and this plugin? | ||
50 | * - YES: disallow connection | ||
51 | * - Do we have a local blacklist entry for this peer and all plugins? | ||
52 | * - YES: disallow connection | ||
53 | * - Does one of the clients disallow? | ||
54 | * - YES: disallow connection | ||
55 | * | ||
25 | */ | 56 | */ |
26 | #include "platform.h" | 57 | #include "platform.h" |
27 | #include "gnunet-service-transport.h" | 58 | #include "gnunet-service-transport.h" |
@@ -29,7 +60,6 @@ | |||
29 | #include "gnunet-service-transport_neighbours.h" | 60 | #include "gnunet-service-transport_neighbours.h" |
30 | #include "transport.h" | 61 | #include "transport.h" |
31 | 62 | ||
32 | |||
33 | /** | 63 | /** |
34 | * Size of the blacklist hash map. | 64 | * Size of the blacklist hash map. |
35 | */ | 65 | */ |