OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::PacketStream< SIZE_TYPE > Class Template Reference

#include <pktstream.hpp>

Collaboration diagram for openvpn::PacketStream< SIZE_TYPE >:
[legend]

Public Member Functions

 OPENVPN_SIMPLE_EXCEPTION (embedded_packet_size_error)
 
 OPENVPN_SIMPLE_EXCEPTION (packet_not_fully_formed)
 
void put (BufferAllocated &buf, const Frame::Context &frame_context)
 
bool ready () const
 
void get (BufferAllocated &ret)
 
void get (BufferAllocated &ret, const Frame::Context &frame_context)
 
void reset ()
 

Static Public Member Functions

static void prepend_size (Buffer &buf)
 

Private Member Functions

bool declared_size_defined () const
 
void extract_size (Buffer &buf, const Frame::Context &frame_context)
 

Static Private Member Functions

static size_t network_to_host (const std::uint16_t value)
 
static size_t network_to_host (const std::uint32_t value)
 
static void host_to_network (std::uint16_t &result, const size_t value)
 
static void host_to_network (std::uint32_t &result, const size_t value)
 
static bool size_defined (const Buffer &buf)
 
static size_t read_size (Buffer &buf)
 
static void validate_size (const size_t size, const Frame::Context &frame_context)
 

Private Attributes

size_t declared_size = SIZE_UNDEF
 
BufferAllocated buffer
 

Static Private Attributes

static constexpr size_t SIZE_UNDEF = std::numeric_limits<size_t>::max()
 

Detailed Description

template<typename SIZE_TYPE>
class openvpn::PacketStream< SIZE_TYPE >

Definition at line 34 of file pktstream.hpp.

Member Function Documentation

◆ declared_size_defined()

template<typename SIZE_TYPE >
bool openvpn::PacketStream< SIZE_TYPE >::declared_size_defined ( ) const
inlineprivate

Definition at line 170 of file pktstream.hpp.

Here is the caller graph for this function:

◆ extract_size()

template<typename SIZE_TYPE >
void openvpn::PacketStream< SIZE_TYPE >::extract_size ( Buffer buf,
const Frame::Context frame_context 
)
inlineprivate

Definition at line 175 of file pktstream.hpp.

Here is the caller graph for this function:

◆ get() [1/2]

template<typename SIZE_TYPE >
void openvpn::PacketStream< SIZE_TYPE >::get ( BufferAllocated ret)
inline

Definition at line 110 of file pktstream.hpp.

Here is the caller graph for this function:

◆ get() [2/2]

template<typename SIZE_TYPE >
void openvpn::PacketStream< SIZE_TYPE >::get ( BufferAllocated ret,
const Frame::Context frame_context 
)
inline

Definition at line 124 of file pktstream.hpp.

◆ host_to_network() [1/2]

template<typename SIZE_TYPE >
static void openvpn::PacketStream< SIZE_TYPE >::host_to_network ( std::uint16_t &  result,
const size_t  value 
)
inlinestaticprivate

Definition at line 160 of file pktstream.hpp.

Here is the caller graph for this function:

◆ host_to_network() [2/2]

template<typename SIZE_TYPE >
static void openvpn::PacketStream< SIZE_TYPE >::host_to_network ( std::uint32_t &  result,
const size_t  value 
)
inlinestaticprivate

Definition at line 165 of file pktstream.hpp.

◆ network_to_host() [1/2]

template<typename SIZE_TYPE >
static size_t openvpn::PacketStream< SIZE_TYPE >::network_to_host ( const std::uint16_t  value)
inlinestaticprivate

Definition at line 150 of file pktstream.hpp.

Here is the caller graph for this function:

◆ network_to_host() [2/2]

template<typename SIZE_TYPE >
static size_t openvpn::PacketStream< SIZE_TYPE >::network_to_host ( const std::uint32_t  value)
inlinestaticprivate

Definition at line 155 of file pktstream.hpp.

◆ OPENVPN_SIMPLE_EXCEPTION() [1/2]

template<typename SIZE_TYPE >
openvpn::PacketStream< SIZE_TYPE >::OPENVPN_SIMPLE_EXCEPTION ( embedded_packet_size_error  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/2]

template<typename SIZE_TYPE >
openvpn::PacketStream< SIZE_TYPE >::OPENVPN_SIMPLE_EXCEPTION ( packet_not_fully_formed  )

◆ prepend_size()

template<typename SIZE_TYPE >
static void openvpn::PacketStream< SIZE_TYPE >::prepend_size ( Buffer buf)
inlinestatic

Definition at line 130 of file pktstream.hpp.

Here is the caller graph for this function:

◆ put()

template<typename SIZE_TYPE >
void openvpn::PacketStream< SIZE_TYPE >::put ( BufferAllocated buf,
const Frame::Context frame_context 
)
inline

Definition at line 48 of file pktstream.hpp.

Here is the caller graph for this function:

◆ read_size()

template<typename SIZE_TYPE >
static size_t openvpn::PacketStream< SIZE_TYPE >::read_size ( Buffer buf)
inlinestaticprivate

Definition at line 187 of file pktstream.hpp.

Here is the caller graph for this function:

◆ ready()

template<typename SIZE_TYPE >
bool openvpn::PacketStream< SIZE_TYPE >::ready ( ) const
inline

Definition at line 103 of file pktstream.hpp.

Here is the caller graph for this function:

◆ reset()

template<typename SIZE_TYPE >
void openvpn::PacketStream< SIZE_TYPE >::reset ( )
inline

Definition at line 138 of file pktstream.hpp.

◆ size_defined()

template<typename SIZE_TYPE >
static bool openvpn::PacketStream< SIZE_TYPE >::size_defined ( const Buffer buf)
inlinestaticprivate

Definition at line 182 of file pktstream.hpp.

Here is the caller graph for this function:

◆ validate_size()

template<typename SIZE_TYPE >
static void openvpn::PacketStream< SIZE_TYPE >::validate_size ( const size_t  size,
const Frame::Context frame_context 
)
inlinestaticprivate

Definition at line 194 of file pktstream.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ buffer

template<typename SIZE_TYPE >
BufferAllocated openvpn::PacketStream< SIZE_TYPE >::buffer
private

Definition at line 203 of file pktstream.hpp.

◆ declared_size

template<typename SIZE_TYPE >
size_t openvpn::PacketStream< SIZE_TYPE >::declared_size = SIZE_UNDEF
private

Definition at line 202 of file pktstream.hpp.

◆ SIZE_UNDEF

template<typename SIZE_TYPE >
constexpr size_t openvpn::PacketStream< SIZE_TYPE >::SIZE_UNDEF = std::numeric_limits<size_t>::max()
staticconstexprprivate

Definition at line 37 of file pktstream.hpp.


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