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

#include <vpnservpool.hpp>

Inheritance diagram for openvpn::VPNServerPool::Pool:
[legend]
Collaboration diagram for openvpn::VPNServerPool::Pool:
[legend]

Public Types

enum  Flags { IPv4_DEPLETION = (1 << 0) , IPv6_DEPLETION = (1 << 1) }
 

Public Member Functions

 Pool (const OptionList &opt)
 
unsigned int acquire (IP46 &addr_pair, const bool request_ipv6)
 
void release (IP46 &addr_pair)
 
- Public Member Functions inherited from openvpn::VPNServerNetblock
 OPENVPN_EXCEPTION (vpn_serv_netblock)
 
 VPNServerNetblock ()
 
 VPNServerNetblock (const OptionList &opt, const std::string &opt_name, const bool ipv4_optional, const unsigned int n_threads)
 
const ClientNetblocknetblock4 () const
 
const ClientNetblocknetblock6 () const
 
bool netblock_contains (const IP::Addr &a) const
 
size_t size () const
 
const PerThreadper_thread (const size_t index) const
 
std::string to_string () const
 

Static Private Member Functions

static VPNServerNetblock init_snb_from_opt (const OptionList &opt)
 
static bool configured (const OptionList &opt, const std::string &opt_name)
 

Private Attributes

std::mutex mutex
 
IP::Pool pool4
 
IP::Pool pool6
 

Detailed Description

Definition at line 57 of file vpnservpool.hpp.

Member Enumeration Documentation

◆ Flags

Enumerator
IPv4_DEPLETION 
IPv6_DEPLETION 

Definition at line 60 of file vpnservpool.hpp.

Constructor & Destructor Documentation

◆ Pool()

openvpn::VPNServerPool::Pool::Pool ( const OptionList opt)
inline

Definition at line 66 of file vpnservpool.hpp.

Member Function Documentation

◆ acquire()

unsigned int openvpn::VPNServerPool::Pool::acquire ( IP46 addr_pair,
const bool  request_ipv6 
)
inline

Definition at line 77 of file vpnservpool.hpp.

◆ configured()

static bool openvpn::VPNServerPool::Pool::configured ( const OptionList opt,
const std::string &  opt_name 
)
inlinestaticprivate

Definition at line 110 of file vpnservpool.hpp.

Here is the caller graph for this function:

◆ init_snb_from_opt()

static VPNServerNetblock openvpn::VPNServerPool::Pool::init_snb_from_opt ( const OptionList opt)
inlinestaticprivate

Definition at line 101 of file vpnservpool.hpp.

◆ release()

void openvpn::VPNServerPool::Pool::release ( IP46 addr_pair)
inline

Definition at line 91 of file vpnservpool.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ mutex

std::mutex openvpn::VPNServerPool::Pool::mutex
private

Definition at line 116 of file vpnservpool.hpp.

◆ pool4

IP::Pool openvpn::VPNServerPool::Pool::pool4
private

Definition at line 118 of file vpnservpool.hpp.

◆ pool6

IP::Pool openvpn::VPNServerPool::Pool::pool6
private

Definition at line 119 of file vpnservpool.hpp.


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