$(HTTP_API_TEST) \
$(HTTPS_PLUGIN_TEST) \
$(HTTPS_API_TEST) \
+ test_transport_api_multi \
test_transport_api_reliability_tcp \
test_transport_api_reliability_tcp_nat \
test_transport_api_reliability_udp \
$(HTTP_API_TEST) \
$(HTTPS_PLUGIN_TEST) \
$(HTTPS_API_TEST) \
+ test_transport_api_multi \
test_transport_api_reliability_tcp \
test_transport_api_reliability_tcp_nat \
$(HTTP_REL_TEST) \
# $(top_builddir)/src/transport/libgnunettransport.la \
# $(top_builddir)/src/util/libgnunetutil.la
+test_transport_api_multi_SOURCES = \
+ test_transport_api.c
+test_transport_api_multi_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
endif
test_transport_api_http_peer2.conf \
test_transport_api_https_peer1.conf \
test_transport_api_https_peer2.conf \
+ test_transport_api_multi_peer1.conf \
+ test_transport_api_multi_peer2.conf \
test_transport_api_rel_http_peer1.conf \
test_transport_api_rel_http_peer2.conf \
test_transport_api_rel_https_peer1.conf \
static int is_https;
+static int is_multi_protocol;
+
static GNUNET_SCHEDULER_TaskIdentifier die_task;
static char * key_file_p1;
die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&end_badly, NULL);
+ if (is_multi_protocol)
+ {
+ setup_peer (&p1, "test_transport_api_multi_peer1.conf");
+ setup_peer (&p2, "test_transport_api_multi_peer2.conf");
+ }
+
if (is_udp)
{
setup_peer (&p1, "test_transport_api_udp_peer1.conf");
{
is_http = GNUNET_YES;
}
+ else if (strstr(argv[0], "multi") != NULL)
+ {
+ is_multi_protocol = GNUNET_YES;
+ }
ret = check ();
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-1");
- GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-2");
+ if (is_multi_protocol)
+ {
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-multi-peer-1/");
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-multi-peer-2/");
+ }
+ else
+ {
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-1");
+ GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-transport-peer-2");
+ }
return ret;
}
--- /dev/null
+[transport-tcp]
+DISABLEV6 = YES
+PORT = 30001
+BINDTO = 127.0.0.1
+BEHIND_NAT = NO
+ALLOW_NAT = NO
+ENABLE_UPNP = NO
+INTERNAL_ADDRESS = 127.0.0.1
+EXTERNAL_ADDRESS = 127.0.0.1
+
+[transport-udp]
+PORT = 30001
+
+[transport-http]
+PORT = 30002
+DEBUG = NO
+USE_IPv6 = YES
+USE_IPv4 = YES
+#BINDTO4 = 127.0.0.1
+#BINDTO6 = ::1
+
+[transport-https]
+PORT = 30003
+DEBUG = NO
+USE_IPv6 = YES
+USE_IPv4 = YES
+#BINDTO4 = 127.0.0.1
+#BINDTO6 = ::1
+
+[fs]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO
+
+[core]
+AUTOSTART = NO
+
+[hostlist]
+HTTP-PROXY =
+SERVERS = http://gnunet.org:8080/
+OPTIONS = -b
+BINARY = gnunet-daemon-hostlist
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+HTTPPORT = 8080
+
+[topology]
+BINARY = gnunet-daemon-topology
+CONFIG = $DEFAULTCONFIG
+FRIENDS = $SERVICEHOME/friends
+TARGET-CONNECTION-COUNT = 16
+AUTOCONNECT = YES
+FRIENDS-ONLY = NO
+MINIMUM-FRIENDS = 0
+
+[transport]
+PLUGINS = tcp udp http https
+#DEBUG = YES
+#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
+#PREFIX = valgrind --tool=memcheck --leak-check=full --log-file=transport%p
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+NEIGHBOUR_LIMIT = 50
+BINARY = gnunet-service-transport
+#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 12365
+UNIXPATH = /tmp/gnunet-p1-service-transport.sock
+
+[peerinfo]
+TRUST = $SERVICEHOME/data/credit/
+HOSTS = $SERVICEHOME/data/hosts/
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-peerinfo
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 12369
+UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
+
+[resolver]
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-resolver
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 1236
+UNIXPATH = /tmp/gnunet-p1-service-resolver.sock
+
+[statistics]
+AUTOSTART = YES
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-statistics
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 12367
+UNIXPATH = /tmp/gnunet-p1-service-statistics.sock
+
+[arm]
+DEFAULTSERVICES = transport
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-arm
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 12366
+UNIXPATH = /tmp/gnunet-p1-service-arm.sock
+
+[TESTING]
+WEAKRANDOM = YES
+
+[gnunetd]
+HOSTKEY = $SERVICEHOME/.hostkey
+
+[PATHS]
+DEFAULTCONFIG = test_transport_api_multi_peer1.conf
+SERVICEHOME = /tmp/test-gnunetd-transport-multi-peer-1/
+
+
+[dht]
+AUTOSTART = NO
+
+
--- /dev/null
+[transport-tcp]
+DISABLEV6 = YES
+PORT = 0
+BINDTO = 127.0.0.1
+BEHIND_NAT = NO
+ALLOW_NAT = NO
+ENABLE_UPNP = NO
+EXTERNAL_ADDRESS = 127.0.0.1
+INTERNAL_ADDRESS = 127.0.0.1
+
+[transport-udp]
+PORT = 40001
+
+[transport-http]
+PORT = 40002
+DEBUG = NO
+USE_IPv6 = YES
+USE_IPv4 = YES
+#BINDTO4 = 127.0.0.1
+#BINDTO6 = ::1
+
+[transport-https]
+PORT = 40003
+DEBUG = NO
+USE_IPv6 = YES
+USE_IPv4 = YES
+#BINDTO4 = 127.0.0.1
+#BINDTO6 = ::1
+
+
+[core]
+AUTOSTART = NO
+
+[fs]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO
+
+[hostlist]
+HTTP-PROXY =
+SERVERS = http://gnunet.org:8080/
+OPTIONS = -b
+BINARY = gnunet-daemon-hostlist
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+HTTPPORT = 8080
+
+[topology]
+BINARY = gnunet-daemon-topology
+CONFIG = $DEFAULTCONFIG
+FRIENDS = $SERVICEHOME/friends
+TARGET-CONNECTION-COUNT = 16
+AUTOCONNECT = YES
+FRIENDS-ONLY = NO
+MINIMUM-FRIENDS = 0
+
+[transport]
+PLUGINS = tcp udp http https
+#DEBUG = YES
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+NEIGHBOUR_LIMIT = 50
+#BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/transport/.libs/gnunet-service-transport
+BINARY = gnunet-service-transport
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 22365
+UNIXPATH = /tmp/gnunet-p2-service-transport.sock
+#PREFIX = valgrind --tool=callgrind
+#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
+#PREFIX = valgrind --leak-check=full
+
+[peerinfo]
+TRUST = $SERVICEHOME/data/credit/
+HOSTS = $SERVICEHOME/data/hosts/
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-peerinfo
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 22369
+UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
+
+[resolver]
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-resolver
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 22364
+UNIXPATH = /tmp/gnunet-p2-service-resolver.sock
+
+[statistics]
+AUTOSTART = YES
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-statistics
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 22367
+UNIXPATH = /tmp/gnunet-p2-service-statistics.sock
+
+[arm]
+DEFAULTSERVICES = transport
+ACCEPT_FROM6 = ::1;
+ACCEPT_FROM = 127.0.0.1;
+BINARY = gnunet-service-arm
+CONFIG = $DEFAULTCONFIG
+HOME = $SERVICEHOME
+HOSTNAME = localhost
+PORT = 22366
+UNIXPATH = /tmp/gnunet-p2-service-arm.sock
+
+[TESTING]
+WEAKRANDOM = YES
+
+[gnunetd]
+HOSTKEY = $SERVICEHOME/.hostkey
+
+[PATHS]
+DEFAULTCONFIG = test_transport_api_multi_peer2.conf
+SERVICEHOME = /tmp/test-gnunetd-transport-multi-peer-2/
+
+
+[dht]
+AUTOSTART = NO
+
+