aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-03-11 12:45:52 +0000
committerNathan S. Evans <evans@in.tum.de>2010-03-11 12:45:52 +0000
commit9c923d1ef6752f40535124439fed299ee4150795 (patch)
treee912eb27f4d0c0a94e55a7bb61d52b82af09dc38 /src
parent566fa39ac965c18fe9392ec607cbed99f0860eb9 (diff)
downloadgnunet-9c923d1ef6752f40535124439fed299ee4150795.tar.gz
gnunet-9c923d1ef6752f40535124439fed299ee4150795.zip
dv config files and fixes
Diffstat (limited to 'src')
-rw-r--r--src/dv/Makefile.am24
-rw-r--r--src/dv/gnunet-service-dv.c82
-rw-r--r--src/dv/plugin_transport_dv.c50
-rw-r--r--src/dv/test_transport_api_data.conf133
-rw-r--r--src/dv/test_transport_api_dv_peer1.conf144
-rw-r--r--src/dv/test_transport_api_dv_peer2.conf142
-rw-r--r--src/dv/test_transport_api_dv_peer3.conf142
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 = \ 50check_PROGRAMS = \
51# test_statistics_api 51 test_transport_api_dv
52 52
53TESTS = $(check_PROGRAMS) $(check_SCRIPTS) 53TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
54 54
55#test_statistics_api_SOURCES = \ 55test_transport_api_dv_SOURCES = \
56# test_statistics_api.c 56 test_transport_api_dv.c
57#test_statistics_api_LDADD = \ 57test_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 = \ 61EXTRA_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 */
44static struct GNUNET_CORE_Handle *coreAPI; 48static struct GNUNET_CORE_Handle *coreAPI;
45 49
50/**
51 * The identity of our peer.
52 */
46static struct GNUNET_PeerIdentity *my_identity; 53static struct GNUNET_PeerIdentity *my_identity;
47 54
55/**
56 * The configuration for this service.
57 */
48const struct GNUNET_CONFIGURATION_Handle *cfg; 58const struct GNUNET_CONFIGURATION_Handle *cfg;
49 59
50struct GNUNET_SCHEDULER_Handle *sched; 60/**
61 * The scheduler for this service.
62 */
63static 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 */
70static struct GNUNET_SERVER_Client * client_handle;
51 71
52GNUNET_SCHEDULER_TaskIdentifier cleanup_task; 72GNUNET_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 */
64void handle_dv_data_message (void *cls, 84static 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 */
88void handle_dv_gossip_message (void *cls, 111static 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 */
129static struct GNUNET_SERVER_MessageHandler core_handlers[] = { 168static 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
135static struct GNUNET_SERVER_MessageHandler plugin_handlers[] = { 174static 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 */
204void handle_core_disconnect (void *cls, 244void 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 */
289static void 289static void
290dv_plugin_address_pretty_printer (void *cls, 290dv_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 */
333void * 333void *
334gnunet_plugin_transport_dv_init (void *cls) 334libgnunet_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 */
389void * 405void *
390gnunet_plugin_transport_dv_done (void *cls) 406libgnunet_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]
2SERVICEHOME = /tmp/test-transport-api/
3DEFAULTCONFIG = test_transport_api_data.conf
4
5[transport-udp]
6PORT = 2094
7
8[fs]
9ALLOW_SHUTDOWN = YES
10ACCEPT_FROM6 = ::1;
11ACCEPT_FROM = 127.0.0.1;
12BINARY = gnunet-service-fs
13CONFIG = $DEFAULTCONFIG
14HOME = $SERVICEHOME
15HOSTNAME = localhost
16PORT = 2094
17INDEXDB = $SERVICEHOME/idxinfo.lst
18
19[datastore-sqlite]
20FILENAME = $SERVICEHOME/datastore/sqlite.db
21
22[datastore]
23DATABASE = sqlite
24BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
25QUOTA = 100000000
26ALLOW_SHUTDOWN = YES
27ACCEPT_FROM6 = ::1;
28ACCEPT_FROM = 127.0.0.1;
29BINARY = gnunet-service-datastore
30CONFIG = $DEFAULTCONFIG
31HOME = $SERVICEHOME
32HOSTNAME = localhost
33PORT = 2093
34
35[hostlist]
36HTTP-PROXY =
37SERVERS = http://gnunet.org:8080/
38OPTIONS = -b
39BINARY = gnunet-daemon-hostlist
40CONFIG = $DEFAULTCONFIG
41HOME = $SERVICEHOME
42HOSTNAME = localhost
43HTTPPORT = 8080
44
45[topology]
46BINARY = gnunet-daemon-topology
47CONFIG = $DEFAULTCONFIG
48FRIENDS = $SERVICEHOME/friends
49TARGET-CONNECTION-COUNT = 16
50AUTOCONNECT = YES
51FRIENDS-ONLY = NO
52MINIMUM-FRIENDS = 0
53
54[core]
55TOTAL_QUOTA_OUT = 3932160
56TOTAL_QUOTA_IN = 3932160
57ALLOW_SHUTDOWN = YES
58ACCEPT_FROM6 = ::1;
59ACCEPT_FROM = 127.0.0.1;
60BINARY = gnunet-service-core
61CONFIG = $DEFAULTCONFIG
62HOME = $SERVICEHOME
63HOSTNAME = localhost
64PORT = 2092
65
66[transport]
67plugins = udp
68DEBUG = NO
69PREFIX =
70ALLOW_SHUTDOWN = YES
71ACCEPT_FROM6 = ::1;
72ACCEPT_FROM = 127.0.0.1;
73NEIGHBOUR_LIMIT = 50
74BINARY = gnunet-service-transport
75CONFIG = $DEFAULTCONFIG
76HOME = $SERVICEHOME
77HOSTNAME = localhost
78PORT = 2091
79
80[peerinfo]
81TRUST = $SERVICEHOME/data/credit/
82HOSTS = $SERVICEHOME/data/hosts/
83ALLOW_SHUTDOWN = YES
84ACCEPT_FROM6 = ::1;
85ACCEPT_FROM = 127.0.0.1;
86BINARY = gnunet-service-peerinfo
87CONFIG = $DEFAULTCONFIG
88HOME = $SERVICEHOME
89HOSTNAME = localhost
90PORT = 2090
91
92[resolver]
93ALLOW_SHUTDOWN = YES
94ACCEPT_FROM6 = ::1;
95ACCEPT_FROM = 127.0.0.1;
96BINARY = gnunet-service-resolver
97CONFIG = $DEFAULTCONFIG
98HOME = $SERVICEHOME
99HOSTNAME = localhost
100PORT = 2089
101
102[statistics]
103ALLOW_SHUTDOWN = YES
104ACCEPT_FROM6 = ::1;
105ACCEPT_FROM = 127.0.0.1;
106BINARY = gnunet-service-statistics
107CONFIG = $DEFAULTCONFIG
108HOME = $SERVICEHOME
109HOSTNAME = localhost
110PORT = 2088
111
112[arm]
113DEFAULTSERVICES = resolver transport core
114ALLOW_SHUTDOWN = YES
115ACCEPT_FROM6 = ::1;
116ACCEPT_FROM = 127.0.0.1;
117BINARY = gnunet-service-arm
118CONFIG = $DEFAULTCONFIG
119HOME = $SERVICEHOME
120HOSTNAME = localhost
121PORT = 2087
122
123[transport-tcp]
124ALLOW_SHUTDOWN = NO
125TIMEOUT = 300000
126PORT = 2094
127
128[TESTING]
129WEAKRANDOM = NO
130
131[gnunetd]
132HOSTKEY = $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]
2ALLOW_SHUTDOWN = YES
3ACCEPT_FROM6 = ::1;
4ACCEPT_FROM = 127.0.0.1;
5BINARY = gnunet-service-fs
6CONFIG = $DEFAULTCONFIG
7HOME = $SERVICEHOME
8HOSTNAME = localhost
9PORT = 2094
10INDEXDB = $SERVICEHOME/idxinfo.lst
11
12[datastore-sqlite]
13FILENAME = $SERVICEHOME/datastore/sqlite.db
14
15[datastore]
16DATABASE = sqlite
17BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
18QUOTA = 100000000
19ALLOW_SHUTDOWN = YES
20ACCEPT_FROM6 = ::1;
21ACCEPT_FROM = 127.0.0.1;
22BINARY = gnunet-service-datastore
23CONFIG = $DEFAULTCONFIG
24HOME = $SERVICEHOME
25HOSTNAME = localhost
26PORT = 2093
27
28[hostlist]
29HTTP-PROXY =
30SERVERS = http://gnunet.org:8080/
31OPTIONS = -b
32BINARY = gnunet-daemon-hostlist
33CONFIG = $DEFAULTCONFIG
34HOME = $SERVICEHOME
35HOSTNAME = localhost
36HTTPPORT = 8080
37
38[topology]
39BINARY = gnunet-daemon-topology
40CONFIG = $DEFAULTCONFIG
41FRIENDS = $SERVICEHOME/friends
42TARGET-CONNECTION-COUNT = 16
43AUTOCONNECT = YES
44FRIENDS-ONLY = NO
45MINIMUM-FRIENDS = 0
46
47[transport]
48PLUGINS = tcp dv
49DEBUG = YES
50#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
51#PREFIX = valgrind --leak-check=full
52ALLOW_SHUTDOWN = YES
53ACCEPT_FROM6 = ::1;
54ACCEPT_FROM = 127.0.0.1;
55NEIGHBOUR_LIMIT = 50
56BINARY = gnunet-service-transport
57CONFIG = $DEFAULTCONFIG
58HOME = $SERVICEHOME
59HOSTNAME = localhost
60PORT = 12365
61
62[peerinfo]
63TRUST = $SERVICEHOME/data/credit/
64HOSTS = $SERVICEHOME/data/hosts/
65ALLOW_SHUTDOWN = YES
66ACCEPT_FROM6 = ::1;
67ACCEPT_FROM = 127.0.0.1;
68BINARY = gnunet-service-peerinfo
69CONFIG = $DEFAULTCONFIG
70HOME = $SERVICEHOME
71HOSTNAME = localhost
72PORT = 12369
73
74[resolver]
75ALLOW_SHUTDOWN = YES
76ACCEPT_FROM6 = ::1;
77ACCEPT_FROM = 127.0.0.1;
78BINARY = gnunet-service-resolver
79CONFIG = $DEFAULTCONFIG
80HOME = $SERVICEHOME
81HOSTNAME = localhost
82PORT = 12364
83
84[statistics]
85ALLOW_SHUTDOWN = YES
86ACCEPT_FROM6 = ::1;
87ACCEPT_FROM = 127.0.0.1;
88BINARY = gnunet-service-statistics
89CONFIG = $DEFAULTCONFIG
90HOME = $SERVICEHOME
91HOSTNAME = localhost
92PORT = 12367
93
94[dv]
95DEBUG = YES
96ALLOW_SHUTDOWN = YES
97ACCEPT_FROM6 = ::1;
98ACCEPT_FROM = 127.0.0.1;
99BINARY = 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
102CONFIG = $DEFAULTCONFIG
103HOME = $SERVICEHOME
104HOSTNAME = localhost
105PORT = 12370
106
107[core]
108TOTAL_QUOTA_OUT = 3932160
109TOTAL_QUOTA_IN = 3932160
110ALLOW_SHUTDOWN = YES
111ACCEPT_FROM6 = ::1;
112ACCEPT_FROM = 127.0.0.1;
113BINARY = gnunet-service-core
114CONFIG = $DEFAULTCONFIG
115HOME = $SERVICEHOME
116HOSTNAME = localhost
117PORT = 12092
118
119[arm]
120DEFAULTSERVICES = core dv
121ALLOW_SHUTDOWN = YES
122ACCEPT_FROM6 = ::1;
123ACCEPT_FROM = 127.0.0.1;
124BINARY = gnunet-service-arm
125CONFIG = $DEFAULTCONFIG
126HOME = $SERVICEHOME
127HOSTNAME = localhost
128PORT = 12366
129
130[transport-tcp]
131ALLOW_SHUTDOWN = NO
132TIMEOUT = 300000
133PORT = 12368
134
135[TESTING]
136WEAKRANDOM = YES
137
138[gnunetd]
139HOSTKEY = $SERVICEHOME/.hostkey
140
141[PATHS]
142DEFAULTCONFIG = test_transport_api_dv_peer1.conf
143SERVICEHOME = /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]
2ALLOW_SHUTDOWN = YES
3ACCEPT_FROM6 = ::1;
4ACCEPT_FROM = 127.0.0.1;
5BINARY = gnunet-service-fs
6CONFIG = $DEFAULTCONFIG
7HOME = $SERVICEHOME
8HOSTNAME = localhost
9PORT = 2094
10INDEXDB = $SERVICEHOME/idxinfo.lst
11
12[datastore-sqlite]
13FILENAME = $SERVICEHOME/datastore/sqlite.db
14
15[core]
16TOTAL_QUOTA_OUT = 3932160
17TOTAL_QUOTA_IN = 3932160
18ALLOW_SHUTDOWN = YES
19ACCEPT_FROM6 = ::1;
20ACCEPT_FROM = 127.0.0.1;
21BINARY = gnunet-service-core
22CONFIG = $DEFAULTCONFIG
23HOME = $SERVICEHOME
24HOSTNAME = localhost
25PORT = 22092
26
27[datastore]
28DATABASE = sqlite
29BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
30QUOTA = 100000000
31ALLOW_SHUTDOWN = YES
32ACCEPT_FROM6 = ::1;
33ACCEPT_FROM = 127.0.0.1;
34BINARY = gnunet-service-datastore
35CONFIG = $DEFAULTCONFIG
36HOME = $SERVICEHOME
37HOSTNAME = localhost
38PORT = 2093
39
40[hostlist]
41HTTP-PROXY =
42SERVERS = http://gnunet.org:8080/
43OPTIONS = -b
44BINARY = gnunet-daemon-hostlist
45CONFIG = $DEFAULTCONFIG
46HOME = $SERVICEHOME
47HOSTNAME = localhost
48HTTPPORT = 8080
49
50[topology]
51BINARY = gnunet-daemon-topology
52CONFIG = $DEFAULTCONFIG
53FRIENDS = $SERVICEHOME/friends
54TARGET-CONNECTION-COUNT = 16
55AUTOCONNECT = YES
56FRIENDS-ONLY = NO
57MINIMUM-FRIENDS = 0
58
59[transport]
60PLUGINS = tcp dv
61DEBUG = YES
62# PREFIX =
63ALLOW_SHUTDOWN = YES
64ACCEPT_FROM6 = ::1;
65ACCEPT_FROM = 127.0.0.1;
66NEIGHBOUR_LIMIT = 50
67BINARY = gnunet-service-transport
68CONFIG = $DEFAULTCONFIG
69HOME = $SERVICEHOME
70HOSTNAME = localhost
71PORT = 22365
72#PREFIX = xterm -T transport1 -e gdb --command=cmd --args
73#PREFIX = valgrind --leak-check=full
74
75[peerinfo]
76TRUST = $SERVICEHOME/data/credit/
77HOSTS = $SERVICEHOME/data/hosts/
78ALLOW_SHUTDOWN = YES
79ACCEPT_FROM6 = ::1;
80ACCEPT_FROM = 127.0.0.1;
81BINARY = gnunet-service-peerinfo
82CONFIG = $DEFAULTCONFIG
83HOME = $SERVICEHOME
84HOSTNAME = localhost
85PORT = 22369
86
87[resolver]
88ALLOW_SHUTDOWN = YES
89ACCEPT_FROM6 = ::1;
90ACCEPT_FROM = 127.0.0.1;
91BINARY = gnunet-service-resolver
92CONFIG = $DEFAULTCONFIG
93HOME = $SERVICEHOME
94HOSTNAME = localhost
95PORT = 22364
96
97[statistics]
98ALLOW_SHUTDOWN = YES
99ACCEPT_FROM6 = ::1;
100ACCEPT_FROM = 127.0.0.1;
101BINARY = gnunet-service-statistics
102CONFIG = $DEFAULTCONFIG
103HOME = $SERVICEHOME
104HOSTNAME = localhost
105PORT = 22367
106
107[dv]
108ALLOW_SHUTDOWN = YES
109ACCEPT_FROM6 = ::1;
110ACCEPT_FROM = 127.0.0.1;
111BINARY = gnunet-service-dv
112CONFIG = $DEFAULTCONFIG
113HOME = $SERVICEHOME
114HOSTNAME = localhost
115PORT = 22370
116
117[arm]
118DEFAULTSERVICES = core dv
119ALLOW_SHUTDOWN = YES
120ACCEPT_FROM6 = ::1;
121ACCEPT_FROM = 127.0.0.1;
122BINARY = gnunet-service-arm
123CONFIG = $DEFAULTCONFIG
124HOME = $SERVICEHOME
125HOSTNAME = localhost
126PORT = 22366
127
128[transport-tcp]
129ALLOW_SHUTDOWN = NO
130TIMEOUT = 300000
131PORT = 22368
132
133[TESTING]
134WEAKRANDOM = YES
135
136[gnunetd]
137HOSTKEY = $SERVICEHOME/.hostkey
138
139[PATHS]
140DEFAULTCONFIG = test_transport_api_dv_peer2.conf
141SERVICEHOME = /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]
2ALLOW_SHUTDOWN = YES
3ACCEPT_FROM6 = ::1;
4ACCEPT_FROM = 127.0.0.1;
5BINARY = gnunet-service-fs
6CONFIG = $DEFAULTCONFIG
7HOME = $SERVICEHOME
8HOSTNAME = localhost
9PORT = 2094
10INDEXDB = $SERVICEHOME/idxinfo.lst
11
12[datastore-sqlite]
13FILENAME = $SERVICEHOME/datastore/sqlite.db
14
15[datastore]
16DATABASE = sqlite
17BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
18QUOTA = 100000000
19ALLOW_SHUTDOWN = YES
20ACCEPT_FROM6 = ::1;
21ACCEPT_FROM = 127.0.0.1;
22BINARY = gnunet-service-datastore
23CONFIG = $DEFAULTCONFIG
24HOME = $SERVICEHOME
25HOSTNAME = localhost
26PORT = 2093
27
28[hostlist]
29HTTP-PROXY =
30SERVERS = http://gnunet.org:8080/
31OPTIONS = -b
32BINARY = gnunet-daemon-hostlist
33CONFIG = $DEFAULTCONFIG
34HOME = $SERVICEHOME
35HOSTNAME = localhost
36HTTPPORT = 8080
37
38[topology]
39BINARY = gnunet-daemon-topology
40CONFIG = $DEFAULTCONFIG
41FRIENDS = $SERVICEHOME/friends
42TARGET-CONNECTION-COUNT = 16
43AUTOCONNECT = YES
44FRIENDS-ONLY = NO
45MINIMUM-FRIENDS = 0
46
47[transport]
48PLUGINS = tcp dv
49#DEBUG = YES
50# PREFIX =
51ALLOW_SHUTDOWN = YES
52ACCEPT_FROM6 = ::1;
53ACCEPT_FROM = 127.0.0.1;
54NEIGHBOUR_LIMIT = 50
55BINARY = gnunet-service-transport
56CONFIG = $DEFAULTCONFIG
57HOME = $SERVICEHOME
58HOSTNAME = localhost
59PORT = 32365
60#PREFIX = xterm -T transport1 -e gdb --command=cmd --args
61#PREFIX = valgrind --leak-check=full
62
63[peerinfo]
64TRUST = $SERVICEHOME/data/credit/
65HOSTS = $SERVICEHOME/data/hosts/
66ALLOW_SHUTDOWN = YES
67ACCEPT_FROM6 = ::1;
68ACCEPT_FROM = 127.0.0.1;
69BINARY = gnunet-service-peerinfo
70CONFIG = $DEFAULTCONFIG
71HOME = $SERVICEHOME
72HOSTNAME = localhost
73PORT = 32369
74
75[resolver]
76ALLOW_SHUTDOWN = YES
77ACCEPT_FROM6 = ::1;
78ACCEPT_FROM = 127.0.0.1;
79BINARY = gnunet-service-resolver
80CONFIG = $DEFAULTCONFIG
81HOME = $SERVICEHOME
82HOSTNAME = localhost
83PORT = 32364
84
85[core]
86TOTAL_QUOTA_OUT = 3932160
87TOTAL_QUOTA_IN = 3932160
88ALLOW_SHUTDOWN = YES
89ACCEPT_FROM6 = ::1;
90ACCEPT_FROM = 127.0.0.1;
91BINARY = gnunet-service-core
92CONFIG = $DEFAULTCONFIG
93HOME = $SERVICEHOME
94HOSTNAME = localhost
95PORT = 32092
96
97[statistics]
98ALLOW_SHUTDOWN = YES
99ACCEPT_FROM6 = ::1;
100ACCEPT_FROM = 127.0.0.1;
101BINARY = gnunet-service-statistics
102CONFIG = $DEFAULTCONFIG
103HOME = $SERVICEHOME
104HOSTNAME = localhost
105PORT = 32367
106
107[dv]
108ALLOW_SHUTDOWN = YES
109ACCEPT_FROM6 = ::1;
110ACCEPT_FROM = 127.0.0.1;
111BINARY = gnunet-service-dv
112CONFIG = $DEFAULTCONFIG
113HOME = $SERVICEHOME
114HOSTNAME = localhost
115PORT = 32370
116
117[arm]
118DEFAULTSERVICES = core dv
119ALLOW_SHUTDOWN = YES
120ACCEPT_FROM6 = ::1;
121ACCEPT_FROM = 127.0.0.1;
122BINARY = gnunet-service-arm
123CONFIG = $DEFAULTCONFIG
124HOME = $SERVICEHOME
125HOSTNAME = localhost
126PORT = 32366
127
128[transport-tcp]
129ALLOW_SHUTDOWN = NO
130TIMEOUT = 300000
131PORT = 32368
132
133[TESTING]
134WEAKRANDOM = YES
135
136[gnunetd]
137HOSTKEY = $SERVICEHOME/.hostkey
138
139[PATHS]
140DEFAULTCONFIG = test_transport_api_dv_peer3.conf
141SERVICEHOME = /tmp/test-gnunetd-transport-peer-3/
142