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

#include <relack.hpp>

Public Types

typedef reliable::id_t id_t
 

Public Member Functions

 ReliableAck ()=default
 
size_t size () const
 
bool empty () const
 
bool acks_ready () const
 
void push_back (id_t value)
 
id_t front () const
 
void pop_front ()
 
void read (Buffer &buf)
 
void prepend (Buffer &buf, bool ackv1)
 
size_t resend_size ()
 

Static Public Member Functions

template<typename REL_SEND >
static size_t ack (REL_SEND &rel_send, Buffer &buf, const bool live)
 
static size_t ack_skip (Buffer &buf)
 
static void prepend_id (Buffer &buf, const id_t id)
 
static id_t read_id (Buffer &buf)
 

Static Public Attributes

static constexpr size_t maximum_acks_ack_v1 = 8
 
static constexpr size_t maximum_acks_control_v1 = 4
 

Private Member Functions

void add_ack_to_reack (id_t ack)
 

Private Attributes

std::deque< id_tdata
 
std::deque< id_tre_acks
 

Detailed Description

Definition at line 28 of file relack.hpp.

Member Typedef Documentation

◆ id_t

Definition at line 33 of file relack.hpp.

Constructor & Destructor Documentation

◆ ReliableAck()

openvpn::ReliableAck::ReliableAck ( )
explicitdefault

Member Function Documentation

◆ ack()

template<typename REL_SEND >
static size_t openvpn::ReliableAck::ack ( REL_SEND &  rel_send,
Buffer buf,
const bool  live 
)
inlinestatic

Definition at line 56 of file relack.hpp.

Here is the caller graph for this function:

◆ ack_skip()

static size_t openvpn::ReliableAck::ack_skip ( Buffer buf)
inlinestatic

Definition at line 68 of file relack.hpp.

Here is the caller graph for this function:

◆ acks_ready()

bool openvpn::ReliableAck::acks_ready ( ) const
inline

Returns true if either outstanding acks are present or ACKs for resending are present.

Definition at line 166 of file relack.hpp.

Here is the caller graph for this function:

◆ add_ack_to_reack()

void openvpn::ReliableAck::add_ack_to_reack ( id_t  ack)
inlineprivate

Definition at line 171 of file relack.hpp.

Here is the caller graph for this function:

◆ empty()

bool openvpn::ReliableAck::empty ( ) const
inline

Returns true if all outstanding ACKs are empty, otherwise false. Acks that can be resend are ignored.

Returns
Returns true if all ACKs are empty, otherwise false;

Definition at line 156 of file relack.hpp.

Here is the caller graph for this function:

◆ front()

id_t openvpn::ReliableAck::front ( ) const
inline

Definition at line 43 of file relack.hpp.

◆ pop_front()

void openvpn::ReliableAck::pop_front ( )
inline

Definition at line 47 of file relack.hpp.

◆ prepend()

void openvpn::ReliableAck::prepend ( Buffer buf,
bool  ackv1 
)
inline

handles the reACK logic and reACK/ACK list manipulation. pulls as many repeated ACKs as we can fit into the packet from the reACK queue, and pushes the fresh never-been-ACKed ids into the other end of the reACK queue. Enforces a limit on the size of the reACK queue and may discard reACKs sometimes.

Definition at line 93 of file relack.hpp.

Here is the caller graph for this function:

◆ prepend_id()

static void openvpn::ReliableAck::prepend_id ( Buffer buf,
const id_t  id 
)
inlinestatic

Definition at line 119 of file relack.hpp.

Here is the caller graph for this function:

◆ push_back()

void openvpn::ReliableAck::push_back ( id_t  value)
inline

Definition at line 39 of file relack.hpp.

Here is the caller graph for this function:

◆ read()

void openvpn::ReliableAck::read ( Buffer buf)
inline

Definition at line 77 of file relack.hpp.

Here is the caller graph for this function:

◆ read_id()

static id_t openvpn::ReliableAck::read_id ( Buffer buf)
inlinestatic

Definition at line 125 of file relack.hpp.

Here is the caller graph for this function:

◆ resend_size()

size_t openvpn::ReliableAck::resend_size ( )
inline

Definition at line 190 of file relack.hpp.

◆ size()

size_t openvpn::ReliableAck::size ( ) const
inline

Returns the number of outstanding ACKs that have been sent.

Definition at line 144 of file relack.hpp.

Member Data Documentation

◆ data

std::deque<id_t> openvpn::ReliableAck::data
private

Definition at line 137 of file relack.hpp.

◆ maximum_acks_ack_v1

constexpr size_t openvpn::ReliableAck::maximum_acks_ack_v1 = 8
staticconstexpr

Definition at line 31 of file relack.hpp.

◆ maximum_acks_control_v1

constexpr size_t openvpn::ReliableAck::maximum_acks_control_v1 = 4
staticconstexpr

Definition at line 32 of file relack.hpp.

◆ re_acks

std::deque<id_t> openvpn::ReliableAck::re_acks
private

Definition at line 138 of file relack.hpp.


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