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...
 
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 498 of file openvpn.h.

Field Documentation

◆ c0

struct context_0* context::c0

Level 0 context.

Definition at line 535 of file openvpn.h.

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

◆ c1

struct context_1 context::c1

◆ c2

struct context_2 context::c2

Level 2 context.

Definition at line 537 of file openvpn.h.

Referenced by check_add_routes(), check_add_routes_action(), check_add_routes_dowork(), check_coarse_timers(), check_coarse_timers_dowork(), check_connection_established(), check_connection_established_dowork(), check_fragment(), check_fragment_dowork(), check_inactivity_timeout(), check_incoming_control_channel(), check_incoming_control_channel_dowork(), check_packet_id_persist_flush(), check_ping_restart(), check_ping_send(), check_ping_send_dowork(), check_push_request(), check_push_request_dowork(), check_scheduled_exit(), check_scheduled_exit_dowork(), 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_server_poll_timeout_dowork(), check_status_file(), check_timeout_random_component(), check_timeout_random_component_dowork(), check_tls(), check_tls_dowork(), check_tls_errors(), check_tls_errors_co(), check_tls_errors_nco(), close_instance(), context_clear_2(), context_gc_free(), context_immediate_reschedule(), context_reschedule_sec(), 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_env_set_destroy(), do_event_set_init(), do_inherit_env(), do_init_buffers(), do_init_crypto_static(), do_init_crypto_tls(), do_init_finalize_tls_frame(), do_init_fragment(), do_init_frame(), do_init_server_poll_timeout(), do_init_socket_1(), do_init_socket_2(), do_init_timers(), do_init_traffic_shaper(), do_init_tun(), do_link_socket_new(), do_open_tun(), 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_finalize_options(), get_link_socket_info(), ifconfig_push_constraint_satisfied(), ignore_restart_signals(), incoming_push_message(), inherit_context_child(), inherit_context_top(), init_instance(), init_verb_mute(), initialization_sequence_completed(), io_wait(), io_wait_dowork(), learn_address_script(), management_callback_kill_by_cn(), management_callback_proxy_cmd(), management_delete_event(), management_show_net_callback(), multi_bcast(), multi_client_connect_post(), multi_client_connect_post_plugin(), multi_client_connect_setenv(), multi_client_disconnect_script(), multi_client_disconnect_setenv(), 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_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(), pre_select(), prepare_push_reply(), print_status(), process_coarse_timers(), process_explicit_exit_notification_init(), process_explicit_exit_notification_timer_wakeup(), process_incoming_link(), process_incoming_link_part1(), process_incoming_link_part2(), process_incoming_push_msg(), 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(), register_activity(), reset_coarse_timers(), route_quota_exceeded(), schedule_exit(), send_control_channel_string(), send_push_request(), setenv_stats(), socks_postprocess_incoming_link(), socks_preprocess_outgoing_link(), test_crypto_thread(), tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp_single_threaded().

◆ did_we_daemonize

bool context::did_we_daemonize

Whether demonization has already taken place.

Definition at line 530 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 521 of file openvpn.h.

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

◆ 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 517 of file openvpn.h.

Referenced by context_gc_free(), 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 512 of file openvpn.h.

Referenced by close_instance(), inherit_context_child(), inherit_context_top(), init_instance(), tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp_single_threaded().

◆ options

struct options context::options

Options loaded from command line or configuration file.

Definition at line 500 of file openvpn.h.

Referenced by ce_management_query_proxy(), ce_management_query_remote(), check_add_routes_action(), check_connection_established_dowork(), check_fragment_dowork(), check_inactivity_timeout(), check_ping_restart(), check_ping_restart_dowork(), check_ping_send(), check_send_occ_req_dowork(), check_server_poll_timeout(), check_stale_routes(), context_gc_free(), context_init_1(), do_alloc_route_list(), do_close_check_if_restart_permitted(), do_close_free_key_schedule(), do_close_link_socket(), do_close_tun(), do_compute_occ_strings(), do_deferred_options(), 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_server_poll_timeout(), do_init_socket_1(), 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_preresolve(), do_preresolve_host(), do_setup_fast_io(), do_signal_on_tls_errors(), do_test_crypto(), do_uid_gid_chroot(), do_up(), frame_finalize_options(), ifconfig_push_constraint_satisfied(), incoming_push_message(), inherit_context_child(), inherit_context_top(), init_connection_list(), init_crypto_pre(), init_instance(), init_plugins(), init_proxy_dowork(), init_query_passwords(), init_verb_mute(), initialization_sequence_completed(), io_wait_dowork(), learn_address_script(), management_callback_proxy_cmd(), management_callback_remote_cmd(), management_show_net_callback(), multi_add_iroutes(), multi_client_connect_post(), multi_client_connect_post_plugin(), multi_client_disconnect_script(), multi_connection_established(), multi_del_iroutes(), multi_init(), multi_print_status(), multi_process_per_second_timers_dowork(), multi_process_signal(), multi_select_virtual_addr(), multi_tcp_instance_specific_init(), next_connection_entry(), open_management(), open_plugins(), openvpn_main(), prepare_push_reply(), process_explicit_exit_notification_timer_wakeup(), process_incoming_link_part1(), process_incoming_link_part2(), process_incoming_push_msg(), process_incoming_tun(), process_ip_header(), process_outgoing_link(), process_received_occ_msg(), process_sigterm(), pull_permission_mask(), read_incoming_link(), receive_auth_failed(), register_activity(), remap_signal(), restore_ncp_options(), route_quota_exceeded(), route_quota_test(), save_ncp_options(), send_auth_failed(), send_push_reply(), send_push_request(), send_restart(), server_pushed_signal(), socket_restart_pause(), test_crypto_thread(), and tunnel_server().

◆ 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 526 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: