105 struct buffer compress_buf;
106 struct buffer decompress_buf;
250#ifdef ENABLE_FRAGMENT
271#ifdef PACKET_TRUNCATION_CHECK
358 struct compress_context *comp_context;
452#ifdef ENABLE_MANAGEMENT
456#ifdef ENABLE_ASYNC_PUSH
484#define CM_TOP_CLONE 2
485#define CM_CHILD_UDP 3
486#define CM_CHILD_TCP 4
520#define EVENT_LOOP_CHECK_SIGNAL(c, func, arg) \
523 const int brk = func(arg); \
536#define TLS_MODE(c) ((c)->c2.tls_multi != NULL)
537#define PROTO_DUMP_FLAGS (check_debug_level(D_LINK_RW_VERBOSE) ? (PD_SHOW_DATA|PD_VERBOSE) : 0)
538#define PROTO_DUMP(buf, gc) protocol_dump((buf), \
540 |(c->c2.tls_multi ? PD_TLS : 0) \
541 |(c->options.tls_auth_file ? md_kt_size(c->c1.ks.key_type.digest) : 0) \
542 |(c->options.tls_crypt_file || c->options.tls_crypt_v2_file ? PD_TLS_CRYPT : 0), \
546#define MAX_PEER_ID 0xFFFFFF
Data Channel Cryptography Module.
mbedtls_md_context_t hmac_ctx_t
Generic HMAC context.
mbedtls_md_context_t md_ctx_t
Generic message digest context.
Data Channel Fragmentation module header file.
static void packet_id_persist_init(struct packet_id_persist *p)
static bool is_cas_pending(enum multi_status cas)
Control Channel SSL/Data channel negotiation module.
@ CAS_PENDING_DEFERRED
Waiting on an async option import handler.
@ CAS_PENDING_DEFERRED_PARTIAL
at least handler succeeded but another is still pending
@ CAS_PENDING
Options import (Connect script/plugin, ccd,...)
Wrapper structure for dynamically allocated memory.
Level 0 context containing information related to the OpenVPN process.
Level 1 context containing state that persists across SIGUSR1 restarts.
struct ifconfig_pool_persist * ifconfig_pool_persist
struct status_output * status_output
struct route_list * route_list
List of routing information.
struct link_socket_addr * link_socket_addrs
Local and remote addresses on the external network.
struct sha256_digest pulled_options_digest_save
Hash of option strings received from the remote OpenVPN server.
struct route_ipv6_list * route_ipv6_list
struct packet_id_persist pid_persist
struct http_proxy_info * http_proxy
bool tuntap_owned
Whether the tun/tap interface should be cleaned up when this context is cleaned up.
bool ifconfig_pool_persist_owned
struct socks_proxy_info * socks_proxy
struct cached_dns_entry * dns_cache
struct tuntap * tuntap
Tun/tap virtual network interface.
Level 2 context containing state that is reset on both SIGHUP and SIGUSR1 restarts.
bool push_request_received
counter_type link_read_bytes
char * options_string_local
counter_type link_write_bytes
bool push_ifconfig_ipv6_defined
struct event_timeout occ_mtu_load_test_interval
struct event_timeout server_poll_interval
struct fragment_master * fragment
time_t update_timeout_random_component
unsigned int event_set_status
bool push_ifconfig_defined
char * options_string_remote
counter_type dco_read_bytes
struct event_timeout route_wakeup_expire
struct event_timeout ping_send_interval
md_ctx_t * pulled_options_state
struct timeval timeout_random_component
counter_type tun_read_bytes
struct man_def_auth_context mda_context
hmac_ctx_t * session_id_hmac
the HMAC we use to generate and verify our syn cookie like session ids from the server.
const struct link_socket * accept_from
bool pulled_options_digest_init_done
struct tls_auth_standalone * tls_auth_standalone
TLS state structure required for the initial authentication of a client's connection attempt.
counter_type dco_write_bytes
struct event_timeout scheduled_exit
time_t push_request_timeout
struct event_timeout auth_token_renewal_interval
struct event_timeout wait_for_connect
struct event_timeout push_request_interval
struct tls_multi * tls_multi
TLS state structure for this VPN tunnel.
time_t sent_push_reply_expiry
time_t coarse_timer_wakeup
int scheduled_exit_signal
struct in6_addr push_ifconfig_ipv6_remote
struct link_socket_actual from
struct frame frame_fragment
int push_ifconfig_ipv6_netbits
struct in6_addr push_ifconfig_ipv6_local
counter_type tun_write_bytes
struct event_timeout occ_interval
struct link_socket ** link_sockets
in_addr_t push_ifconfig_local_alias
counter_type link_read_bytes_auth
struct link_socket_info ** link_socket_infos
struct event_timeout packet_id_persist_interval
struct link_socket_actual * to_link_addr
struct event_timeout session_interval
in_addr_t push_ifconfig_remote_netmask
struct timeval timeval
Time to next event of timers and similar.
time_t explicit_exit_notification_time_wait
struct gc_arena gc
Garbage collection arena for allocations done in the level 2 scope of this context_2 structure.
struct sha256_digest pulled_options_digest
struct event_set * event_set
struct context_buffers * buffers
struct event_timeout explicit_exit_notification_interval
struct event_timeout route_wakeup
struct event_timeout inactivity_interval
struct event_timeout ping_rec_interval
in_addr_t push_ifconfig_local
struct buffer read_link_buf
struct buffer encrypt_buf
struct buffer read_tun_buf
struct buffer decrypt_buf
int restart_sleep_seconds
Contains all state information for one tunnel.
int mode
Role of this context within the OpenVPN process.
struct context_0 * c0
Level 0 context.
bool did_we_daemonize
Whether demonization has already taken place.
bool first_time
True on the first iteration of OpenVPN's main loop.
struct signal_info * sig
Internal error signaling object.
openvpn_net_ctx_t net_ctx
Networking API opaque context.
struct plugin_list * plugins
List of plug-ins.
struct context_2 c2
Level 2 context.
struct env_set * es
Set of environment variables.
bool plugins_owned
Whether the plug-ins should be cleaned up when this context is cleaned up.
struct gc_arena gc
Garbage collection arena for allocations done in the scope of this context structure.
struct context_1 c1
Level 1 context.
struct context_persist persist
Persistent context.
Security parameter state for processing data channel packets.
Fragmentation and reassembly state for one VPN tunnel instance.
Packet geometry parameters.
Garbage collection arena used to keep track of dynamically allocated memory.
Container for bidirectional cipher and HMAC key material.
Container for two sets of OpenSSL cipher and/or HMAC contexts for both sending and receiving directio...
Container for one set of cipher and/or HMAC contexts.
struct buffer tls_crypt_v2_wkc
Wrapped client key.
struct key2 original_wrap_keydata
original tls-crypt key preserved to xored into the tls_crypt renegotiation key
struct key_ctx auth_token_key
struct tls_root_ctx ssl_ctx
struct key_type tls_auth_key_type
struct key_ctx_bi tls_wrap_key
struct key_ctx_bi static_key
struct key_ctx tls_crypt_v2_server_key
Wrapper struct to pass around SHA256 digests.
Security parameter state for a single VPN tunnel.
Structure that wraps the TLS context.