diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-03-11 12:45:52 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-03-11 12:45:52 +0000 |
commit | 9c923d1ef6752f40535124439fed299ee4150795 (patch) | |
tree | e912eb27f4d0c0a94e55a7bb61d52b82af09dc38 /src | |
parent | 566fa39ac965c18fe9392ec607cbed99f0860eb9 (diff) | |
download | gnunet-9c923d1ef6752f40535124439fed299ee4150795.tar.gz gnunet-9c923d1ef6752f40535124439fed299ee4150795.zip |
dv config files and fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/dv/Makefile.am | 24 | ||||
-rw-r--r-- | src/dv/gnunet-service-dv.c | 82 | ||||
-rw-r--r-- | src/dv/plugin_transport_dv.c | 50 | ||||
-rw-r--r-- | src/dv/test_transport_api_data.conf | 133 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv_peer1.conf | 144 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv_peer2.conf | 142 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv_peer3.conf | 142 |
7 files changed, 667 insertions, 50 deletions
diff --git a/src/dv/Makefile.am b/src/dv/Makefile.am index 755f89d59..9b5761f32 100644 --- a/src/dv/Makefile.am +++ b/src/dv/Makefile.am | |||
@@ -47,20 +47,20 @@ libgnunet_plugin_transport_dv_la_LDFLAGS = \ | |||
47 | $(GN_PLUGIN_LDFLAGS) | 47 | $(GN_PLUGIN_LDFLAGS) |
48 | 48 | ||
49 | 49 | ||
50 | #check_PROGRAMS = \ | 50 | check_PROGRAMS = \ |
51 | # test_statistics_api | 51 | test_transport_api_dv |
52 | 52 | ||
53 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) | 53 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) |
54 | 54 | ||
55 | #test_statistics_api_SOURCES = \ | 55 | test_transport_api_dv_SOURCES = \ |
56 | # test_statistics_api.c | 56 | test_transport_api_dv.c |
57 | #test_statistics_api_LDADD = \ | 57 | test_transport_api_dv_LDADD = \ |
58 | # $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 58 | $(top_builddir)/src/transport/libgnunettransport.la \ |
59 | # $(top_builddir)/src/util/libgnunetutil.la | 59 | $(top_builddir)/src/util/libgnunetutil.la |
60 | 60 | ||
61 | #EXTRA_DIST = \ | 61 | EXTRA_DIST = \ |
62 | # test_statistics_api_data.conf | 62 | test_transport_api_dv_peer1.conf \ |
63 | test_transport_api_dv_peer2.conf \ | ||
64 | test_transport_api_dv_peer3.conf | ||
63 | 65 | ||
64 | #check_SCRIPTS = \ | ||
65 | # test_gnunet_statistics.sh | ||
66 | 66 | ||
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 92f5c96aa..3c483746e 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -41,13 +41,33 @@ | |||
41 | /** | 41 | /** |
42 | * DV Service Context stuff goes here... | 42 | * DV Service Context stuff goes here... |
43 | */ | 43 | */ |
44 | |||
45 | /** | ||
46 | * Handle to the core service api. | ||
47 | */ | ||
44 | static struct GNUNET_CORE_Handle *coreAPI; | 48 | static struct GNUNET_CORE_Handle *coreAPI; |
45 | 49 | ||
50 | /** | ||
51 | * The identity of our peer. | ||
52 | */ | ||
46 | static struct GNUNET_PeerIdentity *my_identity; | 53 | static struct GNUNET_PeerIdentity *my_identity; |
47 | 54 | ||
55 | /** | ||
56 | * The configuration for this service. | ||
57 | */ | ||
48 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 58 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
49 | 59 | ||
50 | struct GNUNET_SCHEDULER_Handle *sched; | 60 | /** |
61 | * The scheduler for this service. | ||
62 | */ | ||
63 | static struct GNUNET_SCHEDULER_Handle *sched; | ||
64 | |||
65 | /** | ||
66 | * The client, should be the DV plugin connected to us. Hopefully | ||
67 | * this client will never change, although if the plugin dies | ||
68 | * and returns for some reason it may happen. | ||
69 | */ | ||
70 | static struct GNUNET_SERVER_Client * client_handle; | ||
51 | 71 | ||
52 | GNUNET_SCHEDULER_TaskIdentifier cleanup_task; | 72 | GNUNET_SCHEDULER_TaskIdentifier cleanup_task; |
53 | 73 | ||
@@ -61,17 +81,20 @@ GNUNET_SCHEDULER_TaskIdentifier cleanup_task; | |||
61 | * @param client identification of the client | 81 | * @param client identification of the client |
62 | * @param message the actual message | 82 | * @param message the actual message |
63 | */ | 83 | */ |
64 | void handle_dv_data_message (void *cls, | 84 | static void handle_dv_data_message (void *cls, |
65 | struct GNUNET_SERVER_Client * | 85 | struct GNUNET_PeerIdentity * |
66 | client, | 86 | peer, |
67 | const struct | 87 | const struct |
68 | GNUNET_MessageHeader * | 88 | GNUNET_MessageHeader * |
69 | message) | 89 | message, |
90 | struct GNUNET_TIME_Relative latency, | ||
91 | uint32_t distance) | ||
70 | { | 92 | { |
71 | #if DEBUG_DV | 93 | #if DEBUG_DV |
72 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 94 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
73 | "%s: Receives %s message!\n", "dv", "DV DATA"); | 95 | "%s: Receives %s message!\n", "dv", "DV DATA"); |
74 | #endif | 96 | #endif |
97 | |||
75 | } | 98 | } |
76 | 99 | ||
77 | /** | 100 | /** |
@@ -85,16 +108,17 @@ void handle_dv_data_message (void *cls, | |||
85 | * @param client identification of the client | 108 | * @param client identification of the client |
86 | * @param message the actual message | 109 | * @param message the actual message |
87 | */ | 110 | */ |
88 | void handle_dv_gossip_message (void *cls, | 111 | static void handle_dv_gossip_message (void *cls, |
89 | struct GNUNET_SERVER_Client * | 112 | struct GNUNET_PeerIdentity * peer, |
90 | client, | 113 | const struct GNUNET_MessageHeader * message, |
91 | const struct GNUNET_MessageHeader * | 114 | struct GNUNET_TIME_Relative latency, |
92 | message) | 115 | uint32_t distance) |
93 | { | 116 | { |
94 | #if DEBUG_DV | 117 | #if DEBUG_DV |
95 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
96 | "%s: Receives %s message!\n", "dv", "DV GOSSIP"); | 119 | "%s: Receives %s message!\n", "dv", "DV GOSSIP"); |
97 | #endif | 120 | #endif |
121 | |||
98 | } | 122 | } |
99 | 123 | ||
100 | 124 | ||
@@ -114,6 +138,21 @@ void send_dv_message (void *cls, | |||
114 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 138 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
115 | "%s: Receives %s message!\n", "dv", "SEND"); | 139 | "%s: Receives %s message!\n", "dv", "SEND"); |
116 | #endif | 140 | #endif |
141 | if (client_handle == NULL) | ||
142 | { | ||
143 | client_handle = client; | ||
144 | #if DEBUG_DV | ||
145 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
146 | "%s: Setting initial client handle!\n", "dv"); | ||
147 | #endif | ||
148 | } | ||
149 | else if (client_handle != client) | ||
150 | { | ||
151 | client_handle = client; | ||
152 | /* What should we do in this case, assert fail or just log the warning? */ | ||
153 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
154 | "%s: Setting client handle (was a different client!)!\n", "dv"); | ||
155 | } | ||
117 | } | 156 | } |
118 | 157 | ||
119 | /** | 158 | /** |
@@ -126,10 +165,10 @@ void send_dv_message (void *cls, | |||
126 | * transport) and then our server should be getting messages | 165 | * transport) and then our server should be getting messages |
127 | * from the dv_plugin, right? | 166 | * from the dv_plugin, right? |
128 | */ | 167 | */ |
129 | static struct GNUNET_SERVER_MessageHandler core_handlers[] = { | 168 | static struct GNUNET_CORE_MessageHandler core_handlers[] = { |
130 | {&handle_dv_data_message, NULL, GNUNET_MESSAGE_TYPE_DV_DATA, 0}, | 169 | {&handle_dv_data_message, GNUNET_MESSAGE_TYPE_DV_DATA, 0}, |
131 | {&handle_dv_gossip_message, NULL, GNUNET_MESSAGE_TYPE_DV_GOSSIP, 0}, | 170 | {&handle_dv_gossip_message, GNUNET_MESSAGE_TYPE_DV_GOSSIP, 0}, |
132 | {NULL, NULL, 0, 0} | 171 | {NULL, 0, 0} |
133 | }; | 172 | }; |
134 | 173 | ||
135 | static struct GNUNET_SERVER_MessageHandler plugin_handlers[] = { | 174 | static struct GNUNET_SERVER_MessageHandler plugin_handlers[] = { |
@@ -165,10 +204,11 @@ void core_init (void *cls, | |||
165 | { | 204 | { |
166 | GNUNET_SCHEDULER_cancel(sched, cleanup_task); | 205 | GNUNET_SCHEDULER_cancel(sched, cleanup_task); |
167 | GNUNET_SCHEDULER_add_now(sched, &shutdown_task, NULL); | 206 | GNUNET_SCHEDULER_add_now(sched, &shutdown_task, NULL); |
207 | return; | ||
168 | } | 208 | } |
169 | #if DEBUG_DV | 209 | #if DEBUG_DV |
170 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
171 | "%s: Core initialized, I am peer: %s\n", "dv", GNUNET_i2s(my_identity)); | 211 | "%s: Core connection initialized, I am peer: %s\n", "dv", GNUNET_i2s(my_identity)); |
172 | #endif | 212 | #endif |
173 | coreAPI = server; | 213 | coreAPI = server; |
174 | } | 214 | } |
@@ -202,13 +242,11 @@ void handle_core_connect (void *cls, | |||
202 | * @param distance reported distance (DV) to 'other' | 242 | * @param distance reported distance (DV) to 'other' |
203 | */ | 243 | */ |
204 | void handle_core_disconnect (void *cls, | 244 | void handle_core_disconnect (void *cls, |
205 | const struct GNUNET_PeerIdentity * peer, | 245 | const struct GNUNET_PeerIdentity * peer) |
206 | struct GNUNET_TIME_Relative latency, | ||
207 | uint32_t distance) | ||
208 | { | 246 | { |
209 | #if DEBUG_DV | 247 | #if DEBUG_DV |
210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 248 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
211 | "%s: Receives core disconnect message!\n", "dv"); | 249 | "%s: Receives core peer disconnect message!\n", "dv"); |
212 | #endif | 250 | #endif |
213 | } | 251 | } |
214 | 252 | ||
@@ -228,6 +266,8 @@ run (void *cls, | |||
228 | const struct GNUNET_CONFIGURATION_Handle *c) | 266 | const struct GNUNET_CONFIGURATION_Handle *c) |
229 | { | 267 | { |
230 | struct GNUNET_TIME_Relative timeout; | 268 | struct GNUNET_TIME_Relative timeout; |
269 | |||
270 | timeout = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5); | ||
231 | sched = scheduler; | 271 | sched = scheduler; |
232 | cfg = c; | 272 | cfg = c; |
233 | GNUNET_SERVER_add_handlers (server, plugin_handlers); | 273 | GNUNET_SERVER_add_handlers (server, plugin_handlers); |
@@ -241,9 +281,9 @@ run (void *cls, | |||
241 | &handle_core_connect, | 281 | &handle_core_connect, |
242 | &handle_core_disconnect, | 282 | &handle_core_disconnect, |
243 | NULL, | 283 | NULL, |
284 | GNUNET_NO, | ||
244 | NULL, | 285 | NULL, |
245 | NULL, | 286 | GNUNET_NO, |
246 | NULL, | ||
247 | core_handlers); | 287 | core_handlers); |
248 | 288 | ||
249 | if (coreAPI == NULL) | 289 | if (coreAPI == NULL) |
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index aa25c97e6..2c9881d30 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c | |||
@@ -146,12 +146,12 @@ struct Plugin | |||
146 | /** | 146 | /** |
147 | * Our server. | 147 | * Our server. |
148 | */ | 148 | */ |
149 | struct GNUNET_SERVER_Handle *server; | 149 | //struct GNUNET_SERVER_Handle *server; |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * Handle to the running service. | 152 | * Handle to the running service. |
153 | */ | 153 | */ |
154 | struct GNUNET_SERVICE_Context *service; | 154 | //struct GNUNET_SERVICE_Context *service; |
155 | 155 | ||
156 | /** | 156 | /** |
157 | * Copy of the handler array where the closures are | 157 | * Copy of the handler array where the closures are |
@@ -268,7 +268,7 @@ dv_plugin_disconnect (void *cls, | |||
268 | const struct GNUNET_PeerIdentity *target) | 268 | const struct GNUNET_PeerIdentity *target) |
269 | { | 269 | { |
270 | // struct Plugin *plugin = cls; | 270 | // struct Plugin *plugin = cls; |
271 | // FIXME | 271 | // TODO: Add message type to send to dv service to "disconnect" a peer |
272 | } | 272 | } |
273 | 273 | ||
274 | 274 | ||
@@ -288,13 +288,13 @@ dv_plugin_disconnect (void *cls, | |||
288 | */ | 288 | */ |
289 | static void | 289 | static void |
290 | dv_plugin_address_pretty_printer (void *cls, | 290 | dv_plugin_address_pretty_printer (void *cls, |
291 | const char *type, | 291 | const char *type, |
292 | const void *addr, | 292 | const void *addr, |
293 | size_t addrlen, | 293 | size_t addrlen, |
294 | int numeric, | 294 | int numeric, |
295 | struct GNUNET_TIME_Relative timeout, | 295 | struct GNUNET_TIME_Relative timeout, |
296 | GNUNET_TRANSPORT_AddressStringCallback | 296 | GNUNET_TRANSPORT_AddressStringCallback |
297 | asc, void *asc_cls) | 297 | asc, void *asc_cls) |
298 | { | 298 | { |
299 | asc (asc_cls, NULL); | 299 | asc (asc_cls, NULL); |
300 | } | 300 | } |
@@ -323,7 +323,7 @@ dv_plugin_address_suggested (void *cls, | |||
323 | 323 | ||
324 | /* check if the address is plausible; if so, | 324 | /* check if the address is plausible; if so, |
325 | add it to our list! */ | 325 | add it to our list! */ |
326 | return GNUNET_OK; | 326 | return GNUNET_NO; |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
@@ -331,14 +331,17 @@ dv_plugin_address_suggested (void *cls, | |||
331 | * Entry point for the plugin. | 331 | * Entry point for the plugin. |
332 | */ | 332 | */ |
333 | void * | 333 | void * |
334 | gnunet_plugin_transport_dv_init (void *cls) | 334 | libgnunet_plugin_transport_dv_init (void *cls) |
335 | { | 335 | { |
336 | struct GNUNET_TRANSPORT_PluginEnvironment *env = cls; | 336 | struct GNUNET_TRANSPORT_PluginEnvironment *env = cls; |
337 | struct GNUNET_TRANSPORT_PluginFunctions *api; | 337 | struct GNUNET_TRANSPORT_PluginFunctions *api; |
338 | struct Plugin *plugin; | 338 | struct Plugin *plugin; |
339 | unsigned long long port; | ||
340 | struct GNUNET_SERVICE_Context *service; | 339 | struct GNUNET_SERVICE_Context *service; |
341 | 340 | ||
341 | /** | ||
342 | * Do we not even need a service for this thing? That's peculiar. | ||
343 | */ | ||
344 | /* | ||
342 | service = GNUNET_SERVICE_start ("transport-dv", env->sched, env->cfg); | 345 | service = GNUNET_SERVICE_start ("transport-dv", env->sched, env->cfg); |
343 | if (service == NULL) | 346 | if (service == NULL) |
344 | { | 347 | { |
@@ -349,7 +352,13 @@ gnunet_plugin_transport_dv_init (void *cls) | |||
349 | "dv"); | 352 | "dv"); |
350 | return NULL; | 353 | return NULL; |
351 | } | 354 | } |
352 | 355 | */ | |
356 | /** | ||
357 | * I don't think we need a port, the only way we get stuff is being directly | ||
358 | * called by service transport or by responses from the dv-service via our | ||
359 | * client handle | ||
360 | */ | ||
361 | /* | ||
353 | if ((GNUNET_OK != | 362 | if ((GNUNET_OK != |
354 | GNUNET_CONFIGURATION_get_value_number (env->cfg, | 363 | GNUNET_CONFIGURATION_get_value_number (env->cfg, |
355 | "transport-dv", | 364 | "transport-dv", |
@@ -364,15 +373,22 @@ gnunet_plugin_transport_dv_init (void *cls) | |||
364 | GNUNET_SERVICE_stop (service); | 373 | GNUNET_SERVICE_stop (service); |
365 | return NULL; | 374 | return NULL; |
366 | } | 375 | } |
376 | */ | ||
367 | 377 | ||
368 | plugin = GNUNET_malloc (sizeof (struct Plugin)); | 378 | plugin = GNUNET_malloc (sizeof (struct Plugin)); |
369 | plugin->env = env; | 379 | plugin->env = env; |
370 | plugin->statistics = NULL; | 380 | plugin->statistics = NULL; |
371 | plugin->service = service; | 381 | //plugin->service = service; |
372 | plugin->server = GNUNET_SERVICE_get_server (service); | 382 | //plugin->server = GNUNET_SERVICE_get_server (service); |
373 | 383 | ||
374 | plugin->dv_handle = GNUNET_DV_connect(env->sched, env->cfg, &handle_dv_message_received, plugin); | 384 | plugin->dv_handle = GNUNET_DV_connect(env->sched, env->cfg, &handle_dv_message_received, plugin); |
375 | 385 | ||
386 | if (plugin->dv_handle == NULL) | ||
387 | { | ||
388 | GNUNET_free(plugin); | ||
389 | return NULL; | ||
390 | } | ||
391 | |||
376 | api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); | 392 | api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); |
377 | api->cls = plugin; | 393 | api->cls = plugin; |
378 | api->send = &dv_plugin_send; | 394 | api->send = &dv_plugin_send; |
@@ -387,7 +403,7 @@ gnunet_plugin_transport_dv_init (void *cls) | |||
387 | * Exit point from the plugin. | 403 | * Exit point from the plugin. |
388 | */ | 404 | */ |
389 | void * | 405 | void * |
390 | gnunet_plugin_transport_dv_done (void *cls) | 406 | libgnunet_plugin_transport_dv_done (void *cls) |
391 | { | 407 | { |
392 | struct GNUNET_TRANSPORT_PluginFunctions *api = cls; | 408 | struct GNUNET_TRANSPORT_PluginFunctions *api = cls; |
393 | struct Plugin *plugin = api->cls; | 409 | struct Plugin *plugin = api->cls; |
diff --git a/src/dv/test_transport_api_data.conf b/src/dv/test_transport_api_data.conf new file mode 100644 index 000000000..0a5c8f02e --- /dev/null +++ b/src/dv/test_transport_api_data.conf | |||
@@ -0,0 +1,133 @@ | |||
1 | [PATHS] | ||
2 | SERVICEHOME = /tmp/test-transport-api/ | ||
3 | DEFAULTCONFIG = test_transport_api_data.conf | ||
4 | |||
5 | [transport-udp] | ||
6 | PORT = 2094 | ||
7 | |||
8 | [fs] | ||
9 | ALLOW_SHUTDOWN = YES | ||
10 | ACCEPT_FROM6 = ::1; | ||
11 | ACCEPT_FROM = 127.0.0.1; | ||
12 | BINARY = gnunet-service-fs | ||
13 | CONFIG = $DEFAULTCONFIG | ||
14 | HOME = $SERVICEHOME | ||
15 | HOSTNAME = localhost | ||
16 | PORT = 2094 | ||
17 | INDEXDB = $SERVICEHOME/idxinfo.lst | ||
18 | |||
19 | [datastore-sqlite] | ||
20 | FILENAME = $SERVICEHOME/datastore/sqlite.db | ||
21 | |||
22 | [datastore] | ||
23 | DATABASE = sqlite | ||
24 | BLOOMFILTER = $SERVICEHOME/fs/bloomfilter | ||
25 | QUOTA = 100000000 | ||
26 | ALLOW_SHUTDOWN = YES | ||
27 | ACCEPT_FROM6 = ::1; | ||
28 | ACCEPT_FROM = 127.0.0.1; | ||
29 | BINARY = gnunet-service-datastore | ||
30 | CONFIG = $DEFAULTCONFIG | ||
31 | HOME = $SERVICEHOME | ||
32 | HOSTNAME = localhost | ||
33 | PORT = 2093 | ||
34 | |||
35 | [hostlist] | ||
36 | HTTP-PROXY = | ||
37 | SERVERS = http://gnunet.org:8080/ | ||
38 | OPTIONS = -b | ||
39 | BINARY = gnunet-daemon-hostlist | ||
40 | CONFIG = $DEFAULTCONFIG | ||
41 | HOME = $SERVICEHOME | ||
42 | HOSTNAME = localhost | ||
43 | HTTPPORT = 8080 | ||
44 | |||
45 | [topology] | ||
46 | BINARY = gnunet-daemon-topology | ||
47 | CONFIG = $DEFAULTCONFIG | ||
48 | FRIENDS = $SERVICEHOME/friends | ||
49 | TARGET-CONNECTION-COUNT = 16 | ||
50 | AUTOCONNECT = YES | ||
51 | FRIENDS-ONLY = NO | ||
52 | MINIMUM-FRIENDS = 0 | ||
53 | |||
54 | [core] | ||
55 | TOTAL_QUOTA_OUT = 3932160 | ||
56 | TOTAL_QUOTA_IN = 3932160 | ||
57 | ALLOW_SHUTDOWN = YES | ||
58 | ACCEPT_FROM6 = ::1; | ||
59 | ACCEPT_FROM = 127.0.0.1; | ||
60 | BINARY = gnunet-service-core | ||
61 | CONFIG = $DEFAULTCONFIG | ||
62 | HOME = $SERVICEHOME | ||
63 | HOSTNAME = localhost | ||
64 | PORT = 2092 | ||
65 | |||
66 | [transport] | ||
67 | plugins = udp | ||
68 | DEBUG = NO | ||
69 | PREFIX = | ||
70 | ALLOW_SHUTDOWN = YES | ||
71 | ACCEPT_FROM6 = ::1; | ||
72 | ACCEPT_FROM = 127.0.0.1; | ||
73 | NEIGHBOUR_LIMIT = 50 | ||
74 | BINARY = gnunet-service-transport | ||
75 | CONFIG = $DEFAULTCONFIG | ||
76 | HOME = $SERVICEHOME | ||
77 | HOSTNAME = localhost | ||
78 | PORT = 2091 | ||
79 | |||
80 | [peerinfo] | ||
81 | TRUST = $SERVICEHOME/data/credit/ | ||
82 | HOSTS = $SERVICEHOME/data/hosts/ | ||
83 | ALLOW_SHUTDOWN = YES | ||
84 | ACCEPT_FROM6 = ::1; | ||
85 | ACCEPT_FROM = 127.0.0.1; | ||
86 | BINARY = gnunet-service-peerinfo | ||
87 | CONFIG = $DEFAULTCONFIG | ||
88 | HOME = $SERVICEHOME | ||
89 | HOSTNAME = localhost | ||
90 | PORT = 2090 | ||
91 | |||
92 | [resolver] | ||
93 | ALLOW_SHUTDOWN = YES | ||
94 | ACCEPT_FROM6 = ::1; | ||
95 | ACCEPT_FROM = 127.0.0.1; | ||
96 | BINARY = gnunet-service-resolver | ||
97 | CONFIG = $DEFAULTCONFIG | ||
98 | HOME = $SERVICEHOME | ||
99 | HOSTNAME = localhost | ||
100 | PORT = 2089 | ||
101 | |||
102 | [statistics] | ||
103 | ALLOW_SHUTDOWN = YES | ||
104 | ACCEPT_FROM6 = ::1; | ||
105 | ACCEPT_FROM = 127.0.0.1; | ||
106 | BINARY = gnunet-service-statistics | ||
107 | CONFIG = $DEFAULTCONFIG | ||
108 | HOME = $SERVICEHOME | ||
109 | HOSTNAME = localhost | ||
110 | PORT = 2088 | ||
111 | |||
112 | [arm] | ||
113 | DEFAULTSERVICES = resolver transport core | ||
114 | ALLOW_SHUTDOWN = YES | ||
115 | ACCEPT_FROM6 = ::1; | ||
116 | ACCEPT_FROM = 127.0.0.1; | ||
117 | BINARY = gnunet-service-arm | ||
118 | CONFIG = $DEFAULTCONFIG | ||
119 | HOME = $SERVICEHOME | ||
120 | HOSTNAME = localhost | ||
121 | PORT = 2087 | ||
122 | |||
123 | [transport-tcp] | ||
124 | ALLOW_SHUTDOWN = NO | ||
125 | TIMEOUT = 300000 | ||
126 | PORT = 2094 | ||
127 | |||
128 | [TESTING] | ||
129 | WEAKRANDOM = NO | ||
130 | |||
131 | [gnunetd] | ||
132 | HOSTKEY = $SERVICEHOME/.hostkey | ||
133 | |||
diff --git a/src/dv/test_transport_api_dv_peer1.conf b/src/dv/test_transport_api_dv_peer1.conf new file mode 100644 index 000000000..25dc1fa34 --- /dev/null +++ b/src/dv/test_transport_api_dv_peer1.conf | |||
@@ -0,0 +1,144 @@ | |||
1 | [fs] | ||
2 | ALLOW_SHUTDOWN = YES | ||
3 | ACCEPT_FROM6 = ::1; | ||
4 | ACCEPT_FROM = 127.0.0.1; | ||
5 | BINARY = gnunet-service-fs | ||
6 | CONFIG = $DEFAULTCONFIG | ||
7 | HOME = $SERVICEHOME | ||
8 | HOSTNAME = localhost | ||
9 | PORT = 2094 | ||
10 | INDEXDB = $SERVICEHOME/idxinfo.lst | ||
11 | |||
12 | [datastore-sqlite] | ||
13 | FILENAME = $SERVICEHOME/datastore/sqlite.db | ||
14 | |||
15 | [datastore] | ||
16 | DATABASE = sqlite | ||
17 | BLOOMFILTER = $SERVICEHOME/fs/bloomfilter | ||
18 | QUOTA = 100000000 | ||
19 | ALLOW_SHUTDOWN = YES | ||
20 | ACCEPT_FROM6 = ::1; | ||
21 | ACCEPT_FROM = 127.0.0.1; | ||
22 | BINARY = gnunet-service-datastore | ||
23 | CONFIG = $DEFAULTCONFIG | ||
24 | HOME = $SERVICEHOME | ||
25 | HOSTNAME = localhost | ||
26 | PORT = 2093 | ||
27 | |||
28 | [hostlist] | ||
29 | HTTP-PROXY = | ||
30 | SERVERS = http://gnunet.org:8080/ | ||
31 | OPTIONS = -b | ||
32 | BINARY = gnunet-daemon-hostlist | ||
33 | CONFIG = $DEFAULTCONFIG | ||
34 | HOME = $SERVICEHOME | ||
35 | HOSTNAME = localhost | ||
36 | HTTPPORT = 8080 | ||
37 | |||
38 | [topology] | ||
39 | BINARY = gnunet-daemon-topology | ||
40 | CONFIG = $DEFAULTCONFIG | ||
41 | FRIENDS = $SERVICEHOME/friends | ||
42 | TARGET-CONNECTION-COUNT = 16 | ||
43 | AUTOCONNECT = YES | ||
44 | FRIENDS-ONLY = NO | ||
45 | MINIMUM-FRIENDS = 0 | ||
46 | |||
47 | [transport] | ||
48 | PLUGINS = tcp dv | ||
49 | DEBUG = YES | ||
50 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | ||
51 | #PREFIX = valgrind --leak-check=full | ||
52 | ALLOW_SHUTDOWN = YES | ||
53 | ACCEPT_FROM6 = ::1; | ||
54 | ACCEPT_FROM = 127.0.0.1; | ||
55 | NEIGHBOUR_LIMIT = 50 | ||
56 | BINARY = gnunet-service-transport | ||
57 | CONFIG = $DEFAULTCONFIG | ||
58 | HOME = $SERVICEHOME | ||
59 | HOSTNAME = localhost | ||
60 | PORT = 12365 | ||
61 | |||
62 | [peerinfo] | ||
63 | TRUST = $SERVICEHOME/data/credit/ | ||
64 | HOSTS = $SERVICEHOME/data/hosts/ | ||
65 | ALLOW_SHUTDOWN = YES | ||
66 | ACCEPT_FROM6 = ::1; | ||
67 | ACCEPT_FROM = 127.0.0.1; | ||
68 | BINARY = gnunet-service-peerinfo | ||
69 | CONFIG = $DEFAULTCONFIG | ||
70 | HOME = $SERVICEHOME | ||
71 | HOSTNAME = localhost | ||
72 | PORT = 12369 | ||
73 | |||
74 | [resolver] | ||
75 | ALLOW_SHUTDOWN = YES | ||
76 | ACCEPT_FROM6 = ::1; | ||
77 | ACCEPT_FROM = 127.0.0.1; | ||
78 | BINARY = gnunet-service-resolver | ||
79 | CONFIG = $DEFAULTCONFIG | ||
80 | HOME = $SERVICEHOME | ||
81 | HOSTNAME = localhost | ||
82 | PORT = 12364 | ||
83 | |||
84 | [statistics] | ||
85 | ALLOW_SHUTDOWN = YES | ||
86 | ACCEPT_FROM6 = ::1; | ||
87 | ACCEPT_FROM = 127.0.0.1; | ||
88 | BINARY = gnunet-service-statistics | ||
89 | CONFIG = $DEFAULTCONFIG | ||
90 | HOME = $SERVICEHOME | ||
91 | HOSTNAME = localhost | ||
92 | PORT = 12367 | ||
93 | |||
94 | [dv] | ||
95 | DEBUG = YES | ||
96 | ALLOW_SHUTDOWN = YES | ||
97 | ACCEPT_FROM6 = ::1; | ||
98 | ACCEPT_FROM = 127.0.0.1; | ||
99 | BINARY = gnunet-service-dv | ||
100 | #BINARY = /root/documents/research/gnunet/gnunet-ng/src/dv/.libs/gnunet-service-dv | ||
101 | #PREFIX = xterm -T dvservice -e gdb --args | ||
102 | CONFIG = $DEFAULTCONFIG | ||
103 | HOME = $SERVICEHOME | ||
104 | HOSTNAME = localhost | ||
105 | PORT = 12370 | ||
106 | |||
107 | [core] | ||
108 | TOTAL_QUOTA_OUT = 3932160 | ||
109 | TOTAL_QUOTA_IN = 3932160 | ||
110 | ALLOW_SHUTDOWN = YES | ||
111 | ACCEPT_FROM6 = ::1; | ||
112 | ACCEPT_FROM = 127.0.0.1; | ||
113 | BINARY = gnunet-service-core | ||
114 | CONFIG = $DEFAULTCONFIG | ||
115 | HOME = $SERVICEHOME | ||
116 | HOSTNAME = localhost | ||
117 | PORT = 12092 | ||
118 | |||
119 | [arm] | ||
120 | DEFAULTSERVICES = core dv | ||
121 | ALLOW_SHUTDOWN = YES | ||
122 | ACCEPT_FROM6 = ::1; | ||
123 | ACCEPT_FROM = 127.0.0.1; | ||
124 | BINARY = gnunet-service-arm | ||
125 | CONFIG = $DEFAULTCONFIG | ||
126 | HOME = $SERVICEHOME | ||
127 | HOSTNAME = localhost | ||
128 | PORT = 12366 | ||
129 | |||
130 | [transport-tcp] | ||
131 | ALLOW_SHUTDOWN = NO | ||
132 | TIMEOUT = 300000 | ||
133 | PORT = 12368 | ||
134 | |||
135 | [TESTING] | ||
136 | WEAKRANDOM = YES | ||
137 | |||
138 | [gnunetd] | ||
139 | HOSTKEY = $SERVICEHOME/.hostkey | ||
140 | |||
141 | [PATHS] | ||
142 | DEFAULTCONFIG = test_transport_api_dv_peer1.conf | ||
143 | SERVICEHOME = /tmp/test-gnunetd-transport-peer-1/ | ||
144 | |||
diff --git a/src/dv/test_transport_api_dv_peer2.conf b/src/dv/test_transport_api_dv_peer2.conf new file mode 100644 index 000000000..03670607f --- /dev/null +++ b/src/dv/test_transport_api_dv_peer2.conf | |||
@@ -0,0 +1,142 @@ | |||
1 | [fs] | ||
2 | ALLOW_SHUTDOWN = YES | ||
3 | ACCEPT_FROM6 = ::1; | ||
4 | ACCEPT_FROM = 127.0.0.1; | ||
5 | BINARY = gnunet-service-fs | ||
6 | CONFIG = $DEFAULTCONFIG | ||
7 | HOME = $SERVICEHOME | ||
8 | HOSTNAME = localhost | ||
9 | PORT = 2094 | ||
10 | INDEXDB = $SERVICEHOME/idxinfo.lst | ||
11 | |||
12 | [datastore-sqlite] | ||
13 | FILENAME = $SERVICEHOME/datastore/sqlite.db | ||
14 | |||
15 | [core] | ||
16 | TOTAL_QUOTA_OUT = 3932160 | ||
17 | TOTAL_QUOTA_IN = 3932160 | ||
18 | ALLOW_SHUTDOWN = YES | ||
19 | ACCEPT_FROM6 = ::1; | ||
20 | ACCEPT_FROM = 127.0.0.1; | ||
21 | BINARY = gnunet-service-core | ||
22 | CONFIG = $DEFAULTCONFIG | ||
23 | HOME = $SERVICEHOME | ||
24 | HOSTNAME = localhost | ||
25 | PORT = 22092 | ||
26 | |||
27 | [datastore] | ||
28 | DATABASE = sqlite | ||
29 | BLOOMFILTER = $SERVICEHOME/fs/bloomfilter | ||
30 | QUOTA = 100000000 | ||
31 | ALLOW_SHUTDOWN = YES | ||
32 | ACCEPT_FROM6 = ::1; | ||
33 | ACCEPT_FROM = 127.0.0.1; | ||
34 | BINARY = gnunet-service-datastore | ||
35 | CONFIG = $DEFAULTCONFIG | ||
36 | HOME = $SERVICEHOME | ||
37 | HOSTNAME = localhost | ||
38 | PORT = 2093 | ||
39 | |||
40 | [hostlist] | ||
41 | HTTP-PROXY = | ||
42 | SERVERS = http://gnunet.org:8080/ | ||
43 | OPTIONS = -b | ||
44 | BINARY = gnunet-daemon-hostlist | ||
45 | CONFIG = $DEFAULTCONFIG | ||
46 | HOME = $SERVICEHOME | ||
47 | HOSTNAME = localhost | ||
48 | HTTPPORT = 8080 | ||
49 | |||
50 | [topology] | ||
51 | BINARY = gnunet-daemon-topology | ||
52 | CONFIG = $DEFAULTCONFIG | ||
53 | FRIENDS = $SERVICEHOME/friends | ||
54 | TARGET-CONNECTION-COUNT = 16 | ||
55 | AUTOCONNECT = YES | ||
56 | FRIENDS-ONLY = NO | ||
57 | MINIMUM-FRIENDS = 0 | ||
58 | |||
59 | [transport] | ||
60 | PLUGINS = tcp dv | ||
61 | DEBUG = YES | ||
62 | # PREFIX = | ||
63 | ALLOW_SHUTDOWN = YES | ||
64 | ACCEPT_FROM6 = ::1; | ||
65 | ACCEPT_FROM = 127.0.0.1; | ||
66 | NEIGHBOUR_LIMIT = 50 | ||
67 | BINARY = gnunet-service-transport | ||
68 | CONFIG = $DEFAULTCONFIG | ||
69 | HOME = $SERVICEHOME | ||
70 | HOSTNAME = localhost | ||
71 | PORT = 22365 | ||
72 | #PREFIX = xterm -T transport1 -e gdb --command=cmd --args | ||
73 | #PREFIX = valgrind --leak-check=full | ||
74 | |||
75 | [peerinfo] | ||
76 | TRUST = $SERVICEHOME/data/credit/ | ||
77 | HOSTS = $SERVICEHOME/data/hosts/ | ||
78 | ALLOW_SHUTDOWN = YES | ||
79 | ACCEPT_FROM6 = ::1; | ||
80 | ACCEPT_FROM = 127.0.0.1; | ||
81 | BINARY = gnunet-service-peerinfo | ||
82 | CONFIG = $DEFAULTCONFIG | ||
83 | HOME = $SERVICEHOME | ||
84 | HOSTNAME = localhost | ||
85 | PORT = 22369 | ||
86 | |||
87 | [resolver] | ||
88 | ALLOW_SHUTDOWN = YES | ||
89 | ACCEPT_FROM6 = ::1; | ||
90 | ACCEPT_FROM = 127.0.0.1; | ||
91 | BINARY = gnunet-service-resolver | ||
92 | CONFIG = $DEFAULTCONFIG | ||
93 | HOME = $SERVICEHOME | ||
94 | HOSTNAME = localhost | ||
95 | PORT = 22364 | ||
96 | |||
97 | [statistics] | ||
98 | ALLOW_SHUTDOWN = YES | ||
99 | ACCEPT_FROM6 = ::1; | ||
100 | ACCEPT_FROM = 127.0.0.1; | ||
101 | BINARY = gnunet-service-statistics | ||
102 | CONFIG = $DEFAULTCONFIG | ||
103 | HOME = $SERVICEHOME | ||
104 | HOSTNAME = localhost | ||
105 | PORT = 22367 | ||
106 | |||
107 | [dv] | ||
108 | ALLOW_SHUTDOWN = YES | ||
109 | ACCEPT_FROM6 = ::1; | ||
110 | ACCEPT_FROM = 127.0.0.1; | ||
111 | BINARY = gnunet-service-dv | ||
112 | CONFIG = $DEFAULTCONFIG | ||
113 | HOME = $SERVICEHOME | ||
114 | HOSTNAME = localhost | ||
115 | PORT = 22370 | ||
116 | |||
117 | [arm] | ||
118 | DEFAULTSERVICES = core dv | ||
119 | ALLOW_SHUTDOWN = YES | ||
120 | ACCEPT_FROM6 = ::1; | ||
121 | ACCEPT_FROM = 127.0.0.1; | ||
122 | BINARY = gnunet-service-arm | ||
123 | CONFIG = $DEFAULTCONFIG | ||
124 | HOME = $SERVICEHOME | ||
125 | HOSTNAME = localhost | ||
126 | PORT = 22366 | ||
127 | |||
128 | [transport-tcp] | ||
129 | ALLOW_SHUTDOWN = NO | ||
130 | TIMEOUT = 300000 | ||
131 | PORT = 22368 | ||
132 | |||
133 | [TESTING] | ||
134 | WEAKRANDOM = YES | ||
135 | |||
136 | [gnunetd] | ||
137 | HOSTKEY = $SERVICEHOME/.hostkey | ||
138 | |||
139 | [PATHS] | ||
140 | DEFAULTCONFIG = test_transport_api_dv_peer2.conf | ||
141 | SERVICEHOME = /tmp/test-gnunetd-transport-peer-2/ | ||
142 | |||
diff --git a/src/dv/test_transport_api_dv_peer3.conf b/src/dv/test_transport_api_dv_peer3.conf new file mode 100644 index 000000000..eff16f039 --- /dev/null +++ b/src/dv/test_transport_api_dv_peer3.conf | |||
@@ -0,0 +1,142 @@ | |||
1 | [fs] | ||
2 | ALLOW_SHUTDOWN = YES | ||
3 | ACCEPT_FROM6 = ::1; | ||
4 | ACCEPT_FROM = 127.0.0.1; | ||
5 | BINARY = gnunet-service-fs | ||
6 | CONFIG = $DEFAULTCONFIG | ||
7 | HOME = $SERVICEHOME | ||
8 | HOSTNAME = localhost | ||
9 | PORT = 2094 | ||
10 | INDEXDB = $SERVICEHOME/idxinfo.lst | ||
11 | |||
12 | [datastore-sqlite] | ||
13 | FILENAME = $SERVICEHOME/datastore/sqlite.db | ||
14 | |||
15 | [datastore] | ||
16 | DATABASE = sqlite | ||
17 | BLOOMFILTER = $SERVICEHOME/fs/bloomfilter | ||
18 | QUOTA = 100000000 | ||
19 | ALLOW_SHUTDOWN = YES | ||
20 | ACCEPT_FROM6 = ::1; | ||
21 | ACCEPT_FROM = 127.0.0.1; | ||
22 | BINARY = gnunet-service-datastore | ||
23 | CONFIG = $DEFAULTCONFIG | ||
24 | HOME = $SERVICEHOME | ||
25 | HOSTNAME = localhost | ||
26 | PORT = 2093 | ||
27 | |||
28 | [hostlist] | ||
29 | HTTP-PROXY = | ||
30 | SERVERS = http://gnunet.org:8080/ | ||
31 | OPTIONS = -b | ||
32 | BINARY = gnunet-daemon-hostlist | ||
33 | CONFIG = $DEFAULTCONFIG | ||
34 | HOME = $SERVICEHOME | ||
35 | HOSTNAME = localhost | ||
36 | HTTPPORT = 8080 | ||
37 | |||
38 | [topology] | ||
39 | BINARY = gnunet-daemon-topology | ||
40 | CONFIG = $DEFAULTCONFIG | ||
41 | FRIENDS = $SERVICEHOME/friends | ||
42 | TARGET-CONNECTION-COUNT = 16 | ||
43 | AUTOCONNECT = YES | ||
44 | FRIENDS-ONLY = NO | ||
45 | MINIMUM-FRIENDS = 0 | ||
46 | |||
47 | [transport] | ||
48 | PLUGINS = tcp dv | ||
49 | #DEBUG = YES | ||
50 | # PREFIX = | ||
51 | ALLOW_SHUTDOWN = YES | ||
52 | ACCEPT_FROM6 = ::1; | ||
53 | ACCEPT_FROM = 127.0.0.1; | ||
54 | NEIGHBOUR_LIMIT = 50 | ||
55 | BINARY = gnunet-service-transport | ||
56 | CONFIG = $DEFAULTCONFIG | ||
57 | HOME = $SERVICEHOME | ||
58 | HOSTNAME = localhost | ||
59 | PORT = 32365 | ||
60 | #PREFIX = xterm -T transport1 -e gdb --command=cmd --args | ||
61 | #PREFIX = valgrind --leak-check=full | ||
62 | |||
63 | [peerinfo] | ||
64 | TRUST = $SERVICEHOME/data/credit/ | ||
65 | HOSTS = $SERVICEHOME/data/hosts/ | ||
66 | ALLOW_SHUTDOWN = YES | ||
67 | ACCEPT_FROM6 = ::1; | ||
68 | ACCEPT_FROM = 127.0.0.1; | ||
69 | BINARY = gnunet-service-peerinfo | ||
70 | CONFIG = $DEFAULTCONFIG | ||
71 | HOME = $SERVICEHOME | ||
72 | HOSTNAME = localhost | ||
73 | PORT = 32369 | ||
74 | |||
75 | [resolver] | ||
76 | ALLOW_SHUTDOWN = YES | ||
77 | ACCEPT_FROM6 = ::1; | ||
78 | ACCEPT_FROM = 127.0.0.1; | ||
79 | BINARY = gnunet-service-resolver | ||
80 | CONFIG = $DEFAULTCONFIG | ||
81 | HOME = $SERVICEHOME | ||
82 | HOSTNAME = localhost | ||
83 | PORT = 32364 | ||
84 | |||
85 | [core] | ||
86 | TOTAL_QUOTA_OUT = 3932160 | ||
87 | TOTAL_QUOTA_IN = 3932160 | ||
88 | ALLOW_SHUTDOWN = YES | ||
89 | ACCEPT_FROM6 = ::1; | ||
90 | ACCEPT_FROM = 127.0.0.1; | ||
91 | BINARY = gnunet-service-core | ||
92 | CONFIG = $DEFAULTCONFIG | ||
93 | HOME = $SERVICEHOME | ||
94 | HOSTNAME = localhost | ||
95 | PORT = 32092 | ||
96 | |||
97 | [statistics] | ||
98 | ALLOW_SHUTDOWN = YES | ||
99 | ACCEPT_FROM6 = ::1; | ||
100 | ACCEPT_FROM = 127.0.0.1; | ||
101 | BINARY = gnunet-service-statistics | ||
102 | CONFIG = $DEFAULTCONFIG | ||
103 | HOME = $SERVICEHOME | ||
104 | HOSTNAME = localhost | ||
105 | PORT = 32367 | ||
106 | |||
107 | [dv] | ||
108 | ALLOW_SHUTDOWN = YES | ||
109 | ACCEPT_FROM6 = ::1; | ||
110 | ACCEPT_FROM = 127.0.0.1; | ||
111 | BINARY = gnunet-service-dv | ||
112 | CONFIG = $DEFAULTCONFIG | ||
113 | HOME = $SERVICEHOME | ||
114 | HOSTNAME = localhost | ||
115 | PORT = 32370 | ||
116 | |||
117 | [arm] | ||
118 | DEFAULTSERVICES = core dv | ||
119 | ALLOW_SHUTDOWN = YES | ||
120 | ACCEPT_FROM6 = ::1; | ||
121 | ACCEPT_FROM = 127.0.0.1; | ||
122 | BINARY = gnunet-service-arm | ||
123 | CONFIG = $DEFAULTCONFIG | ||
124 | HOME = $SERVICEHOME | ||
125 | HOSTNAME = localhost | ||
126 | PORT = 32366 | ||
127 | |||
128 | [transport-tcp] | ||
129 | ALLOW_SHUTDOWN = NO | ||
130 | TIMEOUT = 300000 | ||
131 | PORT = 32368 | ||
132 | |||
133 | [TESTING] | ||
134 | WEAKRANDOM = YES | ||
135 | |||
136 | [gnunetd] | ||
137 | HOSTKEY = $SERVICEHOME/.hostkey | ||
138 | |||
139 | [PATHS] | ||
140 | DEFAULTCONFIG = test_transport_api_dv_peer3.conf | ||
141 | SERVICEHOME = /tmp/test-gnunetd-transport-peer-3/ | ||
142 | |||