diff options
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.h')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h index 2be8277e1..072a3d078 100644 --- a/src/ats/gnunet-service-ats_addresses.h +++ b/src/ats/gnunet-service-ats_addresses.h | |||
@@ -235,12 +235,12 @@ struct GAS_NormalizationInfo | |||
235 | /** | 235 | /** |
236 | * Averaging queue | 236 | * Averaging queue |
237 | */ | 237 | */ |
238 | uint32_t atsi_abs[GAS_normalization_queue_length]; | 238 | uint64_t atsi_abs[GAS_normalization_queue_length]; |
239 | 239 | ||
240 | /** | 240 | /** |
241 | * Averaged ATSI values from queue | 241 | * Averaged ATSI values from queue |
242 | */ | 242 | */ |
243 | uint32_t avg; | 243 | uint64_t avg; |
244 | 244 | ||
245 | /** | 245 | /** |
246 | * Normalized values from queue to a range of values [1.0...2.0] | 246 | * Normalized values from queue to a range of values [1.0...2.0] |
@@ -277,7 +277,7 @@ struct ATS_Address | |||
277 | /** | 277 | /** |
278 | * ATS performance information for this address | 278 | * ATS performance information for this address |
279 | */ | 279 | */ |
280 | struct GNUNET_ATS_Information *atsi; | 280 | struct GNUNET_ATS_Properties properties; |
281 | 281 | ||
282 | /** | 282 | /** |
283 | * Time when address had last activity (update, in uses) | 283 | * Time when address had last activity (update, in uses) |
@@ -336,10 +336,25 @@ struct ATS_Address | |||
336 | int active; | 336 | int active; |
337 | 337 | ||
338 | /** | 338 | /** |
339 | * Normalized ATS performance information for this address | 339 | * Normalized delay information for this address. |
340 | * Each entry can be accessed using the GNUNET_ATS_QualityProperties avg_queue_index | ||
341 | */ | 340 | */ |
342 | struct GAS_NormalizationInfo atsin[GNUNET_ATS_QualityPropertiesCount]; | 341 | struct GAS_NormalizationInfo norm_delay; |
342 | |||
343 | /** | ||
344 | * Normalized distance information for this address. | ||
345 | */ | ||
346 | struct GAS_NormalizationInfo norm_distance; | ||
347 | |||
348 | /** | ||
349 | * Normalized utilization inbound for this address. | ||
350 | */ | ||
351 | struct GAS_NormalizationInfo norm_utilization_in; | ||
352 | |||
353 | /** | ||
354 | * Normalized utilization outbound for this address. | ||
355 | */ | ||
356 | struct GAS_NormalizationInfo norm_utilization_out; | ||
357 | |||
343 | }; | 358 | }; |
344 | 359 | ||
345 | 360 | ||
@@ -375,8 +390,7 @@ GAS_addresses_done (void); | |||
375 | * @param plugin_addr_len length of the @a plugin_addr | 390 | * @param plugin_addr_len length of the @a plugin_addr |
376 | * @param local_address_info the local address for the address | 391 | * @param local_address_info the local address for the address |
377 | * @param session_id session id, can never be 0. | 392 | * @param session_id session id, can never be 0. |
378 | * @param atsi performance information for this address | 393 | * @param prop performance information for this address |
379 | * @param atsi_count number of performance information contained in @a atsi | ||
380 | */ | 394 | */ |
381 | void | 395 | void |
382 | GAS_addresses_add (const struct GNUNET_PeerIdentity *peer, | 396 | GAS_addresses_add (const struct GNUNET_PeerIdentity *peer, |
@@ -385,8 +399,7 @@ GAS_addresses_add (const struct GNUNET_PeerIdentity *peer, | |||
385 | size_t plugin_addr_len, | 399 | size_t plugin_addr_len, |
386 | uint32_t local_address_info, | 400 | uint32_t local_address_info, |
387 | uint32_t session_id, | 401 | uint32_t session_id, |
388 | const struct GNUNET_ATS_Information *atsi, | 402 | const struct GNUNET_ATS_Properties *prop); |
389 | uint32_t atsi_count); | ||
390 | 403 | ||
391 | 404 | ||
392 | /** | 405 | /** |
@@ -394,14 +407,12 @@ GAS_addresses_add (const struct GNUNET_PeerIdentity *peer, | |||
394 | * | 407 | * |
395 | * @param peer peer | 408 | * @param peer peer |
396 | * @param session_id session id, can never be 0 | 409 | * @param session_id session id, can never be 0 |
397 | * @param atsi performance information for this address | 410 | * @param prop performance information for this address |
398 | * @param atsi_count number of performance information contained in @a atsi | ||
399 | */ | 411 | */ |
400 | void | 412 | void |
401 | GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, | 413 | GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, |
402 | uint32_t session_id, | 414 | uint32_t session_id, |
403 | const struct GNUNET_ATS_Information *atsi, | 415 | const struct GNUNET_ATS_Properties *prop); |
404 | uint32_t atsi_count); | ||
405 | 416 | ||
406 | 417 | ||
407 | /** | 418 | /** |
@@ -432,7 +443,6 @@ GAS_addresses_destroy_all (void); | |||
432 | * @param plugin_addr_len length of @a plugin_addr | 443 | * @param plugin_addr_len length of @a plugin_addr |
433 | * @param address_active is address actively used | 444 | * @param address_active is address actively used |
434 | * @param atsi ats performance information | 445 | * @param atsi ats performance information |
435 | * @param atsi_count number of ats performance elements in @a atsi | ||
436 | * @param bandwidth_out current outbound bandwidth assigned to address | 446 | * @param bandwidth_out current outbound bandwidth assigned to address |
437 | * @param bandwidth_in current inbound bandwidth assigned to address | 447 | * @param bandwidth_in current inbound bandwidth assigned to address |
438 | */ | 448 | */ |
@@ -443,8 +453,7 @@ typedef void | |||
443 | const void *plugin_addr, | 453 | const void *plugin_addr, |
444 | size_t plugin_addr_len, | 454 | size_t plugin_addr_len, |
445 | const int address_active, | 455 | const int address_active, |
446 | const struct GNUNET_ATS_Information *atsi, | 456 | const struct GNUNET_ATS_Properties *prop, |
447 | uint32_t atsi_count, | ||
448 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 457 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
449 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in); | 458 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in); |
450 | 459 | ||