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

#include <remotelist.hpp>

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

Classes

class  BulkResolve
 
struct  ConnBlock
 
struct  ConnBlockFactory
 
struct  Directives
 
struct  Index
 
struct  Item
 
struct  RemoteOverride
 
struct  ResolvedAddr
 
struct  ResolvedAddrList
 

Public Types

enum class  Advance { None , Addr , Remote }
 
enum  { WARN_UNSUPPORTED = 1 << 0 , CONN_BLOCK_ONLY = 1 << 1 , CONN_BLOCK_OMIT_UNDEF = 1 << 2 , ALLOW_EMPTY = 1 << 3 }
 
typedef RCPtr< RemoteListPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 OPENVPN_EXCEPTION (remote_list_error)
 
 RemoteList (RemoteOverride *remote_override_arg)
 
 RemoteList (const std::string &server_host, const std::string &server_port, const Protocol &transport_protocol, const std::string &title)
 
 RemoteList (const OptionList &opt, const std::string &connection_tag, const unsigned int flags, ConnBlockFactory *conn_block_factory, RandomAPI::Ptr rng_arg)
 
void process_push (const OptionList &opt)
 
void set_enable_cache (const bool enable_cache_arg)
 
bool get_enable_cache () const
 
void set_server_override (const std::string &server_override)
 
void set_port_override (const std::string &port_override)
 
void set_proto_version_override (const IP::Addr::Version v)
 
void set_random (const RandomAPI::Ptr &rng_arg)
 
void randomize ()
 
void handle_proto_override (const Protocol &proto_override, const bool tcp_proxy_enabled)
 
void next (Advance type=Advance::Addr)
 
bool endpoint_available (std::string *server_host, std::string *server_port, Protocol *transport_protocol) const
 
template<class EPRANGE >
void set_endpoint_range (EPRANGE &endpoint_range)
 
template<class EP >
void get_endpoint (EP &endpoint) const
 
bool defined () const
 
size_t size () const
 
Item::Ptr get_item (const size_t index) const
 
std::string current_server_host () const
 
const Protocolcurrent_transport_protocol () const
 
template<typename T >
T * current_conn_block_rawptr () const
 
std::string to_string () const
 
void cached_ip_address_list (IP::AddrList &addrlist) const
 
void reset_cache ()
 
void reset_cache_item ()
 
- 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.
 

Private Member Functions

void process_cache_lifetime (const OptionList &opt)
 
void reset_item (const size_t i)
 
size_t item_index () const
 
size_t item_addr_length (const size_t i) const
 
bool contains_protocol (const Protocol &proto)
 
void set_proto_override (const Protocol &proto_override)
 
bool cached_item_exists () const
 
void prune_uncached ()
 
std::string get_port (const OptionList &opt, const std::string &default_port)
 
Protocol get_proto (const OptionList &opt, const Protocol &default_proto)
 
void add (const OptionList &opt, const Protocol &default_proto, const std::string &default_port, ConnBlock::Ptr conn_block)
 
void unsupported_in_connection_block (const OptionList &options, const std::string &option)
 
void randomize_host (Item &item)
 

Private Attributes

std::size_t cache_lifetime = 0
 
bool random_hostname = false
 
bool random = false
 
bool enable_cache = false
 
Index index
 
std::vector< Item::Ptrlist
 
Directives directives
 
RemoteOverrideremote_override = nullptr
 
RandomAPI::Ptr rng
 

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.
 

Detailed Description

Definition at line 51 of file remotelist.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 294 of file remotelist.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
WARN_UNSUPPORTED 
CONN_BLOCK_ONLY 
CONN_BLOCK_OMIT_UNDEF 
ALLOW_EMPTY 

Definition at line 456 of file remotelist.hpp.

◆ Advance

enum class openvpn::RemoteList::Advance
strong
Enumerator
None 
Addr 
Remote 

Definition at line 85 of file remotelist.hpp.

Constructor & Destructor Documentation

◆ RemoteList() [1/3]

openvpn::RemoteList::RemoteList ( RemoteOverride remote_override_arg)
inline

Definition at line 434 of file remotelist.hpp.

◆ RemoteList() [2/3]

openvpn::RemoteList::RemoteList ( const std::string &  server_host,
const std::string &  server_port,
const Protocol transport_protocol,
const std::string &  title 
)
inline

Definition at line 441 of file remotelist.hpp.

◆ RemoteList() [3/3]

openvpn::RemoteList::RemoteList ( const OptionList opt,
const std::string &  connection_tag,
const unsigned int  flags,
ConnBlockFactory conn_block_factory,
RandomAPI::Ptr  rng_arg 
)
inline

Definition at line 465 of file remotelist.hpp.

Member Function Documentation

◆ add()

void openvpn::RemoteList::add ( const OptionList opt,
const Protocol default_proto,
const std::string &  default_port,
ConnBlock::Ptr  conn_block 
)
inlineprivate

Definition at line 914 of file remotelist.hpp.

Here is the caller graph for this function:

◆ cached_ip_address_list()

void openvpn::RemoteList::cached_ip_address_list ( IP::AddrList addrlist) const
inline

Definition at line 735 of file remotelist.hpp.

Here is the caller graph for this function:

◆ cached_item_exists()

bool openvpn::RemoteList::cached_item_exists ( ) const
inlineprivate

Definition at line 858 of file remotelist.hpp.

Here is the caller graph for this function:

◆ contains_protocol()

bool openvpn::RemoteList::contains_protocol ( const Protocol proto)
inlineprivate

Definition at line 825 of file remotelist.hpp.

Here is the caller graph for this function:

◆ current_conn_block_rawptr()

template<typename T >
T * openvpn::RemoteList::current_conn_block_rawptr ( ) const
inline

Definition at line 717 of file remotelist.hpp.

◆ current_server_host()

std::string openvpn::RemoteList::current_server_host ( ) const
inline

Definition at line 703 of file remotelist.hpp.

Here is the caller graph for this function:

◆ current_transport_protocol()

const Protocol & openvpn::RemoteList::current_transport_protocol ( ) const
inline

Definition at line 710 of file remotelist.hpp.

Here is the caller graph for this function:

◆ defined()

bool openvpn::RemoteList::defined ( ) const
inline

Definition at line 686 of file remotelist.hpp.

Here is the caller graph for this function:

◆ endpoint_available()

bool openvpn::RemoteList::endpoint_available ( std::string *  server_host,
std::string *  server_port,
Protocol transport_protocol 
) const
inline

Definition at line 650 of file remotelist.hpp.

Here is the caller graph for this function:

◆ get_enable_cache()

bool openvpn::RemoteList::get_enable_cache ( ) const
inline

Definition at line 548 of file remotelist.hpp.

Here is the caller graph for this function:

◆ get_endpoint()

template<class EP >
void openvpn::RemoteList::get_endpoint ( EP &  endpoint) const
inline

Definition at line 678 of file remotelist.hpp.

Here is the caller graph for this function:

◆ get_item()

Item::Ptr openvpn::RemoteList::get_item ( const size_t  index) const
inline

Definition at line 697 of file remotelist.hpp.

Here is the caller graph for this function:

◆ get_port()

std::string openvpn::RemoteList::get_port ( const OptionList opt,
const std::string &  default_port 
)
inlineprivate

Definition at line 892 of file remotelist.hpp.

Here is the caller graph for this function:

◆ get_proto()

Protocol openvpn::RemoteList::get_proto ( const OptionList opt,
const Protocol default_proto 
)
inlineprivate

Definition at line 904 of file remotelist.hpp.

Here is the caller graph for this function:

◆ handle_proto_override()

void openvpn::RemoteList::handle_proto_override ( const Protocol proto_override,
const bool  tcp_proxy_enabled 
)
inline

Definition at line 610 of file remotelist.hpp.

Here is the caller graph for this function:

◆ item_addr_length()

size_t openvpn::RemoteList::item_addr_length ( const size_t  i) const
inlineprivate

Definition at line 813 of file remotelist.hpp.

Here is the caller graph for this function:

◆ item_index()

size_t openvpn::RemoteList::item_index ( ) const
inlineprivate

Definition at line 803 of file remotelist.hpp.

Here is the caller graph for this function:

◆ next()

void openvpn::RemoteList::next ( Advance  type = Advance::Addr)
inline

Definition at line 625 of file remotelist.hpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION()

openvpn::RemoteList::OPENVPN_EXCEPTION ( remote_list_error  )

◆ process_cache_lifetime()

void openvpn::RemoteList::process_cache_lifetime ( const OptionList opt)
inlineprivate

Definition at line 772 of file remotelist.hpp.

Here is the caller graph for this function:

◆ process_push()

void openvpn::RemoteList::process_push ( const OptionList opt)
inline

Definition at line 537 of file remotelist.hpp.

Here is the caller graph for this function:

◆ prune_uncached()

void openvpn::RemoteList::prune_uncached ( )
inlineprivate

Definition at line 871 of file remotelist.hpp.

Here is the caller graph for this function:

◆ randomize()

void openvpn::RemoteList::randomize ( )
inline

Definition at line 597 of file remotelist.hpp.

Here is the caller graph for this function:

◆ randomize_host()

void openvpn::RemoteList::randomize_host ( Item item)
inlineprivate

Definition at line 959 of file remotelist.hpp.

Here is the caller graph for this function:

◆ reset_cache()

void openvpn::RemoteList::reset_cache ( )
inline

Definition at line 753 of file remotelist.hpp.

Here is the caller graph for this function:

◆ reset_cache_item()

void openvpn::RemoteList::reset_cache_item ( )
inline

Definition at line 764 of file remotelist.hpp.

Here is the caller graph for this function:

◆ reset_item()

void openvpn::RemoteList::reset_item ( const size_t  i)
inlineprivate

Definition at line 791 of file remotelist.hpp.

Here is the caller graph for this function:

◆ set_enable_cache()

void openvpn::RemoteList::set_enable_cache ( const bool  enable_cache_arg)
inline

Definition at line 543 of file remotelist.hpp.

Here is the caller graph for this function:

◆ set_endpoint_range()

template<class EPRANGE >
void openvpn::RemoteList::set_endpoint_range ( EPRANGE &  endpoint_range)
inline

Definition at line 667 of file remotelist.hpp.

Here is the caller graph for this function:

◆ set_port_override()

void openvpn::RemoteList::set_port_override ( const std::string &  port_override)
inline

Definition at line 569 of file remotelist.hpp.

Here is the caller graph for this function:

◆ set_proto_override()

void openvpn::RemoteList::set_proto_override ( const Protocol proto_override)
inlineprivate

Definition at line 836 of file remotelist.hpp.

Here is the caller graph for this function:

◆ set_proto_version_override()

void openvpn::RemoteList::set_proto_version_override ( const IP::Addr::Version  v)
inline

Definition at line 582 of file remotelist.hpp.

Here is the caller graph for this function:

◆ set_random()

void openvpn::RemoteList::set_random ( const RandomAPI::Ptr rng_arg)
inline

Definition at line 591 of file remotelist.hpp.

Here is the caller graph for this function:

◆ set_server_override()

void openvpn::RemoteList::set_server_override ( const std::string &  server_override)
inline

Definition at line 554 of file remotelist.hpp.

Here is the caller graph for this function:

◆ size()

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

Definition at line 692 of file remotelist.hpp.

Here is the caller graph for this function:

◆ to_string()

std::string openvpn::RemoteList::to_string ( ) const
inline

Definition at line 723 of file remotelist.hpp.

◆ unsupported_in_connection_block()

void openvpn::RemoteList::unsupported_in_connection_block ( const OptionList options,
const std::string &  option 
)
inlineprivate

Definition at line 953 of file remotelist.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ cache_lifetime

std::size_t openvpn::RemoteList::cache_lifetime = 0
private

Definition at line 989 of file remotelist.hpp.

◆ directives

Directives openvpn::RemoteList::directives
private

Definition at line 997 of file remotelist.hpp.

◆ enable_cache

bool openvpn::RemoteList::enable_cache = false
private

Definition at line 992 of file remotelist.hpp.

◆ index

Index openvpn::RemoteList::index
private

Definition at line 993 of file remotelist.hpp.

◆ list

std::vector<Item::Ptr> openvpn::RemoteList::list
private

Definition at line 995 of file remotelist.hpp.

◆ random

bool openvpn::RemoteList::random = false
private

Definition at line 991 of file remotelist.hpp.

◆ random_hostname

bool openvpn::RemoteList::random_hostname = false
private

Definition at line 990 of file remotelist.hpp.

◆ remote_override

RemoteOverride* openvpn::RemoteList::remote_override = nullptr
private

Definition at line 999 of file remotelist.hpp.

◆ rng

RandomAPI::Ptr openvpn::RemoteList::rng
private

Definition at line 1001 of file remotelist.hpp.


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