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

#include <httpvpn.hpp>

Inheritance diagram for openvpn::WS::ViaVPN:
[legend]
Collaboration diagram for openvpn::WS::ViaVPN:
[legend]

Public Types

enum  GatewayType { NONE , GW , GW4 , GW6 }
 
typedef RCPtr< ViaVPNPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 OPENVPN_EXCEPTION (via_vpn_error)
 
 ViaVPN (const OptionList &opt)
 
 ViaVPN (std::string conn_info_fn, const std::string &gw)
 
template<typename HOST >
Json::Value client_update_host (HOST &host) const
 
IP::Addr client_ip () const
 
std::string to_string () const
 
- 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 bool is_enabled (const OptionList &opt)
 
static ViaVPN::Ptr client_new_if_enabled (const OptionList &opt)
 
template<typename LISTEN_ITEM >
static IP::Addr server_local_addr (const LISTEN_ITEM &listen_item, const GatewayType gw_type)
 
- 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 Private Member Functions

static void set_host_field (std::string &dest, const Json::Value &root, const std::string &name, const std::string &title)
 
static void maybe_swap (std::string &s1, std::string &s2)
 
static GatewayType parse_gw_type (const std::string &gw)
 
static std::string gw_type_to_string (const GatewayType gw_type)
 

Private Attributes

std::string connection_info_fn
 
GatewayType gw_type
 

Detailed Description

Definition at line 21 of file httpvpn.hpp.

Member Typedef Documentation

◆ Ptr

Definition at line 24 of file httpvpn.hpp.

Member Enumeration Documentation

◆ GatewayType

Enumerator
NONE 
GW 
GW4 
GW6 

Definition at line 28 of file httpvpn.hpp.

Constructor & Destructor Documentation

◆ ViaVPN() [1/2]

openvpn::WS::ViaVPN::ViaVPN ( const OptionList opt)
inline

Definition at line 41 of file httpvpn.hpp.

◆ ViaVPN() [2/2]

openvpn::WS::ViaVPN::ViaVPN ( std::string  conn_info_fn,
const std::string &  gw 
)
inline

Definition at line 48 of file httpvpn.hpp.

Member Function Documentation

◆ client_ip()

IP::Addr openvpn::WS::ViaVPN::client_ip ( ) const
inline

Definition at line 107 of file httpvpn.hpp.

◆ client_new_if_enabled()

static ViaVPN::Ptr openvpn::WS::ViaVPN::client_new_if_enabled ( const OptionList opt)
inlinestatic

Definition at line 55 of file httpvpn.hpp.

◆ client_update_host()

template<typename HOST >
Json::Value openvpn::WS::ViaVPN::client_update_host ( HOST &  host) const
inline

Definition at line 64 of file httpvpn.hpp.

◆ gw_type_to_string()

static std::string openvpn::WS::ViaVPN::gw_type_to_string ( const GatewayType  gw_type)
inlinestaticprivate

Definition at line 160 of file httpvpn.hpp.

Here is the caller graph for this function:

◆ is_enabled()

static bool openvpn::WS::ViaVPN::is_enabled ( const OptionList opt)
inlinestatic

Definition at line 36 of file httpvpn.hpp.

Here is the caller graph for this function:

◆ maybe_swap()

static void openvpn::WS::ViaVPN::maybe_swap ( std::string &  s1,
std::string &  s2 
)
inlinestaticprivate

Definition at line 140 of file httpvpn.hpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION()

openvpn::WS::ViaVPN::OPENVPN_EXCEPTION ( via_vpn_error  )

◆ parse_gw_type()

static GatewayType openvpn::WS::ViaVPN::parse_gw_type ( const std::string &  gw)
inlinestaticprivate

Definition at line 146 of file httpvpn.hpp.

Here is the caller graph for this function:

◆ server_local_addr()

template<typename LISTEN_ITEM >
static IP::Addr openvpn::WS::ViaVPN::server_local_addr ( const LISTEN_ITEM &  listen_item,
const GatewayType  gw_type 
)
inlinestatic

Definition at line 81 of file httpvpn.hpp.

Here is the caller graph for this function:

◆ set_host_field()

static void openvpn::WS::ViaVPN::set_host_field ( std::string &  dest,
const Json::Value &  root,
const std::string &  name,
const std::string &  title 
)
inlinestaticprivate

Definition at line 129 of file httpvpn.hpp.

Here is the caller graph for this function:

◆ to_string()

std::string openvpn::WS::ViaVPN::to_string ( ) const
inline

Definition at line 113 of file httpvpn.hpp.

Member Data Documentation

◆ connection_info_fn

std::string openvpn::WS::ViaVPN::connection_info_fn
private

Definition at line 177 of file httpvpn.hpp.

◆ gw_type

GatewayType openvpn::WS::ViaVPN::gw_type
private

Definition at line 178 of file httpvpn.hpp.


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