aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_addresses.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.c')
-rw-r--r--src/ats/gnunet-service-ats_addresses.c58
1 files changed, 8 insertions, 50 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 73545e352..b13de0df1 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -33,49 +33,6 @@
33#include "gnunet-service-ats_scheduling.h" 33#include "gnunet-service-ats_scheduling.h"
34#include "gnunet-service-ats_reservations.h" 34#include "gnunet-service-ats_reservations.h"
35 35
36struct ATS_Address
37{
38 struct GNUNET_PeerIdentity peer;
39
40 size_t addr_len;
41
42 uint32_t session_id;
43
44 uint32_t ats_count;
45
46 const void *addr;
47
48 char *plugin;
49
50 struct GNUNET_ATS_Information *ats;
51
52 struct GNUNET_TIME_Relative atsp_latency;
53
54 struct GNUNET_BANDWIDTH_Value32NBO atsp_utilization_in;
55
56 struct GNUNET_BANDWIDTH_Value32NBO atsp_utilization_out;
57
58 uint32_t atsp_distance;
59
60 uint32_t atsp_cost_wan;
61
62 uint32_t atsp_cost_lan;
63
64 uint32_t atsp_cost_wlan;
65
66 uint32_t atsp_network_type;
67
68 struct GNUNET_BANDWIDTH_Value32NBO assigned_bw_in;
69
70 struct GNUNET_BANDWIDTH_Value32NBO assigned_bw_out;
71
72 /**
73 * Is this the active address for this peer?
74 */
75 int active;
76
77};
78
79enum ATS_Mode 36enum ATS_Mode
80{ 37{
81 SIMPLE, 38 SIMPLE,
@@ -501,15 +458,16 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
501 { 458 {
502 /* MLP = YES */ 459 /* MLP = YES */
503 case GNUNET_YES: 460 case GNUNET_YES:
504#if !HAVE_LIBGLPK 461#if HAVE_LIBGLPK
505 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "MLP mode was configured, but libglpk is not installed, switching to simple mode"); 462 ats_mode = MLP;
506 ats_mode = SIMPLE; 463 /* Init the MLP solver with default values */
507 break; 464 GAS_mlp_init (MLP_MAX_EXEC_DURATION, MLP_MAX_ITERATIONS);
465 break;
508#else 466#else
509 ats_mode = MLP; 467 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "MLP mode was configured, but libglpk is not installed, switching to simple mode");
510 GAS_mlp_init (); 468 ats_mode = SIMPLE;
469 break;
511#endif 470#endif
512 break;
513 /* MLP = NO */ 471 /* MLP = NO */
514 case GNUNET_NO: 472 case GNUNET_NO:
515 ats_mode = SIMPLE; 473 ats_mode = SIMPLE;