From 61787bfa37e0ac5998e01d9c4806600033c19c74 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 23 Nov 2018 17:19:53 +0100 Subject: rename fest: use new libgnunetnt instead of old libgnunetats logic for network type classification --- src/ats-tool/Makefile.am | 1 + src/ats-tool/gnunet-ats.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/ats-tool') diff --git a/src/ats-tool/Makefile.am b/src/ats-tool/Makefile.am index 02a21591b..55bfe1322 100644 --- a/src/ats-tool/Makefile.am +++ b/src/ats-tool/Makefile.am @@ -17,6 +17,7 @@ gnunet_ats_SOURCES = \ gnunet_ats_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/ats/libgnunetats.la \ + $(top_builddir)/src/nt/libgnunetnt.la \ $(top_builddir)/src/transport/libgnunettransport.la \ $(top_builddir)/src/hello/libgnunethello.la \ $(GN_LIBINTL) diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index 2db0a47d9..0d26ba5d9 100644 --- a/src/ats-tool/gnunet-ats.c +++ b/src/ats-tool/gnunet-ats.c @@ -394,7 +394,7 @@ transport_addr_to_str_cb (void *cls, GNUNET_i2s (&pr->address->peer), pr->address->transport_name, address, - GNUNET_ATS_print_network_type (pr->properties.scope), + GNUNET_NT_to_string (pr->properties.scope), ntohl (pr->bandwidth_out.value__), ntohl (pr->bandwidth_in.value__), pr->active ? _("active ") : _("inactive ")); @@ -641,15 +641,15 @@ print_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg) unsigned long long int quota_in; int c; - for (c = 0; (c < GNUNET_ATS_NetworkTypeCount); c++) + for (c = 0; (c < GNUNET_NT_COUNT); c++) { GNUNET_asprintf (&entry_out, "%s_QUOTA_OUT", - GNUNET_ATS_print_network_type (c)); + GNUNET_NT_to_string (c)); GNUNET_asprintf (&entry_in, "%s_QUOTA_IN", - GNUNET_ATS_print_network_type (c)); + GNUNET_NT_to_string (c)); /* quota out */ if (GNUNET_OK == @@ -671,7 +671,7 @@ print_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg) { FPRINTF (stderr, "Outbound quota for network `%11s' not configured!\n", - GNUNET_ATS_print_network_type (c)); + GNUNET_NT_to_string (c)); GNUNET_asprintf ("a_out_str, "-"); } GNUNET_free (entry_out); @@ -694,20 +694,20 @@ print_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg) { FPRINTF (stderr, "Inbound quota for network `%11s' not configured!\n", - GNUNET_ATS_print_network_type (c)); + GNUNET_NT_to_string (c)); GNUNET_asprintf ("a_in_str, "-"); } GNUNET_free(entry_in); FPRINTF (stdout, _("Quota for network `%11s' (in/out): %10s / %10s\n"), - GNUNET_ATS_print_network_type (c), + GNUNET_NT_to_string (c), quota_in_str, quota_out_str); GNUNET_free(quota_out_str); GNUNET_free(quota_in_str); } - return GNUNET_ATS_NetworkTypeCount; + return GNUNET_NT_COUNT; } -- cgit v1.2.3