OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::ClientProto::Session Class Reference

#include <cliproto.hpp>

Inheritance diagram for openvpn::ClientProto::Session:
[legend]
Collaboration diagram for openvpn::ClientProto::Session:
[legend]

Classes

struct  Config
 

Public Types

typedef RCPtr< SessionPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 OPENVPN_EXCEPTION (client_exception)
 
 OPENVPN_EXCEPTION (client_halt_restart)
 
 OPENVPN_EXCEPTION (tun_exception)
 
 OPENVPN_EXCEPTION (transport_exception)
 
 OPENVPN_EXCEPTION (max_pushed_options_exceeded)
 
 OPENVPN_SIMPLE_EXCEPTION (session_invalidated)
 
 OPENVPN_SIMPLE_EXCEPTION (authentication_failed)
 
 OPENVPN_SIMPLE_EXCEPTION (inactive_timer_expired)
 
 OPENVPN_SIMPLE_EXCEPTION (relay_event)
 
 OPENVPN_EXCEPTION (proxy_exception)
 
 Session (openvpn_io::io_context &io_context_arg, const Config &config, NotifyCallback *notify_callback_arg)
 
bool first_packet_received () const
 
void start ()
 
TransportClientFactory::Ptr transport_factory_relay ()
 
void transport_factory_override (TransportClientFactory::Ptr factory)
 
void send_explicit_exit_notify ()
 
void tun_set_disconnect ()
 
void validate_and_post_cc_msg (const std::string &msg)
 
void post_cc_msg (const std::string &msg)
 
void post_app_control_message (const std::string proto, const std::string message)
 
void stop (const bool call_terminate_callback)
 
void stop_on_signal (const openvpn_io::error_code &error, int signal_number)
 
bool reached_connected_state () const
 
Error::Type fatal () const
 
const std::string & fatal_reason () const
 
RemoteList::Advance advance_type () const
 
std::chrono::milliseconds reconnect_delay () const
 
void start_acc_certcheck (SSLLib::SSLAPI::Config::Ptr config)
 Start up the cert check handshake using the given certs and key.
 
virtual ~Session ()
 
- Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
 RC () noexcept=default
 
 RC (const RC &)=delete
 
virtual ~RC ()=default
 
RCoperator= (const RC &)=delete
 
olong use_count () const noexcept
 Delegates call to RCImpl and returns the result.
 

Private Member Functions

bool transport_is_openvpn_protocol () override
 
void transport_recv (BufferAllocated &buf) override
 
void transport_needs_send () override
 
void tun_recv (BufferAllocated &buf) override
 
bool is_keepalive_enabled () const override
 
void disable_keepalive (unsigned int &keepalive_ping, unsigned int &keepalive_timeout) override
 
void transport_pre_resolve () override
 
std::string server_endpoint_render ()
 
void transport_wait_proxy () override
 
void transport_wait () override
 
void transport_connecting () override
 
void transport_error (const Error::Type fatal_err, const std::string &err_text) override
 
void proxy_error (const Error::Type fatal_err, const std::string &err_text) override
 
void extract_auth_token (const OptionList &opt)
 
std::string parse_auth_failed_temp (const std::string &msg)
 
void control_net_send (const Buffer &net_buf) override
 
void recv_auth_failed (const std::string &msg)
 
void recv_auth_pending (const std::string &msg)
 
void recv_relay ()
 
void recv_info (const std::string &msg, bool info_pre)
 
void recv_push_update (const std::string &msg)
 Handles incoming PUSH_UPDATE message.
 
void control_recv (BufferPtr &&app_bp) override
 
void recv_custom_control_message (const std::string msg)
 receive, validate, and dispatch ACC messages
 
void do_acc_certcheck (const std::string &msg_str)
 Handles the ACC certcheck TLS handshake data exchange.
 
void notify_client_acc_protocols ()
 
void recv_push_reply (const std::string &msg)
 
void tun_pre_tun_config () override
 
void tun_pre_route_config () override
 
void tun_event (ClientEvent::Base::Ptr ev) override
 
void tun_connected () override
 
void tun_error (const Error::Type fatal_err, const std::string &err_text) override
 
void client_auth (Buffer &buf) override
 
void send_push_request_callback (const Time::Duration &dur, const openvpn_io::error_code &e)
 
void schedule_push_request_callback (const Time::Duration &dur)
 
virtual void check_tls_warnings ()
 
void check_proto_warnings ()
 
void active (bool primary) override
 Called when KeyContext transitions to ACTIVE state.
 
bool supports_proto_v3 () override
 
void housekeeping_callback (const openvpn_io::error_code &e)
 
void set_housekeeping_timer ()
 
void set_cc_handshake_config (SSLLib::SSLAPI::Config::Ptr cfg)
 Set the cc handshake config object.
 
void process_inactive (const OptionList &opt)
 
void schedule_inactive_timer ()
 
void reset_inactive_timer (const count_t bytes_count)
 
void inactive_callback (const openvpn_io::error_code &e)
 
void process_echo (const OptionList &opt)
 
void process_exception (const std::exception &e, const char *method_name)
 
void recv_halt_restart (const std::string &msg)
 
void schedule_info_hold_callback ()
 
void info_hold_callback (const openvpn_io::error_code &e)
 
- Private Member Functions inherited from openvpn::ProtoContextCallbackInterface
virtual ~ProtoContextCallbackInterface ()=default
 
virtual void server_auth (const std::string &username, const SafeString &password, const std::string &peer_info, const AuthCert::Ptr &auth_cert)
 
- Private Member Functions inherited from openvpn::TransportClientParent
virtual ~TransportClientParent ()=default
 
- Private Member Functions inherited from openvpn::TunClientParent
virtual ~TunClientParent ()=default
 

Private Attributes

ProtoContext proto_context
 
openvpn_io::io_context & io_context
 
TransportClientFactory::Ptr transport_factory
 
TransportClient::Ptr transport
 
TunClientFactory::Ptr tun_factory
 
TunClient::Ptr tun
 
unsigned int tcp_queue_limit
 
bool transport_has_send_queue = false
 
NotifyCallbacknotify_callback
 
CoarseTime housekeeping_schedule
 
AsioTimer housekeeping_timer
 
AsioTimer push_request_timer
 
bool halt = false
 
OptionListContinuation received_options
 
ClientCreds::Ptr creds
 
ProtoContextCompressionOptions::Ptr proto_context_options
 
bool first_packet_received_ = false
 
bool sent_push_request = false
 
bool auth_pending = false
 
SessionStats::Ptr cli_stats
 
ClientEvent::Queue::Ptr cli_events
 
ClientEvent::Connected::Ptr connected_
 
bool echo
 
bool info
 
Error::Type fatal_ = Error::UNDEF
 
std::string fatal_reason_
 
OptionList::Limits pushed_options_limit
 
OptionList::FilterBase::Ptr pushed_options_filter
 
PushOptionsMerger::Ptr pushed_options_merger
 
AsioTimer inactive_timer
 
Time::Duration inactive_duration
 
count_t inactive_last_sample = 0
 
unsigned int inactivity_minimum_bytes = 0
 
std::uint64_t inactivity_bytes = 0
 
std::shared_ptr< SessionStats::inc_callback_tout_tun_callback_
 
std::shared_ptr< SessionStats::inc_callback_tin_tun_callback_
 
std::unique_ptr< std::vector< ClientEvent::Base::Ptr > > info_hold
 
AsioTimer info_hold_timer
 
std::chrono::milliseconds temp_fail_backoff_ {0}
 
RemoteList::Advance temp_fail_advance_ = RemoteList::Advance::Addr
 
AccHandshaker certcheck_hs
 

Static Private Attributes

static const std::string certcheckProto = "cck1"
 

Additional Inherited Members

- Static Public Member Functions inherited from openvpn::RC< thread_unsafe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 
- Static Private Member Functions inherited from openvpn::ProtoContextCallbackInterface
static void write_empty_string (Buffer &buf)
 

Detailed Description

Definition at line 90 of file cliproto.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 98 of file cliproto.hpp.

Constructor & Destructor Documentation

◆ Session()

openvpn::ClientProto::Session::Session ( openvpn_io::io_context &  io_context_arg,
const Config config,
NotifyCallback notify_callback_arg 
)
inline

Definition at line 142 of file cliproto.hpp.

◆ ~Session()

virtual openvpn::ClientProto::Session::~Session ( )
inlinevirtual

Definition at line 339 of file cliproto.hpp.

Member Function Documentation

◆ active()

void openvpn::ClientProto::Session::active ( bool  primary)
inlineoverrideprivatevirtual

Called when KeyContext transitions to ACTIVE state.

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 1379 of file cliproto.hpp.

◆ advance_type()

RemoteList::Advance openvpn::ClientProto::Session::advance_type ( ) const
inline

Definition at line 318 of file cliproto.hpp.

◆ check_proto_warnings()

void openvpn::ClientProto::Session::check_proto_warnings ( )
inlineprivate

Definition at line 1344 of file cliproto.hpp.

Here is the caller graph for this function:

◆ check_tls_warnings()

virtual void openvpn::ClientProto::Session::check_tls_warnings ( )
inlineprivatevirtual

Definition at line 1327 of file cliproto.hpp.

Here is the caller graph for this function:

◆ client_auth()

void openvpn::ClientProto::Session::client_auth ( Buffer buf)
inlineoverrideprivatevirtual

Called on client to request username/password credentials. Should be overridden by derived class if credentials are required. username and password should be written into buf with write_auth_string().

Reimplemented from openvpn::ProtoContextCallbackInterface.

Definition at line 1230 of file cliproto.hpp.

◆ control_net_send()

void openvpn::ClientProto::Session::control_net_send ( const Buffer net_buf)
inlineoverrideprivatevirtual

Sends out bytes to the network.

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 722 of file cliproto.hpp.

◆ control_recv()

void openvpn::ClientProto::Session::control_recv ( BufferPtr &&  app_bp)
inlineoverrideprivatevirtual

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 936 of file cliproto.hpp.

◆ disable_keepalive()

void openvpn::ClientProto::Session::disable_keepalive ( unsigned int &  keepalive_ping,
unsigned int &  keepalive_timeout 
)
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 514 of file cliproto.hpp.

◆ do_acc_certcheck()

void openvpn::ClientProto::Session::do_acc_certcheck ( const std::string &  msg_str)
inlineprivate

Handles the ACC certcheck TLS handshake data exchange.

Parameters
msg_strTLS handshake traffic
Todo:
std::string is perfectly OK for storing buffers containing null bytes but it's atypical.

Definition at line 1021 of file cliproto.hpp.

Here is the caller graph for this function:

◆ extract_auth_token()

void openvpn::ClientProto::Session::extract_auth_token ( const OptionList opt)
inlineprivate

Definition at line 596 of file cliproto.hpp.

Here is the caller graph for this function:

◆ fatal()

Error::Type openvpn::ClientProto::Session::fatal ( ) const
inline

Definition at line 307 of file cliproto.hpp.

◆ fatal_reason()

const std::string & openvpn::ClientProto::Session::fatal_reason ( ) const
inline

Definition at line 311 of file cliproto.hpp.

◆ first_packet_received()

bool openvpn::ClientProto::Session::first_packet_received ( ) const
inline

Definition at line 177 of file cliproto.hpp.

◆ housekeeping_callback()

void openvpn::ClientProto::Session::housekeeping_callback ( const openvpn_io::error_code &  e)
inlineprivate

Definition at line 1396 of file cliproto.hpp.

◆ inactive_callback()

void openvpn::ClientProto::Session::inactive_callback ( const openvpn_io::error_code &  e)
inlineprivate

Definition at line 1514 of file cliproto.hpp.

◆ info_hold_callback()

void openvpn::ClientProto::Session::info_hold_callback ( const openvpn_io::error_code &  e)
inlineprivate

Definition at line 1611 of file cliproto.hpp.

◆ is_keepalive_enabled()

bool openvpn::ClientProto::Session::is_keepalive_enabled ( ) const
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 507 of file cliproto.hpp.

◆ notify_client_acc_protocols()

void openvpn::ClientProto::Session::notify_client_acc_protocols ( )
inlineprivate

Definition at line 1048 of file cliproto.hpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION() [1/6]

openvpn::ClientProto::Session::OPENVPN_EXCEPTION ( client_exception  )

◆ OPENVPN_EXCEPTION() [2/6]

openvpn::ClientProto::Session::OPENVPN_EXCEPTION ( client_halt_restart  )

◆ OPENVPN_EXCEPTION() [3/6]

openvpn::ClientProto::Session::OPENVPN_EXCEPTION ( max_pushed_options_exceeded  )

◆ OPENVPN_EXCEPTION() [4/6]

openvpn::ClientProto::Session::OPENVPN_EXCEPTION ( proxy_exception  )

◆ OPENVPN_EXCEPTION() [5/6]

openvpn::ClientProto::Session::OPENVPN_EXCEPTION ( transport_exception  )

◆ OPENVPN_EXCEPTION() [6/6]

openvpn::ClientProto::Session::OPENVPN_EXCEPTION ( tun_exception  )

◆ OPENVPN_SIMPLE_EXCEPTION() [1/4]

openvpn::ClientProto::Session::OPENVPN_SIMPLE_EXCEPTION ( authentication_failed  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/4]

openvpn::ClientProto::Session::OPENVPN_SIMPLE_EXCEPTION ( inactive_timer_expired  )

◆ OPENVPN_SIMPLE_EXCEPTION() [3/4]

openvpn::ClientProto::Session::OPENVPN_SIMPLE_EXCEPTION ( relay_event  )

◆ OPENVPN_SIMPLE_EXCEPTION() [4/4]

openvpn::ClientProto::Session::OPENVPN_SIMPLE_EXCEPTION ( session_invalidated  )

◆ parse_auth_failed_temp()

std::string openvpn::ClientProto::Session::parse_auth_failed_temp ( const std::string &  msg)
inlineprivate

Parses a AUTH_FAILED,TEMP string, extracts the flags and returns the human readable reason part of it, if there is one. The string passed has the format "[flag(s)]:reason".

Flags are optional and delimited by a comma (","). They are given as "key=value" strings. Currently there's support for parsing two keys:

  • backoff: seconds to wait between reconnects
  • advance: how to advance through the remote addresses list. Possible values are:
    • no: do not advance
    • addr: use the next address in the list (default)
    • remote: use the next remote's first address

The reason string is free text and returned verbatim.

Parameters
msgThe string to be parsed
Returns
Returns the human readable reason for the auth failure or an empty string if not applicable.

Definition at line 651 of file cliproto.hpp.

Here is the caller graph for this function:

◆ post_app_control_message()

void openvpn::ClientProto::Session::post_app_control_message ( const std::string  proto,
const std::string  message 
)
inline

Definition at line 256 of file cliproto.hpp.

Here is the caller graph for this function:

◆ post_cc_msg()

void openvpn::ClientProto::Session::post_cc_msg ( const std::string &  msg)
inline

Post a control message to the control channel. This only intended to be used by consumers that either validated the message itself beforehand or construct a message in a way that it is always valid.

Parameters
msgThe message to send on the control channel.

Definition at line 248 of file cliproto.hpp.

Here is the caller graph for this function:

◆ process_echo()

void openvpn::ClientProto::Session::process_echo ( const OptionList opt)
inlineprivate

Definition at line 1555 of file cliproto.hpp.

Here is the caller graph for this function:

◆ process_exception()

void openvpn::ClientProto::Session::process_exception ( const std::exception &  e,
const char *  method_name 
)
inlineprivate

Definition at line 1571 of file cliproto.hpp.

Here is the caller graph for this function:

◆ process_inactive()

void openvpn::ClientProto::Session::process_inactive ( const OptionList opt)
inlineprivate

Definition at line 1460 of file cliproto.hpp.

Here is the caller graph for this function:

◆ proxy_error()

void openvpn::ClientProto::Session::proxy_error ( const Error::Type  fatal_err,
const std::string &  err_text 
)
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 580 of file cliproto.hpp.

◆ reached_connected_state()

bool openvpn::ClientProto::Session::reached_connected_state ( ) const
inline

Definition at line 296 of file cliproto.hpp.

◆ reconnect_delay()

std::chrono::milliseconds openvpn::ClientProto::Session::reconnect_delay ( ) const
inline

Definition at line 322 of file cliproto.hpp.

◆ recv_auth_failed()

void openvpn::ClientProto::Session::recv_auth_failed ( const std::string &  msg)
inlineprivate

Definition at line 729 of file cliproto.hpp.

Here is the caller graph for this function:

◆ recv_auth_pending()

void openvpn::ClientProto::Session::recv_auth_pending ( const std::string &  msg)
inlineprivate

Definition at line 802 of file cliproto.hpp.

Here is the caller graph for this function:

◆ recv_custom_control_message()

void openvpn::ClientProto::Session::recv_custom_control_message ( const std::string  msg)
inlineprivate

receive, validate, and dispatch ACC messages

Parameters
msgthe received message

This function's main purpose is to receive a custom control message from the server, parse out the protocol and contents, validate the protocol is supported, and queue a ClientEvent for supported protocols to be handled later. It acts as the interface between the lower-level network code receiving the raw message, and the higher-level event handling logic.

Definition at line 994 of file cliproto.hpp.

Here is the caller graph for this function:

◆ recv_halt_restart()

void openvpn::ClientProto::Session::recv_halt_restart ( const std::string &  msg)
inlineprivate

Definition at line 1582 of file cliproto.hpp.

Here is the caller graph for this function:

◆ recv_info()

void openvpn::ClientProto::Session::recv_info ( const std::string &  msg,
bool  info_pre 
)
inlineprivate

Definition at line 864 of file cliproto.hpp.

Here is the caller graph for this function:

◆ recv_push_reply()

void openvpn::ClientProto::Session::recv_push_reply ( const std::string &  msg)
inlineprivate

Definition at line 1058 of file cliproto.hpp.

Here is the caller graph for this function:

◆ recv_push_update()

void openvpn::ClientProto::Session::recv_push_update ( const std::string &  msg)
inlineprivate

Handles incoming PUSH_UPDATE message.

Parameters
msgComma-separated list of options prefixed with PUSH_UPDATE tag

Definition at line 909 of file cliproto.hpp.

Here is the caller graph for this function:

◆ recv_relay()

void openvpn::ClientProto::Session::recv_relay ( )
inlineprivate

Definition at line 843 of file cliproto.hpp.

Here is the caller graph for this function:

◆ reset_inactive_timer()

void openvpn::ClientProto::Session::reset_inactive_timer ( const count_t  bytes_count)
inlineprivate

Definition at line 1498 of file cliproto.hpp.

◆ schedule_inactive_timer()

void openvpn::ClientProto::Session::schedule_inactive_timer ( )
inlineprivate

Definition at line 1489 of file cliproto.hpp.

Here is the caller graph for this function:

◆ schedule_info_hold_callback()

void openvpn::ClientProto::Session::schedule_info_hold_callback ( )
inlineprivate

Definition at line 1601 of file cliproto.hpp.

Here is the caller graph for this function:

◆ schedule_push_request_callback()

void openvpn::ClientProto::Session::schedule_push_request_callback ( const Time::Duration &  dur)
inlineprivate

Definition at line 1314 of file cliproto.hpp.

Here is the caller graph for this function:

◆ send_explicit_exit_notify()

void openvpn::ClientProto::Session::send_explicit_exit_notify ( )
inline

Definition at line 213 of file cliproto.hpp.

Here is the caller graph for this function:

◆ send_push_request_callback()

void openvpn::ClientProto::Session::send_push_request_callback ( const Time::Duration &  dur,
const openvpn_io::error_code &  e 
)
inlineprivate

Definition at line 1269 of file cliproto.hpp.

◆ server_endpoint_render()

std::string openvpn::ClientProto::Session::server_endpoint_render ( )
inlineprivate

Definition at line 526 of file cliproto.hpp.

Here is the caller graph for this function:

◆ set_cc_handshake_config()

void openvpn::ClientProto::Session::set_cc_handshake_config ( SSLLib::SSLAPI::Config::Ptr  cfg)
inlineprivate

Set the cc handshake config object.

Parameters
cfgThe config to use for initializing the SSLAPI

Definition at line 1455 of file cliproto.hpp.

◆ set_housekeeping_timer()

void openvpn::ClientProto::Session::set_housekeeping_timer ( )
inlineprivate

Definition at line 1426 of file cliproto.hpp.

Here is the caller graph for this function:

◆ start()

void openvpn::ClientProto::Session::start ( )
inline

Definition at line 182 of file cliproto.hpp.

◆ start_acc_certcheck()

void openvpn::ClientProto::Session::start_acc_certcheck ( SSLLib::SSLAPI::Config::Ptr  config)
inline

Start up the cert check handshake using the given certs and key.

Parameters
configSSL Config setup with the correct keys and certificates

Begins the handshake with Client Hello via the ACC.

Definition at line 333 of file cliproto.hpp.

◆ stop()

void openvpn::ClientProto::Session::stop ( const bool  call_terminate_callback)
inline

Definition at line 269 of file cliproto.hpp.

Here is the caller graph for this function:

◆ stop_on_signal()

void openvpn::ClientProto::Session::stop_on_signal ( const openvpn_io::error_code &  error,
int  signal_number 
)
inline

Definition at line 291 of file cliproto.hpp.

◆ supports_proto_v3()

bool openvpn::ClientProto::Session::supports_proto_v3 ( )
inlineoverrideprivatevirtual

the protocol context needs to know if the parent and its tun/transport layer are able to support 64bit and AEAD tag at the end in order to properly handshake this protocol feature

Implements openvpn::ProtoContextCallbackInterface.

Definition at line 1391 of file cliproto.hpp.

◆ transport_connecting()

void openvpn::ClientProto::Session::transport_connecting ( )
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 547 of file cliproto.hpp.

Here is the caller graph for this function:

◆ transport_error()

void openvpn::ClientProto::Session::transport_error ( const Error::Type  fatal_err,
const std::string &  err_text 
)
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 564 of file cliproto.hpp.

Here is the caller graph for this function:

◆ transport_factory_override()

void openvpn::ClientProto::Session::transport_factory_override ( TransportClientFactory::Ptr  factory)
inline

Definition at line 208 of file cliproto.hpp.

◆ transport_factory_relay()

TransportClientFactory::Ptr openvpn::ClientProto::Session::transport_factory_relay ( )
inline

Definition at line 201 of file cliproto.hpp.

◆ transport_is_openvpn_protocol()

bool openvpn::ClientProto::Session::transport_is_openvpn_protocol ( )
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 345 of file cliproto.hpp.

◆ transport_needs_send()

void openvpn::ClientProto::Session::transport_needs_send ( )
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 427 of file cliproto.hpp.

◆ transport_pre_resolve()

void openvpn::ClientProto::Session::transport_pre_resolve ( )
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 520 of file cliproto.hpp.

◆ transport_recv()

void openvpn::ClientProto::Session::transport_recv ( BufferAllocated buf)
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 351 of file cliproto.hpp.

◆ transport_wait()

void openvpn::ClientProto::Session::transport_wait ( )
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 541 of file cliproto.hpp.

◆ transport_wait_proxy()

void openvpn::ClientProto::Session::transport_wait_proxy ( )
inlineoverrideprivatevirtual

Implements openvpn::TransportClientParent.

Definition at line 535 of file cliproto.hpp.

◆ tun_connected()

void openvpn::ClientProto::Session::tun_connected ( )
inlineoverrideprivatevirtual

Implements openvpn::TunClientParent.

Definition at line 1176 of file cliproto.hpp.

◆ tun_error()

void openvpn::ClientProto::Session::tun_error ( const Error::Type  fatal_err,
const std::string &  err_text 
)
inlineoverrideprivatevirtual

Implements openvpn::TunClientParent.

Definition at line 1211 of file cliproto.hpp.

Here is the caller graph for this function:

◆ tun_event()

void openvpn::ClientProto::Session::tun_event ( ClientEvent::Base::Ptr  ev)
inlineoverrideprivatevirtual

Reimplemented from openvpn::TunClientParent.

Definition at line 1171 of file cliproto.hpp.

◆ tun_pre_route_config()

void openvpn::ClientProto::Session::tun_pre_route_config ( )
inlineoverrideprivatevirtual

Implements openvpn::TunClientParent.

Definition at line 1165 of file cliproto.hpp.

◆ tun_pre_tun_config()

void openvpn::ClientProto::Session::tun_pre_tun_config ( )
inlineoverrideprivatevirtual

Implements openvpn::TunClientParent.

Definition at line 1159 of file cliproto.hpp.

◆ tun_recv()

void openvpn::ClientProto::Session::tun_recv ( BufferAllocated buf)
inlineoverrideprivatevirtual

Implements openvpn::TunClientParent.

Definition at line 432 of file cliproto.hpp.

◆ tun_set_disconnect()

void openvpn::ClientProto::Session::tun_set_disconnect ( )
inline

Definition at line 219 of file cliproto.hpp.

◆ validate_and_post_cc_msg()

void openvpn::ClientProto::Session::validate_and_post_cc_msg ( const std::string &  msg)
inline

Posts a control message from the client API. To ensure the client that will always send valid message (e.g. no extra newlines or invalid) character this method will first check the message for validity before sending it to the control channel

Parameters
msgcontrol channel message

Definition at line 231 of file cliproto.hpp.

Member Data Documentation

◆ auth_pending

bool openvpn::ClientProto::Session::auth_pending = false
private

Definition at line 1674 of file cliproto.hpp.

◆ certcheck_hs

AccHandshaker openvpn::ClientProto::Session::certcheck_hs
private

Definition at line 1708 of file cliproto.hpp.

◆ certcheckProto

const std::string openvpn::ClientProto::Session::certcheckProto = "cck1"
inlinestaticprivate

Definition at line 95 of file cliproto.hpp.

◆ cli_events

ClientEvent::Queue::Ptr openvpn::ClientProto::Session::cli_events
private

Definition at line 1677 of file cliproto.hpp.

◆ cli_stats

SessionStats::Ptr openvpn::ClientProto::Session::cli_stats
private

Definition at line 1676 of file cliproto.hpp.

◆ connected_

ClientEvent::Connected::Ptr openvpn::ClientProto::Session::connected_
private

Definition at line 1679 of file cliproto.hpp.

◆ creds

ClientCreds::Ptr openvpn::ClientProto::Session::creds
private

Definition at line 1668 of file cliproto.hpp.

◆ echo

bool openvpn::ClientProto::Session::echo
private

Definition at line 1681 of file cliproto.hpp.

◆ fatal_

Error::Type openvpn::ClientProto::Session::fatal_ = Error::UNDEF
private

Definition at line 1684 of file cliproto.hpp.

◆ fatal_reason_

std::string openvpn::ClientProto::Session::fatal_reason_
private

Definition at line 1685 of file cliproto.hpp.

◆ first_packet_received_

bool openvpn::ClientProto::Session::first_packet_received_ = false
private

Definition at line 1672 of file cliproto.hpp.

◆ halt

bool openvpn::ClientProto::Session::halt = false
private

Definition at line 1664 of file cliproto.hpp.

◆ housekeeping_schedule

CoarseTime openvpn::ClientProto::Session::housekeeping_schedule
private

Definition at line 1661 of file cliproto.hpp.

◆ housekeeping_timer

AsioTimer openvpn::ClientProto::Session::housekeeping_timer
private

Definition at line 1662 of file cliproto.hpp.

◆ in_tun_callback_

std::shared_ptr<SessionStats::inc_callback_t> openvpn::ClientProto::Session::in_tun_callback_
private

Definition at line 1698 of file cliproto.hpp.

◆ inactive_duration

Time::Duration openvpn::ClientProto::Session::inactive_duration
private

Definition at line 1692 of file cliproto.hpp.

◆ inactive_last_sample

count_t openvpn::ClientProto::Session::inactive_last_sample = 0
private

Definition at line 1694 of file cliproto.hpp.

◆ inactive_timer

AsioTimer openvpn::ClientProto::Session::inactive_timer
private

Definition at line 1691 of file cliproto.hpp.

◆ inactivity_bytes

std::uint64_t openvpn::ClientProto::Session::inactivity_bytes = 0
private

Definition at line 1696 of file cliproto.hpp.

◆ inactivity_minimum_bytes

unsigned int openvpn::ClientProto::Session::inactivity_minimum_bytes = 0
private

Definition at line 1695 of file cliproto.hpp.

◆ info

bool openvpn::ClientProto::Session::info
private

Definition at line 1682 of file cliproto.hpp.

◆ info_hold

std::unique_ptr<std::vector<ClientEvent::Base::Ptr> > openvpn::ClientProto::Session::info_hold
private

Definition at line 1700 of file cliproto.hpp.

◆ info_hold_timer

AsioTimer openvpn::ClientProto::Session::info_hold_timer
private

Definition at line 1701 of file cliproto.hpp.

◆ io_context

openvpn_io::io_context& openvpn::ClientProto::Session::io_context
private

Definition at line 1648 of file cliproto.hpp.

◆ notify_callback

NotifyCallback* openvpn::ClientProto::Session::notify_callback
private

Definition at line 1659 of file cliproto.hpp.

◆ out_tun_callback_

std::shared_ptr<SessionStats::inc_callback_t> openvpn::ClientProto::Session::out_tun_callback_
private

Definition at line 1697 of file cliproto.hpp.

◆ proto_context

ProtoContext openvpn::ClientProto::Session::proto_context
private

Definition at line 1646 of file cliproto.hpp.

◆ proto_context_options

ProtoContextCompressionOptions::Ptr openvpn::ClientProto::Session::proto_context_options
private

Definition at line 1670 of file cliproto.hpp.

◆ push_request_timer

AsioTimer openvpn::ClientProto::Session::push_request_timer
private

Definition at line 1663 of file cliproto.hpp.

◆ pushed_options_filter

OptionList::FilterBase::Ptr openvpn::ClientProto::Session::pushed_options_filter
private

Definition at line 1688 of file cliproto.hpp.

◆ pushed_options_limit

OptionList::Limits openvpn::ClientProto::Session::pushed_options_limit
private

Definition at line 1687 of file cliproto.hpp.

◆ pushed_options_merger

PushOptionsMerger::Ptr openvpn::ClientProto::Session::pushed_options_merger
private

Definition at line 1689 of file cliproto.hpp.

◆ received_options

OptionListContinuation openvpn::ClientProto::Session::received_options
private

Definition at line 1666 of file cliproto.hpp.

◆ sent_push_request

bool openvpn::ClientProto::Session::sent_push_request = false
private

Definition at line 1673 of file cliproto.hpp.

◆ tcp_queue_limit

unsigned int openvpn::ClientProto::Session::tcp_queue_limit
private

Definition at line 1656 of file cliproto.hpp.

◆ temp_fail_advance_

RemoteList::Advance openvpn::ClientProto::Session::temp_fail_advance_ = RemoteList::Advance::Addr
private

Definition at line 1705 of file cliproto.hpp.

◆ temp_fail_backoff_

std::chrono::milliseconds openvpn::ClientProto::Session::temp_fail_backoff_ {0}
private

Definition at line 1704 of file cliproto.hpp.

◆ transport

TransportClient::Ptr openvpn::ClientProto::Session::transport
private

Definition at line 1651 of file cliproto.hpp.

◆ transport_factory

TransportClientFactory::Ptr openvpn::ClientProto::Session::transport_factory
private

Definition at line 1650 of file cliproto.hpp.

◆ transport_has_send_queue

bool openvpn::ClientProto::Session::transport_has_send_queue = false
private

Definition at line 1657 of file cliproto.hpp.

◆ tun

TunClient::Ptr openvpn::ClientProto::Session::tun
private

Definition at line 1654 of file cliproto.hpp.

◆ tun_factory

TunClientFactory::Ptr openvpn::ClientProto::Session::tun_factory
private

Definition at line 1653 of file cliproto.hpp.


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