OpenVPN
|
Go to the source code of this file.
Functions | |
void | interval_init (struct interval *top, int horizon, int refresh) |
bool | event_timeout_trigger (struct event_timeout *et, struct timeval *tv, const int et_const_retry) |
This is the principal function for testing and triggering recurring timers. More... | |
bool event_timeout_trigger | ( | struct event_timeout * | et, |
struct timeval * | tv, | ||
int | et_const_retry | ||
) |
This is the principal function for testing and triggering recurring timers.
If *et is not triggered, *tv is set to remaining time until the timeout if not already lower:
*tv = minimum(*tv, event_timeout_remaining(*et))
If *et triggers and et_const_retry is negative (ETT_DEFAULT is -1):
If *et triggers and et_const_retry >= 0, *tv will be lowered to et_const_try if larger:
*tv = *minimum(*tv, et_const_retry)
This is mainly useful if the trigger cannot yet be triggered for other reasons and a backoff timeout should be returned if the timer is ready to trigger.
et | the timeout to check |
tv | will be set to timeout for next check for this timeout unless already smaller. |
et_const_retry | see above |
Definition at line 43 of file interval.c.
References D_INTERVAL, event_timeout::defined, dmsg, event_timeout_remaining(), event_timeout::last, event_timeout::n, and now.
Referenced by check_add_routes(), check_ping_restart(), check_ping_send(), check_send_occ_load_test(), check_send_occ_req(), check_session_timeout(), management_check_bytecount(), process_coarse_timers(), process_explicit_exit_notification_timer_wakeup(), stale_route_check_trigger(), and status_trigger().
void interval_init | ( | struct interval * | top, |
int | horizon, | ||
int | refresh | ||
) |
Definition at line 35 of file interval.c.
References CLEAR, interval::horizon, and interval::refresh.
Referenced by do_init_timers().