OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate Class Reference

#include <nrpt.hpp>

Inheritance diagram for openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate:
[legend]
Collaboration diagram for openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate:
[legend]

Public Member Functions

 ActionCreate (DWORD process_id, const std::vector< std::string > &split_domains, const std::vector< std::string > &dns_servers, const std::vector< std::wstring > &search_domains, bool dnssec)
 
void execute (std::ostream &log) override
 Apply NRPT data to the registry.
 
std::string to_string () const override
 Produce a textual representating of the NRPT data.
 
- Public Member Functions inherited from openvpn::Action
virtual Json::Value to_json () const
 
virtual ~Action ()=default
 
- 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 Attributes

DWORD process_id_
 
const std::vector< std::string > split_domains_
 
const std::vector< std::string > dns_servers_
 
const std::vector< std::wstring > search_domains_
 
const bool dnssec_
 

Additional Inherited Members

- Public Types inherited from openvpn::Action
typedef RCPtr< ActionPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 
- 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.
 
- Public Attributes inherited from openvpn::Action
std::string mark
 

Detailed Description

template<typename REG, typename NETAPI>
class openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate

Definition at line 392 of file nrpt.hpp.

Constructor & Destructor Documentation

◆ ActionCreate()

template<typename REG , typename NETAPI >
openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::ActionCreate ( DWORD  process_id,
const std::vector< std::string > &  split_domains,
const std::vector< std::string > &  dns_servers,
const std::vector< std::wstring > &  search_domains,
bool  dnssec 
)
inline

Definition at line 395 of file nrpt.hpp.

Member Function Documentation

◆ execute()

template<typename REG , typename NETAPI >
void openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::execute ( std::ostream &  log)
inlineoverridevirtual

Apply NRPT data to the registry.

In case a –dns server has no domains, we fall back to resolving "all domains" with it and install rules excluding the domains found on the system, so local domain names keep working.

Parameters
logwhere the rules will be logged to

Implements openvpn::Action.

Definition at line 417 of file nrpt.hpp.

◆ to_string()

template<typename REG , typename NETAPI >
std::string openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::to_string ( ) const
inlineoverridevirtual

Produce a textual representating of the NRPT data.

Returns
std::string the data as string

Implements openvpn::Action.

Definition at line 445 of file nrpt.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ dns_servers_

template<typename REG , typename NETAPI >
const std::vector<std::string> openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::dns_servers_
private

Definition at line 459 of file nrpt.hpp.

◆ dnssec_

template<typename REG , typename NETAPI >
const bool openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::dnssec_
private

Definition at line 461 of file nrpt.hpp.

◆ process_id_

template<typename REG , typename NETAPI >
DWORD openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::process_id_
private

Definition at line 457 of file nrpt.hpp.

◆ search_domains_

template<typename REG , typename NETAPI >
const std::vector<std::wstring> openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::search_domains_
private

Definition at line 460 of file nrpt.hpp.

◆ split_domains_

template<typename REG , typename NETAPI >
const std::vector<std::string> openvpn::TunWin::Nrpt< REG, NETAPI >::ActionCreate::split_domains_
private

Definition at line 458 of file nrpt.hpp.


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