aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_quota_compliance.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-29 08:56:09 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-29 08:56:09 +0000
commit6aac05fa79f97bb8826849a6784c11c0d76d1eba (patch)
treee3ea9ff8e53d6bed437d2cd3b031051cbd9fb7a4 /src/transport/test_quota_compliance.c
parent6e57576b032f02d76bf7b7a37ccbe725936f584a (diff)
downloadgnunet-6aac05fa79f97bb8826849a6784c11c0d76d1eba.tar.gz
gnunet-6aac05fa79f97bb8826849a6784c11c0d76d1eba.zip
Adding support for other plugins
Diffstat (limited to 'src/transport/test_quota_compliance.c')
-rw-r--r--src/transport/test_quota_compliance.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 194222183..88e47d7d3 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -47,7 +47,7 @@
47#define MEASUREMENT_MSG_SIZE_BIG 32768 47#define MEASUREMENT_MSG_SIZE_BIG 32768
48#define MEASUREMENT_MAX_QUOTA 1024 * 1024 * 1024 48#define MEASUREMENT_MAX_QUOTA 1024 * 1024 * 1024
49#define MEASUREMENT_MIN_QUOTA 1024 * 10 49#define MEASUREMENT_MIN_QUOTA 1024 * 10
50#define SEND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) 50#define SEND_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 35)
51/** 51/**
52 * Testcase timeout 52 * Testcase timeout
53 */ 53 */
@@ -132,6 +132,12 @@ static unsigned long long total_bytes;
132static unsigned long long current_quota_p1; 132static unsigned long long current_quota_p1;
133static unsigned long long current_quota_p2; 133static unsigned long long current_quota_p2;
134 134
135static int is_tcp;
136static int is_tcp_nat;
137static int is_http;
138static int is_https;
139static int is_udp;
140
135static struct GNUNET_TIME_Absolute start_time; 141static struct GNUNET_TIME_Absolute start_time;
136 142
137static GNUNET_SCHEDULER_TaskIdentifier die_task; 143static GNUNET_SCHEDULER_TaskIdentifier die_task;
@@ -587,6 +593,26 @@ main (int argc, char *argv[])
587#ifdef MINGW 593#ifdef MINGW
588 return GNUNET_SYSERR; 594 return GNUNET_SYSERR;
589#endif 595#endif
596 if (strstr(argv[0], "tcp_nat") != NULL)
597 {
598 is_tcp_nat = GNUNET_YES;
599 }
600 else if (strstr(argv[0], "tcp") != NULL)
601 {
602 is_tcp = GNUNET_YES;
603 }
604 else if (strstr(argv[0], "https") != NULL)
605 {
606 is_https = GNUNET_YES;
607 }
608 else if (strstr(argv[0], "http") != NULL)
609 {
610 is_http = GNUNET_YES;
611 }
612 else if (strstr(argv[0], "udp") != NULL)
613 {
614 is_udp = GNUNET_YES;
615 }
590 GNUNET_log_setup ("test-quota-compliance", 616 GNUNET_log_setup ("test-quota-compliance",
591#if VERBOSE 617#if VERBOSE
592 "DEBUG", 618 "DEBUG",