32 #define BIG_M_STRING "unlimited" 120 for (cur = peer_head; NULL != cur; cur = cur->
next)
132 for (cur = peer_head; NULL != cur; cur = cur->
next)
167 if (NULL == lts->
prev)
177 for (cur = peer_head; NULL != cur; cur = cur->
next)
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),
278 for (res = lf_head; NULL !=
res; res = res->
next)
279 if ((res->
pid == peer_id) && (res->
aid == address_id))
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;
353 (
GNUNET_YES == use_dir) ? DIR_SEPARATOR_STR :
"",
360 "Add writing log data for peer %llu address %llu to file `%s'\n",
361 cur->
pid, cur->
aid, filename);
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);
703 for (cur = prop_gen_head; NULL != cur; cur = cur->
next)
706 if ((cur->
ats_property == ats_property) || (0 == ats_property))
724 "Removing old up preference generator peer [%u] address [%u] `%s'\n",
781 "Setting up %s property generator peer [%u] address [%u] `%s'" \
784 GNUNET_ATS_print_property_type (ats_property),
790 "Setting up %s property generator peer [%u] address [%u] `%s' " \
791 "min %u Bips max %u Bips\n",
793 GNUNET_ATS_print_property_type (ats_property),
794 base_value, value_rate);
799 "Setting up %s property generator peer [%u] address [%u] `%s' " \
800 "baserate %u Bips, amplitude %u Bps\n",
802 GNUNET_ATS_print_property_type (ats_property),
803 base_value, value_rate);
808 "Setting up %s property generator peer [%u] address [%u] `%s' " \
809 "min %u Bips max %u Bps\n",
811 GNUNET_ATS_print_property_type (ats_property),
812 base_value, value_rate);
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);
1032 "Setting preference for peer [%u] for client %p pref %s to %f\n",
1059 for (cur = pref_gen_head; NULL != cur; cur = cur->
next)
1060 if (cur->
peer == peer)
1086 "Removing old up preference generator peer [%u] `%s'\n",
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);
1418 if (0 == strcmp (op_network,
"UNSPECIFIED"))
1422 else if (0 == strcmp (op_network,
"LOOPBACK"))
1426 else if (0 == strcmp (op_network,
"LAN"))
1430 else if (0 == strcmp (op_network,
"WAN"))
1434 else if (0 == strcmp (op_network,
"WLAN"))
1438 else if (0 == strcmp (op_network,
"BT"))
1445 "Invalid address-network in operation %u `%s' in episode `%s': `%s'\n",
1446 op_counter,
"ADD_ADDRESS", op_name, op_network);
1456 "Found operation %s: [%llu:%llu] address `%s' plugin `%s' \n",
1480 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1481 op_counter,
"DEL_ADDRESS", op_name);
1494 "Missing address-id in operation %u `%s' in episode `%s'\n",
1495 op_counter,
"DEL_ADDRESS", op_name);
1508 fprintf (stderr,
"Missing plugin in operation %u `%s' in episode `%s'\n",
1509 op_counter,
"DEL_ADDRESS", op_name);
1521 fprintf (stderr,
"Missing address in operation %u `%s' in episode `%s'\n",
1522 op_counter,
"DEL_ADDRESS", op_name);
1536 "Missing address-session in operation %u `%s' in episode `%s'\n",
1537 op_counter,
"DEL_ADDRESS", op_name);
1545 "Found operation %s: [%llu:%llu] address `%s' plugin `%s' \n",
1552 static enum GNUNET_ATS_Property
1558 for (c = 0; c < GNUNET_ATS_PreferenceCount; c++)
1559 if (0 == strcmp (str, props[c]))
1582 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1583 op_counter,
"START_SET_PREFERENCE", op_name);
1595 fprintf (stderr,
"Missing client-id in operation %u `%s' in episode `%s'\n",
1596 op_counter,
"START_SET_PREFERENCE", op_name);
1608 fprintf (stderr,
"Missing type in operation %u `%s' in episode `%s'\n",
1609 op_counter,
"START_SET_PREFERENCE", op_name);
1615 if (0 == strcmp (type,
"constant"))
1619 else if (0 == strcmp (type,
"linear"))
1623 else if (0 == strcmp (type,
"sinus"))
1627 else if (0 == strcmp (type,
"random"))
1633 fprintf (stderr,
"Invalid generator type %u `%s' in episode %u\n",
1634 op_counter, op_name, e->
id);
1649 fprintf (stderr,
"Missing base rate in operation %u `%s' in episode %u\n",
1650 op_counter, op_name, e->
id);
1667 fprintf (stderr,
"Missing max rate in operation %u `%s' in episode %u\n",
1668 op_counter, op_name, e->
id);
1691 fprintf (stderr,
"Missing frequency in operation %u `%s' in episode %u\n",
1692 op_counter, op_name, e->
id);
1704 fprintf (stderr,
"Missing preference in operation %u `%s' in episode %u\n",
1705 op_counter, op_name, e->
id);
1712 fprintf (stderr,
"Invalid preference in operation %u `%s' in episode %u\n",
1713 op_counter, op_name, e->
id);
1728 "Using feedback delay %llu in operation %u `%s' in episode %u\n",
1730 op_counter, op_name, e->
id);
1737 "Found operation %s: [%llu:%llu]: %s = %llu\n",
1761 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1762 op_counter,
"STOP_SET_PREFERENCE", op_name);
1775 "Missing address-id in operation %u `%s' in episode `%s'\n",
1776 op_counter,
"STOP_SET_PREFERENCE", op_name);
1789 "Missing preference in operation %u `%s' in episode `%s'\n",
1790 op_counter,
"STOP_SET_PREFERENCE", op_name);
1797 fprintf (stderr,
"Invalid preference in operation %u `%s' in episode %u\n",
1798 op_counter, op_name, e->
id);
1807 "Found operation %s: [%llu:%llu]: %s\n",
1814 static enum GNUNET_ATS_Property
1817 enum GNUNET_ATS_Property c;
1819 for (c = 0; c < GNUNET_ATS_PropertyCount; c++)
1820 if (0 == strcmp (str,
1821 GNUNET_ATS_print_property_type (c)))
1844 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
1845 op_counter,
"START_SET_PROPERTY", op_name);
1858 "Missing address-id in operation %u `%s' in episode `%s'\n",
1859 op_counter,
"START_SET_PROPERTY", op_name);
1871 fprintf (stderr,
"Missing type in operation %u `%s' in episode `%s'\n",
1872 op_counter,
"START_SET_PROPERTY", op_name);
1878 if (0 == strcmp (type,
"constant"))
1882 else if (0 == strcmp (type,
"linear"))
1886 else if (0 == strcmp (type,
"sinus"))
1890 else if (0 == strcmp (type,
"random"))
1896 fprintf (stderr,
"Invalid generator type %u `%s' in episode %u\n",
1897 op_counter, op_name, e->
id);
1912 fprintf (stderr,
"Missing base rate in operation %u `%s' in episode %u\n",
1913 op_counter, op_name, e->
id);
1930 fprintf (stderr,
"Missing max rate in operation %u `%s' in episode %u\n",
1931 op_counter, op_name, e->
id);
1954 fprintf (stderr,
"Missing frequency in operation %u `%s' in episode %u\n",
1955 op_counter, op_name, e->
id);
1967 fprintf (stderr,
"Missing property in operation %u `%s' in episode %u\n",
1968 op_counter, op_name, e->
id);
1976 fprintf (stderr,
"Invalid property in operation %u `%s' in episode %u\n",
1977 op_counter, op_name, e->
id);
1987 "Found operation %s: [%llu:%llu] %s = %llu\n",
1989 GNUNET_ATS_print_property_type (o->prop_type), o->
base_rate);
2011 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
2012 op_counter,
"STOP_SET_PROPERTY", op_name);
2025 "Missing address-id in operation %u `%s' in episode `%s'\n",
2026 op_counter,
"STOP_SET_PROPERTY", op_name);
2038 fprintf (stderr,
"Missing property in operation %u `%s' in episode `%s'\n",
2039 op_counter,
"STOP_SET_PROPERTY", op_name);
2047 fprintf (stderr,
"Invalid property in operation %u `%s' in episode %u\n",
2048 op_counter, op_name, e->
id);
2058 "Found operation %s: [%llu:%llu] %s\n",
2060 GNUNET_ATS_print_property_type (o->prop_type));
2081 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
2082 op_counter,
"START_REQUEST", op_name);
2106 fprintf (stderr,
"Missing peer-id in operation %u `%s' in episode `%s'\n",
2107 op_counter,
"STOP_REQUEST", op_name);
2146 if (0 == strcmp (op,
"address_add"))
2150 op_counter, sec_name, cfg);
2152 else if (0 == strcmp (op,
"address_del"))
2156 op_counter, sec_name, cfg);
2158 else if (0 == strcmp (op,
"start_set_property"))
2162 op_counter, sec_name, cfg);
2164 else if (0 == strcmp (op,
"stop_set_property"))
2168 op_counter, sec_name, cfg);
2170 else if (0 == strcmp (op,
"start_set_preference"))
2174 op_counter, sec_name, cfg);
2176 else if (0 == strcmp (op,
"stop_set_preference"))
2180 op_counter, sec_name, cfg);
2182 else if (0 == strcmp (op,
"start_request"))
2186 op_counter, sec_name, cfg);
2188 else if (0 == strcmp (op,
"stop_request"))
2192 op_counter, sec_name, cfg);
2196 fprintf (stderr,
"Invalid operation %u `%s' in episode %u\n",
2197 op_counter, op, cur->
id);
2244 cur->
id = e_counter;
2282 fprintf (stderr,
"Experiment timeout!\n");
2298 const void *plugin_addr,
2299 size_t plugin_addr_len,
2307 aa->atsi =
GNUNET_new (
struct GNUNET_ATS_Information);
2308 aa->atsi[0].type = htonl (GNUNET_ATS_NETWORK_TYPE);
2309 aa->atsi[0].value = htonl (network);
2315 aa->
plugin = (
char *) &aa[1] + plugin_addr_len;
2338 for (c = 0; c < GNUNET_ATS_PreferenceCount; c++)
2363 for (c = 0; c < GNUNET_ATS_PropertyCount; c++)
2370 "Adding address %u for peer %u in network `%s'\n",
2388 "Deleting address for unknown peer %u\n", op->
peer_id);
2396 "Deleting address for unknown peer %u\n", op->
peer_id);
2410 "Removing address %u for peer %u\n",
2445 "Starting property generation for unknown peer %u\n",
2454 "Setting property for unknown address %u\n", op->
peer_id);
2479 "Stopping preference generation for peer %u address %u\n",
2487 "Cannot find preference generator for peer %u address %u\n",
2509 "Starting preference generation for unknown peer %u\n",
2536 "Stopping property generation for peer %u address %u\n",
2544 "Cannot find preference generator for peer %u address %u\n",
2560 "Requesting address for unknown peer %u\n", op->
peer_id);
2581 "Requesting address for unknown peer %u\n", op->
peer_id);
2586 "Stop requesting address for peer %u\n",
2605 for (cur = ep->
head; NULL != cur; cur = cur->
next)
2610 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu]\n",
2616 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu]\n",
2622 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2629 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2636 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2643 fprintf (stderr,
"Enforcing operation: %s [%llu:%llu] == %llu\n",
2650 fprintf (stderr,
"Enforcing operation: %s [%llu]\n",
2656 fprintf (stderr,
"Enforcing operation: %s [%llu]\n",
2682 fprintf (stderr,
"Last episode done!\n");
2693 fprintf (stderr,
"Running episode %u with timeout %s\n",
2710 fprintf (stderr,
"Running experiment `%s' with timeout %s\n", e->
name,
2723 if (NULL == e->
start)
2730 fprintf (stderr,
"Running episode %u with timeout %s\n",
2773 fprintf (stderr,
"Failed to load `%s'\n", filename);
2783 fprintf (stderr,
"Invalid %s \n",
"name");
2794 fprintf (stderr,
"Invalid %s \n",
"log_prefix");
2812 "Experiment logging output directory: `%s'\n",
2819 "log_append_time_stamp")))
2822 "Experiment logging append timestamp: `%s'\n",
2831 fprintf (stderr,
"Invalid %s \n",
"cfg_file");
2842 fprintf (stderr,
"Invalid configuration %s \n",
"cfg_file");
2852 fprintf (stderr,
"Invalid %s \n",
"log_freq");
2865 fprintf (stderr,
"Invalid %s",
"max_duration");
2879 fprintf (stderr,
"Failed to load experiment\n");
2883 "Loaded %u episodes with total duration %s\n",
2942 unsigned long long *out_dest,
2943 unsigned long long *in_dest,
2946 char *entry_in = NULL;
2947 char *entry_out = NULL;
2948 char *quota_out_str;
2977 quota_out_str, &out_dest[c])))
2992 "Could not load quota for network `%s': `%s', assigning default bandwidth %llu\n"),
3001 "Outbound quota configure for network `%s' is %llu\n",
3011 "No outbound quota configured for network `%s', assigning default bandwidth %llu\n"),
3030 quota_in_str, &in_dest[c])))
3044 "Could not load quota for network `%s': `%s', assigning default bandwidth %llu\n"),
3053 "Inbound quota configured for network `%s' is %llu\n",
3063 "No outbound quota configure for network `%s', assigning default bandwidth %llu\n"),
3069 "Loaded quota for network `%s' (in/out): %llu %llu\n",
3099 add_info =
"GAS_INFO_NONE";
3103 add_info =
"GAS_INFO_MLP_FULL";
3107 add_info =
"GAS_INFO_MLP_UPDATED";
3111 add_info =
"GAS_INFO_PROP_ALL";
3115 add_info =
"GAS_INFO_PROP_SINGLE";
3119 add_info =
"INVALID";
3127 "Solver notifies `%s' with result `%s' `%s'\n",
3128 "GAS_OP_SOLVE_START",
3134 "Solver notifies `%s' with result `%s'\n",
"GAS_OP_SOLVE_STOP",
3140 "Solver notifies `%s' with result `%s'\n",
3141 "GAS_OP_SOLVE_SETUP_START",
3147 "Solver notifies `%s' with result `%s'\n",
3148 "GAS_OP_SOLVE_SETUP_STOP",
3154 "Solver notifies `%s' with result `%s'\n",
3155 "GAS_OP_SOLVE_LP_START",
3161 "Solver notifies `%s' with result `%s'\n",
3162 "GAS_OP_SOLVE_LP_STOP",
3168 "Solver notifies `%s' with result `%s'\n",
3169 "GAS_OP_SOLVE_MLP_START",
3175 "Solver notifies `%s' with result `%s'\n",
3176 "GAS_OP_SOLVE_MLP_STOP",
3182 "Solver notifies `%s' with result `%s'\n",
3183 "GAS_OP_SOLVE_UPDATE_NOTIFICATION_START",
3189 "Solver notifies `%s' with result `%s'\n",
3190 "GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP",
3211 "Solver notified to disconnect peer `%s'\n",
3220 for (pg = pref_gen_head; NULL != pg; pg = pg->
next)
3239 "Bandwidth changed addresses %s %p to %u Bps out / %u Bps in\n",
3278 solver_str =
"proportional";
3297 "libgnunet_plugin_ats_%s",
3330 fprintf (stderr,
"Failed to load solver `%s'\n", sh->
plugin);
3385 while (NULL != (cur = next))
3390 while (NULL != (cur_a = next_a))
3392 next_a = cur_a->
next;
3450 run (
void *cls,
char *
const *
args,
const char *cfgfile,
3458 fprintf (stderr,
"No experiment given ...\n");
3466 fprintf (stderr,
"No solver given ...\n");
3476 else if (0 == strcmp (
opt_solver,
"proportional"))
3486 fprintf (stderr,
"No solver given ...");
3492 for (c = 0; c < GNUNET_ATS_PropertyCount; c++)
3495 for (c = 0; c < GNUNET_ATS_PreferenceCount; c++)
3503 fprintf (stderr,
"Failed to load experiment ...\n");
3514 fprintf (stderr,
"Failed to start solver ...\n");
3581 NULL, options, &
run, argv[0]);
void GNUNET_ATS_solver_generate_preferences_stop(struct PreferenceGenerator *pg)
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
struct LoggingPeer * head
void GAS_normalization_stop()
Stop the normalization component and free all items.
struct GNUNET_ATS_TEST_Operation * next
GAS_solver_stop_get_preferred_address s_get_stop
Tell solver stop notifying ATS about changes for this peers.
static void enforce_start_property(struct GNUNET_ATS_TEST_Operation *op)
double prop_abs[GNUNET_ATS_PropertyCount]
Solving of the LP problem was started MLP solver only.
After the problem was finished, start notifications about changes to addresses.
Create file if it doesn't exist.
void GNUNET_ATS_solvers_solver_stop(struct SolverHandle *sh)
struct PreferenceGenerator * next
struct LoggingHandle * GNUNET_ATS_solver_logging_start(struct GNUNET_TIME_Relative freq)
struct LoggingTimeStep * tail
struct GNUNET_TIME_Absolute time_start
static void set_feedback_task(void *cls)
GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb
GAS_solver_address_add s_add
Add a new address for a peer to the solver.
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, parse options).
static void enforce_add_address(struct GNUNET_ATS_TEST_Operation *op)
long long unsigned int peer_id
GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
uint64_t rel_value_us
The actual value.
The proportional solver had to recalculate for a single network.
const char * GNUNET_NT_to_string(enum GNUNET_NetworkType net)
Convert a enum GNUNET_NetworkType to a string.
static struct GNUNET_TIME_Relative delta
uint32_t session_id
Session ID, can never be 0.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_load(struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename)
Load configuration.
The setup of the problem as a preparation to solve it was started.
void GNUNET_ATS_solver_logging_free(struct LoggingHandle *l)
static void enforce_del_address(struct GNUNET_ATS_TEST_Operation *op)
double pref_abs[GNUNET_ATS_PreferenceCount]
struct GNUNET_TIME_Relative total_duration
struct LoggingTimeStep * prev
int active
Is this the active address for this peer?
GAS_get_preferences get_preferences
ATS addresses function to obtain preference values.
static int load_episodes(struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg)
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)
struct GNUNET_PeerIdentity peer
Peer ID this address is for.
struct GNUNET_STATISTICS_Handle * GNUNET_STATISTICS_create(const char *subsystem, const struct GNUNET_CONFIGURATION_Handle *cfg)
Get handle for the statistics service.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_verbose(unsigned int *level)
Define the '-V' verbosity option.
struct LoggingAddress * addr_tail
long long unsigned int peer
uint32_t last_assigned_bw_in
GAS_Solver_Status
Status of a GAS_Solver_Operation operation.
struct GNUNET_TIME_Relative duration_period
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)
uint32_t GNUNET_CRYPTO_random_u32(enum GNUNET_CRYPTO_Quality mode, uint32_t i)
Produce a random value.
static int opt_log
cmd option -l: enable logging
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
enum GNUNET_GenericReturnValue GNUNET_DISK_file_close(struct GNUNET_DISK_FileHandle *h)
Close an open file.
The proportional solver had to recalculate for all networks.
uint32_t last_assigned_bw_out
No more specific information.
const void * addr
Address (in plugin-specific binary format).
static char * opt_exp_file
cmd option -e: experiment file
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...
long long unsigned int aid
struct LoggingTimeStep * next
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.
long long unsigned int address_id
#define DEFAULT_REL_QUALITY
Value we return for a normalized quality score if we have no data.
static void logging_task(void *cls)
long long unsigned int id
static struct TestPeer * find_peer_by_pid(const struct GNUNET_PeerIdentity *pid)
struct GNUNET_PeerIdentity peer_id
GAS_solver_address_feedback_preference s_feedback
Give feedback about the current assignment.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
struct LoggingTimeStep * head
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.
static struct Experiment * e
ats service address: management of ATS properties and preferences normalization
GAS_solver_address_property_changed s_address_update_property
Update the properties of an address in the solver.
static struct GNUNET_HashCode session_id
int GNUNET_STRINGS_fancy_size_to_bytes(const char *fancy_size, unsigned long long *size)
Convert a given fancy human-readable size to bytes.
int 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.
static char * peer_id
Option –peer.
struct GNUNET_TIME_Absolute feedback_last_delay_update
int main(int argc, char *argv[])
Main function of the benchmark.
A full solution process is performed Quite specific to the MLP solver.
static struct TestAddress * find_active_address(struct TestPeer *p)
char * plugin
Plugin name.
size_t addr_len
Address length, number of bytes in addr.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
Definition of a command line option.
unsigned int num_episodes
struct GNUNET_TIME_Relative period
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.
long long unsigned int client_id
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create(void)
Create a new configuration object.
long long unsigned int pid
Solving of the LP problem is done MLP solver only.
void GNUNET_ATS_solver_logging_eval(struct LoggingHandle *l)
void GNUNET_STATISTICS_destroy(struct GNUNET_STATISTICS_Handle *h, int sync_first)
Destroy a handle (free all state associated with it).
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).
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.
struct LoggingAddress * next
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
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.
struct GNUNET_STATISTICS_Handle * GSA_stats
Handle for statistics.
uint64_t abs_value_us
The actual value.
static struct TestPeer * peer_tail
struct TestAddress * addr_tail
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
struct ATS_Address * ats_addr
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
struct PropertyGenerator * next
struct GNUNET_STATISTICS_Handle * stats
Statistics handle to be used by the solver.
static enum GNUNET_ATS_Property parse_preference_string(const char *str)
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.
enum GNUNET_ATS_PreferenceKind kind
struct SolverHandle * GNUNET_ATS_solvers_solver_start(enum GNUNET_ATS_Solvers type)
GAS_Solver_Operation
Operation codes for solver information callback.
void * GNUNET_PLUGIN_unload(const char *library_name, void *arg)
Unload plugin (runs the "done" callback and returns whatever "done" returned).
uint32_t assigned_bw_in
Inbound bandwidth assigned by solver.
struct LoggingPeer * tail
struct GNUNET_SCHEDULER_Task * experiment_timeout_task
struct LoggingPeer * next
static struct LoggingHandle * l
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.
Solving of the MLP problem is done MLP solver only.
double pref_abs[GNUNET_ATS_PREFERENCE_END]
struct GNUNET_TIME_Relative log_freq
void GAS_normalization_update_property(struct ATS_Address *address)
Update and normalize atsi performance information.
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_TIME_Absolute feedback_last_bw_update
struct LoggingAddress * addr_head
struct GNUNET_SCHEDULER_Task * set_task
A solution iteration has been started.
static void end_now()
Do shutdown.
void GNUNET_STRINGS_utf8_toupper(const char *input, char *output)
Convert the utf-8 input string to upper case.
static int opt_save
cmd option -p: enable plots
static void enforce_stop_property(struct GNUNET_ATS_TEST_Operation *op)
static struct GNUNET_OS_Process * p
Helper process we started.
static void experiment_done_cb(struct Experiment *e, struct GNUNET_TIME_Relative duration, int success)
void(* GNUNET_ATS_TESTING_ExperimentDoneCallback)(struct Experiment *e, struct GNUNET_TIME_Relative duration, int success)
static struct LoggingFileHandle * find_logging_file_handle(struct LoggingFileHandle *lf_head, struct LoggingFileHandle *lf_tail, int peer_id, int address_id)
static char * value
Value of the record to add/remove.
struct LoggingFileHandle * next
double prop_norm[GNUNET_ATS_PropertyCount]
Truncate file if it exists.
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
static int free_all_it(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Solver.
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.
static char * print_generator_type(enum GeneratorType g)
static struct PropertyGenerator * prop_gen_tail
void GNUNET_ATS_solver_logging_now(struct LoggingHandle *l)
Logging.
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 struct SolverHandle * sh
GAS_Solver_Additional_Information
Status of the operation.
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 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)
GAS_solver_address_delete s_del
Delete an address in the solver.
long long unsigned int aid
Solving of the MLP problem was started MLP solver only.
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)
long long unsigned int base_rate
static const char * print_op(enum OperationType op)
Experiments.
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
const double * get_preferences_cb(void *cls, const struct GNUNET_PeerIdentity *id)
void GNUNET_ATS_solver_generate_property_stop(struct PropertyGenerator *pg)
static void cleanup(void *cls)
Function scheduled as very last function, cleans up after us.
enum GNUNET_ATS_PreferenceKind pref_type
struct GNUNET_TIME_Relative frequency
static void timeout_experiment(void *cls)
void(* GNUNET_ATS_TESTING_EpisodeDoneCallback)(struct Episode *e)
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
long long unsigned int address_id
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)
#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 a enum GNUNET_ATS_PreferenceType to a string.
struct GNUNET_SCHEDULER_Task * episode_timeout_task
void * cls
Closure to pass to all solver functions in this struct.
GAS_solver_address_change_preference s_pref
Change relative preference for quality in solver.
void GNUNET_ATS_solvers_experimentation_run(struct Experiment *e, GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb, GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb)
struct GNUNET_SCHEDULER_Task * set_task
static void enforce_start_request(struct GNUNET_ATS_TEST_Operation *op)
void GNUNET_ATS_solvers_experimentation_stop(struct Experiment *e)
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
struct GNUNET_TIME_Relative duration
Entry for a benchmark peer.
struct GNUNET_TIME_Absolute start_time
struct LinkProperty * props
list of link properties
static struct PreferenceGenerator * pref_gen_head
Preference Generators.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
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_property_stop_all()
Stop all preferences generators.
An operation in an experiment.
struct TestAddress * test_address
static double get_property(struct PropertyGenerator *pg)
#define GNUNET_ATS_MaxBandwidth
Maximum bandwidth assigned to a network : 4095 MB/s.
Address with additional information.
static int opt_print
cmd option -p: print logs
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GNUNET_HashCode key
The key used in the DHT.
struct GNUNET_TIME_Absolute time_start
static int opt_disable_normalization
cmd option -d: disable normalization
static struct TestPeer * peer_head
struct GNUNET_TIME_Relative delta
static struct Experiment * create_experiment()
void GNUNET_ATS_solver_generate_preferences_stop_all()
Stop all preferences generators.
static void solver_bandwidth_changed_cb(void *cls, struct ATS_Address *address)
struct GNUNET_TIME_Absolute timestamp
#define GNUNET_CONTAINER_DLL_insert_tail(head, tail, element)
Insert an element at the tail of a DLL.
Change the peer's latency value to the given amount.
#define DEFAULT_REL_PREFERENCE
Default relative preference value we assume if we know nothing.
struct GNUNET_TIME_Absolute feedback_last
static int opt_verbose
cmd option -v: verbose logs
struct GNUNET_ATS_SolverFunctions * sf
Solver handle.
static int add
Desired action is to add a record.
static void set_prop_task(void *cls)
struct GNUNET_DISK_FileHandle * f_hd
#define GNUNET_TIME_UNIT_ZERO
Relative time zero.
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
struct GNUNET_CONFIGURATION_Handle * cfg
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.
static double default_properties[GNUNET_ATS_PropertyCount]
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...
unsigned long long in_quota[6]
Array of configured inbound quotas Order according to networks in network array.
A solution iteration has been finished.
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)
Allow multiple values with the same key.
struct GNUNET_ATS_TEST_Operation * head
uint32_t feedback_delay_acc
static void episode_done_cb(struct Episode *ep)
uint32_t feedback_bw_in_acc
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.
struct GNUNET_ATS_TEST_Operation * tail
struct TestAddress * next
static int load_episode(struct Experiment *e, struct Episode *cur, struct GNUNET_CONFIGURATION_Handle *cfg)
struct GNUNET_SCHEDULER_Task * feedback_task
static void enforce_stop_request(struct GNUNET_ATS_TEST_Operation *op)
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 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...
GAS_solver_bulk_start s_bulk_start
Start a bulk operation.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_add(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Add relative times together.
double prop_abs[GNUNET_ATS_PropertyCount]
void GNUNET_ATS_solver_logging_stop(struct LoggingHandle *l)
The identity of the host (wraps the signing key of the peer).
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
int 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.
static struct PreferenceGenerator * find_pref_gen(unsigned int peer, enum GNUNET_ATS_PreferenceKind kind)
uint32_t assigned_bw_out
Outbound bandwidth assigned by solver.
struct Experiment * GNUNET_ATS_solvers_experimentation_load(char *filename)
uint32_t feedback_bw_out_acc
long long unsigned int peer
void GNUNET_ATS_solver_logging_write_to_disk(struct LoggingHandle *l, int add_time_stamp, char *output_dir)
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)
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.
struct TestAddress * addr_head
static void enforce_start_preference(struct GNUNET_ATS_TEST_Operation *op)
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...
void GAS_normalization_start()
Start the normalization component.
static enum GNUNET_ATS_Property parse_property_string(const char *str)
struct GNUNET_TIME_Relative frequency
static void timeout_episode(void *cls)
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.
const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration handle to be used by the solver.
static double get_preference(struct PreferenceGenerator *pg)
#define GNUNET_log(kind,...)
int log_append_time_stamp
GAS_solver_information_callback info_cb
Callback for solver to call with status information, can be NULL.
long long unsigned int aid
Open the file for both reading and writing.
Change the peer's bandwidth value (value per byte of bandwidth in the goal function) to the given amo...
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.
The setup of the problem as a preparation to solve is finished.
unsigned long long out_quota[6]
Array of configured outbound quotas Order according to networks in network array. ...
static struct GNUNET_TIME_Relative duration
How long do we run the test?
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".
static struct TestPeer * find_peer_by_id(int id)
An existing solution was reused Quite specific to the MLP solver.
struct GNUNET_TIME_Relative feedback_delay
struct TestPeer * test_peer
struct GNUNET_TIME_Relative frequency
static struct PreferenceGenerator * pref_gen_tail
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
static void free_experiment(struct Experiment *e)
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.
void * GNUNET_PLUGIN_load(const char *library_name, void *arg)
Setup plugin (runs the "init" callback and returns whatever "init" returned).
#define GNUNET_ATS_PreferenceTypeString
ATS preference types as string array initializer.
static void set_pref_task(void *cls)
#define DEFAULT_ABS_PREFERENCE
Default preference value we assume if we know nothing.
struct GNUNET_TIME_Relative log_freq
struct GNUNET_CONTAINER_MultiPeerMap * addresses
Address hashmap.
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_create_for_file(const char *filename)
Create the directory structure for storing a file.
struct GNUNET_ATS_PluginEnvironment env
Solver environment.
GNUNET_ATS_PreferenceKind
Enum defining all known preference categories.
struct GNUNET_TIME_Relative feedback_frequency
double pref_norm[GNUNET_ATS_PREFERENCE_END]
static struct GNUNET_ARM_Operation * op
Current operation.
struct GNUNET_CONTAINER_MultiPeerMap * addresses
Hashmap containing all addresses available.
static double default_preferences[GNUNET_ATS_PreferenceCount]
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
struct GNUNET_SCHEDULER_Task * logging_task
long long unsigned int max_rate
unsigned int address_network
double prop_norm[GNUNET_ATS_PropertyCount]
struct GNUNET_DISK_FileHandle * GNUNET_DISK_file_open(const char *fn, enum GNUNET_DISK_OpenFlags flags, enum GNUNET_DISK_AccessPermissions perm)
Open a file.
uint32_t atsi_count
ATS performance information for this address, size of the atsi array.
struct GNUNET_TIME_Relative max_duration
GAS_solver_bulk_stop s_bulk_stop
Bulk operation done.
static char * address
GNS address for this phone.
GAS_bandwidth_changed_cb bandwidth_changed_cb
ATS addresses callback to be notified about bandwidth assignment changes.
After the problem was finished, notifications about changes to addresses are done.
long long unsigned int address_session
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.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
struct GNUNET_TIME_Relative duration_period
static char * plugin_name
Name of our plugin.
unsigned int network_count
Number of networks available, size of the out_quota and in_quota arrays.
static struct TestAddress * find_address_by_id(struct TestPeer *peer, int aid)
No good quality of the operation is needed (i.e., random numbers can be pseudo-random).
double pref_norm[GNUNET_ATS_PreferenceCount]
#define GNUNET_malloc(size)
Wrapper around malloc.
static void enforce_episode(struct Episode *ep)
static void enforce_stop_preference(struct GNUNET_ATS_TEST_Operation *op)
#define GNUNET_free(ptr)
Wrapper around free.
static struct PropertyGenerator * prop_gen_head
Property Generators.
long long unsigned int id
Time for relative time used by GNUnet, in microseconds.
char * plugin
Solver plugin name.
enum GeneratorType gen_type
#define gettext_noop(String)
struct GNUNET_PeerIdentity peer_id
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.