OpenVPN
|
Level 2 context containing state that is reset on both SIGHUP
and SIGUSR1
restarts.
More...
#include <openvpn.h>
Level 2 context containing state that is reset on both SIGHUP
and SIGUSR1
restarts.
This structure is initialized at the top of the tunnel_point_to_point()
, tunnel_server_udp()
, and tunnel_server_tcp()
functions. In other words, it is reset for every iteration of the main()
function's inner SIGUSR1
loop.
const struct link_socket* context_2::accept_from |
Definition at line 245 of file openvpn.h.
Referenced by inherit_context_child(), and link_socket_init_phase1().
struct event_timeout context_2::auth_token_renewal_interval |
Definition at line 296 of file openvpn.h.
Referenced by do_init_timers(), and process_coarse_timers().
struct buffer context_2::buf |
Definition at line 378 of file openvpn.h.
Referenced by check_fragment(), check_ping_send_dowork(), check_send_occ_msg_dowork(), do_pre_decrypt_check(), drop_if_recursive_routing(), encrypt_sign(), multi_get_create_instance_udp(), multi_get_queue(), multi_process_float(), multi_process_incoming_link(), multi_process_incoming_tun(), process_incoming_link(), process_incoming_link_part1(), process_incoming_link_part2(), process_incoming_tun(), process_outgoing_link(), process_received_occ_msg(), read_incoming_link(), read_incoming_tun(), and socks_postprocess_incoming_link().
struct context_buffers* context_2::buffers |
Definition at line 370 of file openvpn.h.
Referenced by check_ping_send_dowork(), check_send_occ_msg_dowork(), do_close_free_buf(), do_init_buffers(), encrypt_sign(), inherit_context_child(), ipv6_send_icmp_unreachable(), multi_top_free(), multi_top_init(), process_incoming_link_part1(), process_incoming_link_part2(), read_incoming_link(), read_incoming_tun(), and send_hmac_reset_packet().
bool context_2::buffers_owned |
Definition at line 371 of file openvpn.h.
Referenced by do_close_free_buf(), do_init_buffers(), and inherit_context_top().
time_t context_2::coarse_timer_wakeup |
Definition at line 402 of file openvpn.h.
Referenced by check_coarse_timers(), and reset_coarse_timers().
struct crypto_options context_2::crypto_options |
Security parameters and crypto state used by the Data Channel Crypto module to process data channel packet.
Definition at line 352 of file openvpn.h.
Referenced by do_close_packet_id(), do_init_crypto_static(), encrypt_sign(), process_incoming_link_part1(), and test_crypto_thread().
counter_type context_2::dco_read_bytes |
Definition at line 270 of file openvpn.h.
Referenced by dco_get_peer_stats(), man_persist_client_stats(), management_check_bytecount(), multi_print_status(), print_status(), and setenv_stats().
counter_type context_2::dco_write_bytes |
Definition at line 273 of file openvpn.h.
Referenced by dco_get_peer_stats(), man_persist_client_stats(), management_check_bytecount(), multi_print_status(), print_status(), and setenv_stats().
bool context_2::did_open_tun |
Definition at line 390 of file openvpn.h.
Referenced by do_up(), init_instance(), and io_wait_dowork().
struct env_set* context_2::es |
Definition at line 423 of file openvpn.h.
Referenced by ccs_delete_config_file(), ccs_delete_deferred_ret_file(), ccs_gen_config_file(), ccs_gen_deferred_ret_file(), check_add_routes_action(), do_close_tun(), do_env_set_destroy(), do_inherit_env(), do_init_crypto_tls(), do_init_tun(), do_open_tun(), incoming_push_message(), inherit_context_child(), learn_address_script(), multi_client_connect_call_plugin_v1(), multi_client_connect_call_plugin_v2(), multi_client_connect_call_script(), multi_client_connect_mda(), multi_client_connect_post(), multi_client_connect_post_plugin(), multi_client_connect_setenv(), multi_client_connect_source_ccd(), multi_client_disconnect_script(), multi_client_disconnect_setenv(), multi_connection_established(), multi_set_virtual_addr_env(), open_plugins(), process_incoming_link_part2(), process_incoming_push_reply(), process_ip_header(), and setenv_stats().
bool context_2::es_owned |
Definition at line 424 of file openvpn.h.
Referenced by do_env_set_destroy(), do_inherit_env(), and inherit_context_top().
struct event_set* context_2::event_set |
Definition at line 233 of file openvpn.h.
Referenced by do_close_event_set(), do_event_set_init(), inherit_context_top(), and io_wait_dowork().
int context_2::event_set_max |
Definition at line 234 of file openvpn.h.
Referenced by do_event_set_init().
bool context_2::event_set_owned |
Definition at line 235 of file openvpn.h.
Referenced by do_close_event_set(), do_event_set_init(), and inherit_context_top().
unsigned int context_2::event_set_status |
Definition at line 238 of file openvpn.h.
Referenced by io_wait(), io_wait_dowork(), multi_process_io_udp(), multi_tcp_wait_lite(), process_io(), tunnel_point_to_point(), and tunnel_server_udp().
struct event_timeout context_2::explicit_exit_notification_interval |
Definition at line 420 of file openvpn.h.
Referenced by process_explicit_exit_notification_init(), process_explicit_exit_notification_timer_wakeup(), read_incoming_link(), and remap_restart_signals().
time_t context_2::explicit_exit_notification_time_wait |
Definition at line 419 of file openvpn.h.
Referenced by process_coarse_timers(), process_explicit_exit_notification_init(), process_explicit_exit_notification_timer_wakeup(), and process_sigterm().
bool context_2::fast_io |
Definition at line 427 of file openvpn.h.
Referenced by do_setup_fast_io(), io_wait(), and multi_process_io_udp().
struct fragment_master* context_2::fragment |
Definition at line 255 of file openvpn.h.
Referenced by check_fragment(), do_close_fragment(), do_init_fragment(), do_print_data_channel_mtu_parms(), encrypt_sign(), init_instance(), multi_process_post(), pre_select(), and process_incoming_link_part2().
struct frame context_2::frame |
Definition at line 251 of file openvpn.h.
Referenced by check_ping_send_dowork(), check_send_occ_load_test_dowork(), check_send_occ_msg_dowork(), do_close_tun(), do_compute_occ_strings(), do_deferred_options(), do_deferred_options_part2(), do_deferred_p2p_ncp(), do_init_buffers(), do_init_fragment(), do_init_frame(), do_init_frame_tls(), do_init_tun(), do_open_tun(), do_print_data_channel_mtu_parms(), encrypt_sign(), frame_adjust_path_mtu(), frame_finalize_options(), get_frame_mtu(), init_instance(), ipv6_send_icmp_unreachable(), link_socket_init_phase2(), multi_client_generate_tls_keys(), multi_client_setup_dco_initial(), multi_top_init(), p2p_set_dco_keepalive(), process_incoming_link_part1(), process_incoming_link_part2(), process_ip_header(), process_outgoing_link(), process_outgoing_tun(), read_incoming_link(), read_incoming_tun(), and test_crypto_thread().
struct frame context_2::frame_fragment |
Definition at line 256 of file openvpn.h.
Referenced by check_fragment(), do_deferred_options_part2(), do_deferred_p2p_ncp(), do_init_fragment(), do_print_data_channel_mtu_parms(), encrypt_sign(), frame_adjust_path_mtu(), multi_client_generate_tls_keys(), and process_incoming_link_part2().
struct link_socket_actual context_2::from |
Definition at line 248 of file openvpn.h.
Referenced by do_pre_decrypt_check(), multi_get_create_instance_udp(), multi_process_float(), multi_process_incoming_link(), process_incoming_link_part1(), process_incoming_link_part2(), read_incoming_link(), send_hmac_reset_packet(), and socks_postprocess_incoming_link().
struct gc_arena context_2::gc |
Garbage collection arena for allocations done in the level 2 scope of this context_2 structure.
Definition at line 228 of file openvpn.h.
Referenced by close_instance(), context_gc_free(), do_init_crypto_tls(), do_init_frame_tls(), inherit_context_top(), init_instance(), and management_callback_proxy_cmd().
int64_t context_2::inactivity_bytes |
Definition at line 291 of file openvpn.h.
Referenced by check_inactivity_timeout(), and register_activity().
struct event_timeout context_2::inactivity_interval |
Definition at line 290 of file openvpn.h.
Referenced by check_inactivity_timeout(), do_init_timers(), process_coarse_timers(), and register_activity().
counter_type context_2::link_read_bytes |
Definition at line 269 of file openvpn.h.
Referenced by check_send_occ_req_dowork(), multi_print_status(), print_status(), process_incoming_link_part1(), process_outgoing_link(), and setenv_stats().
counter_type context_2::link_read_bytes_auth |
Definition at line 271 of file openvpn.h.
Referenced by check_send_occ_req_dowork(), print_status(), and process_incoming_link_part2().
struct link_socket* context_2::link_socket |
Definition at line 240 of file openvpn.h.
Referenced by check_tls_errors(), do_close_link_socket(), do_deferred_options(), do_link_socket_new(), do_open_tun(), do_up(), frame_adjust_path_mtu(), get_link_socket_info(), inherit_context_child(), initialization_sequence_completed(), io_wait_dowork(), link_socket_init_phase1(), link_socket_init_phase2(), multi_process_float(), multi_tcp_dereference_instance(), multi_tcp_instance_specific_init(), multi_tcp_post(), multi_tcp_process_io(), multi_tcp_set_global_rw_flags(), multi_tcp_wait(), process_incoming_link_part1(), process_ip_header(), process_outgoing_link(), read_incoming_link(), socks_postprocess_incoming_link(), and socks_preprocess_outgoing_link().
struct link_socket_info* context_2::link_socket_info |
This variable is used instead link_socket->info for P2MP UDP childs.
Definition at line 244 of file openvpn.h.
Referenced by get_link_socket_info(), inherit_context_child(), and multi_process_float().
bool context_2::link_socket_owned |
Definition at line 241 of file openvpn.h.
Referenced by do_close_link_socket(), do_link_socket_new(), and inherit_context_top().
counter_type context_2::link_write_bytes |
Definition at line 272 of file openvpn.h.
Referenced by multi_print_status(), print_status(), process_incoming_link_part1(), process_outgoing_link(), and setenv_stats().
bool context_2::log_rw |
Definition at line 383 of file openvpn.h.
Referenced by init_verb_mute(), process_incoming_link_part1(), process_incoming_tun(), process_outgoing_link(), and process_outgoing_tun().
int context_2::max_recv_size_local |
Definition at line 311 of file openvpn.h.
Referenced by check_send_occ_msg_dowork(), process_incoming_link_part2(), and process_received_occ_msg().
int context_2::max_recv_size_remote |
Definition at line 312 of file openvpn.h.
Referenced by process_received_occ_msg().
int context_2::max_send_size_local |
Definition at line 313 of file openvpn.h.
Referenced by check_send_occ_msg_dowork(), process_outgoing_link(), and process_received_occ_msg().
int context_2::max_send_size_remote |
Definition at line 314 of file openvpn.h.
Referenced by process_received_occ_msg().
struct man_def_auth_context context_2::mda_context |
Definition at line 456 of file openvpn.h.
Referenced by close_instance(), do_init_crypto_tls(), multi_client_disconnect_script(), multi_close_instance(), multi_connection_established(), multi_create_instance(), multi_learn_in6_addr(), multi_learn_in_addr_t(), multi_print_status(), multi_process_float(), process_incoming_link_part1(), and process_outgoing_link().
struct event_timeout context_2::occ_interval |
Definition at line 304 of file openvpn.h.
Referenced by check_send_occ_req(), check_send_occ_req_dowork(), do_init_timers(), and process_received_occ_msg().
int context_2::occ_mtu_load_n_tries |
Definition at line 321 of file openvpn.h.
Referenced by check_send_occ_load_test_dowork().
int context_2::occ_mtu_load_size |
Definition at line 318 of file openvpn.h.
Referenced by check_send_occ_load_test_dowork(), check_send_occ_msg_dowork(), and process_received_occ_msg().
struct event_timeout context_2::occ_mtu_load_test_interval |
Definition at line 320 of file openvpn.h.
Referenced by check_send_occ_load_test(), check_send_occ_load_test_dowork(), do_init_timers(), and process_received_occ_msg().
int context_2::occ_n_tries |
Definition at line 303 of file openvpn.h.
Referenced by check_send_occ_req_dowork().
int context_2::occ_op |
Definition at line 302 of file openvpn.h.
Referenced by check_send_occ_load_test(), check_send_occ_load_test_dowork(), check_send_occ_msg(), check_send_occ_msg_dowork(), check_send_occ_req(), check_send_occ_req_dowork(), init_instance(), process_explicit_exit_notification_timer_wakeup(), and process_received_occ_msg().
char* context_2::options_string_local |
Definition at line 299 of file openvpn.h.
Referenced by check_send_occ_msg_dowork(), do_close_tls(), do_compute_occ_strings(), and do_init_timers().
char* context_2::options_string_remote |
Definition at line 300 of file openvpn.h.
Referenced by do_close_tls(), do_compute_occ_strings(), do_init_timers(), and process_received_occ_msg().
int context_2::original_recv_size |
Definition at line 310 of file openvpn.h.
Referenced by process_incoming_link_part1(), and process_incoming_link_part2().
struct event_timeout context_2::packet_id_persist_interval |
Definition at line 358 of file openvpn.h.
Referenced by do_init_timers(), and process_coarse_timers().
struct event_timeout context_2::ping_rec_interval |
Definition at line 287 of file openvpn.h.
Referenced by check_add_routes(), check_ping_restart(), do_init_timers(), process_incoming_link_part1(), and process_incoming_link_part2().
struct event_timeout context_2::ping_send_interval |
Definition at line 286 of file openvpn.h.
Referenced by check_ping_send(), do_init_timers(), and process_outgoing_link().
struct sha256_digest context_2::pulled_options_digest |
Definition at line 448 of file openvpn.h.
Referenced by do_up(), and process_incoming_push_reply().
bool context_2::pulled_options_digest_init_done |
Definition at line 446 of file openvpn.h.
Referenced by process_incoming_push_reply().
md_ctx_t* context_2::pulled_options_state |
Definition at line 447 of file openvpn.h.
Referenced by do_close_tls(), and process_incoming_push_reply().
bool context_2::push_ifconfig_defined |
Definition at line 431 of file openvpn.h.
Referenced by ifconfig_push_constraint_satisfied(), multi_client_connect_late_setup(), multi_select_virtual_addr(), multi_set_virtual_addr_env(), and prepare_push_reply().
bool context_2::push_ifconfig_ipv6_defined |
Definition at line 437 of file openvpn.h.
Referenced by multi_client_connect_late_setup(), multi_select_virtual_addr(), multi_set_virtual_addr_env(), and prepare_push_reply().
struct in6_addr context_2::push_ifconfig_ipv6_local |
Definition at line 438 of file openvpn.h.
Referenced by multi_client_connect_late_setup(), multi_select_virtual_addr(), multi_set_virtual_addr_env(), and prepare_push_reply().
int context_2::push_ifconfig_ipv6_netbits |
Definition at line 439 of file openvpn.h.
Referenced by multi_select_virtual_addr(), multi_set_virtual_addr_env(), and prepare_push_reply().
struct in6_addr context_2::push_ifconfig_ipv6_remote |
Definition at line 440 of file openvpn.h.
Referenced by multi_select_virtual_addr(), multi_set_virtual_addr_env(), and prepare_push_reply().
in_addr_t context_2::push_ifconfig_local |
Definition at line 433 of file openvpn.h.
Referenced by ifconfig_push_constraint_satisfied(), multi_client_connect_late_setup(), multi_select_virtual_addr(), multi_set_virtual_addr_env(), and prepare_push_reply().
in_addr_t context_2::push_ifconfig_local_alias |
Definition at line 435 of file openvpn.h.
Referenced by multi_select_virtual_addr(), and prepare_push_reply().
in_addr_t context_2::push_ifconfig_remote_netmask |
Definition at line 434 of file openvpn.h.
Referenced by multi_select_virtual_addr(), multi_set_virtual_addr_env(), and prepare_push_reply().
struct event_timeout context_2::push_request_interval |
Definition at line 442 of file openvpn.h.
Referenced by check_connection_established(), check_push_request(), incoming_push_message(), and process_coarse_timers().
bool context_2::push_request_received |
Definition at line 430 of file openvpn.h.
Referenced by multi_client_connect_late_setup(), multi_client_set_protocol_options(), multi_create_instance(), and process_incoming_push_msg().
time_t context_2::push_request_timeout |
Definition at line 443 of file openvpn.h.
Referenced by check_connection_established(), receive_auth_pending(), and send_push_request().
struct event_timeout context_2::route_wakeup |
Definition at line 386 of file openvpn.h.
Referenced by check_add_routes(), check_add_routes_action(), do_up(), and process_coarse_timers().
struct event_timeout context_2::route_wakeup_expire |
Definition at line 387 of file openvpn.h.
Referenced by check_add_routes(), check_add_routes_action(), and do_up().
struct event_timeout context_2::scheduled_exit |
Definition at line 450 of file openvpn.h.
Referenced by process_coarse_timers(), and schedule_exit().
int context_2::scheduled_exit_signal |
Definition at line 451 of file openvpn.h.
Referenced by check_scheduled_exit(), and schedule_exit().
time_t context_2::sent_push_reply_expiry |
Definition at line 432 of file openvpn.h.
Referenced by process_incoming_push_request().
struct event_timeout context_2::server_poll_interval |
Definition at line 411 of file openvpn.h.
Referenced by check_server_poll_timeout(), do_init_server_poll_timeout(), link_socket_init_phase1(), and process_coarse_timers().
hmac_ctx_t* context_2::session_id_hmac |
the HMAC we use to generate and verify our syn cookie like session ids from the server.
Definition at line 341 of file openvpn.h.
Referenced by do_init_crypto_tls(), and do_pre_decrypt_check().
struct event_timeout context_2::session_interval |
Definition at line 293 of file openvpn.h.
Referenced by check_session_timeout(), and do_init_timers().
struct shaper context_2::shaper |
Definition at line 262 of file openvpn.h.
Referenced by do_init_traffic_shaper(), io_wait_dowork(), and process_outgoing_link().
struct timeval context_2::timeout_random_component |
Definition at line 407 of file openvpn.h.
Referenced by check_timeout_random_component(), and check_timeout_random_component_dowork().
struct timeval context_2::timeval |
Time to next event of timers and similar.
This is used to determine how long to wait on event wait (select/poll on link/tun read) before this context wants to be serviced.
Definition at line 399 of file openvpn.h.
Referenced by check_add_routes(), check_coarse_timers(), check_fragment(), check_ping_restart(), check_ping_send(), check_send_occ_load_test(), check_send_occ_msg(), check_send_occ_req(), check_session_timeout(), check_timeout_random_component(), context_immediate_reschedule(), context_reschedule_sec(), io_wait_dowork(), multi_process_post(), multi_schedule_context_wakeup(), multi_tcp_wait(), multi_tcp_wait_lite(), pre_select(), process_coarse_timers(), process_explicit_exit_notification_timer_wakeup(), tunnel_server_tcp(), and tunnel_server_udp().
struct tls_auth_standalone* context_2::tls_auth_standalone |
TLS state structure required for the initial authentication of a client's connection attempt.
This structure is used by the tls_pre_decrypt_lite()
function when it performs the HMAC firewall check on the first connection packet received from a new client. See the –tls-auth
commandline option.
Definition at line 329 of file openvpn.h.
Referenced by do_close_tls(), do_init_crypto_tls(), do_init_frame_tls(), and do_pre_decrypt_check().
int context_2::tls_exit_signal |
Definition at line 350 of file openvpn.h.
Referenced by check_tls_errors(), check_tls_errors_co(), check_tls_errors_nco(), and do_signal_on_tls_errors().
struct tls_multi* context_2::tls_multi |
TLS state structure for this VPN tunnel.
Definition at line 326 of file openvpn.h.
Referenced by cc_exit_notify_enabled(), check_connection_established(), check_dco_key_status(), check_incoming_control_channel(), check_pull_client_ncp(), check_send_auth_token(), check_server_poll_timeout(), check_tls(), check_tls_errors(), connection_established(), do_close_tls(), do_compute_occ_strings(), do_deferred_options(), do_deferred_options_part2(), do_deferred_p2p_ncp(), do_init_crypto_tls(), do_init_frame_tls(), do_open_tun(), do_up(), encrypt_sign(), format_common_name(), inherit_context_top(), learn_address_script(), management_callback_kill_by_cn(), management_client_auth(), management_client_pending_auth(), management_get_peer_info(), multi_assign_peer_id(), multi_client_connect_compress_migrate(), multi_client_connect_early_setup(), multi_client_connect_late_setup(), multi_client_connect_setenv(), multi_client_connect_source_ccd(), multi_client_generate_tls_keys(), multi_client_set_protocol_options(), multi_client_setup_dco_initial(), multi_close_instance(), multi_connection_established(), multi_create_instance(), multi_delete_dup(), multi_get_create_instance_udp(), multi_instance_string(), multi_print_status(), multi_process_float(), multi_process_post(), multi_select_virtual_addr(), p2p_set_dco_keepalive(), pre_select(), prepare_push_reply(), process_coarse_timers(), process_incoming_dco(), process_incoming_link_part1(), process_incoming_push_request(), process_outgoing_link(), receive_auth_pending(), receive_cr_response(), schedule_exit(), send_auth_failed(), send_control_channel_string(), and send_push_request().
struct interval context_2::tmp_int |
Definition at line 347 of file openvpn.h.
Referenced by check_tls(), do_init_timers(), process_incoming_link_part1(), and reschedule_multi_process().
struct buffer context_2::to_link |
Definition at line 380 of file openvpn.h.
Referenced by check_fragment(), check_tls(), encrypt_sign(), ipv6_send_icmp_unreachable(), multi_process_outgoing_link(), multi_process_post(), multi_tcp_process_outgoing_link(), multi_tcp_process_outgoing_link_ready(), p2p_iow_flags(), process_incoming_tun(), process_outgoing_link(), and socks_preprocess_outgoing_link().
struct link_socket_actual* context_2::to_link_addr |
Definition at line 247 of file openvpn.h.
Referenced by check_tls(), drop_if_recursive_routing(), encrypt_sign(), multi_process_float(), multi_process_outgoing_link(), process_outgoing_link(), and socks_preprocess_outgoing_link().
struct buffer context_2::to_tun |
Definition at line 379 of file openvpn.h.
Referenced by ipv6_send_icmp_unreachable(), multi_process_drop_outgoing_tun(), multi_process_incoming_link(), multi_process_outgoing_tun(), multi_process_post(), p2p_iow_flags(), process_incoming_link_part1(), process_incoming_link_part2(), process_outgoing_tun(), and vlan_process_outgoing_tun().
counter_type context_2::tun_read_bytes |
Definition at line 267 of file openvpn.h.
Referenced by check_inactivity_timeout(), dco_get_peer_stats(), print_status(), and process_incoming_tun().
counter_type context_2::tun_write_bytes |
Definition at line 268 of file openvpn.h.
Referenced by check_inactivity_timeout(), dco_get_peer_stats(), print_status(), and process_outgoing_tun().
time_t context_2::update_timeout_random_component |
Definition at line 406 of file openvpn.h.
Referenced by check_timeout_random_component(), and check_timeout_random_component_dowork().
struct event_timeout context_2::wait_for_connect |
Definition at line 285 of file openvpn.h.
Referenced by check_connection_established(), check_tls(), do_init_timers(), incoming_push_message(), and process_coarse_timers().