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

#include <dns.hpp>

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

Public Member Functions

 ActionCreate (const std::string &itf_name, const std::string &search_domains)
 
void execute (std::ostream &log) override
 Apply DNS data to the system.
 
std::string to_string () const override
 Produce a textual representating of the DNS 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

const std::string itf_name_
 
const std::string search_domains_
 

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::Dns< REG, NETAPI >::ActionCreate

Definition at line 416 of file dns.hpp.

Constructor & Destructor Documentation

◆ ActionCreate()

template<typename REG , typename NETAPI >
openvpn::TunWin::Dns< REG, NETAPI >::ActionCreate::ActionCreate ( const std::string &  itf_name,
const std::string &  search_domains 
)
inline

Definition at line 419 of file dns.hpp.

Member Function Documentation

◆ execute()

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

Apply DNS data to the system.

Parameters
logwhere the rules will be logged to

Implements openvpn::Action.

Definition at line 429 of file dns.hpp.

◆ to_string()

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

Produce a textual representating of the DNS data.

Returns
std::string the data as string

Implements openvpn::Action.

Definition at line 440 of file dns.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ itf_name_

template<typename REG , typename NETAPI >
const std::string openvpn::TunWin::Dns< REG, NETAPI >::ActionCreate::itf_name_
private

Definition at line 450 of file dns.hpp.

◆ search_domains_

template<typename REG , typename NETAPI >
const std::string openvpn::TunWin::Dns< REG, NETAPI >::ActionCreate::search_domains_
private

Definition at line 451 of file dns.hpp.


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