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

#include <datalimit.hpp>

Collaboration diagram for openvpn::DataLimit:
[legend]

Classes

class  Component
 
struct  Parameters
 

Public Types

enum  Mode { Encrypt = 0 , Decrypt = 1 }
 
enum  State { None = 0 , Green = 1 , Red = 2 }
 
typedef unsigned int size_type
 

Public Member Functions

 DataLimit (const Parameters &p)
 
State update_state (const Mode mode, const State newstate)
 
State add (const Mode mode, const size_type n)
 
bool is_decrypt_green ()
 

Static Public Member Functions

static const char * mode_str (const Mode m)
 
static const char * state_str (const State s)
 

Private Member Functions

State elgible (const Mode mode, const State state)
 
Componentcomponent (const Mode m)
 

Private Attributes

Component encrypt
 
Component decrypt
 
unsigned int flags = 0
 

Detailed Description

Definition at line 22 of file datalimit.hpp.

Member Typedef Documentation

◆ size_type

typedef unsigned int openvpn::DataLimit::size_type

Definition at line 25 of file datalimit.hpp.

Member Enumeration Documentation

◆ Mode

Enumerator
Encrypt 
Decrypt 

Definition at line 27 of file datalimit.hpp.

◆ State

Enumerator
None 
Green 
Red 

Definition at line 33 of file datalimit.hpp.

Constructor & Destructor Documentation

◆ DataLimit()

openvpn::DataLimit::DataLimit ( const Parameters p)
inline

Definition at line 46 of file datalimit.hpp.

Member Function Documentation

◆ add()

State openvpn::DataLimit::add ( const Mode  mode,
const size_type  n 
)
inline

Definition at line 57 of file datalimit.hpp.

Here is the caller graph for this function:

◆ component()

Component & openvpn::DataLimit::component ( const Mode  m)
inlineprivate

Definition at line 180 of file datalimit.hpp.

Here is the caller graph for this function:

◆ elgible()

State openvpn::DataLimit::elgible ( const Mode  mode,
const State  state 
)
inlineprivate

Definition at line 100 of file datalimit.hpp.

Here is the caller graph for this function:

◆ is_decrypt_green()

bool openvpn::DataLimit::is_decrypt_green ( )
inline

Definition at line 62 of file datalimit.hpp.

◆ mode_str()

static const char * openvpn::DataLimit::mode_str ( const Mode  m)
inlinestatic

Definition at line 67 of file datalimit.hpp.

Here is the caller graph for this function:

◆ state_str()

static const char * openvpn::DataLimit::state_str ( const State  s)
inlinestatic

Definition at line 80 of file datalimit.hpp.

Here is the caller graph for this function:

◆ update_state()

State openvpn::DataLimit::update_state ( const Mode  mode,
const State  newstate 
)
inline

Definition at line 52 of file datalimit.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ decrypt

Component openvpn::DataLimit::decrypt
private

Definition at line 194 of file datalimit.hpp.

◆ encrypt

Component openvpn::DataLimit::encrypt
private

Definition at line 193 of file datalimit.hpp.

◆ flags

unsigned int openvpn::DataLimit::flags = 0
private

Definition at line 195 of file datalimit.hpp.


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