OpenVPN
|
Go to the source code of this file.
Data Structures | |
struct | frequency_limit |
Macros | |
#define | TV_WITHIN_SIGMA_MAX_SEC 600 |
#define | TV_WITHIN_SIGMA_MAX_USEC (TV_WITHIN_SIGMA_MAX_SEC * 1000000) |
Functions | |
struct frequency_limit * | frequency_limit_init (int max, int per) |
void | frequency_limit_free (struct frequency_limit *f) |
bool | frequency_limit_event_allowed (struct frequency_limit *f) |
const char * | time_string (time_t t, int usec, bool show_usec, struct gc_arena *gc) |
const char * | tv_string (const struct timeval *tv, struct gc_arena *gc) |
const char * | tv_string_abs (const struct timeval *tv, struct gc_arena *gc) |
void | time_test (void) |
void | update_now (const time_t system_time) |
void | update_now_usec (struct timeval *tv) |
static int | openvpn_gettimeofday (struct timeval *tv, void *tz) |
static void | update_time (void) |
static time_t | openvpn_time (time_t *t) |
static void | tv_clear (struct timeval *tv) |
static bool | tv_defined (const struct timeval *tv) |
static int | tv_subtract (const struct timeval *tv1, const struct timeval *tv2, const unsigned int max_seconds) |
static void | tv_add (struct timeval *dest, const struct timeval *src) |
static bool | tv_lt (const struct timeval *t1, const struct timeval *t2) |
static bool | tv_le (const struct timeval *t1, const struct timeval *t2) |
static bool | tv_ge (const struct timeval *t1, const struct timeval *t2) |
static bool | tv_gt (const struct timeval *t1, const struct timeval *t2) |
static bool | tv_eq (const struct timeval *t1, const struct timeval *t2) |
static void | tv_delta (struct timeval *dest, const struct timeval *t1, const struct timeval *t2) |
static bool | tv_within_sigma (const struct timeval *t1, const struct timeval *t2, unsigned int sigma) |
static void | interval_earliest_wakeup (interval_t *wakeup, time_t at, time_t current) |
Variables | |
time_t | now |
time_t | now_usec |
#define TV_WITHIN_SIGMA_MAX_USEC (TV_WITHIN_SIGMA_MAX_SEC * 1000000) |
bool frequency_limit_event_allowed | ( | struct frequency_limit * | f | ) |
Definition at line 167 of file otime.c.
References http-client::f, and now.
Referenced by multi_get_create_instance_udp().
void frequency_limit_free | ( | struct frequency_limit * | f | ) |
struct frequency_limit* frequency_limit_init | ( | int | max, |
int | per | ||
) |
Definition at line 146 of file otime.c.
References ALLOC_OBJ, ASSERT, http-client::f, frequency_limit::max, and frequency_limit::per.
Referenced by multi_init().
|
inlinestatic |
Definition at line 258 of file otime.h.
Referenced by interval_schedule_wakeup().
|
inlinestatic |
Definition at line 64 of file otime.h.
References now, now_usec, status, and update_now_usec().
Referenced by multi_get_timeout(), multi_push_restart_schedule_exit(), multi_schedule_context_wakeup(), shaper_delay(), shaper_wrote_bytes(), update_time(), usec_timer_end(), and usec_timer_start().
|
inlinestatic |
Definition at line 90 of file otime.h.
References now, and update_time().
Referenced by gen_timestamp(), and process_incoming_push_request().
const char* time_string | ( | time_t | t, |
int | usec, | ||
bool | show_usec, | ||
struct gc_arena * | gc | ||
) |
Definition at line 108 of file otime.c.
References alloc_buf_gc(), BSTR, and buf_printf().
Referenced by multi_client_connect_setenv(), multi_print_status(), packet_id_net_print(), packet_id_persist_print(), print_status(), show_adapter(), tv_string_abs(), and x_msg_va().
void time_test | ( | void | ) |
Referenced by init_static().
|
inlinestatic |
Definition at line 132 of file otime.h.
Referenced by check_timeout_random_component(), multi_push_restart_schedule_exit(), multi_schedule_context_wakeup(), and shaper_wrote_bytes().
|
inlinestatic |
Definition at line 101 of file otime.h.
Referenced by check_send_occ_msg(), and multi_tcp_wait_lite().
|
inlinestatic |
Definition at line 108 of file otime.h.
Referenced by shaper_delay().
|
inlinestatic |
Definition at line 220 of file otime.h.
Referenced by multi_get_timeout().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
const char* tv_string | ( | const struct timeval * | tv, |
struct gc_arena * | gc | ||
) |
Definition at line 82 of file otime.c.
References alloc_buf_gc(), BSTR, and buf_printf().
const char* tv_string_abs | ( | const struct timeval * | tv, |
struct gc_arena * | gc | ||
) |
Definition at line 97 of file otime.c.
References time_string().
|
inlinestatic |
Definition at line 115 of file otime.h.
References constrain_int().
Referenced by shaper_delay(), tv_within_sigma(), and usec_timer_interval().
|
inlinestatic |
Definition at line 247 of file otime.h.
References tv_subtract(), and TV_WITHIN_SIGMA_MAX_SEC.
Referenced by schedule_add_entry().
void update_now | ( | const time_t | system_time | ) |
Definition at line 45 of file otime.c.
Referenced by update_now_usec(), and update_time().
void update_now_usec | ( | struct timeval * | tv | ) |
Definition at line 68 of file otime.c.
References now, now_usec, and update_now().
Referenced by openvpn_gettimeofday().
|
inlinestatic |
Definition at line 77 of file otime.h.
References now_usec, openvpn_gettimeofday(), and update_now().
Referenced by ce_management_query_proxy(), ce_management_query_remote(), check_add_routes(), check_add_routes_action(), check_tls(), do_data_channel_round_trip(), do_init_server_poll_timeout(), do_init_timers(), do_up(), get_server_poll_remaining_time(), ifconfig_pool_read(), init_static(), io_wait_dowork(), key_state_init(), man_block(), management_callback_proxy_cmd(), management_echo(), management_event_loop_n_seconds(), management_set_state(), multi_tcp_wait(), openvpn_time(), read_incoming_tls_plaintext(), schedule_exit(), test_crypto(), tls_multi_process(), tls_process(), virtual_output_callback_func(), and win32_sleep().
time_t now |
Definition at line 34 of file otime.c.
Referenced by auth_token_test_empty_user(), auth_token_test_known_keys(), auth_token_test_random_keys(), auth_token_test_timeout(), calculate_session_id_hmac(), check_add_routes(), check_coarse_timers(), check_connection_established(), check_stale_routes(), check_timeout_random_component(), check_timeout_random_component_dowork(), check_timestamp_delta(), check_tls(), do_init_server_poll_timeout(), do_init_timers(), do_up(), event_timeout_remaining(), event_timeout_reset(), event_timeout_trigger(), fragment_incoming(), fragment_init(), fragment_ttl_reap(), frequency_limit_event_allowed(), generate_auth_token(), ifconfig_pool_entry_free(), ifconfig_pool_set(), interval_action(), interval_future_trigger(), interval_schedule_wakeup(), interval_test(), key_state_soft_reset(), lame_duck_must_die(), man_block(), man_bytecount(), man_bytecount_output_server(), management_bytes_server(), management_echo(), management_event_loop_n_seconds(), management_set_state(), multi_client_disconnect_setenv(), multi_create_instance(), multi_get_instance_by_virtual_addr(), multi_learn_addr(), multi_print_status(), multi_process_per_second_timers(), multi_reap_new(), multi_reap_process(), multi_reap_process_dowork(), multi_route_defined(), openvpn_gettimeofday(), openvpn_time(), packet_id_add(), packet_id_reap(), packet_id_reap_test(), packet_id_send_update(), process_explicit_exit_notification_init(), process_explicit_exit_notification_timer_wakeup(), process_incoming_push_request(), reflect_filter_rate_limit_check(), reliable_can_send(), reliable_schedule_now(), reliable_send(), reliable_send_purge(), reliable_send_timeout(), schedule_exit(), send_auth_pending_messages(), send_push_request(), session_move_active(), session_move_pre_start(), setup(), test_calc_session_id_hmac_static(), test_generate_reset_packet_tls_auth(), test_packet_id_write_long(), test_packet_id_write_long_prepend(), test_packet_id_write_long_wrap(), test_packet_id_write_short(), test_packet_id_write_short_prepend(), tls_authentication_status(), tls_authentication_status_use_cache(), tls_crypt_v2_write_client_key_file(), tls_pre_decrypt(), tls_process(), tls_process_state(), tls_select_encryption_key(), tls_session_init(), update_key_auth_status(), update_now(), update_now_usec(), verify_auth_token(), virtual_output_callback_func(), and win32_sleep().
time_t now_usec |
Definition at line 37 of file otime.c.
Referenced by openvpn_gettimeofday(), update_now_usec(), and update_time().