![]() |
The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
|
Calculate smoothed round trip time and round trip time variation. More...
#include <freeradius-devel/util/time.h>
Include dependency graph for rtt.h:Go to the source code of this file.
Data Structures | |
| struct | fr_rtt_t |
| Smoothed round trip time, and the variation of the round trip time. More... | |
Macros | |
| #define | FR_RTT_DIFF(_rtt, _t) |
| Absolute difference between the smoothed round trip time and a new sample. | |
| #define | FR_RTT_IALPHA (8) |
| #define | FR_RTT_IBETA (4) |
| #define | FR_RTT_RTO(_rtt, _k) fr_time_delta_add((_rtt)->rtt, fr_time_delta_mul((_rtt)->rttvar, (_k))) |
| Calculate the retransmission timeout as SRTT + (K * RTTVAR) | |
| #define | FR_RTT_SMOOTH(_old, _new) fr_time_delta_wrap((fr_time_delta_unwrap(_new) + (fr_time_delta_unwrap(_old) * (FR_RTT_IALPHA - 1))) / FR_RTT_IALPHA) |
| Calculate the new smoothed round trip time from the old value and a new sample. | |
| #define | FR_RTT_VAR(_rtt, _rttvar, _t) |
| Calculate the new RTT variation from the old values and a new sample. | |
Functions | |
| static void | fr_rtt_update (fr_rtt_t *r, fr_time_delta_t t) |
| Update the smoothed round trip time and the variation with a new sample. | |
Calculate smoothed round trip time and round trip time variation.
Definition in file rtt.h.
| struct fr_rtt_t |
Smoothed round trip time, and the variation of the round trip time.
Collaboration diagram for fr_rtt_t:| Data Fields | ||
|---|---|---|
| fr_time_delta_t | rtt | smoothed round trip time |
| fr_time_delta_t | rttvar | RTT variation. |
| #define FR_RTT_DIFF | ( | _rtt, | |
| _t | |||
| ) |
Absolute difference between the smoothed round trip time and a new sample.
| #define FR_RTT_RTO | ( | _rtt, | |
| _k | |||
| ) | fr_time_delta_add((_rtt)->rtt, fr_time_delta_mul((_rtt)->rttvar, (_k))) |
Calculate the retransmission timeout as SRTT + (K * RTTVAR)
| [in] | _rtt | pointer to the fr_rtt_t. |
| [in] | _k | integer multiplier for the RTT variation. |
| #define FR_RTT_SMOOTH | ( | _old, | |
| _new | |||
| ) | fr_time_delta_wrap((fr_time_delta_unwrap(_new) + (fr_time_delta_unwrap(_old) * (FR_RTT_IALPHA - 1))) / FR_RTT_IALPHA) |
| #define FR_RTT_VAR | ( | _rtt, | |
| _rttvar, | |||
| _t | |||
| ) |
Calculate the new RTT variation from the old values and a new sample.
|
inlinestatic |
1.9.8