gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r25046 - gnunet/src/ats-tool


From: gnunet
Subject: [GNUnet-SVN] r25046 - gnunet/src/ats-tool
Date: Mon, 19 Nov 2012 14:01:08 +0100

Author: wachs
Date: 2012-11-19 14:01:07 +0100 (Mon, 19 Nov 2012)
New Revision: 25046

Modified:
   gnunet/src/ats-tool/gnunet-ats.c
Log:
- verbosity

Modified: gnunet/src/ats-tool/gnunet-ats.c
===================================================================
--- gnunet/src/ats-tool/gnunet-ats.c    2012-11-19 09:56:21 UTC (rev 25045)
+++ gnunet/src/ats-tool/gnunet-ats.c    2012-11-19 13:01:07 UTC (rev 25046)
@@ -45,6 +45,7 @@
 
 static char *type_str;
 static unsigned int value;
+static int verbose;
 
 static struct GNUNET_ATS_PerformanceHandle *ph;
 
@@ -85,6 +86,8 @@
   if (NULL != address)
   {
       ats_str = GNUNET_strdup("");
+      if (verbose)
+      {
       for (c = 0; c <  pr->ats_count; c++)
       {
           ats_tmp = ats_str;
@@ -115,9 +118,9 @@
           GNUNET_asprintf (&ats_str, "%s%s=%s, ", ats_tmp, 
ats_prop_arr[ats_type] , ats_prop_value);
           GNUNET_free (ats_tmp);
           GNUNET_free (ats_prop_value);
+        }
       }
 
-
       fprintf (stderr, _("Peer `%s' plugin `%s', address `%s', bw out: %u 
Bytes/s, bw in %u Bytes/s, %s\n"),
         GNUNET_i2s (&pr->address->peer), pr->address->transport_name, address,
         ntohl (pr->bandwidth_out.value__), ntohl 
(pr->bandwidth_in.value__),ats_str);
@@ -308,9 +311,12 @@
        {'t', "type", "TYPE",
          gettext_noop ("preference type to set: latency | bandwidth"),
          1, &GNUNET_GETOPT_set_string, &type_str},
-         {'k', "value", "VALUE",
-           gettext_noop ("preference value"),
-           1, &GNUNET_GETOPT_set_uint, &value},
+       {'k', "value", "VALUE",
+         gettext_noop ("preference value"),
+         1, &GNUNET_GETOPT_set_uint, &value},
+       {'V', "verbose", NULL,
+        gettext_noop ("verbose output (include ATS address properties)"),
+        0, &GNUNET_GETOPT_set_one, &verbose},
     GNUNET_GETOPT_OPTION_END
   };
 




reply via email to

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