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

#include <lzo.hpp>

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

Public Types

enum  { LZO_COMPRESS = 0x66 , LZO_COMPRESS_SWAP = 0x67 }
 
- Public Types inherited from openvpn::Compress
typedef RCPtr< CompressPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (lzo_init_failed)
 
 CompressLZO (const Frame::Ptr &frame, const SessionStats::Ptr &stats, const bool support_swap_arg, const bool asym_arg)
 
const char * name () const override
 
void decompress_work (BufferAllocated &buf)
 
void compress (BufferAllocated &buf, const bool hint) override
 
void decompress (BufferAllocated &buf) override
 
- 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.
 

Static Public Member Functions

static void init_static ()
 
- 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
 

Private Member Functions

size_t lzo_extra_buffer (const size_t len)
 

Private Attributes

const bool support_swap
 
const bool asym
 
BufferAllocated work
 
BufferAllocated lzo_workspace
 

Additional Inherited Members

- 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
 
- Protected Types inherited from openvpn::Compress
enum  { NO_COMPRESS = 0xFA , NO_COMPRESS_SWAP = 0xFB }
 
enum  { COMPRESS_V2_ESCAPE = 0x50 , OVPN_COMPv2_NONE = 0 , OVPN_COMPv2_LZ4 = 1 }
 
- Protected Member Functions inherited from openvpn::Compress
 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 inherited from openvpn::Compress
Frame::Ptr frame
 
SessionStats::Ptr stats
 
- 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 23 of file lzo.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
LZO_COMPRESS 
LZO_COMPRESS_SWAP 

Definition at line 27 of file lzo.hpp.

Constructor & Destructor Documentation

◆ CompressLZO()

openvpn::CompressLZO::CompressLZO ( const Frame::Ptr frame,
const SessionStats::Ptr stats,
const bool  support_swap_arg,
const bool  asym_arg 
)
inline

Definition at line 35 of file lzo.hpp.

Member Function Documentation

◆ compress()

void openvpn::CompressLZO::compress ( BufferAllocated buf,
const bool  hint 
)
inlineoverridevirtual

Implements openvpn::Compress.

Definition at line 75 of file lzo.hpp.

◆ decompress()

void openvpn::CompressLZO::decompress ( BufferAllocated buf)
inlineoverridevirtual

Implements openvpn::Compress.

Definition at line 125 of file lzo.hpp.

◆ decompress_work()

void openvpn::CompressLZO::decompress_work ( BufferAllocated buf)
inline

Definition at line 58 of file lzo.hpp.

Here is the caller graph for this function:

◆ init_static()

static void openvpn::CompressLZO::init_static ( )
inlinestatic

Definition at line 47 of file lzo.hpp.

◆ lzo_extra_buffer()

size_t openvpn::CompressLZO::lzo_extra_buffer ( const size_t  len)
inlineprivate

Definition at line 152 of file lzo.hpp.

Here is the caller graph for this function:

◆ name()

const char * openvpn::CompressLZO::name ( ) const
inlineoverridevirtual

Implements openvpn::Compress.

Definition at line 53 of file lzo.hpp.

◆ OPENVPN_SIMPLE_EXCEPTION()

openvpn::CompressLZO::OPENVPN_SIMPLE_EXCEPTION ( lzo_init_failed  )

Member Data Documentation

◆ asym

const bool openvpn::CompressLZO::asym
private

Definition at line 158 of file lzo.hpp.

◆ lzo_workspace

BufferAllocated openvpn::CompressLZO::lzo_workspace
private

Definition at line 160 of file lzo.hpp.

◆ support_swap

const bool openvpn::CompressLZO::support_swap
private

Definition at line 157 of file lzo.hpp.

◆ work

BufferAllocated openvpn::CompressLZO::work
private

Definition at line 159 of file lzo.hpp.


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