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

#include <macdns_watchdog.hpp>

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

Classes

class  DNSAction
 

Public Types

enum  { ENABLE_WATCHDOG = (1 << 0) , SYNCHRONOUS = (1 << 1) , FLUSH_RECONFIG = (1 << 2) }
 
typedef RCPtr< MacDNSWatchdogPtr
 
- Public Types inherited from openvpn::RC< thread_unsafe_refcount >
typedef RCPtr< RCPtr
 

Public Member Functions

 MacDNSWatchdog ()
 
virtual ~MacDNSWatchdog ()
 
- 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 void add_actions (const MacDNS::Config::Ptr &dns, const unsigned int flags, ActionList &create, ActionList &destroy)
 
- 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.
 

Private Member Functions

bool setdns (const MacDNS::Config::Ptr &config, const unsigned int flags)
 
std::string to_string () const
 
void stop_thread ()
 
void thread_func ()
 
void callback (SCDynamicStoreRef store, CFArrayRef changedKeys)
 
void schedule_push_timer (const int seconds)
 
void cancel_push_timer_nolock ()
 
void cancel_push_timer ()
 
void push_timer_callback (CFRunLoopTimerRef timer)
 

Static Private Member Functions

static void callback_static (SCDynamicStoreRef store, CFArrayRef changedKeys, void *arg)
 
static void push_timer_callback_static (CFRunLoopTimerRef timer, void *info)
 

Private Attributes

MacDNS::Config::Ptr config_
 
MacDNS::Ptr macdns
 
std::thread * thread
 
CF::RunLoop runloop
 
CF::Timer push_timer
 
std::mutex push_timer_lock
 
Log::Context::Wrapper logwrap
 

Detailed Description

Definition at line 29 of file macdns_watchdog.hpp.

Member Typedef Documentation

◆ Ptr

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ENABLE_WATCHDOG 
SYNCHRONOUS 
FLUSH_RECONFIG 

Definition at line 35 of file macdns_watchdog.hpp.

Constructor & Destructor Documentation

◆ MacDNSWatchdog()

openvpn::MacDNSWatchdog::MacDNSWatchdog ( )
inline

Definition at line 84 of file macdns_watchdog.hpp.

◆ ~MacDNSWatchdog()

virtual openvpn::MacDNSWatchdog::~MacDNSWatchdog ( )
inlinevirtual

Definition at line 90 of file macdns_watchdog.hpp.

Member Function Documentation

◆ add_actions()

static void openvpn::MacDNSWatchdog::add_actions ( const MacDNS::Config::Ptr dns,
const unsigned int  flags,
ActionList create,
ActionList destroy 
)
inlinestatic

Definition at line 95 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ callback()

void openvpn::MacDNSWatchdog::callback ( SCDynamicStoreRef  store,
CFArrayRef  changedKeys 
)
inlineprivate

Definition at line 217 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ callback_static()

static void openvpn::MacDNSWatchdog::callback_static ( SCDynamicStoreRef  store,
CFArrayRef  changedKeys,
void *  arg 
)
inlinestaticprivate

Definition at line 211 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ cancel_push_timer()

void openvpn::MacDNSWatchdog::cancel_push_timer ( )
inlineprivate

Definition at line 245 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ cancel_push_timer_nolock()

void openvpn::MacDNSWatchdog::cancel_push_timer_nolock ( )
inlineprivate

Definition at line 236 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ push_timer_callback()

void openvpn::MacDNSWatchdog::push_timer_callback ( CFRunLoopTimerRef  timer)
inlineprivate

Definition at line 257 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ push_timer_callback_static()

static void openvpn::MacDNSWatchdog::push_timer_callback_static ( CFRunLoopTimerRef  timer,
void *  info 
)
inlinestaticprivate

Definition at line 251 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ schedule_push_timer()

void openvpn::MacDNSWatchdog::schedule_push_timer ( const int  seconds)
inlineprivate

Definition at line 224 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ setdns()

bool openvpn::MacDNSWatchdog::setdns ( const MacDNS::Config::Ptr config,
const unsigned int  flags 
)
inlineprivate

Definition at line 109 of file macdns_watchdog.hpp.

◆ stop_thread()

void openvpn::MacDNSWatchdog::stop_thread ( )
inlineprivate

Definition at line 160 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ thread_func()

void openvpn::MacDNSWatchdog::thread_func ( )
inlineprivate

Definition at line 175 of file macdns_watchdog.hpp.

Here is the caller graph for this function:

◆ to_string()

std::string openvpn::MacDNSWatchdog::to_string ( ) const
inlineprivate

Definition at line 151 of file macdns_watchdog.hpp.

Member Data Documentation

◆ config_

MacDNS::Config::Ptr openvpn::MacDNSWatchdog::config_
private

Definition at line 273 of file macdns_watchdog.hpp.

◆ logwrap

Log::Context::Wrapper openvpn::MacDNSWatchdog::logwrap
private

Definition at line 280 of file macdns_watchdog.hpp.

◆ macdns

MacDNS::Ptr openvpn::MacDNSWatchdog::macdns
private

Definition at line 274 of file macdns_watchdog.hpp.

◆ push_timer

CF::Timer openvpn::MacDNSWatchdog::push_timer
private

Definition at line 278 of file macdns_watchdog.hpp.

◆ push_timer_lock

std::mutex openvpn::MacDNSWatchdog::push_timer_lock
private

Definition at line 279 of file macdns_watchdog.hpp.

◆ runloop

CF::RunLoop openvpn::MacDNSWatchdog::runloop
private

Definition at line 277 of file macdns_watchdog.hpp.

◆ thread

std::thread* openvpn::MacDNSWatchdog::thread
private

Definition at line 276 of file macdns_watchdog.hpp.


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