gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r404 - in GNUnet: . contrib src/applications/fs/ecrs src/ap


From: grothoff
Subject: [GNUnet-SVN] r404 - in GNUnet: . contrib src/applications/fs/ecrs src/applications/session src/applications/session/peer1 src/applications/session/peer1/data src/applications/session/peer1/data/hosts src/applications/session/peer1/state.sdb src/applications/session/peer2 src/applications/session/peer2/data src/applications/session/peer2/data/hosts src/applications/session/peer2/state.sdb src/applications/stats src/applications/tbench src/applications/tbench/peer1 src/applications/tbench/peer1/data src/applications/tbench/peer1/data/hosts src/applications/tbench/peer1/state.sdb src/applications/tbench/peer2 src/applications/tbench/peer2/data src/applications/tbench/peer2/data/hosts src/applications/tbench/peer2/state.sdb src/server src/util
Date: Mon, 7 Mar 2005 04:29:49 -0800 (PST)

Author: grothoff
Date: 2005-03-07 04:29:46 -0800 (Mon, 07 Mar 2005)
New Revision: 404

Added:
   GNUnet/src/applications/session/peer1.conf
   GNUnet/src/applications/session/peer1/
   GNUnet/src/applications/session/peer1/.hostkey
   GNUnet/src/applications/session/peer1/data/
   GNUnet/src/applications/session/peer1/data/credit/
   GNUnet/src/applications/session/peer1/data/hosts/
   
GNUnet/src/applications/session/peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
   
GNUnet/src/applications/session/peer1/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
   GNUnet/src/applications/session/peer1/state.sdb/
   GNUnet/src/applications/session/peer1/state.sdb/GNUNET-VERSION
   GNUnet/src/applications/session/peer1/state.sdb/bootstrap-info
   GNUnet/src/applications/session/peer1/state.sdb/topology-070
   GNUnet/src/applications/session/peer2.conf
   GNUnet/src/applications/session/peer2/
   GNUnet/src/applications/session/peer2/.hostkey
   GNUnet/src/applications/session/peer2/data/
   GNUnet/src/applications/session/peer2/data/credit/
   GNUnet/src/applications/session/peer2/data/hosts/
   
GNUnet/src/applications/session/peer2/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
   
GNUnet/src/applications/session/peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
   GNUnet/src/applications/session/peer2/state.sdb/
   GNUnet/src/applications/session/peer2/state.sdb/GNUNET-VERSION
   GNUnet/src/applications/session/peer2/state.sdb/bootstrap-info
   GNUnet/src/applications/session/peer2/state.sdb/topology-070
   GNUnet/src/applications/tbench/peer1.conf
   GNUnet/src/applications/tbench/peer1/
   GNUnet/src/applications/tbench/peer1/.hostkey
   GNUnet/src/applications/tbench/peer1/data/
   GNUnet/src/applications/tbench/peer1/data/credit/
   GNUnet/src/applications/tbench/peer1/data/hosts/
   
GNUnet/src/applications/tbench/peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
   
GNUnet/src/applications/tbench/peer1/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
   GNUnet/src/applications/tbench/peer1/state.sdb/
   GNUnet/src/applications/tbench/peer1/state.sdb/GNUNET-VERSION
   GNUnet/src/applications/tbench/peer1/state.sdb/topology-070
   GNUnet/src/applications/tbench/peer2.conf
   GNUnet/src/applications/tbench/peer2/
   GNUnet/src/applications/tbench/peer2/.hostkey
   GNUnet/src/applications/tbench/peer2/data/
   GNUnet/src/applications/tbench/peer2/data/credit/
   GNUnet/src/applications/tbench/peer2/data/hosts/
   
GNUnet/src/applications/tbench/peer2/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
   
GNUnet/src/applications/tbench/peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
   GNUnet/src/applications/tbench/peer2/state.sdb/
   GNUnet/src/applications/tbench/peer2/state.sdb/GNUNET-VERSION
   GNUnet/src/applications/tbench/peer2/state.sdb/topology-070
Modified:
   GNUnet/contrib/gnunet.root
   GNUnet/src/applications/fs/ecrs/ecrstest.c
   GNUnet/src/applications/session/Makefile.am
   GNUnet/src/applications/session/connect.c
   GNUnet/src/applications/stats/clientapi.c
   GNUnet/src/applications/tbench/Makefile.am
   GNUnet/src/applications/tbench/tbench.c
   GNUnet/src/server/connection.c
   GNUnet/src/server/gnunet-update.c
   GNUnet/src/util/symcipher_gcrypt.c
   GNUnet/src/util/symcipher_openssl.c
   GNUnet/todo
Log:
starting multi-peer testing

Modified: GNUnet/contrib/gnunet.root
===================================================================
--- GNUnet/contrib/gnunet.root  2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/contrib/gnunet.root  2005-03-07 12:29:46 UTC (rev 404)
@@ -383,10 +383,6 @@
 # BLACKLIST = 127.0.0.1/8;192.168.0.0/16;10.0.0.0/255.0.0.0; 
 BLACKLIST = 127.0.0.1/8;192.168.0.0/16;10.0.0.0/255.0.0.0;
 
-# The MTU to use (TCP is stream oriented, so we are pretty free to
-# choose what we want, but note that larger MTUs mean more noise if
-# traffic is low). Do not use less than 1200.  Default is 1460.
-MTU = 1460
 
 ###############################################
 # Options for NAT transport
@@ -424,7 +420,6 @@
 # Default port is 2088 and MTU is 1440.
 PORT = 2088
 # BLACKLIST = 
-MTU = 1440
 
 [HTTP]
 

Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c  2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c  2005-03-07 12:29:46 UTC (rev 
404)
@@ -264,9 +264,6 @@
 
   daemon = fork();
   if (daemon == 0) {
-    /* FIXME: would be nice to be able to tell
-       gnunetd to use the check/debug DB and not
-       any real DB! */
     if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */
                    "gnunetd", /* arg0, path to gnunet binary */
                    "-d",  /* do not daemonize so we can easily kill you */

Modified: GNUnet/src/applications/session/Makefile.am
===================================================================
--- GNUnet/src/applications/session/Makefile.am 2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/session/Makefile.am 2005-03-07 12:29:46 UTC (rev 
404)
@@ -11,3 +11,24 @@
  $(top_builddir)/src/util/libgnunetutil.la 
 libgnunetmodule_session_la_LDFLAGS = \
   -export-dynamic -avoid-version -module
+
+
+
+check_PROGRAMS = \
+  sessiontest 
+
+TESTS = $(check_PROGRAMS)
+
+sessiontest_SOURCES = \
+  sessiontest.c 
+sessiontest_LDADD = \
+  $(top_builddir)/src/applications/stats/libgnunetstats_api.la \
+  $(top_builddir)/src/util/libgnunetutil.la 
+
+EXTRA_DIST = \
+  peer1.conf \
+  peer2.conf \
+  peer1/.hostkey \
+  peer2/.hostkey \
+  
peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
 \
+  
peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6

Modified: GNUnet/src/applications/session/connect.c
===================================================================
--- GNUnet/src/applications/session/connect.c   2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/session/connect.c   2005-03-07 12:29:46 UTC (rev 
404)
@@ -76,7 +76,28 @@
 
 } SKEY_Message;
 
+#if 0
 /**
+ * Not thread-safe, only use for debugging!
+ */
+static const char * printSKEY(const SESSIONKEY * sk) {
+  static char r[512];
+  static char t[12];
+  int i;
+
+  strcpy(r, "");
+  for (i=0;i<SESSIONKEY_LEN;i++) {
+    SNPRINTF(t,
+            12,
+            "%02x",
+            sk->key[i]);
+    strcat(r,t);
+  }
+  return r;
+}
+#endif
+
+/**
  * We received a sign of life from this host. 
  * 
  * @param hostId the peer that gave a sign of live
@@ -117,6 +138,7 @@
   int size;
   SKEY_Message * msg;
   char * pt;
+  EncName enc;
 
   GNUNET_ASSERT(sk != NULL);
   foreignHelo = NULL;
@@ -478,8 +500,10 @@
   if (key.crc32 !=
       htonl(crc32N(&key, SESSIONKEY_LEN))) {
     LOG(LOG_WARNING, 
-       _("SKEY from '%s' fails CRC check.\n"),
-       &enc);
+       _("SKEY from '%s' fails CRC check (have: %u, want %u).\n"),
+       &enc,
+       ntohl(key.crc32),
+       crc32N(&key, SESSIONKEY_LEN));
     return SYSERR;
   }
 

Added: GNUnet/src/applications/session/peer1/.hostkey
===================================================================
(Binary files differ)


Property changes on: GNUnet/src/applications/session/peer1/.hostkey
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/session/peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/session/peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/session/peer1/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/session/peer1/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/session/peer1/state.sdb/GNUNET-VERSION
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/session/peer1/state.sdb/GNUNET-VERSION
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/session/peer1/state.sdb/bootstrap-info
===================================================================
--- GNUnet/src/applications/session/peer1/state.sdb/bootstrap-info      
2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/applications/session/peer1/state.sdb/bootstrap-info      
2005-03-07 12:29:46 UTC (rev 404)
@@ -0,0 +1 @@
+X
\ No newline at end of file

Added: GNUnet/src/applications/session/peer1/state.sdb/topology-070
===================================================================
--- GNUnet/src/applications/session/peer1/state.sdb/topology-070        
2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/applications/session/peer1/state.sdb/topology-070        
2005-03-07 12:29:46 UTC (rev 404)
@@ -0,0 +1 @@
+0.7.0pre0
\ No newline at end of file

Added: GNUnet/src/applications/session/peer1.conf
===================================================================
--- GNUnet/src/applications/session/peer1.conf  2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/session/peer1.conf  2005-03-07 12:29:46 UTC (rev 
404)
@@ -0,0 +1,60 @@
+# This is the configuration for the GNUnet daemon when running
+# the test in this directory (make check).
+
+GNUNETD_HOME     = peer1
+
+[GNUNETD]
+# VALGRIND        = 300
+HELOEXPIRES     = 60
+LOGLEVEL        = DEBUG
+LOGFILE         = $GNUNETD_HOME/log
+KEEPLOG         = 0
+PIDFILE         = $GNUNETD_HOME/gnunetd.pid
+HOSTS          = $GNUNETD_HOME/data/hosts/
+APPLICATIONS = "advertising topology tbench stats"
+TRANSPORTS = "tcp"
+
+[MODULES]
+topology = "topology_default"
+
+[NETWORK]
+PORT = 2087
+INTERFACE = eth0
+HELOEXCHANGE = NO
+TRUSTED = 127.0.0.0/8;
+
+[LOAD]
+INTERFACES          = eth0
+BASICLIMITING       = YES
+MAXNETUPBPSTOTAL    = 50000
+MAXNETDOWNBPSTOTAL  = 50000
+MAXCPULOAD         = 100
+
+[TCP]
+PORT = 2086
+# BLACKLIST = 
+
+[UDP]
+PORT = 2086
+# BLACKLIST = 
+MTU = 1472
+
+[UDP6]
+# Default port is 2088 and MTU is 1452.
+PORT = 2088
+# BLACKLIST = 
+MTU = 1452
+
+[TCP6]
+
+# Default port is 2088 and MTU is 1440.
+PORT = 2088
+# BLACKLIST = 
+MTU = 1440
+
+[HTTP]
+# Default port is 1080 and MTU is 1400.
+PORT = 1080
+# BLACKLIST =
+
+

Added: GNUnet/src/applications/session/peer2/.hostkey
===================================================================
(Binary files differ)


Property changes on: GNUnet/src/applications/session/peer2/.hostkey
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/session/peer2/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/session/peer2/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/session/peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/session/peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/session/peer2/state.sdb/GNUNET-VERSION
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/session/peer2/state.sdb/GNUNET-VERSION
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/session/peer2/state.sdb/bootstrap-info
===================================================================
--- GNUnet/src/applications/session/peer2/state.sdb/bootstrap-info      
2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/applications/session/peer2/state.sdb/bootstrap-info      
2005-03-07 12:29:46 UTC (rev 404)
@@ -0,0 +1 @@
+X
\ No newline at end of file

Added: GNUnet/src/applications/session/peer2/state.sdb/topology-070
===================================================================
--- GNUnet/src/applications/session/peer2/state.sdb/topology-070        
2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/applications/session/peer2/state.sdb/topology-070        
2005-03-07 12:29:46 UTC (rev 404)
@@ -0,0 +1 @@
+0.7.0pre0
\ No newline at end of file

Added: GNUnet/src/applications/session/peer2.conf
===================================================================
--- GNUnet/src/applications/session/peer2.conf  2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/session/peer2.conf  2005-03-07 12:29:46 UTC (rev 
404)
@@ -0,0 +1,60 @@
+# This is the configuration for the GNUnet daemon when running
+# the test in this directory (make check).
+
+GNUNETD_HOME     = peer2
+
+[GNUNETD]
+# VALGRIND        = 300
+HELOEXPIRES     = 60
+LOGLEVEL        = DEBUG
+LOGFILE         = $GNUNETD_HOME/log
+KEEPLOG         = 0
+PIDFILE         = $GNUNETD_HOME/gnunetd.pid
+HOSTS          = $GNUNETD_HOME/data/hosts/
+APPLICATIONS = "advertising topology tbench"
+TRANSPORTS  = "tcp"
+
+[MODULES]
+topology = "topology_default"
+
+[NETWORK]
+PORT = 12087
+INTERFACE = eth0
+HELOEXCHANGE = NO
+TRUSTED = 127.0.0.0/8;
+
+[LOAD]
+INTERFACES          = eth0
+BASICLIMITING       = YES
+MAXNETUPBPSTOTAL    = 50000
+MAXNETDOWNBPSTOTAL  = 50000
+MAXCPULOAD         = 100
+
+[TCP]
+PORT = 12086
+# BLACKLIST = 
+
+[UDP]
+PORT = 12086
+# BLACKLIST = 
+MTU = 1472
+
+[UDP6]
+# Default port is 2088 and MTU is 1452.
+PORT = 12088
+# BLACKLIST = 
+MTU = 1452
+
+[TCP6]
+
+# Default port is 2088 and MTU is 1440.
+PORT = 12088
+# BLACKLIST = 
+MTU = 1440
+
+[HTTP]
+# Default port is 1080 and MTU is 1400.
+PORT = 11080
+# BLACKLIST =
+
+

Modified: GNUnet/src/applications/stats/clientapi.c
===================================================================
--- GNUnet/src/applications/stats/clientapi.c   2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/stats/clientapi.c   2005-03-07 12:29:46 UTC (rev 
404)
@@ -189,12 +189,7 @@
        break; /* out of bounds! */      
       }
       if (ret != SYSERR) {
-       char desc[61];
-       SNPRINTF(desc, 
-                61, 
-                "%60s", 
-                
&((char*)(((STATS_CS_MESSAGE_GENERIC*)statMsg)->values))[mpos]);
-       ret = processor(desc,
+       ret = 
processor(&((char*)(((STATS_CS_MESSAGE_GENERIC*)statMsg)->values))[mpos],
                        ntohll(((STATS_CS_MESSAGE_GENERIC*)statMsg)->values[i]),
                        cls);
       }

Modified: GNUnet/src/applications/tbench/Makefile.am
===================================================================
--- GNUnet/src/applications/tbench/Makefile.am  2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/tbench/Makefile.am  2005-03-07 12:29:46 UTC (rev 
404)
@@ -7,7 +7,6 @@
 
 bin_PROGRAMS = \
   gnunet-tbench
-
 plugin_LTLIBRARIES = \
   libgnunetmodule_tbench.la
 
@@ -16,13 +15,31 @@
   gnunet-tbench.c \
   tbench.h
 
-
 libgnunetmodule_tbench_la_SOURCES = \
   tbench.c\
   tbench.h
-
 libgnunetmodule_tbench_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la
- 
 libgnunetmodule_tbench_la_LDFLAGS = \
   -export-dynamic -avoid-version -module
+
+
+
+check_PROGRAMS = \
+  tbenchtest 
+
+TESTS = $(check_PROGRAMS)
+
+tbenchtest_SOURCES = \
+  tbenchtest.c 
+tbenchtest_LDADD = \
+  $(top_builddir)/src/applications/stats/libgnunetstats_api.la \
+  $(top_builddir)/src/util/libgnunetutil.la 
+
+EXTRA_DIST = \
+  peer1.conf \
+  peer2.conf \
+  peer1/.hostkey \
+  peer2/.hostkey \
+  
peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
 \
+  
peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6

Added: GNUnet/src/applications/tbench/peer1/.hostkey
===================================================================
(Binary files differ)


Property changes on: GNUnet/src/applications/tbench/peer1/.hostkey
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/tbench/peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/tbench/peer1/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/tbench/peer1/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/tbench/peer1/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/tbench/peer1/state.sdb/GNUNET-VERSION
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/tbench/peer1/state.sdb/GNUNET-VERSION
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/tbench/peer1/state.sdb/topology-070
===================================================================
--- GNUnet/src/applications/tbench/peer1/state.sdb/topology-070 2005-03-07 
12:26:11 UTC (rev 403)
+++ GNUnet/src/applications/tbench/peer1/state.sdb/topology-070 2005-03-07 
12:29:46 UTC (rev 404)
@@ -0,0 +1 @@
+0.7.0pre0
\ No newline at end of file

Added: GNUnet/src/applications/tbench/peer1.conf
===================================================================
--- GNUnet/src/applications/tbench/peer1.conf   2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/tbench/peer1.conf   2005-03-07 12:29:46 UTC (rev 
404)
@@ -0,0 +1,60 @@
+# This is the configuration for the GNUnet daemon when running
+# the test in this directory (make check).
+
+GNUNETD_HOME     = peer1
+
+[GNUNETD]
+# VALGRIND        = 300
+HELOEXPIRES     = 60
+LOGLEVEL        = INFO
+# LOGFILE         = 
+KEEPLOG         = 0
+PIDFILE         = $GNUNETD_HOME/gnunetd.pid
+HOSTS          = $GNUNETD_HOME/data/hosts/
+APPLICATIONS = "advertising topology tbench stats"
+TRANSPORTS = "tcp"
+
+[MODULES]
+topology = "topology_default"
+
+[NETWORK]
+PORT = 2087
+INTERFACE = eth0
+HELOEXCHANGE = NO
+TRUSTED = 127.0.0.0/8;
+
+[LOAD]
+INTERFACES          = eth0
+BASICLIMITING       = YES
+MAXNETUPBPSTOTAL    = 50000
+MAXNETDOWNBPSTOTAL  = 50000
+MAXCPULOAD         = 100
+
+[TCP]
+PORT = 2086
+# BLACKLIST = 
+
+[UDP]
+PORT = 2086
+# BLACKLIST = 
+MTU = 1472
+
+[UDP6]
+# Default port is 2088 and MTU is 1452.
+PORT = 2088
+# BLACKLIST = 
+MTU = 1452
+
+[TCP6]
+
+# Default port is 2088 and MTU is 1440.
+PORT = 2088
+# BLACKLIST = 
+MTU = 1440
+
+[HTTP]
+# Default port is 1080 and MTU is 1400.
+PORT = 1080
+# BLACKLIST =
+
+

Added: GNUnet/src/applications/tbench/peer2/.hostkey
===================================================================
(Binary files differ)


Property changes on: GNUnet/src/applications/tbench/peer2/.hostkey
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/tbench/peer2/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/tbench/peer2/data/hosts/BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77FOPDA8F1VIKESLSNBO.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
GNUnet/src/applications/tbench/peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/tbench/peer2/data/hosts/D73MOVC9CA0QMTMG4Q2QBQL8D8FVOLBN41MIQHN0GM7IMAS2VKU46NU69OHQEE19BCQMDFOMFT2H6PJ5KF29DJFLUUCO0CFGK0E56R0.6
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/tbench/peer2/state.sdb/GNUNET-VERSION
===================================================================
(Binary files differ)


Property changes on: 
GNUnet/src/applications/tbench/peer2/state.sdb/GNUNET-VERSION
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: GNUnet/src/applications/tbench/peer2/state.sdb/topology-070
===================================================================
--- GNUnet/src/applications/tbench/peer2/state.sdb/topology-070 2005-03-07 
12:26:11 UTC (rev 403)
+++ GNUnet/src/applications/tbench/peer2/state.sdb/topology-070 2005-03-07 
12:29:46 UTC (rev 404)
@@ -0,0 +1 @@
+0.7.0pre0
\ No newline at end of file

Added: GNUnet/src/applications/tbench/peer2.conf
===================================================================
--- GNUnet/src/applications/tbench/peer2.conf   2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/tbench/peer2.conf   2005-03-07 12:29:46 UTC (rev 
404)
@@ -0,0 +1,60 @@
+# This is the configuration for the GNUnet daemon when running
+# the test in this directory (make check).
+
+GNUNETD_HOME     = peer2
+
+[GNUNETD]
+# VALGRIND        = 300
+HELOEXPIRES     = 60
+LOGLEVEL        = INFO
+# LOGFILE         = 
+KEEPLOG         = 0
+PIDFILE         = $GNUNETD_HOME/gnunetd.pid
+HOSTS          = $GNUNETD_HOME/data/hosts/
+APPLICATIONS = "advertising topology tbench"
+TRANSPORTS  = "tcp"
+
+[MODULES]
+topology = "topology_default"
+
+[NETWORK]
+PORT = 12087
+INTERFACE = eth0
+HELOEXCHANGE = NO
+TRUSTED = 127.0.0.0/8;
+
+[LOAD]
+INTERFACES          = eth0
+BASICLIMITING       = YES
+MAXNETUPBPSTOTAL    = 50000
+MAXNETDOWNBPSTOTAL  = 50000
+MAXCPULOAD         = 100
+
+[TCP]
+PORT = 12086
+# BLACKLIST = 
+
+[UDP]
+PORT = 12086
+# BLACKLIST = 
+MTU = 1472
+
+[UDP6]
+# Default port is 2088 and MTU is 1452.
+PORT = 12088
+# BLACKLIST = 
+MTU = 1452
+
+[TCP6]
+
+# Default port is 2088 and MTU is 1440.
+PORT = 12088
+# BLACKLIST = 
+MTU = 1440
+
+[HTTP]
+# Default port is 1080 and MTU is 1400.
+PORT = 11080
+# BLACKLIST =
+
+

Modified: GNUnet/src/applications/tbench/tbench.c
===================================================================
--- GNUnet/src/applications/tbench/tbench.c     2005-03-07 12:26:11 UTC (rev 
403)
+++ GNUnet/src/applications/tbench/tbench.c     2005-03-07 12:29:46 UTC (rev 
404)
@@ -22,6 +22,8 @@
  * TBench CORE. This is the code that is plugged
  * into the GNUnet core to enable transport profiling.
  *
+ * FIXME: this code needs some serious workover (leaks!)
+ *
  * @author Paul Ruth
  * @file applications/tbench/tbench.c
  */
@@ -54,7 +56,7 @@
   TBENCH_p2p_MESSAGE *pmsg = (TBENCH_p2p_MESSAGE*)message;
   
   LOG(LOG_DEBUG, 
-      "%s received iteration %d, message %d",
+      "%s received iteration %d, message %d\n",
       __FUNCTION__,
       htons(pmsg->iterationNum), 
       htons(pmsg->packetNum));
@@ -69,20 +71,21 @@
   TBENCH_p2p_MESSAGE *pmsg = (TBENCH_p2p_MESSAGE*)message;
   
   LOG(LOG_DEBUG, 
-      "%s",
+      "Entering %s.\n",
       __FUNCTION__);
   MUTEX_LOCK(&lockCnt); 
   if(htons(pmsg->iterationNum) == currIteration) {
     cronTime(&endTime);
     receiveCnt++;
     LOG(LOG_DEBUG,
-       "iteration %d, received reply, %d",
-       currIteration, receiveCnt);
+       "iteration %d, received reply, %d\n",
+       currIteration, 
+       receiveCnt);
     if(receiveCnt >= msgCnt)
       SEMAPHORE_UP(sem);
   } else {
     LOG(LOG_DEBUG,
-       "Old Reply: iteration %d, received reply, %d",
+       "Old Reply: iteration %d, received reply, %d\n",
        currIteration, receiveCnt);
   }
   MUTEX_UNLOCK(&lockCnt);
@@ -94,8 +97,8 @@
 }
 
 /* */
-static void csHandleTBenchRequest(ClientHandle client,
-                                 const CS_HEADER * message) {
+static int csHandleTBenchRequest(ClientHandle client,
+                                const CS_HEADER * message) {
   int i,j;
   int sum_loss,sum_time;
   double sum_variance_time, sum_variance_loss;
@@ -105,7 +108,7 @@
   struct Result *results;
 
   LOG(LOG_DEBUG, 
-      "%s",
+      "Entering %s.\n",
       __FUNCTION__);
   icmsg   = (TBENCH_CS_MESSAGE*)message;
  
@@ -119,8 +122,9 @@
   results = MALLOC(msgIter * sizeof(struct Result));
 
   LOG(LOG_DEBUG,
-      "TBENCH: msgCnt %d msgIter %d",
-      msgCnt, msgIter);
+      "TBENCH: msgCnt %d msgIter %d\n",
+      msgCnt, 
+      msgIter);
   sem = SEMAPHORE_NEW(0);
 
   receiveCnt = 0;
@@ -139,7 +143,7 @@
     opmsg->iterationNum = htons(currIteration);
     receiveCnt = 0;
     LOG(LOG_DEBUG,
-       "Timeout after %u ms",
+       "Timeout after %ums\n",
        ntohl(icmsg->timeOut));
     addCronJob((CronJob)&semaUp,
               ntohl(icmsg->timeOut) * cronMILLIS,
@@ -179,7 +183,7 @@
   /* Lets see what the raw results are */
   for(i = 0; i <  msgIter; i++){
     LOG(LOG_EVERYTHING, 
-       "iter[%d], packets %d/%d, time %d ms",
+       "iter[%d], packets %d/%d, time %dms\n",
        i,
        results[i].packets,
        msgCnt,
@@ -194,7 +198,7 @@
   ocmsg->min_time = htons(results[0].time);
   for(i = 1; i < msgIter; i++) {
     LOG(LOG_EVERYTHING, 
-       " iteration=%d", 
+       "iteration=%d\n", 
        i);
     sum_loss += msgCnt - results[i].packets;
     if(msgCnt-results[i].packets > htons(ocmsg->max_loss))
@@ -217,7 +221,7 @@
   sum_variance_loss = 0.0;
   for(i = 0; i < msgIter; i++){
     LOG(LOG_DEBUG,
-       "TBENCH: iteration=%d msgIter=%d", 
+       "TBENCH: iteration=%d msgIter=%d\n", 
        i,
        msgIter);
     sum_variance_time += (results[i].time - ocmsg->mean_time)*
@@ -233,15 +237,16 @@
   ocmsg->header.type = htons(TBENCH_CS_PROTO_REPLY);
 
   LOG(LOG_DEBUG, 
-      "calling writeToSocket");
+      "calling writeToSocket\n");
   if (SYSERR == coreAPI->sendToClient(client,
                                      &ocmsg->header))
-    return;
+    return SYSERR;
   FREE(opmsg);
   FREE(ocmsg);
   FREE(results);
   LOG(LOG_DEBUG,
-      "finishing benchmark");
+      "finishing benchmark\n");
+  return OK;
 }
 
 /**
@@ -269,9 +274,9 @@
 
 void done_module_tbench() {
   coreAPI->unregisterHandler(TBENCH_p2p_PROTO_REQUEST,
-                          &handleTBenchReq);
+                            &handleTBenchReq);
   coreAPI->unregisterHandler(TBENCH_p2p_PROTO_REPLY,
-                          &handleTBenchReply);
+                            &handleTBenchReply);
   coreAPI->unregisterClientHandler(TBENCH_CS_PROTO_REQUEST,
                                   (CSHandler)&csHandleTBenchRequest);
   MUTEX_DESTROY(&lock);

Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c      2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/server/connection.c      2005-03-07 12:29:46 UTC (rev 404)
@@ -891,7 +891,7 @@
     SendEntry ** entries;
 
     entries = be->sendBuffer;
-    totalMessageSize = 0;
+    totalMessageSize = sizeof(P2P_Message);
     knapsackSolution = MALLOC(sizeof(int) * be->sendBufferSize);
     priority = 0;
     i = 0;
@@ -1046,7 +1046,7 @@
   }
   
   /* build message (start with sequence number) */
-  GNUNET_ASSERT(totalMessageSize > sizeof(P2P_Message));
+  GNUNET_ASSERT(totalMessageSize >= sizeof(P2P_Message));
   plaintextMsg = MALLOC(totalMessageSize);
   p2pHdr = (P2P_Message*) plaintextMsg;
   p2pHdr->timeStamp 
@@ -1723,7 +1723,10 @@
      potentially under-allocated.  Since there's always some
      (unencrypted) traffic that we're not quite accounting for anyway,
      that's probably not so bad. */
-  while (schedulableBandwidth > CONNECTION_MAX_HOSTS_ * 100) {
+  didAssign = YES;
+  while ( (schedulableBandwidth > CONNECTION_MAX_HOSTS_ * 100) &&
+         (activePeerCount > 0) &&
+         (didAssign == YES) ) {
     didAssign = NO;
     decrementSB = 0;
     for (u=0;u<activePeerCount;u++) {
@@ -1742,7 +1745,8 @@
       }
     }
     schedulableBandwidth -= decrementSB;
-    if ( (activePeerCount > 0) && (didAssign == NO) ) {
+    if ( (activePeerCount > 0) && 
+        (didAssign == NO) ) {
       int * perm = permute(activePeerCount);
       /* assign also to random "worthless" (zero-share) peers */
       for (u=0;u<activePeerCount;u++) {
@@ -1776,8 +1780,9 @@
   /* randomly add the MIN_BPM_PER_PEER to minCon peers; yes, this will
      yield some fluctuation, but some amount of fluctuation should be
      good since it creates opportunities. */
-  for (u=0;u<minCon;u++) 
-    entries[randomi(activePeerCount)]->idealized_limit += MIN_BPM_PER_PEER;  
+  if (activePeerCount > 0)
+    for (u=0;u<minCon;u++) 
+      entries[randomi(activePeerCount)]->idealized_limit += MIN_BPM_PER_PEER;  
 
   /* prepare for next round */
   lastRoundStart = now;
@@ -2136,7 +2141,7 @@
              transport->connect(helo,
                                 &be->session.tsession)) {
            be->session.mtu
-             = transport->getMTU(be->session.tsession->ttype);
+             = transport->getMTU(be->session.tsession->ttype);     
          } else {
            LOG(LOG_WARNING,
                _("Session confirmed, but cannot connect! (bug?)"));

Modified: GNUnet/src/server/gnunet-update.c
===================================================================
--- GNUnet/src/server/gnunet-update.c   2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/server/gnunet-update.c   2005-03-07 12:29:46 UTC (rev 404)
@@ -161,11 +161,12 @@
  * Allow the module named "pos" to update.
  * @return OK on success, SYSERR on error
  */ 
-static int updateModule(const char * pos) {
+static int updateModule(const char * rpos) {
   UpdateMethod mptr;
   void * library;
   char * name;
   int i;
+  char * pos;
 
   for (i=0;i<processedCount;i++)
     if (0 == strcmp(pos, processed[i]))
@@ -173,13 +174,19 @@
   GROW(processed, processedCount, processedCount+1);
   processed[processedCount-1] = STRDUP(pos);
 
+  pos = getConfigurationString("MODULES",
+                              rpos);
+  if (pos == NULL)
+    pos = STRDUP(rpos);
+
   name = MALLOC(strlen(pos) + strlen("module_") + 1);
   strcpy(name, "module_");
   strcat(name, pos);
+  FREE(pos);
   library = loadDynamicLibrary(DSO_PREFIX,
                               name);
   if (library == NULL) {
-    FREE(name);
+    FREE(name);    
     return SYSERR;
   }
   mptr = trybindDynamicMethod(library,

Modified: GNUnet/src/util/symcipher_gcrypt.c
===================================================================
--- GNUnet/src/util/symcipher_gcrypt.c  2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/util/symcipher_gcrypt.c  2005-03-07 12:29:46 UTC (rev 404)
@@ -55,12 +55,15 @@
 
 
 /**
- * Create a new SessionKey (for Blowfish)
+ * Create a new SessionKey (for AES-256).
  */
 void makeSessionkey(SESSIONKEY * key) {
   int i;
-  for (i=0;i<SESSIONKEY_LEN;i++)
-    key->key[i] = rand();
+  lockGcrypt();
+  gcry_randomize(&key->key[0],
+                SESSIONKEY_LEN,
+                GCRY_STRONG_RANDOM);
+  unlockGcrypt();
   key->crc32 = htonl(crc32N(key, SESSIONKEY_LEN));
 }
 

Modified: GNUnet/src/util/symcipher_openssl.c
===================================================================
--- GNUnet/src/util/symcipher_openssl.c 2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/src/util/symcipher_openssl.c 2005-03-07 12:29:46 UTC (rev 404)
@@ -31,13 +31,18 @@
 #include <openssl/evp.h>
 #include <openssl/bn.h>
 #include <openssl/err.h>
+#include <openssl/rand.h>
+
 /**
  * Create a new SessionKey (for Blowfish)
  */
 void makeSessionkey(SESSIONKEY * key) {
   int i;
-  for (i=0;i<SESSIONKEY_LEN;i++)
-    key->key[i] = rand();
+  if (1 != RAND_bytes(&key->key[0],
+                     SESSIONKEY_LEN)) {
+    for (i=0;i<SESSIONKEY_LEN;i++)
+      key->key[i] = rand();
+  }
   key->crc32 = htonl(crc32N(key, SESSIONKEY_LEN));
 }
 

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2005-03-07 12:26:11 UTC (rev 403)
+++ GNUnet/todo 2005-03-07 12:29:46 UTC (rev 404)
@@ -10,13 +10,14 @@
   * sqlite-tests: test concurrency with iterators
   * gnunet-pseudonym
   * gnunet-search: multiple search results don't work (yet); test on FSLIB and 
ECRS levels!
+  * sessiontest reveils problems with encryption in gcrypt (!) -- sessionkey 
invalid upon decryption, why?
+  * tbench is awful code (FIX) and also somehow _breaks_ bandwidth 
limitations! (Mantis #766 anyone?)
 - FSUI:
   * download: various details wrt generated events
   * namespace updates
   * collections
   * testing
-- multi-peer testing:
-  * core
+- multi-peer testing: (see sessiontest.c and tbenchtest.c for templates)
   * gap
   * dht / gnunet-dht-join and gnunet-dht-query 
   * fs





reply via email to

[Prev in Thread] Current Thread [Next in Thread]