aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-06 09:28:57 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-06 09:28:57 +0000
commit66d788dbe9224b7d3e51ad60d2a29a167b2e348d (patch)
treedd1737e137f070c01ef42800c4fe625f526d0214 /src/include
parent170d5baeece2def099112c6a25287a95d2b28899 (diff)
downloadgnunet-66d788dbe9224b7d3e51ad60d2a29a167b2e348d.tar.gz
gnunet-66d788dbe9224b7d3e51ad60d2a29a167b2e348d.zip
get rid of stupid network[i]=i array
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_ats_plugin.h10
-rw-r--r--src/include/gnunet_ats_service.h13
2 files changed, 6 insertions, 17 deletions
diff --git a/src/include/gnunet_ats_plugin.h b/src/include/gnunet_ats_plugin.h
index 36a49d252..bec94b31b 100644
--- a/src/include/gnunet_ats_plugin.h
+++ b/src/include/gnunet_ats_plugin.h
@@ -464,14 +464,10 @@ struct GNUNET_ATS_PluginEnvironment
464 GAS_solver_information_callback info_cb; 464 GAS_solver_information_callback info_cb;
465 465
466 /** 466 /**
467 * Available networks 467 * Number of networks available, size of the @e out_quota
468 * and @e in_quota arrays.
468 */ 469 */
469 int networks[GNUNET_ATS_NetworkTypeCount]; 470 unsigned int network_count;
470
471 /**
472 * Number of networks available
473 */
474 int network_count;
475 471
476 /** 472 /**
477 * Array of configured outbound quotas 473 * Array of configured outbound quotas
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index 63c560487..e4070c40f 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -31,12 +31,6 @@
31#include "gnunet_hello_lib.h" 31#include "gnunet_hello_lib.h"
32 32
33/** 33/**
34 * Number of network types supported by ATS
35 */
36#define GNUNET_ATS_NetworkTypeCount 6
37
38
39/**
40 * Types of networks (with separate quotas) we support. 34 * Types of networks (with separate quotas) we support.
41 */ 35 */
42enum GNUNET_ATS_Network_Type 36enum GNUNET_ATS_Network_Type
@@ -70,14 +64,13 @@ enum GNUNET_ATS_Network_Type
70 * Bluetooth LAN 64 * Bluetooth LAN
71 */ 65 */
72 GNUNET_ATS_NET_BT = 5 66 GNUNET_ATS_NET_BT = 5
73};
74
75 67
76/** 68/**
77 * ATS network types as array initializer 69 * Number of network types supported by ATS
78 */ 70 */
79#define GNUNET_ATS_NetworkType { GNUNET_ATS_NET_UNSPECIFIED, GNUNET_ATS_NET_LOOPBACK, GNUNET_ATS_NET_LAN, GNUNET_ATS_NET_WAN, GNUNET_ATS_NET_WLAN, GNUNET_ATS_NET_BT } 71#define GNUNET_ATS_NetworkTypeCount 6
80 72
73};
81 74
82 75
83/** 76/**