OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::Compress Class Referenceabstract

#include <compress.hpp>

Inheritance diagram for openvpn::Compress:
[legend]
Collaboration diagram for openvpn::Compress:
[legend]

Public Types

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

Public Member Functions

virtual const char * name () const =0
 
virtual void compress (BufferAllocated &buf, const bool hint)=0
 
virtual void decompress (BufferAllocated &buf)=0
 
- 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.
 

Protected Types

enum  { NO_COMPRESS = 0xFA , NO_COMPRESS_SWAP = 0xFB }
 
enum  { COMPRESS_V2_ESCAPE = 0x50 , OVPN_COMPv2_NONE = 0 , OVPN_COMPv2_LZ4 = 1 }
 

Protected Member Functions

 Compress (const Frame::Ptr &frame_arg, const SessionStats::Ptr &stats_arg)
 
void error (BufferAllocated &buf)
 
void do_swap (Buffer &buf, unsigned char op)
 
void do_unswap (Buffer &buf)
 
void v2_push (Buffer &buf, unsigned char value)
 
int v2_pull (Buffer &buf)
 

Protected Attributes

Frame::Ptr frame
 
SessionStats::Ptr stats
 

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 Public Member Functions inherited from openvpn::logging::LoggingMixin< OPENVPN_DEBUG_COMPRESS, logging::LOG_LEVEL_TRACE, Compress >
static int log_level ()
 return the current logging level for all logging
 
static void set_log_level (int level)
 set the log level for all loggigng
 
- Static Public Attributes inherited from openvpn::logging::LoggingMixin< OPENVPN_DEBUG_COMPRESS, logging::LOG_LEVEL_TRACE, Compress >
static constexpr int max_log_level
 
static constexpr int default_log_level
 
- Static Protected Attributes inherited from openvpn::logging::LoggingMixin< OPENVPN_DEBUG_COMPRESS, logging::LOG_LEVEL_TRACE, Compress >
static logging::Logger< DEFAULT_LOG_LEVEL, MAX_LEVEL > log_
 

Detailed Description

Definition at line 34 of file compress.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 38 of file compress.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NO_COMPRESS 
NO_COMPRESS_SWAP 

Definition at line 54 of file compress.hpp.

◆ anonymous enum

anonymous enum
protected
Enumerator
COMPRESS_V2_ESCAPE 
OVPN_COMPv2_NONE 
OVPN_COMPv2_LZ4 

Definition at line 61 of file compress.hpp.

Constructor & Destructor Documentation

◆ Compress()

openvpn::Compress::Compress ( const Frame::Ptr frame_arg,
const SessionStats::Ptr stats_arg 
)
inlineprotected

Definition at line 70 of file compress.hpp.

Member Function Documentation

◆ compress()

virtual void openvpn::Compress::compress ( BufferAllocated buf,
const bool  hint 
)
pure virtual

Implemented in openvpn::CompressNull, openvpn::CompressStub, openvpn::CompressStubV2, openvpn::CompressLZ4, openvpn::CompressLZ4v2, openvpn::CompressLZO, openvpn::CompressLZOAsym, and openvpn::CompressSnappy.

Here is the caller graph for this function:

◆ decompress()

virtual void openvpn::Compress::decompress ( BufferAllocated buf)
pure virtual

Implemented in openvpn::CompressNull, openvpn::CompressStub, openvpn::CompressStubV2, openvpn::CompressLZ4, openvpn::CompressLZ4v2, openvpn::CompressLZO, openvpn::CompressLZOAsym, and openvpn::CompressSnappy.

Here is the caller graph for this function:

◆ do_swap()

void openvpn::Compress::do_swap ( Buffer buf,
unsigned char  op 
)
inlineprotected

Definition at line 82 of file compress.hpp.

Here is the caller graph for this function:

◆ do_unswap()

void openvpn::Compress::do_unswap ( Buffer buf)
inlineprotected

Definition at line 93 of file compress.hpp.

Here is the caller graph for this function:

◆ error()

void openvpn::Compress::error ( BufferAllocated buf)
inlineprotected

Definition at line 76 of file compress.hpp.

Here is the caller graph for this function:

◆ name()

◆ v2_pull()

int openvpn::Compress::v2_pull ( Buffer buf)
inlineprotected

Definition at line 117 of file compress.hpp.

Here is the caller graph for this function:

◆ v2_push()

void openvpn::Compress::v2_push ( Buffer buf,
unsigned char  value 
)
inlineprotected

Definition at line 104 of file compress.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ frame

Frame::Ptr openvpn::Compress::frame
protected

Definition at line 127 of file compress.hpp.

◆ stats

SessionStats::Ptr openvpn::Compress::stats
protected

Definition at line 128 of file compress.hpp.


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