OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::ClientAPI::MySessionStats Class Reference
Inheritance diagram for openvpn::ClientAPI::MySessionStats:
[legend]
Collaboration diagram for openvpn::ClientAPI::MySessionStats:
[legend]

Public Types

typedef RCPtr< MySessionStatsPtr
 
- Public Types inherited from openvpn::SessionStats
enum  Stats {
  BYTES_IN = 0 , BYTES_OUT , PACKETS_IN , PACKETS_OUT ,
  TUN_BYTES_IN , TUN_BYTES_OUT , TUN_PACKETS_IN , TUN_PACKETS_OUT ,
  N_STATS
}
 
typedef RCPtr< SessionStatsPtr
 
using inc_callback_t = std::function< void(const count_t value)>
 
- Public Types inherited from openvpn::RC< thread_safe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 MySessionStats (OpenVPNClient *parent_arg)
 
count_t combined_value (const size_t index) const
 
count_t stat_count (const size_t index) const
 
count_t error_count (const size_t index) const
 
void detach_from_parent ()
 
void error (const size_t err, const std::string *text=nullptr) override
 
- Public Member Functions inherited from openvpn::SessionStats
 SessionStats ()
 
bool verbose () const
 
void inc_stat (const size_t type, const count_t value)
 
count_t get_stat (const size_t type) const
 
count_t get_stat_fast (const size_t type) const
 
void update_last_packet_received (const Time &now)
 
const Timelast_packet_received () const
 
void dco_configure (SessionStats::DCOTransportSource *source)
 
bool dco_update ()
 
std::shared_ptr< inc_callback_tset_inc_callback (Stats stat, inc_callback_t callback)
 Sets a callback to be triggered upon increment of stats.
 
- Public Member Functions inherited from openvpn::RC< thread_safe_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.
 

Static Public Member Functions

static size_t combined_n ()
 
static std::string combined_name (const size_t index)
 
- Static Public Member Functions inherited from openvpn::SessionStats
static const char * stat_name (const size_t type)
 
- Static Public Member Functions inherited from openvpn::RC< thread_safe_refcount >
static constexpr bool is_thread_safe ()
 Delegates call to RCImpl and returns the result.
 

Private Attributes

OpenVPNClientparent
 
count_t errors [Error::N_ERRORS]
 

Additional Inherited Members

- Protected Member Functions inherited from openvpn::SessionStats
void session_stats_set_verbose (const bool v)
 

Detailed Description

Definition at line 100 of file ovpncli.cpp.

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ MySessionStats()

openvpn::ClientAPI::MySessionStats::MySessionStats ( OpenVPNClient parent_arg)
inline

Definition at line 105 of file ovpncli.cpp.

Member Function Documentation

◆ combined_n()

static size_t openvpn::ClientAPI::MySessionStats::combined_n ( )
inlinestatic

Definition at line 114 of file ovpncli.cpp.

Here is the caller graph for this function:

◆ combined_name()

static std::string openvpn::ClientAPI::MySessionStats::combined_name ( const size_t  index)
inlinestatic

Definition at line 119 of file ovpncli.cpp.

Here is the caller graph for this function:

◆ combined_value()

count_t openvpn::ClientAPI::MySessionStats::combined_value ( const size_t  index) const
inline

Definition at line 132 of file ovpncli.cpp.

Here is the caller graph for this function:

◆ detach_from_parent()

void openvpn::ClientAPI::MySessionStats::detach_from_parent ( )
inline

Definition at line 155 of file ovpncli.cpp.

◆ error()

void openvpn::ClientAPI::MySessionStats::error ( const size_t  err,
const std::string *  text = nullptr 
)
inlineoverridevirtual

Reimplemented from openvpn::SessionStats.

Definition at line 160 of file ovpncli.cpp.

◆ error_count()

count_t openvpn::ClientAPI::MySessionStats::error_count ( const size_t  index) const
inline

Definition at line 150 of file ovpncli.cpp.

Here is the caller graph for this function:

◆ stat_count()

count_t openvpn::ClientAPI::MySessionStats::stat_count ( const size_t  index) const
inline

Definition at line 145 of file ovpncli.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ errors

count_t openvpn::ClientAPI::MySessionStats::errors[Error::N_ERRORS]
private

Definition at line 176 of file ovpncli.cpp.

◆ parent

OpenVPNClient* openvpn::ClientAPI::MySessionStats::parent
private

Definition at line 175 of file ovpncli.cpp.


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