OpenVPN
Data Fields
context Struct Reference

Contains all state information for one tunnel. More...

#include <openvpn.h>

Collaboration diagram for context:
Collaboration graph
[legend]

Data Fields

struct options options
 Options loaded from command line or configuration file. More...
 
bool first_time
 True on the first iteration of OpenVPN's main loop. More...
 
int mode
 Role of this context within the OpenVPN process. More...
 
struct gc_arena gc
 Garbage collection arena for allocations done in the scope of this context structure. More...
 
struct env_setes
 Set of environment variables. More...
 
openvpn_net_ctx_t net_ctx
 Networking API opaque context. More...
 
struct signal_infosig
 Internal error signaling object. More...
 
struct plugin_listplugins
 List of plug-ins. More...
 
bool plugins_owned
 Whether the plug-ins should be cleaned up when this context is cleaned up. More...
 
bool did_we_daemonize
 Whether demonization has already taken place. More...
 
struct context_persist persist
 Persistent context. More...
 
struct context_0c0
 Level 0 context. More...
 
struct context_1 c1
 Level 1 context. More...
 
struct context_2 c2
 Level 2 context. More...
 

Detailed Description

Contains all state information for one tunnel.

This structure represents one VPN tunnel. It is used to store state information related to a VPN tunnel, but also includes process-wide data, such as configuration options.

The Structure of VPN tunnel state storage related page describes how this structure is used in client-mode and server-mode.

Definition at line 476 of file openvpn.h.

Field Documentation

◆ c0

struct context_0* context::c0

Level 0 context.

Definition at line 515 of file openvpn.h.

Referenced by do_init_crypto_tls_c1(), do_init_first_time(), do_uid_gid_chroot(), and inherit_context_top().

◆ c1

struct context_1 context::c1

Level 1 context.

Definition at line 516 of file openvpn.h.

Referenced by add_wfp_block(), check_add_routes(), check_add_routes_action(), check_dco_key_status(), check_ping_restart(), check_send_occ_load_test_dowork(), check_send_occ_msg_dowork(), check_status_file(), context_clear_1(), context_init_1(), create_socket_dco_win(), dco_get_peer_stats(), del_wfp_block(), do_alloc_route_list(), do_close_free_key_schedule(), do_close_ifconfig_pool_persist(), do_close_link_socket(), do_close_packet_id(), do_close_status_output(), do_close_tun(), do_close_tun_simple(), do_compute_occ_strings(), do_init_crypto_none(), do_init_crypto_static(), do_init_crypto_tls(), do_init_crypto_tls_c1(), do_init_fragment(), do_init_tls_wrap_key(), do_init_tun(), do_open_ifconfig_pool_persist(), do_open_status_output(), do_open_tun(), do_preresolve_host(), do_up(), drop_if_recursive_routing(), frame_adjust_path_mtu(), get_frame_mtu(), inherit_context_child(), inherit_context_top(), init_crypto_pre(), init_instance(), init_proxy_dowork(), initialization_sequence_completed(), io_wait(), io_wait_dowork(), ipv6_send_icmp_unreachable(), link_socket_init_phase1(), multi_add_iroutes(), multi_client_connect_early_setup(), multi_client_connect_late_setup(), multi_client_setup_dco_initial(), multi_del_iroutes(), multi_ifconfig_pool_persist(), multi_init(), multi_print_status(), multi_process_incoming_link(), multi_process_incoming_tun(), multi_process_per_second_timers_dowork(), multi_select_virtual_addr(), multi_set_virtual_addr_env(), multi_tcp_wait(), next_connection_entry(), p2mp_iow_flags(), p2p_iow_flags(), p2p_set_dco_keepalive(), pre_select(), print_status(), process_coarse_timers(), process_incoming_dco(), process_incoming_link_part2(), process_incoming_tun(), process_ip_header(), process_outgoing_tun(), read_incoming_link(), read_incoming_tun(), setenv_stats(), test_crypto_thread(), and uninit_proxy_dowork().

◆ c2

struct context_2 context::c2

Level 2 context.

Definition at line 517 of file openvpn.h.

Referenced by cc_exit_notify_enabled(), ccs_delete_config_file(), ccs_delete_deferred_ret_file(), ccs_gen_config_file(), ccs_gen_deferred_ret_file(), check_add_routes(), check_add_routes_action(), check_coarse_timers(), check_connection_established(), check_dco_key_status(), check_fragment(), check_inactivity_timeout(), check_incoming_control_channel(), check_ping_restart(), check_ping_send(), check_ping_send_dowork(), check_pull_client_ncp(), check_push_request(), check_scheduled_exit(), check_send_auth_token(), 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(), check_server_poll_timeout(), check_session_timeout(), check_timeout_random_component(), check_timeout_random_component_dowork(), check_tls(), check_tls_errors(), check_tls_errors_co(), check_tls_errors_nco(), close_instance(), connection_established(), context_clear_2(), context_gc_free(), context_immediate_reschedule(), context_reschedule_sec(), dco_get_peer_stats(), do_close_event_set(), do_close_fragment(), do_close_free_buf(), do_close_link_socket(), do_close_packet_id(), do_close_tls(), do_close_tun(), do_compute_occ_strings(), do_deferred_options(), do_deferred_options_part2(), do_deferred_p2p_ncp(), do_env_set_destroy(), do_event_set_init(), do_inherit_env(), do_init_buffers(), do_init_crypto_static(), do_init_crypto_tls(), do_init_fragment(), do_init_frame(), do_init_frame_tls(), do_init_server_poll_timeout(), do_init_timers(), do_init_traffic_shaper(), do_init_tun(), do_link_socket_new(), do_open_tun(), do_pre_decrypt_check(), do_print_data_channel_mtu_parms(), do_setup_fast_io(), do_signal_on_tls_errors(), do_up(), drop_if_recursive_routing(), encrypt_sign(), format_common_name(), frame_adjust_path_mtu(), frame_finalize_options(), get_frame_mtu(), get_link_socket_info(), ifconfig_push_constraint_satisfied(), incoming_push_message(), inherit_context_child(), inherit_context_top(), init_instance(), init_verb_mute(), initialization_sequence_completed(), io_wait(), io_wait_dowork(), ipv6_send_icmp_unreachable(), learn_address_script(), link_socket_init_phase1(), link_socket_init_phase2(), man_persist_client_stats(), management_callback_kill_by_cn(), management_callback_proxy_cmd(), management_check_bytecount(), management_client_auth(), management_client_pending_auth(), management_get_peer_info(), multi_assign_peer_id(), multi_client_connect_call_plugin_v1(), multi_client_connect_call_plugin_v2(), multi_client_connect_call_script(), multi_client_connect_compress_migrate(), multi_client_connect_early_setup(), multi_client_connect_late_setup(), 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_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_get_queue(), multi_instance_string(), multi_learn_in6_addr(), multi_learn_in_addr_t(), multi_print_status(), multi_process_drop_outgoing_tun(), multi_process_float(), multi_process_incoming_link(), multi_process_incoming_tun(), multi_process_io_udp(), multi_process_outgoing_link(), multi_process_outgoing_tun(), multi_process_post(), multi_schedule_context_wakeup(), multi_select_virtual_addr(), multi_set_virtual_addr_env(), multi_tcp_dereference_instance(), multi_tcp_instance_specific_init(), multi_tcp_post(), multi_tcp_process_io(), multi_tcp_process_outgoing_link(), multi_tcp_process_outgoing_link_ready(), multi_tcp_set_global_rw_flags(), multi_tcp_wait(), multi_tcp_wait_lite(), multi_top_free(), multi_top_init(), open_plugins(), p2p_iow_flags(), p2p_set_dco_keepalive(), pre_select(), prepare_push_reply(), print_status(), process_coarse_timers(), process_explicit_exit_notification_init(), process_explicit_exit_notification_timer_wakeup(), process_incoming_dco(), process_incoming_link(), process_incoming_link_part1(), process_incoming_link_part2(), process_incoming_push_msg(), process_incoming_push_reply(), process_incoming_push_request(), process_incoming_tun(), process_io(), process_ip_header(), process_outgoing_link(), process_outgoing_tun(), process_received_occ_msg(), process_sigterm(), read_incoming_link(), read_incoming_tun(), receive_auth_pending(), receive_cr_response(), register_activity(), remap_restart_signals(), reschedule_multi_process(), reset_coarse_timers(), schedule_exit(), send_auth_failed(), send_control_channel_string(), send_hmac_reset_packet(), send_push_request(), setenv_stats(), socks_postprocess_incoming_link(), socks_preprocess_outgoing_link(), test_crypto_thread(), tls_print_deferred_options_results(), tunnel_point_to_point(), tunnel_server_tcp(), tunnel_server_udp(), and vlan_process_outgoing_tun().

◆ did_we_daemonize

bool context::did_we_daemonize

Whether demonization has already taken place.

Definition at line 510 of file openvpn.h.

Referenced by do_init_first_time(), and openvpn_main().

◆ es

struct env_set* context::es

Set of environment variables.

Definition at line 499 of file openvpn.h.

Referenced by open_plugins(), openvpn_main(), tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp().

◆ first_time

bool context::first_time

◆ gc

struct gc_arena context::gc

Garbage collection arena for allocations done in the scope of this context structure.

Definition at line 495 of file openvpn.h.

Referenced by context_gc_free(), create_socket_dco_win(), do_alloc_route_list(), do_init_first_time(), do_preresolve_host(), inherit_context_child(), inherit_context_top(), and openvpn_main().

◆ mode

int context::mode

Role of this context within the OpenVPN process.

Valid values are CM_P2P, CM_TOP, CM_TOP_CLONE, CM_CHILD_UDP, and CM_CHILD_TCP.

Definition at line 490 of file openvpn.h.

Referenced by close_instance(), do_open_tun(), do_up(), inherit_context_child(), inherit_context_top(), init_instance(), tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp().

◆ net_ctx

openvpn_net_ctx_t context::net_ctx

◆ options

struct options context::options

Options loaded from command line or configuration file.

Definition at line 478 of file openvpn.h.

Referenced by add_wfp_block(), ccs_gen_config_file(), ccs_gen_deferred_ret_file(), ce_management_query_proxy(), ce_management_query_remote(), check_add_routes_action(), check_connection_established(), check_dco_key_status(), check_inactivity_timeout(), check_ping_restart(), check_ping_send(), check_pull_client_ncp(), check_send_occ_load_test_dowork(), check_send_occ_msg_dowork(), check_send_occ_req_dowork(), check_session_timeout(), check_stale_routes(), check_tls(), context_gc_free(), context_init_1(), create_socket_dco_win(), del_wfp_block(), do_alloc_route_list(), do_close_link_socket(), do_close_tun(), do_close_tun_simple(), do_compute_occ_strings(), do_deferred_options(), do_deferred_options_part2(), do_deferred_p2p_ncp(), do_init_crypto(), do_init_crypto_none(), do_init_crypto_static(), do_init_crypto_tls(), do_init_crypto_tls_c1(), do_init_first_time(), do_init_fragment(), do_init_frame(), do_init_frame_tls(), do_init_server_poll_timeout(), do_init_timers(), do_init_tls_wrap_key(), do_init_traffic_shaper(), do_init_tun(), do_open_ifconfig_pool_persist(), do_open_status_output(), do_open_tun(), do_option_warnings(), do_pre_decrypt_check(), do_preresolve(), do_preresolve_host(), do_setup_fast_io(), do_signal_on_tls_errors(), do_test_crypto(), do_uid_gid_chroot(), do_up(), encrypt_sign(), frame_adjust_path_mtu(), frame_finalize_options(), ifconfig_push_constraint_satisfied(), incoming_push_message(), inherit_context_child(), inherit_context_top(), init_connection_list(), init_crypto_pre(), init_early(), init_instance(), init_plugins(), init_proxy_dowork(), init_query_passwords(), init_verb_mute(), initialization_sequence_completed(), io_wait_dowork(), ipv6_send_icmp_unreachable(), learn_address_script(), link_socket_init_phase1(), link_socket_init_phase2(), man_persist_client_stats(), management_callback_proxy_cmd(), management_callback_remote_cmd(), management_callback_remote_entry_count(), management_callback_remote_entry_get(), management_check_bytecount(), multi_add_iroutes(), multi_bcast(), multi_client_connect_call_script(), multi_client_connect_compress_migrate(), multi_client_connect_early_setup(), multi_client_connect_late_setup(), multi_client_connect_mda(), multi_client_connect_post(), multi_client_connect_post_plugin(), multi_client_connect_source_ccd(), multi_client_disconnect_script(), multi_client_generate_tls_keys(), multi_client_set_protocol_options(), multi_client_setup_dco_initial(), multi_connection_established(), multi_del_iroutes(), multi_init(), multi_instance_string(), multi_print_status(), multi_process_incoming_link(), multi_process_incoming_tun(), multi_process_per_second_timers_dowork(), multi_process_signal(), multi_select_virtual_addr(), multi_tcp_instance_specific_init(), need_keep_caps(), next_connection_entry(), open_management(), open_plugins(), openvpn_main(), p2p_set_dco_keepalive(), prepare_push_reply(), print_status(), process_coarse_timers(), process_explicit_exit_notification_timer_wakeup(), process_incoming_link_part1(), process_incoming_link_part2(), process_incoming_push_reply(), process_incoming_tun(), process_ip_header(), process_outgoing_link(), process_received_occ_msg(), process_sigterm(), pull_permission_mask(), receive_auth_failed(), receive_auth_pending(), receive_exit_message(), register_activity(), remap_signal(), route_quota_exceeded(), route_quota_test(), schedule_exit(), send_push_reply(), send_push_request(), server_pushed_signal(), setenv_stats(), socket_restart_pause(), test_crypto_thread(), tls_print_deferred_options_results(), trigger_ping_timeout_signal(), tunnel_server(), uninit_early(), vlan_decapsulate(), vlan_encapsulate(), and vlan_process_outgoing_tun().

◆ persist

struct context_persist context::persist

◆ plugins

struct plugin_list* context::plugins

◆ plugins_owned

bool context::plugins_owned

Whether the plug-ins should be cleaned up when this context is cleaned up.

Definition at line 506 of file openvpn.h.

Referenced by do_close_plugins(), do_inherit_plugins(), inherit_context_top(), init_plugins(), and open_plugins().

◆ sig

struct signal_info* context::sig

The documentation for this struct was generated from the following file: