34 #define LOG(kind, ...) GNUNET_log_from (kind, "ats-normalization", __VA_ARGS__)
89 ni->
avg = current_val;
180 &
address->norm_utilization_in);
183 &
address->norm_utilization_out);
237 "Updating properties for peer `%s'\n",
245 &
address->norm_utilization_in);
247 &
address->norm_utilization_out);
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static char * address
GNS address for this phone.
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
#define GAS_normalization_queue_length
struct GNUNET_CONTAINER_MultiPeerMap * GSA_addresses
A multihashmap to store all addresses.
ats service address management
static struct PropertyRange property_range
Range information for all quality properties we see.
static void update_norm(uint64_t min, uint64_t max, struct GAS_NormalizationInfo *ni)
Compute the normalized value from the given ni range data and the average value.
void GAS_normalization_stop()
Stop the normalization component and free all items.
static int find_min_max_it(void *cls, const struct GNUNET_PeerIdentity *h, void *k)
Function called for all addresses and peers to find the minimum and maximum (averaged) values for a g...
void GAS_normalization_start()
Start the normalization component.
static int normalize_address(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Normalize the property value for a given address based on the range we know that property values have...
static void init_range(struct PropertyRange *pr)
Initialize property range to the values corresponding to an empty set.
static void update_avg(uint64_t current_val, struct GAS_NormalizationInfo *ni)
Add the value from atsi to the running average of the given ni quality property.
static int notify_change(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Notify about change in normalized property.
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.
void GAS_plugin_solver_unlock()
Resume instant solving, we are done with the bulk state updates.
void GAS_plugin_notify_property_changed(struct ATS_Address *address)
The relative value for a property changed.
void GAS_plugin_solver_lock()
Stop instant solving, there are many state updates happening in bulk right now.
ats service plugin management
Automatic transport selection and outbound bandwidth determination.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
@ GNUNET_ERROR_TYPE_DEBUG
struct GNUNET_TIME_Relative GNUNET_TIME_relative_min(struct GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2)
Return the minimum of two relative time values.
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
struct GNUNET_TIME_Relative GNUNET_TIME_relative_max(struct GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2)
Return the maximum of two relative time values.
Address with additional information.
struct GNUNET_ATS_Properties properties
ATS performance information for this address.
Information provided by ATS normalization.
uint64_t atsi_abs[3]
Averaging queue.
double norm
Normalized values from queue to a range of values [1.0...2.0].
unsigned int avg_queue_index
Next index to use in averaging queue.
uint64_t avg
Averaged ATSI values from queue.
ATS performance characteristics for an address.
uint32_t utilization_in
Actual traffic on this connection from the other peer to this peer.
unsigned int distance
Distance on network layer (required for distance-vector routing) in hops.
struct GNUNET_TIME_Relative delay
Delay.
uint32_t utilization_out
Actual traffic on this connection from this peer to the other peer.
The identity of the host (wraps the signing key of the peer).
uint64_t rel_value_us
The actual value.
Range information for normalization of quality properties.
struct GNUNET_ATS_Properties min
Minimum value we see for this property across all addresses.
struct GNUNET_ATS_Properties max
Maximum value we see for this property across all addresses.