Data Structures | |
struct | rtt_info |
RTT information. More... | |
Defines | |
#define | RTT_MIN_TIMEOUT 50 |
min retransmit timeout value, in milliseconds | |
#define | RTT_MAX_TIMEOUT 120000 |
max retransmit timeout value, in milliseconds | |
Functions | |
void | rtt_init (struct rtt_info *rtt) |
Initialize RTT estimators. | |
int | rtt_timeout (const struct rtt_info *rtt) |
Get timeout to use for sending a UDP packet. | |
int | rtt_unclamped (const struct rtt_info *rtt) |
Get unclamped timeout to use for server selection. | |
void | rtt_update (struct rtt_info *rtt, int ms) |
Update the statistics with a new roundtrip estimate observation. | |
void | rtt_lost (struct rtt_info *rtt) |
Update the statistics with a new timout expired observation. |
void rtt_init | ( | struct rtt_info * | rtt | ) |
Initialize RTT estimators.
rtt,: | The structure. Caller is responsible for allocation of it. |
References calc_rto(), rtt_info::rto, rtt_info::rttvar, and rtt_info::srtt.
Referenced by infra_host(), new_host_entry(), and rtt_test().
int rtt_timeout | ( | const struct rtt_info * | rtt | ) |
Get timeout to use for sending a UDP packet.
rtt,: | round trip statistics structure. |
References rtt_info::rto.
Referenced by infra_host(), and rtt_test().
int rtt_unclamped | ( | const struct rtt_info * | rtt | ) |
Get unclamped timeout to use for server selection.
Recent timeouts are reflected in the returned value.
rtt,: | round trip statistics structure. |
References calc_rto(), rtt_info::rto, rtt_info::rttvar, and rtt_info::srtt.
Referenced by infra_get_lame_rtt().
void rtt_update | ( | struct rtt_info * | rtt, | |
int | ms | |||
) |
Update the statistics with a new roundtrip estimate observation.
rtt,: | round trip statistics structure. | |
ms,: | estimate of roundtrip time in milliseconds. |
References calc_rto(), rtt_info::rto, rtt_info::rttvar, and rtt_info::srtt.
Referenced by infra_rtt_update(), and rtt_test().
void rtt_lost | ( | struct rtt_info * | rtt | ) |
Update the statistics with a new timout expired observation.
rtt,: | round trip statistics structure. |
References rtt_info::rto, and RTT_MAX_TIMEOUT.
Referenced by infra_rtt_update(), and rtt_test().