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

Public Types

typedef RCPtr< MySessionStatsPtr
 
typedef RCPtr< MySessionStatsPtr
 
typedef RCPtr< MySessionStatsPtr
 
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

void error (const size_t err_type, const std::string *text=nullptr) override
 
std::string dump () const
 
void error (const size_t err_type, const std::string *text=nullptr) override
 
std::string dump () const
 
 MySessionStats ()
 
void error (const size_t err_type, const std::string *text=NULL) override
 
count_t get_error_count (const Error::Type type) const
 
 MySessionStats ()
 
void error (const size_t err_type, const std::string *text=nullptr) override
 
count_t get_error_count (const Error::Type type) const
 
void show_error_counts () const
 
- 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.
 

Private Attributes

count_t errors [Error::N_ERRORS]
 

Additional Inherited Members

- 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.
 
- Protected Member Functions inherited from openvpn::SessionStats
void session_stats_set_verbose (const bool v)
 

Detailed Description

Definition at line 70 of file ovpnagent.cpp.

Member Typedef Documentation

◆ Ptr [1/4]

Definition at line 73 of file ovpnagent.cpp.

◆ Ptr [2/4]

Definition at line 91 of file ovpnagent.cpp.

◆ Ptr [3/4]

Definition at line 68 of file test_comp.cpp.

◆ Ptr [4/4]

Definition at line 823 of file test_proto.cpp.

Constructor & Destructor Documentation

◆ MySessionStats() [1/2]

MySessionStats::MySessionStats ( )
inline

Definition at line 70 of file test_comp.cpp.

◆ MySessionStats() [2/2]

MySessionStats::MySessionStats ( )
inline

Definition at line 825 of file test_proto.cpp.

Member Function Documentation

◆ dump() [1/2]

std::string MySessionStats::dump ( ) const
inline

Definition at line 80 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ dump() [2/2]

std::string MySessionStats::dump ( ) const
inline

Definition at line 98 of file ovpnagent.cpp.

◆ error() [1/4]

void MySessionStats::error ( const size_t  err_type,
const std::string *  text = NULL 
)
inlineoverridevirtual

Reimplemented from openvpn::SessionStats.

Definition at line 75 of file test_comp.cpp.

◆ error() [2/4]

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

Reimplemented from openvpn::SessionStats.

Definition at line 75 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ error() [3/4]

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

Reimplemented from openvpn::SessionStats.

Definition at line 93 of file ovpnagent.cpp.

◆ error() [4/4]

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

Reimplemented from openvpn::SessionStats.

Definition at line 830 of file test_proto.cpp.

◆ get_error_count() [1/2]

count_t MySessionStats::get_error_count ( const Error::Type  type) const
inline

Definition at line 81 of file test_comp.cpp.

Here is the caller graph for this function:

◆ get_error_count() [2/2]

count_t MySessionStats::get_error_count ( const Error::Type  type) const
inline

Definition at line 836 of file test_proto.cpp.

◆ show_error_counts()

void MySessionStats::show_error_counts ( ) const
inline

Definition at line 844 of file test_proto.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ errors

count_t MySessionStats::errors
private

Definition at line 90 of file test_comp.cpp.


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