gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r14268 - gnunet/src/nat


From: gnunet
Subject: [GNUnet-SVN] r14268 - gnunet/src/nat
Date: Wed, 26 Jan 2011 11:06:46 +0100

Author: wachs
Date: 2011-01-26 11:06:46 +0100 (Wed, 26 Jan 2011)
New Revision: 14268

Added:
   gnunet/src/nat/test-nat.conf
Modified:
   gnunet/src/nat/test_nat.c
Log:
initial changes to get the nat test to run


Added: gnunet/src/nat/test-nat.conf
===================================================================
--- gnunet/src/nat/test-nat.conf                                (rev 0)
+++ gnunet/src/nat/test-nat.conf        2011-01-26 10:06:46 UTC (rev 14268)
@@ -0,0 +1,350 @@
+[PATHS]
+SERVICEHOME = /tmp/nat-test
+# SERVICEHOME = /var/lib/gnunet/
+# DEFAULTCONFIG = /etc/gnunet.conf
+# If 'DEFAULTCONFIG' is not defined, the current
+# configuration file is assumed to be the default,
+# which is what we want by default...
+
+[gnunetd]
+HOSTKEY = $SERVICEHOME/.hostkey
+
+[TESTING]
+WEAKRANDOM = NO
+
+[client]
+HOME = $SERVICEHOME
+
+[transport-tcp]
+# Use 0 to ONLY advertise as a peer behind NAT (no port binding)
+PORT = 2086
+ADVERTISED_PORT = 2086
+
+# Are we behind NAT?
+BEHIND_NAT = YES
+
+# Is the NAT hole-punched?
+PUNCHED_NAT = NO
+
+# Disable UPNP by default until it gets cleaner!
+ENABLE_UPNP = NO
+
+# External IP address of the NAT box (if known); IPv4 dotted-decimal ONLY at 
this time (should allow DynDNS!)
+# normal interface IP address for non-NATed peers; 
+# possibly auto-detected (using UPnP) if possible if not specified
+# EXTERNAL_ADDRESS = 
+
+# Should we use ICMP-based NAT traversal to try connect to NATed peers
+# or, if we are behind NAT, to allow connections to us?
+ENABLE_ICMP_CLIENT = YES
+ENABLE_ICMP_SERVER = YES
+
+# IP address of the interface connected to the NAT box; IPv4 dotted-decimal 
ONLY;
+# normal interface IP address for non-NATed peers; 
+# likely auto-detected (via interface list) if not specified (!)
+# INTERNAL_ADDRESS = 
+
+# Only bind to a specific IP address; if both are given, this should be 
idential to INTERNAL_ADDRESS
+# (but use different: this one restricts our bind!)
+# BINDTO =
+
+TIMEOUT = 300000
+
+# Disable IPv6 support
+# DISABLEV6 =
+# ACCEPT_FROM =
+# ACCEPT_FROM6 =
+# REJECT_FROM =
+# REJECT_FROM6 =
+
+[transport-udp]
+PORT = 2086
+# BEHIND_NAT = 
+# BINDTO = 
+# ALLOW_NAT = 
+# ONLY_NAT_ADDRESSES = 
+# INTERNAL_ADDRESS = 
+# EXTERNAL_ADDRESS = 
+
+[transport-http]
+PORT = 1080
+
+[transport-https]
+PORT = 4433
+
+[arm]
+PORT = 2087
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-arm
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+DEFAULTSERVICES = topology hostlist
+UNIXPATH = /tmp/gnunet-service-arm.sock
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+# GLOBAL_POSTFIX = -l $SERVICEHOME/{}-logs
+# GLOBAL_PREFIX =
+# USERNAME =
+# MAXBUF =
+# TIMEOUT =
+# DISABLEV6 =
+# BINDTO =
+# REJECT_FROM =
+# REJECT_FROM6 =
+# PREFIX =
+
+[statistics]
+AUTOSTART = YES
+PORT = 2088
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-statistics
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+UNIXPATH = /tmp/gnunet-service-statistics.sock
+UNIX_MATCH_UID = NO
+UNIX_MATCH_GID = YES
+# DISABLE_SOCKET_FORWARDING = NO
+# USERNAME = 
+# MAXBUF =
+# TIMEOUT =
+# DISABLEV6 =
+# BINDTO =
+# REJECT_FROM =
+# REJECT_FROM6 =
+# PREFIX =
+
+[resolver]
+AUTOSTART = YES
+PORT = 2089
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-resolver
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+UNIXPATH = /tmp/gnunet-service-resolver.sock
+UNIX_MATCH_UID = NO
+UNIX_MATCH_GID = NO
+# DISABLE_SOCKET_FORWARDING = NO
+# USERNAME = 
+# MAXBUF =
+# TIMEOUT =
+# DISABLEV6 =
+# BINDTO =
+# REJECT_FROM =
+# REJECT_FROM6 =
+# PREFIX =
+
+[peerinfo]
+AUTOSTART = YES
+PORT = 2090
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-peerinfo
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+UNIXPATH = /tmp/gnunet-service-peerinfo.sock
+UNIX_MATCH_UID = NO
+UNIX_MATCH_GID = YES
+# DISABLE_SOCKET_FORWARDING = NO
+# USERNAME = 
+# MAXBUF =
+# TIMEOUT =
+# DISABLEV6 =
+# BINDTO = 
+# REJECT_FROM =
+# REJECT_FROM6 =
+# PREFIX =
+HOSTS = $SERVICEHOME/data/hosts/
+
+
+[transport]
+AUTOSTART = YES
+PORT = 2091
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-transport
+NEIGHBOUR_LIMIT = 50
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+PLUGINS = tcp
+UNIXPATH = /tmp/gnunet-service-transport.sock
+BLACKLIST_FILE = $SERVICEHOME/blacklist
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+# DISABLE_SOCKET_FORWARDING = NO
+# USERNAME = 
+# MAXBUF =
+# TIMEOUT =
+# DISABLEV6 =
+# BINDTO =
+# REJECT_FROM =
+# REJECT_FROM6 =
+# PREFIX =
+
+[core]
+AUTOSTART = YES
+PORT = 2092
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-core
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+# quotas are in bytes per second now!
+TOTAL_QUOTA_IN = 65536
+TOTAL_QUOTA_OUT = 65536
+UNIXPATH = /tmp/gnunet-service-core.sock
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+# DISABLE_SOCKET_FORWARDING = NO
+# DEBUG = YES
+# USERNAME = 
+# MAXBUF =
+# TIMEOUT =
+# DISABLEV6 =
+# BINDTO =
+# REJECT_FROM =
+# REJECT_FROM6 =
+# PREFIX =
+
+
+[topology]
+MINIMUM-FRIENDS = 0
+FRIENDS-ONLY = NO
+AUTOCONNECT = YES
+TARGET-CONNECTION-COUNT = 16
+FRIENDS = $SERVICEHOME/friends
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-daemon-topology
+
+[hostlist]
+# port for hostlist http server
+HTTPPORT = 8080
+HOME = $SERVICEHOME
+HOSTLISTFILE = $SERVICEHOME/hostlist/learned.data
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-daemon-hostlist
+# consider having "-e" as default as well once implemented
+OPTIONS = -b
+SERVERS = http://v9.gnunet.org:58080/
+# proxy for downloading hostlists
+HTTP-PROXY = 
+
+
+[datastore]
+AUTOSTART = YES
+UNIXPATH = /tmp/gnunet-service-datastore.sock
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+PORT = 2093
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-datastore
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+QUOTA = 100000000
+BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
+DATABASE = sqlite
+# DISABLE_SOCKET_FORWARDING = NO
+
+[datastore-sqlite]
+FILENAME = $SERVICEHOME/datastore/sqlite.db
+
+[datastore-postgres]
+CONFIG = connect_timeout=10; dbname=gnunet
+
+[datastore-mysql]
+DATABASE = gnunet
+CONFIG = ~/.my.cnf
+# USER = gnunet
+# PASSWORD = 
+# HOST = localhost
+# PORT = 3306
+
+[datacache-mysql]
+DATABASE = gnunetcheck
+CONFIG = ~/.my.cnf
+# USER = gnunet
+# PASSWORD =
+# HOST = localhost
+# PORT = 3306
+
+
+[fs]
+AUTOSTART = YES
+INDEXDB = $SERVICEHOME/idxinfo.lst
+TRUST = $SERVICEHOME/data/credit/
+IDENTITY_DIR = $SERVICEHOME/identities/
+STATE_DIR = $SERVICEHOME/persistence/
+UPDATE_DIR = $SERVICEHOME/updates/
+PORT = 2094
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-fs
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+
+CONTENT_CACHING = YES
+CONTENT_PUSHING = YES
+
+UNIXPATH = /tmp/gnunet-service-fs.sock
+UNIX_MATCH_UID = NO
+UNIX_MATCH_GID = YES
+# DISABLE_SOCKET_FORWARDING = NO
+# DEBUG = YES
+MAX_PENDING_REQUESTS = 65536
+# Maximum frequency we're allowed to poll the datastore
+# for content for migration (can be used to reduce 
+# GNUnet's disk-IO rate)
+MIN_MIGRATION_DELAY = 1000
+EXPECTED_NEIGHBOUR_COUNT = 128
+
+[dht]
+AUTOSTART = YES
+PORT = 2095
+HOSTNAME = localhost
+HOME = $SERVICEHOME
+CONFIG = $DEFAULTCONFIG
+BINARY = gnunet-service-dht
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+BUCKET_SIZE = 4
+UNIXPATH = /tmp/gnunet-service-dht.sock
+UNIX_MATCH_UID = YES
+UNIX_MATCH_GID = YES
+# DISABLE_SOCKET_FORWARDING = NO
+# DEBUG = YES
+# USERNAME = 
+# MAXBUF =
+# TIMEOUT =
+# DISABLEV6 =
+# BINDTO =
+# REJECT_FROM =
+# REJECT_FROM6 =
+# PREFIX =
+# DO_FIND_PEER =
+# STRICT_KADEMLIA =
+# USE_MAX_HOPS =
+# MAX_HOPS =
+# REPUBLISH = YES
+# REPLICATION_FREQUENCY = 60 
+# STOP_ON_CLOSEST =
+# STOP_FOUND =
+# CONVERGE_MODIFIER =
+
+
+[dhtcache]
+DATABASE = sqlite
+QUOTA = 1024000
+
+[block]
+PLUGINS = fs dht test

Modified: gnunet/src/nat/test_nat.c
===================================================================
--- gnunet/src/nat/test_nat.c   2011-01-26 08:52:37 UTC (rev 14267)
+++ gnunet/src/nat/test_nat.c   2011-01-26 10:06:46 UTC (rev 14268)
@@ -136,12 +136,31 @@
     GNUNET_GETOPT_OPTION_END
   };
 
-  GNUNET_log_setup ("test-nat", "DEBUG", NULL);
+  char *const argv_prog[] = {
+    "test-nat",
+    "-c",
+    "test-nat.conf",
+    "-L",
+#if VERBOSE
+    "DEBUG",
+#else
+    "WARNING",
+#endif
+    NULL
+  };
 
+  GNUNET_log_setup ("test-nat",
+#if VERBOSE
+                    "DEBUG",
+#else
+                    "WARNING",
+#endif
+                    NULL);
+
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Testing NAT library, timeout set to %d seconds\n", TIMEOUT);
 
-  GNUNET_PROGRAM_run (argc, argv, "test-nat", "nohelp", options, &run, NULL);
+  GNUNET_PROGRAM_run (5, argv_prog, "test-nat", "nohelp", options, &run, NULL);
 
   return 0;
 }




reply via email to

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