From dc87f102d4101926122b473e20ffb7d771f840d7 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 29 Oct 2010 13:12:04 +0000 Subject: [PATCH] and quota compliance for udp --- src/transport/Makefile.am | 12 +- src/transport/test_quota_compliance.c | 4 +- .../test_quota_compliance_udp_peer1.conf | 104 ++++++++++++++++++ .../test_quota_compliance_udp_peer2.conf | 102 +++++++++++++++++ 4 files changed, 218 insertions(+), 4 deletions(-) create mode 100644 src/transport/test_quota_compliance_udp_peer1.conf create mode 100644 src/transport/test_quota_compliance_udp_peer2.conf diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index fbda1c614..a7d49d6e4 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -203,7 +203,8 @@ check_PROGRAMS = \ $(HTTPS_REL_TEST) \ test_quota_compliance_tcp \ test_quota_compliance_http \ - test_quota_compliance_https + test_quota_compliance_https \ + test_quota_compliance_udp # TODO: add tests for nat, etc. if !DISABLE_TEST_RUN @@ -222,7 +223,8 @@ TESTS = \ $(HTTPS_REL_TEST) \ test_quota_compliance_tcp \ test_quota_compliance_http \ - test_quota_compliance_https + test_quota_compliance_https \ + test_quota_compliance_udp endif test_transport_api_tcp_SOURCES = \ @@ -327,6 +329,12 @@ test_quota_compliance_https_LDADD = \ $(top_builddir)/src/transport/libgnunettransport.la \ $(top_builddir)/src/util/libgnunetutil.la +test_quota_compliance_udp_SOURCES = \ + test_quota_compliance.c +test_quota_compliance_udp_LDADD = \ + $(top_builddir)/src/transport/libgnunettransport.la \ + $(top_builddir)/src/util/libgnunetutil.la + endif EXTRA_DIST = \ diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index bfcf3f1fd..087d72da0 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c @@ -595,8 +595,8 @@ run (void *cls, } else if (is_udp) { - setup_peer (&p1, "test_quota_compliance_tcp_peer1.conf"); - setup_peer (&p2, "test_quota_compliance_tcp_peer2.conf"); + setup_peer (&p1, "test_quota_compliance_udp_peer1.conf"); + setup_peer (&p2, "test_quota_compliance_udp_peer2.conf"); } else if (is_tcp_nat) { diff --git a/src/transport/test_quota_compliance_udp_peer1.conf b/src/transport/test_quota_compliance_udp_peer1.conf new file mode 100644 index 000000000..1b9771a37 --- /dev/null +++ b/src/transport/test_quota_compliance_udp_peer1.conf @@ -0,0 +1,104 @@ +[PATHS] +SERVICEHOME = /tmp/test_quota_compliance_peer1/ +DEFAULTCONFIG = test_quota_compliance_udp_peer1.conf + +[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 + +[core] +AUTOSTART = NO + +[transport-udp] +PORT = 4368 + + +[transport] +plugins = udp +#DEBUG = YES +PREFIX = +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +NEIGHBOUR_LIMIT = 50 +BINARY = gnunet-service-transport +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 4091 +UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_transport_peer1.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 = 4090 +UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_peerinfo_peer1.sock + +[resolver] +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +BINARY = gnunet-service-resolver +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 4089 +UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_resolver_peer1.sock + +[statistics] +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +BINARY = gnunet-service-statistics +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 4088 +UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_statistics_peer1.sock + +[arm] +DEFAULTSERVICES = +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +BINARY = gnunet-service-arm +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 4087 +UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_arm_peer1.sock + +[TESTING] +WEAKRANDOM = YES + +[gnunetd] +HOSTKEY = $SERVICEHOME/.hostkey + + +[dht] +AUTOSTART = NO + + diff --git a/src/transport/test_quota_compliance_udp_peer2.conf b/src/transport/test_quota_compliance_udp_peer2.conf new file mode 100644 index 000000000..83f39369d --- /dev/null +++ b/src/transport/test_quota_compliance_udp_peer2.conf @@ -0,0 +1,102 @@ +[PATHS] +SERVICEHOME = /tmp/test_quota_compliance_peer2 +DEFAULTCONFIG = test_quota_compliance_udp_peer2.conf + +[transport-udp] +PORT = 3368 +[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 + +[core] +AUTOSTART = NO + +[transport] +plugins = udp +#DEBUG = YES +PREFIX = +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +NEIGHBOUR_LIMIT = 50 +BINARY = gnunet-service-transport +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 3091 +UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_transport_peer2.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 = 3090 +UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_peerinfo_peer2.sock + +[resolver] +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +BINARY = gnunet-service-resolver +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 3089 +UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_resolver_peer2.sock + +[statistics] +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +BINARY = gnunet-service-statistics +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 3088 +UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_statistics_peer2.sock + +[arm] +DEFAULTSERVICES = +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +BINARY = gnunet-service-arm +CONFIG = $DEFAULTCONFIG +HOME = $SERVICEHOME +HOSTNAME = localhost +PORT = 3087 +UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_arm_peer2.sock + +[TESTING] +WEAKRANDOM = YES + +[gnunetd] +HOSTKEY = $SERVICEHOME/.hostkey + + +[dht] +AUTOSTART = NO + + -- 2.25.1