32 #define BIG_M_STRING "unlimited"
144 for (cur =
peer->addr_head; NULL != cur; cur = cur->
next)
167 if (NULL == lts->
prev)
180 "Logging peer id %llu\n", cur->
id);
186 for (c = 0; c < GNUNET_ATS_PreferenceCount; c++)
191 "\t %s = %.2f %.2f [abs/rel]\n",
197 for (cur_addr = cur->
addr_head; NULL != cur_addr; cur_addr = cur_addr->
next)
200 "Logging peer id %llu address %llu\n",
201 cur->
id, cur_addr->
aid);
203 log_a->
aid = cur_addr->
aid;
208 for (c = 0; c < GNUNET_ATS_PropertyCount; c++)
213 "\t %s = %.2f %.2f [abs/rel]\n",
214 GNUNET_ATS_print_property_type (c),
300 char *propstring_tmp;
302 char *prefstring_tmp;
307 if (NULL != output_dir)
311 fprintf (stderr,
"Failed to create directory `%s'\n", output_dir);
316 fprintf (stderr,
"Created directory `%s'\n", output_dir);
324 for (lts =
l->
head; NULL != lts; lts = lts->
next)
329 for (log_p = lts->
head; NULL != log_p; log_p = log_p->
next)
331 for (log_a = log_p->
addr_head; NULL != log_a; log_a = log_a->
next)
339 cur->
pid = log_p->
id;
360 "Add writing log data for peer %llu address %llu to file `%s'\n",
372 if (NULL == cur->
f_hd)
374 fprintf (stderr,
"Cannot open `%s' to write log data!\n",
filename);
383 "#time delta;log duration;peer_requested;addr net; addr_active; bw in; bw out; " \
384 "UTILIZATION_UP [abs/rel]; UTILIZATION_UP; UTILIZATION_DOWN; UTILIZATION_DOWN; " \
385 "UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_UP; UTILIZATION_PAYLOAD_DOWN; UTILIZATION_PAYLOAD_DOWN;" \
387 "DISTANCE ;DISTANCE ; COST_WAN; COST_WAN; COST_LAN; COST_LAN; " \
388 "COST_WLAN; COST_WLAN;COST_BT; COST_BT; PREF BW abs; PREF BW rel; PREF LATENCY abs; PREF LATENCY rel;\n");
394 for (c = 1; c < GNUNET_ATS_PreferenceCount; c++)
411 for (c = 1; c < GNUNET_ATS_PropertyCount; c++)
413 if (GNUNET_ATS_NETWORK_TYPE == c)
431 rel_value_us / 1000, lts->
delta,
447 for (cur =
next; NULL != cur; cur =
next)
451 if (NULL != cur->
f_hd)
466 for (lts =
l->
head; NULL != lts; lts = lts->
next)
468 fprintf (stderr,
"Log step %llu %llu: \n",
472 for (log_p = lts->
head; NULL != log_p; log_p = log_p->
next)
474 fprintf (stderr,
"\tLogging peer pid %llu\n", log_p->
id);
475 for (c = 1; c < GNUNET_ATS_PreferenceCount; c++)
477 fprintf (stderr,
"\t %s = %.2f %.2f [abs/rel]\n",
482 for (log_a = log_p->
addr_head; NULL != log_a; log_a = log_a->
next)
484 fprintf (stderr,
"\tPeer pid %llu address %llu: %u %u %u\n",
489 for (c = 1; c < GNUNET_ATS_PropertyCount; c++)
491 if (GNUNET_ATS_NETWORK_TYPE == c)
493 fprintf (stderr,
"\t %s = %.2f %.2f [abs/rel]\n",
494 GNUNET_ATS_print_property_type (c),
518 while (NULL != (lts_cur = lts_next))
520 lts_next = lts_cur->
next;
522 log_p_next = lts_cur->
head;
523 while (NULL != (log_p_cur = log_p_next))
525 log_p_next = log_p_cur->
next;
528 while (NULL != (log_a_cur = log_a_next))
530 log_a_next = log_a_cur->
next;
630 struct GNUNET_ATS_Information atsi;
643 "Setting property generation for unknown address [%u:%u]\n",
651 "Setting property generation for unknown peer %u\n",
659 "Setting property generation for unknown peer %u\n",
668 "Setting property for peer [%u] address [%u] for %s to %f\n",
670 GNUNET_ATS_print_property_type (pg->
ats_property), prop_value);
673 atsi.value = htonl ((uint32_t) prop_value);
724 "Removing old up preference generator peer [%u] address [%u] `%s'\n",
781 "Setting up %s property generator peer [%u] address [%u] `%s'" \
790 "Setting up %s property generator peer [%u] address [%u] `%s' " \
791 "min %u Bips max %u Bips\n",
799 "Setting up %s property generator peer [%u] address [%u] `%s' " \
800 "baserate %u Bips, amplitude %u Bps\n",
808 "Setting up %s property generator peer [%u] address [%u] `%s' " \
809 "min %u Bips max %u Bps\n",
834 for (cur =
next; NULL != cur; cur =
next)
924 uint32_t delay_acc_in;
934 "Setting feedback for unknown peer %u\n", pg->
peer);
949 feedback = (p_new / pg->
pref_bw_old) * (bw_acc_in + bw_acc_out)
974 "Giving feedback for peer [%u] for client %p pref %s of %.3f\n",
1010 "Setting preference for unknown peer %u\n", pg->
peer);
1029 p->pref_abs[pg->
kind] = pref_value;
1032 "Setting preference for peer [%u] for client %p pref %s to %f\n",
1038 p->pref_abs[pg->
kind] = pref_value;
1039 p->pref_norm[pg->
kind] = pref_value;
1086 "Removing old up preference generator peer [%u] `%s'\n",
1098 for (cur =
p->addr_head; NULL != cur; cur = cur->
next)
1123 unsigned int address_id,
1127 long int value_rate,
1144 "Starting preference for unknown peer %u\n",
peer);
1165 "Setting up %s preference generator peer [%u] `%s' max %u Bips\n",
1173 "Setting up %s preference generator peer [%u] `%s' min %u Bips max %u Bips\n",
1176 base_value, value_rate);
1181 "Setting up %s preference generator peer [%u] `%s' baserate %u Bips, amplitude %u Bps\n",
1184 base_value, value_rate);
1189 "Setting up %s preference generator peer [%u] `%s' min %u Bips max %u Bps\n",
1192 base_value, value_rate);
1233 for (cur =
next; NULL != cur; cur =
next)
1250 return "ADD_ADDRESS";
1253 return "DEL_ADDRESS";
1256 return "START_SET_PREFERENCE";
1259 return "STOP_STOP_PREFERENCE";
1262 return "START_SET_PROPERTY";
1265 return "STOP_SET_PROPERTY";
1268 return "START_REQUEST";
1271 return "STOP_REQUEST";
1302 for (cur =
next; NULL != cur; cur =
next)
1307 for (cur_o = next_o; NULL != cur_o; cur_o = next_o)
1309 next_o = cur_o->
next;
1341 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1342 op_counter,
"ADD_ADDRESS", op_name);
1355 "Missing address-id in operation %u `%s' in episode `%s'\n",
1356 op_counter,
"ADD_ADDRESS", op_name);
1368 fprintf (stderr,
"Missing plugin in operation %u `%s' in episode `%s'\n",
1369 op_counter,
"ADD_ADDRESS", op_name);
1381 fprintf (stderr,
"Missing address in operation %u `%s' in episode `%s'\n",
1382 op_counter,
"ADD_ADDRESS", op_name);
1396 "Missing address-session in operation %u `%s' in episode `%s'\n",
1397 op_counter,
"ADD_ADDRESS", op_name);
1410 "Missing address-network in operation %u `%s' in episode `%s'\n",
1411 op_counter,
"ADD_ADDRESS", op_name);
1419 if (0 == strcmp (op_network,
"UNSPECIFIED"))
1423 else if (0 == strcmp (op_network,
"LOOPBACK"))
1427 else if (0 == strcmp (op_network,
"LAN"))
1431 else if (0 == strcmp (op_network,
"WAN"))
1435 else if (0 == strcmp (op_network,
"WLAN"))
1439 else if (0 == strcmp (op_network,
"BT"))
1446 "Invalid address-network in operation %u `%s' in episode `%s': `%s'\n",
1447 op_counter,
"ADD_ADDRESS", op_name, op_network);
1457 "Found operation %s: [%llu:%llu] address `%s' plugin `%s' \n",
1481 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1482 op_counter,
"DEL_ADDRESS", op_name);
1495 "Missing address-id in operation %u `%s' in episode `%s'\n",
1496 op_counter,
"DEL_ADDRESS", op_name);
1509 fprintf (stderr,
"Missing plugin in operation %u `%s' in episode `%s'\n",
1510 op_counter,
"DEL_ADDRESS", op_name);
1522 fprintf (stderr,
"Missing address in operation %u `%s' in episode `%s'\n",
1523 op_counter,
"DEL_ADDRESS", op_name);
1537 "Missing address-session in operation %u `%s' in episode `%s'\n",
1538 op_counter,
"DEL_ADDRESS", op_name);
1546 "Found operation %s: [%llu:%llu] address `%s' plugin `%s' \n",
1553 static enum GNUNET_ATS_Property
1559 for (c = 0; c < GNUNET_ATS_PreferenceCount; c++)
1560 if (0 == strcmp (str,
props[c]))
1583 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1584 op_counter,
"START_SET_PREFERENCE", op_name);
1596 fprintf (stderr,
"Missing client-id in operation %u `%s' in episode `%s'\n",
1597 op_counter,
"START_SET_PREFERENCE", op_name);
1609 fprintf (stderr,
"Missing type in operation %u `%s' in episode `%s'\n",
1610 op_counter,
"START_SET_PREFERENCE", op_name);
1616 if (0 == strcmp (
type,
"constant"))
1620 else if (0 == strcmp (
type,
"linear"))
1624 else if (0 == strcmp (
type,
"sinus"))
1628 else if (0 == strcmp (
type,
"random"))
1634 fprintf (stderr,
"Invalid generator type %u `%s' in episode %u\n",
1635 op_counter, op_name,
e->id);
1650 fprintf (stderr,
"Missing base rate in operation %u `%s' in episode %u\n",
1651 op_counter, op_name,
e->id);
1668 fprintf (stderr,
"Missing max rate in operation %u `%s' in episode %u\n",
1669 op_counter, op_name,
e->id);
1692 fprintf (stderr,
"Missing frequency in operation %u `%s' in episode %u\n",
1693 op_counter, op_name,
e->id);
1705 fprintf (stderr,
"Missing preference in operation %u `%s' in episode %u\n",
1706 op_counter, op_name,
e->id);
1713 fprintf (stderr,
"Invalid preference in operation %u `%s' in episode %u\n",
1714 op_counter, op_name,
e->id);
1729 "Using feedback delay %llu in operation %u `%s' in episode %u\n",
1731 op_counter, op_name,
e->id);
1738 "Found operation %s: [%llu:%llu]: %s = %llu\n",
1762 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1763 op_counter,
"STOP_SET_PREFERENCE", op_name);
1776 "Missing address-id in operation %u `%s' in episode `%s'\n",
1777 op_counter,
"STOP_SET_PREFERENCE", op_name);
1790 "Missing preference in operation %u `%s' in episode `%s'\n",
1791 op_counter,
"STOP_SET_PREFERENCE", op_name);
1798 fprintf (stderr,
"Invalid preference in operation %u `%s' in episode %u\n",
1799 op_counter, op_name,
e->id);
1808 "Found operation %s: [%llu:%llu]: %s\n",
1815 static enum GNUNET_ATS_Property
1818 enum GNUNET_ATS_Property c;
1820 for (c = 0; c < GNUNET_ATS_PropertyCount; c++)
1821 if (0 == strcmp (str,
1822 GNUNET_ATS_print_property_type (c)))
1845 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1846 op_counter,
"START_SET_PROPERTY", op_name);
1859 "Missing address-id in operation %u `%s' in episode `%s'\n",
1860 op_counter,
"START_SET_PROPERTY", op_name);
1872 fprintf (stderr,
"Missing type in operation %u `%s' in episode `%s'\n",
1873 op_counter,
"START_SET_PROPERTY", op_name);
1879 if (0 == strcmp (
type,
"constant"))
1883 else if (0 == strcmp (
type,
"linear"))
1887 else if (0 == strcmp (
type,
"sinus"))
1891 else if (0 == strcmp (
type,
"random"))
1897 fprintf (stderr,
"Invalid generator type %u `%s' in episode %u\n",
1898 op_counter, op_name,
e->id);
1913 fprintf (stderr,
"Missing base rate in operation %u `%s' in episode %u\n",
1914 op_counter, op_name,
e->id);
1931 fprintf (stderr,
"Missing max rate in operation %u `%s' in episode %u\n",
1932 op_counter, op_name,
e->id);
1955 fprintf (stderr,
"Missing frequency in operation %u `%s' in episode %u\n",
1956 op_counter, op_name,
e->id);
1968 fprintf (stderr,
"Missing property in operation %u `%s' in episode %u\n",
1969 op_counter, op_name,
e->id);
1977 fprintf (stderr,
"Invalid property in operation %u `%s' in episode %u\n",
1978 op_counter, op_name,
e->id);
1988 "Found operation %s: [%llu:%llu] %s = %llu\n",
1990 GNUNET_ATS_print_property_type (o->prop_type), o->
base_rate);
2012 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
2013 op_counter,
"STOP_SET_PROPERTY", op_name);
2026 "Missing address-id in operation %u `%s' in episode `%s'\n",
2027 op_counter,
"STOP_SET_PROPERTY", op_name);
2039 fprintf (stderr,
"Missing property in operation %u `%s' in episode `%s'\n",
2040 op_counter,
"STOP_SET_PROPERTY", op_name);
2048 fprintf (stderr,
"Invalid property in operation %u `%s' in episode %u\n",
2049 op_counter, op_name,
e->id);
2059 "Found operation %s: [%llu:%llu] %s\n",
2061 GNUNET_ATS_print_property_type (o->prop_type));
2082 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
2083 op_counter,
"START_REQUEST", op_name);
2107 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
2108 op_counter,
"STOP_REQUEST", op_name);
2147 if (0 == strcmp (
op,
"address_add"))
2151 op_counter, sec_name,
cfg);
2153 else if (0 == strcmp (
op,
"address_del"))
2157 op_counter, sec_name,
cfg);
2159 else if (0 == strcmp (
op,
"start_set_property"))
2163 op_counter, sec_name,
cfg);
2165 else if (0 == strcmp (
op,
"stop_set_property"))
2169 op_counter, sec_name,
cfg);
2171 else if (0 == strcmp (
op,
"start_set_preference"))
2175 op_counter, sec_name,
cfg);
2177 else if (0 == strcmp (
op,
"stop_set_preference"))
2181 op_counter, sec_name,
cfg);
2183 else if (0 == strcmp (
op,
"start_request"))
2187 op_counter, sec_name,
cfg);
2189 else if (0 == strcmp (
op,
"stop_request"))
2193 op_counter, sec_name,
cfg);
2197 fprintf (stderr,
"Invalid operation %u `%s' in episode %u\n",
2198 op_counter,
op, cur->
id);
2245 cur->
id = e_counter;
2283 fprintf (stderr,
"Experiment timeout!\n");
2299 const void *plugin_addr,
2300 size_t plugin_addr_len,
2308 aa->atsi =
GNUNET_new (
struct GNUNET_ATS_Information);
2309 aa->atsi[0].type = htonl (GNUNET_ATS_NETWORK_TYPE);
2310 aa->atsi[0].value = htonl (network);
2316 aa->
plugin = (
char *) &aa[1] + plugin_addr_len;
2335 p->id =
op->peer_id;
2336 p->assigned_bw_in = 0;
2337 p->assigned_bw_out = 0;
2338 memset (&
p->peer_id,
op->peer_id,
sizeof(
p->peer_id));
2339 for (c = 0; c < GNUNET_ATS_PreferenceCount; c++)
2351 op->address_id,
op->peer_id);
2356 a->
aid =
op->address_id;
2359 strlen (
op->address) + 1,
2360 op->address_session,
op->address_network);
2361 memset (&
p->peer_id,
op->peer_id,
sizeof(
p->peer_id));
2364 for (c = 0; c < GNUNET_ATS_PropertyCount; c++)
2371 "Adding address %u for peer %u in network `%s'\n",
2389 "Deleting address for unknown peer %u\n",
op->peer_id);
2397 "Deleting address for unknown peer %u\n",
op->peer_id);
2411 "Removing address %u for peer %u\n",
2446 "Starting property generation for unknown peer %u\n",
2455 "Setting property for unknown address %u\n",
op->peer_id);
2480 "Stopping preference generation for peer %u address %u\n",
2488 "Cannot find preference generator for peer %u address %u\n",
2489 op->peer_id,
op->address_id);
2510 "Starting preference generation for unknown peer %u\n",
2537 "Stopping property generation for peer %u address %u\n",
2545 "Cannot find preference generator for peer %u address %u\n",
2546 op->peer_id,
op->address_id);
2561 "Requesting address for unknown peer %u\n",
op->peer_id);
2582 "Requesting address for unknown peer %u\n",
op->peer_id);
2587 "Stop requesting address for peer %u\n",
2590 p->assigned_bw_in = 0;
2591 p->assigned_bw_out = 0;
2606 for (cur = ep->
head; NULL != cur; cur = cur->
next)
2611 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu]\n",
2617 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu]\n",
2623 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2630 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2637 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2644 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2651 fprintf (stderr,
"Enforcing operation: %s [%llu]\n",
2657 fprintf (stderr,
"Enforcing operation: %s [%llu]\n",
2683 fprintf (stderr,
"Last episode done!\n");
2694 fprintf (stderr,
"Running episode %u with timeout %s\n",
2711 fprintf (stderr,
"Running experiment `%s' with timeout %s\n",
e->
name,
2731 fprintf (stderr,
"Running episode %u with timeout %s\n",
2774 fprintf (stderr,
"Failed to load `%s'\n",
filename);
2784 fprintf (stderr,
"Invalid %s \n",
"name");
2795 fprintf (stderr,
"Invalid %s \n",
"log_prefix");
2813 "Experiment logging output directory: `%s'\n",
2820 "log_append_time_stamp")))
2823 "Experiment logging append timestamp: `%s'\n",
2832 fprintf (stderr,
"Invalid %s \n",
"cfg_file");
2843 fprintf (stderr,
"Invalid configuration %s \n",
"cfg_file");
2853 fprintf (stderr,
"Invalid %s \n",
"log_freq");
2866 fprintf (stderr,
"Invalid %s",
"max_duration");
2880 fprintf (stderr,
"Failed to load experiment\n");
2884 "Loaded %u episodes with total duration %s\n",
2943 unsigned long long *out_dest,
2944 unsigned long long *in_dest,
2947 char *entry_in = NULL;
2948 char *entry_out = NULL;
2949 char *quota_out_str;
2978 quota_out_str, &out_dest[c])))
2993 "Could not load quota for network `%s': `%s', assigning default bandwidth %llu\n"),
3002 "Outbound quota configure for network `%s' is %llu\n",
3012 "No outbound quota configured for network `%s', assigning default bandwidth %llu\n"),
3031 quota_in_str, &in_dest[c])))
3045 "Could not load quota for network `%s': `%s', assigning default bandwidth %llu\n"),
3054 "Inbound quota configured for network `%s' is %llu\n",
3064 "No outbound quota configure for network `%s', assigning default bandwidth %llu\n"),
3070 "Loaded quota for network `%s' (in/out): %llu %llu\n",
3100 add_info =
"GAS_INFO_NONE";
3104 add_info =
"GAS_INFO_MLP_FULL";
3108 add_info =
"GAS_INFO_MLP_UPDATED";
3112 add_info =
"GAS_INFO_PROP_ALL";
3116 add_info =
"GAS_INFO_PROP_SINGLE";
3120 add_info =
"INVALID";
3128 "Solver notifies `%s' with result `%s' `%s'\n",
3129 "GAS_OP_SOLVE_START",
3135 "Solver notifies `%s' with result `%s'\n",
"GAS_OP_SOLVE_STOP",
3141 "Solver notifies `%s' with result `%s'\n",
3142 "GAS_OP_SOLVE_SETUP_START",
3148 "Solver notifies `%s' with result `%s'\n",
3149 "GAS_OP_SOLVE_SETUP_STOP",
3155 "Solver notifies `%s' with result `%s'\n",
3156 "GAS_OP_SOLVE_LP_START",
3162 "Solver notifies `%s' with result `%s'\n",
3163 "GAS_OP_SOLVE_LP_STOP",
3169 "Solver notifies `%s' with result `%s'\n",
3170 "GAS_OP_SOLVE_MLP_START",
3176 "Solver notifies `%s' with result `%s'\n",
3177 "GAS_OP_SOLVE_MLP_STOP",
3183 "Solver notifies `%s' with result `%s'\n",
3184 "GAS_OP_SOLVE_UPDATE_NOTIFICATION_START",
3190 "Solver notifies `%s' with result `%s'\n",
3191 "GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP",
3209 if ((0 ==
address->assigned_bw_out) && (0 ==
address->assigned_bw_in))
3212 "Solver notified to disconnect peer `%s'\n",
3218 p->assigned_bw_out =
address->assigned_bw_out;
3219 p->assigned_bw_in =
address->assigned_bw_in;
3223 if (pg->
peer ==
p->id)
3240 "Bandwidth changed addresses %s %p to %u Bps out / %u Bps in\n",
3279 solver_str =
"proportional";
3298 "libgnunet_plugin_ats_%s",
3331 fprintf (stderr,
"Failed to load solver `%s'\n",
sh->
plugin);
3386 while (NULL != (cur =
next))
3391 while (NULL != (cur_a = next_a))
3393 next_a = cur_a->
next;
3451 run (
void *cls,
char *
const *
args,
const char *cfgfile,
3459 fprintf (stderr,
"No experiment given ...\n");
3467 fprintf (stderr,
"No solver given ...\n");
3477 else if (0 == strcmp (
opt_solver,
"proportional"))
3487 fprintf (stderr,
"No solver given ...");
3493 for (c = 0; c < GNUNET_ATS_PropertyCount; c++)
3496 for (c = 0; c < GNUNET_ATS_PreferenceCount; c++)
3504 fprintf (stderr,
"Failed to load experiment ...\n");
3515 fprintf (stderr,
"Failed to start solver ...\n");
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
struct GNUNET_GETOPT_CommandLineOption options[]
#define gettext_noop(String)
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static struct GNUNET_ARM_Operation * op
Current operation.
static void enforce_start_request(struct GNUNET_ATS_TEST_Operation *op)
static struct TestPeer * find_peer_by_id(int id)
static enum GNUNET_ATS_Property parse_property_string(const char *str)
static int opt_log
cmd option -l: enable logging
static struct TestAddress * find_address_by_id(struct TestPeer *peer, int aid)
static struct LoggingFileHandle * find_logging_file_handle(struct LoggingFileHandle *lf_head, struct LoggingFileHandle *lf_tail, int peer_id, int address_id)
static int opt_disable_normalization
cmd option -d: disable normalization
static struct TestPeer * peer_head
int main(int argc, char *argv[])
Main function of the benchmark.
struct PreferenceGenerator * GNUNET_ATS_solver_generate_preferences_start(unsigned int peer, unsigned int address_id, unsigned int client_id, enum GeneratorType type, long int base_value, long int value_rate, struct GNUNET_TIME_Relative period, struct GNUNET_TIME_Relative frequency, enum GNUNET_ATS_PreferenceKind kind, struct GNUNET_TIME_Relative feedback_frequency)
Generate between the source master and the partner and set property with a value depending on the gen...
static int opt_save
cmd option -p: enable plots
static struct PreferenceGenerator * pref_gen_tail
void GNUNET_ATS_solver_generate_property_stop(struct PropertyGenerator *pg)
static void logging_task(void *cls)
static const char * print_op(enum OperationType op)
Experiments.
static struct TestAddress * find_active_address(struct TestPeer *p)
static struct TestPeer * peer_tail
static int free_all_it(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Solver.
static void free_experiment(struct Experiment *e)
static void solver_bandwidth_changed_cb(void *cls, struct ATS_Address *address)
static void solver_info_cb(void *cls, enum GAS_Solver_Operation op, enum GAS_Solver_Status stat, enum GAS_Solver_Additional_Information add)
Information callback for the solver.
static struct PreferenceGenerator * find_pref_gen(unsigned int peer, enum GNUNET_ATS_PreferenceKind kind)
static struct TestPeer * find_peer_by_pid(const struct GNUNET_PeerIdentity *pid)
static void end_now()
Do shutdown.
const double * get_preferences_cb(void *cls, const struct GNUNET_PeerIdentity *id)
static struct Experiment * e
static double get_preference(struct PreferenceGenerator *pg)
void GNUNET_ATS_solver_logging_write_to_disk(struct LoggingHandle *l, int add_time_stamp, char *output_dir)
static int load_op_stop_request(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
void GNUNET_ATS_solver_generate_preferences_stop_all()
Stop all preferences generators.
static int load_op_start_set_property(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
static int load_episode(struct Experiment *e, struct Episode *cur, struct GNUNET_CONFIGURATION_Handle *cfg)
static int load_op_stop_set_property(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
void GNUNET_ATS_solver_logging_free(struct LoggingHandle *l)
static double default_properties[GNUNET_ATS_PropertyCount]
static struct PropertyGenerator * find_prop_gen(unsigned int peer, unsigned int address, uint32_t ats_property)
Set ats_property to 0 to find all pgs.
static void timeout_episode(void *cls)
struct GNUNET_STATISTICS_Handle * GSA_stats
Handle for statistics.
static int opt_verbose
cmd option -v: verbose logs
static struct LoggingHandle * l
struct PropertyGenerator * GNUNET_ATS_solver_generate_property_start(unsigned int peer, unsigned int address_id, struct TestPeer *test_peer, struct TestAddress *test_address, enum GeneratorType type, long int base_value, long int value_rate, struct GNUNET_TIME_Relative period, struct GNUNET_TIME_Relative frequency, uint32_t ats_property)
Generate between the source master and the partner and set property with a value depending on the gen...
void GNUNET_ATS_solver_logging_eval(struct LoggingHandle *l)
struct LoggingHandle * GNUNET_ATS_solver_logging_start(struct GNUNET_TIME_Relative freq)
struct SolverHandle * GNUNET_ATS_solvers_solver_start(enum GNUNET_ATS_Solvers type)
static struct PropertyGenerator * prop_gen_tail
void GNUNET_ATS_solvers_solver_stop(struct SolverHandle *sh)
static void set_prop_task(void *cls)
static void enforce_episode(struct Episode *ep)
static int load_op_stop_set_preference(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
static void timeout_experiment(void *cls)
static void enforce_start_property(struct GNUNET_ATS_TEST_Operation *op)
static char * opt_exp_file
cmd option -e: experiment file
static void episode_done_cb(struct Episode *ep)
struct Experiment * GNUNET_ATS_solvers_experimentation_load(char *filename)
void GNUNET_ATS_solver_generate_preferences_stop(struct PreferenceGenerator *pg)
static int load_episodes(struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg)
static struct PropertyGenerator * prop_gen_head
Property Generators.
struct ATS_Address * create_ats_address(const struct GNUNET_PeerIdentity *peer, const char *plugin_name, const void *plugin_addr, size_t plugin_addr_len, uint32_t session_id, uint32_t network)
static int load_op_del_address(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
static void enforce_stop_preference(struct GNUNET_ATS_TEST_Operation *op)
static void enforce_stop_property(struct GNUNET_ATS_TEST_Operation *op)
void GNUNET_ATS_solver_logging_stop(struct LoggingHandle *l)
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
static enum GNUNET_ATS_Property parse_preference_string(const char *str)
static int opt_print
cmd option -p: print logs
static struct Experiment * create_experiment()
void GNUNET_ATS_solvers_experimentation_stop(struct Experiment *e)
static void experiment_done_cb(struct Experiment *e, struct GNUNET_TIME_Relative duration, int success)
static char * print_generator_type(enum GeneratorType g)
static void set_pref_task(void *cls)
static void enforce_add_address(struct GNUNET_ATS_TEST_Operation *op)
static struct SolverHandle * sh
static int load_op_start_request(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
static double default_preferences[GNUNET_ATS_PreferenceCount]
static void enforce_start_preference(struct GNUNET_ATS_TEST_Operation *op)
static int load_op_start_set_preference(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
static int load_op_add_address(struct GNUNET_ATS_TEST_Operation *o, struct Episode *e, int op_counter, char *sec_name, const struct GNUNET_CONFIGURATION_Handle *cfg)
static void set_feedback_task(void *cls)
unsigned int GNUNET_ATS_solvers_load_quotas(const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned long long *out_dest, unsigned long long *in_dest, int dest_length)
Load quotas for networks from configuration.
void GNUNET_ATS_solvers_experimentation_run(struct Experiment *e, GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb, GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb)
static void enforce_del_address(struct GNUNET_ATS_TEST_Operation *op)
void GNUNET_ATS_solver_logging_now(struct LoggingHandle *l)
Logging.
void GNUNET_ATS_solver_generate_property_stop_all()
Stop all preferences generators.
static struct PreferenceGenerator * pref_gen_head
Preference Generators.
static double get_property(struct PropertyGenerator *pg)
static void enforce_stop_request(struct GNUNET_ATS_TEST_Operation *op)
void(* GNUNET_ATS_TESTING_ExperimentDoneCallback)(struct Experiment *e, struct GNUNET_TIME_Relative duration, int success)
@ GNUNET_ATS_SOLVER_PROPORTIONAL
@ SOLVER_OP_STOP_SET_PREFERENCE
@ SOLVER_OP_START_REQUEST
@ SOLVER_OP_STOP_SET_PROPERTY
@ SOLVER_OP_START_SET_PREFERENCE
@ SOLVER_OP_START_SET_PROPERTY
@ GNUNET_ATS_TEST_TG_RANDOM
@ GNUNET_ATS_TEST_TG_CONSTANT
@ GNUNET_ATS_TEST_TG_SINUS
@ GNUNET_ATS_TEST_TG_LINEAR
void(* GNUNET_ATS_TESTING_EpisodeDoneCallback)(struct Episode *e)
static char * peer_id
Option –peer.
static struct GNUNET_HashCode session_id
static char * address
GNS address for this phone.
static void cleanup(void *cls)
Function scheduled as very last function, cleans up after us.
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
static int add
Desired action is to add a record.
static struct GNUNET_TIME_Relative duration
How long do we run the test?
void GAS_normalization_stop()
Stop the normalization component and free all items.
void GAS_normalization_start()
Start the normalization component.
void GAS_normalization_update_property(struct ATS_Address *address)
Update and normalize atsi performance information.
ats service address: management of ATS properties and preferences normalization
#define DEFAULT_REL_QUALITY
Value we return for a normalized quality score if we have no data.
manage preferences expressed by clients
static void update_preference(struct GNUNET_SERVICE_Client *client, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, float score_abs)
Update the absolute preference and calculate the new relative preference value.
const double * GAS_preference_get_by_peer(void *cls, const struct GNUNET_PeerIdentity *id)
Get the normalized preference values for a specific peer or the default values if.
#define DEFAULT_ABS_PREFERENCE
Default preference value we assume if we know nothing.
#define DEFAULT_REL_PREFERENCE
Default relative preference value we assume if we know nothing.
static char * plugin_name
Name of our plugin.
static int test_address(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Absolute expiration)
Test for checking whether HELLO message is empty.
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
static struct GNUNET_OS_Process * p
Helper process we started.
GAS_Solver_Status
Status of a GAS_Solver_Operation operation.
GAS_Solver_Operation
Operation codes for solver information callback.
GAS_Solver_Additional_Information
Status of the operation.
@ GAS_STAT_SUCCESS
Success.
@ GAS_OP_SOLVE_UPDATE_NOTIFICATION_START
After the problem was finished, start notifications about changes to addresses.
@ GAS_OP_SOLVE_MLP_LP_STOP
Solving of the LP problem is done MLP solver only.
@ GAS_OP_SOLVE_START
A solution iteration has been started.
@ GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP
After the problem was finished, notifications about changes to addresses are done.
@ GAS_OP_SOLVE_MLP_LP_START
Solving of the LP problem was started MLP solver only.
@ GAS_OP_SOLVE_SETUP_STOP
The setup of the problem as a preparation to solve is finished.
@ GAS_OP_SOLVE_MLP_MLP_STOP
Solving of the MLP problem is done MLP solver only.
@ GAS_OP_SOLVE_SETUP_START
The setup of the problem as a preparation to solve it was started.
@ GAS_OP_SOLVE_MLP_MLP_START
Solving of the MLP problem was started MLP solver only.
@ GAS_OP_SOLVE_STOP
A solution iteration has been finished.
@ GAS_INFO_PROP_ALL
The proportional solver had to recalculate for all networks.
@ GAS_INFO_PROP_SINGLE
The proportional solver had to recalculate for a single network.
@ GAS_INFO_UPDATED
An existing solution was reused Quite specific to the MLP solver.
@ GAS_INFO_NONE
No more specific information.
@ GAS_INFO_FULL
A full solution process is performed Quite specific to the MLP solver.
#define GNUNET_ATS_DefaultBandwidth
Default bandwidth assigned to a network : 64 KB/s.
const char * GNUNET_ATS_print_preference_type(enum GNUNET_ATS_PreferenceKind type)
Convert an enum GNUNET_ATS_PreferenceType to a string.
#define GNUNET_ATS_MaxBandwidth
Maximum bandwidth assigned to a network : 4095 MB/s.
GNUNET_ATS_PreferenceKind
Enum defining all known preference categories.
#define GNUNET_ATS_PreferenceTypeString
ATS preference types as string array initializer.
@ GNUNET_ATS_PREFERENCE_BANDWIDTH
Change the peer's bandwidth value (value per byte of bandwidth in the goal function) to the given amo...
@ GNUNET_ATS_PREFERENCE_LATENCY
Change the peer's latency value to the given amount.
@ GNUNET_ATS_PREFERENCE_END
End of preference list.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_filename(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be the name of a file or directory.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_number(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long *number)
Get a configuration value that should be a number.
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create(void)
Create a new configuration object.
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_yesno(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option)
Get a configuration value that should be in a set of "YES" or "NO".
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_time(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, struct GNUNET_TIME_Relative *time)
Get a configuration value that should be a relative time.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_string(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be a string.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_load(struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename)
Load configuration.
uint32_t GNUNET_CRYPTO_random_u32(enum GNUNET_CRYPTO_Quality mode, uint32_t i)
Produce a random value.
@ GNUNET_CRYPTO_QUALITY_WEAK
No good quality of the operation is needed (i.e., random numbers can be pseudo-random).
struct GNUNET_DISK_FileHandle * GNUNET_DISK_file_open(const char *fn, enum GNUNET_DISK_OpenFlags flags, enum GNUNET_DISK_AccessPermissions perm)
Open a file.
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
enum GNUNET_GenericReturnValue GNUNET_DISK_file_close(struct GNUNET_DISK_FileHandle *h)
Close an open file.
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_create_for_file(const char *filename)
Create the directory structure for storing a file.
@ GNUNET_DISK_OPEN_TRUNCATE
Truncate file if it exists.
@ GNUNET_DISK_OPEN_CREATE
Create file if it doesn't exist.
@ GNUNET_DISK_OPEN_READWRITE
Open the file for both reading and writing.
@ GNUNET_DISK_PERM_USER_READ
Owner can read.
@ GNUNET_DISK_PERM_GROUP_READ
Group can read.
@ GNUNET_DISK_PERM_USER_WRITE
Owner can write.
@ GNUNET_DISK_PERM_OTHER_READ
Everybody can read.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert_tail(head, tail, element)
Insert an element at the tail of a DLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_verbose(unsigned int *level)
Define the '-V' verbosity option.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multipeermap_contains_value(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, const void *value)
Check if the map contains the given value under the given key.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multipeermap_remove(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, const void *value)
Remove the given key-value pair from the map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE
Allow multiple values with the same key.
#define GNUNET_log(kind,...)
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
const char * GNUNET_NT_to_string(enum GNUNET_NetworkType net)
Convert a enum GNUNET_NetworkType to a string.
@ GNUNET_NT_WLAN
Wireless LAN (i.e.
@ GNUNET_NT_WAN
Wide area network (i.e.
@ GNUNET_NT_UNSPECIFIED
Category of last resort.
@ GNUNET_NT_LAN
Local area network.
@ GNUNET_NT_LOOPBACK
Loopback (same host).
@ GNUNET_NT_BT
Bluetooth LAN.
void * GNUNET_PLUGIN_unload(const char *library_name, void *arg)
Unload plugin (runs the "done" callback and returns whatever "done" returned).
void * GNUNET_PLUGIN_load(const char *library_name, void *arg)
Setup plugin (runs the "init" callback and returns whatever "init" returned).
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
struct GNUNET_STATISTICS_Handle * GNUNET_STATISTICS_create(const char *subsystem, const struct GNUNET_CONFIGURATION_Handle *cfg)
Get handle for the statistics service.
void GNUNET_STATISTICS_destroy(struct GNUNET_STATISTICS_Handle *h, int sync_first)
Destroy a handle (free all state associated with it).
enum GNUNET_GenericReturnValue GNUNET_STRINGS_utf8_toupper(const char *input, char *output)
Convert the utf-8 input string to upper case.
enum GNUNET_GenericReturnValue GNUNET_STRINGS_fancy_size_to_bytes(const char *fancy_size, unsigned long long *size)
Convert a given fancy human-readable size to bytes.
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration(struct GNUNET_TIME_Absolute whence)
Get the duration of an operation as the difference of the current time and the given start time "henc...
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_add(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Add relative times together.
#define GNUNET_TIME_UNIT_ZERO
Relative time zero.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_difference(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Absolute end)
Compute the time difference between the given start and end times.
static struct GNUNET_TIME_Relative delta
Address with additional information.
uint32_t assigned_bw_in
Inbound bandwidth assigned by solver.
char * plugin
Plugin name.
struct GNUNET_PeerIdentity peer
Peer ID this address is for.
int active
Is this the active address for this peer?
uint32_t assigned_bw_out
Outbound bandwidth assigned by solver.
uint32_t session_id
Session ID, can never be 0.
size_t addr_len
Address length, number of bytes in addr.
uint32_t atsi_count
ATS performance information for this address, size of the atsi array.
const void * addr
Address (in plugin-specific binary format).
struct GNUNET_TIME_Relative duration
struct GNUNET_ATS_TEST_Operation * head
struct GNUNET_ATS_TEST_Operation * tail
struct GNUNET_SCHEDULER_Task * episode_timeout_task
GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb
GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb
int log_append_time_stamp
struct GNUNET_TIME_Relative max_duration
struct GNUNET_TIME_Relative total_duration
struct GNUNET_TIME_Absolute start_time
unsigned int num_episodes
struct GNUNET_TIME_Relative log_freq
struct GNUNET_SCHEDULER_Task * experiment_timeout_task
struct GNUNET_CONFIGURATION_Handle * cfg
GAS_solver_information_callback info_cb
Callback for solver to call with status information, can be NULL.
GAS_get_preferences get_preferences
ATS addresses function to obtain preference values.
unsigned long long in_quota[6]
Array of configured inbound quotas Order according to networks in network array.
struct GNUNET_CONTAINER_MultiPeerMap * addresses
Hashmap containing all addresses available.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration handle to be used by the solver.
unsigned int network_count
Number of networks available, size of the out_quota and in_quota arrays.
GAS_bandwidth_changed_cb bandwidth_changed_cb
ATS addresses callback to be notified about bandwidth assignment changes.
struct GNUNET_STATISTICS_Handle * stats
Statistics handle to be used by the solver.
unsigned long long out_quota[6]
Array of configured outbound quotas Order according to networks in network array.
GAS_solver_address_feedback_preference s_feedback
Give feedback about the current assignment.
GAS_solver_address_property_changed s_address_update_property
Update the properties of an address in the solver.
GAS_solver_address_add s_add
Add a new address for a peer to the solver.
void * cls
Closure to pass to all solver functions in this struct.
GAS_solver_bulk_start s_bulk_start
Start a bulk operation.
GAS_solver_get_preferred_address s_get
Tell solver to notify ATS if the address to use changes for a specific peer using the bandwidth chang...
GAS_solver_bulk_stop s_bulk_stop
Bulk operation done.
GAS_solver_address_change_preference s_pref
Change relative preference for quality in solver.
GAS_solver_stop_get_preferred_address s_get_stop
Tell solver stop notifying ATS about changes for this peers.
GAS_solver_address_delete s_del
Delete an address in the solver.
An operation in an experiment.
struct GNUNET_TIME_Relative period
enum GeneratorType gen_type
long long unsigned int peer_id
struct GNUNET_TIME_Relative feedback_delay
struct GNUNET_ATS_TEST_Operation * next
long long unsigned int address_id
long long unsigned int client_id
long long unsigned int max_rate
enum GNUNET_ATS_PreferenceKind pref_type
long long unsigned int base_rate
struct GNUNET_TIME_Relative frequency
long long unsigned int address_session
unsigned int address_network
Definition of a command line option.
The identity of the host (wraps the signing key of the peer).
uint64_t abs_value_us
The actual value.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.
long long unsigned int aid
double prop_abs[GNUNET_ATS_PropertyCount]
struct LoggingAddress * next
double prop_norm[GNUNET_ATS_PropertyCount]
struct GNUNET_DISK_FileHandle * f_hd
long long unsigned int pid
long long unsigned int aid
struct LoggingFileHandle * next
struct GNUNET_TIME_Relative log_freq
struct LoggingTimeStep * head
struct GNUNET_SCHEDULER_Task * logging_task
struct LoggingTimeStep * tail
struct GNUNET_PeerIdentity peer_id
struct LoggingAddress * addr_tail
struct LoggingAddress * addr_head
double pref_abs[GNUNET_ATS_PREFERENCE_END]
double pref_norm[GNUNET_ATS_PREFERENCE_END]
long long unsigned int id
struct LoggingPeer * next
struct LoggingTimeStep * next
struct GNUNET_TIME_Absolute timestamp
struct LoggingPeer * head
struct LoggingPeer * tail
struct LoggingTimeStep * prev
struct GNUNET_TIME_Relative delta
struct GNUNET_SCHEDULER_Task * feedback_task
struct GNUNET_TIME_Absolute feedback_last_delay_update
struct GNUNET_TIME_Relative frequency
uint32_t feedback_delay_acc
struct GNUNET_SCHEDULER_Task * set_task
uint32_t last_assigned_bw_out
long long unsigned int peer
uint32_t last_assigned_bw_in
enum GNUNET_ATS_PreferenceKind kind
struct PreferenceGenerator * next
uint32_t feedback_bw_in_acc
struct GNUNET_TIME_Absolute feedback_last
struct GNUNET_TIME_Relative duration_period
struct GNUNET_TIME_Absolute time_start
struct GNUNET_TIME_Relative feedback_frequency
uint32_t feedback_bw_out_acc
struct GNUNET_TIME_Absolute feedback_last_bw_update
struct TestPeer * test_peer
struct GNUNET_TIME_Relative duration_period
struct GNUNET_TIME_Relative frequency
struct PropertyGenerator * next
struct GNUNET_TIME_Absolute time_start
struct GNUNET_SCHEDULER_Task * set_task
long long unsigned int address_id
long long unsigned int peer
struct TestAddress * test_address
struct GNUNET_ATS_PluginEnvironment env
Solver environment.
struct GNUNET_ATS_SolverFunctions * sf
Solver handle.
char * plugin
Solver plugin name.
struct GNUNET_CONTAINER_MultiPeerMap * addresses
Address hashmap.
struct TestAddress * next
double prop_norm[GNUNET_ATS_PropertyCount]
struct ATS_Address * ats_addr
long long unsigned int aid
double prop_abs[GNUNET_ATS_PropertyCount]
struct TestAddress * addr_head
double pref_norm[GNUNET_ATS_PreferenceCount]
struct GNUNET_PeerIdentity peer_id
double pref_abs[GNUNET_ATS_PreferenceCount]
struct TestAddress * addr_tail
long long unsigned int id
struct LinkProperty * props
list of link properties
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.