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

#include <nrpt.hpp>

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

Public Member Functions

 ActionDelete (DWORD process_id)
 
void execute (std::ostream &log) override
 Delete all rules this process has set.
 
std::string to_string () const override
 Return the log message.
 
- 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.
 

Protected Attributes

DWORD process_id_
 

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 >::ActionDelete

Definition at line 464 of file nrpt.hpp.

Constructor & Destructor Documentation

◆ ActionDelete()

template<typename REG , typename NETAPI >
openvpn::TunWin::Nrpt< REG, NETAPI >::ActionDelete::ActionDelete ( DWORD  process_id)
inline

Definition at line 467 of file nrpt.hpp.

Member Function Documentation

◆ execute()

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

Delete all rules this process has set.

Note that the ActionCreate and ActionDelete must be executed from the same process for this to work reliably

Parameters
logwhere the log message goes

Implements openvpn::Action.

Definition at line 480 of file nrpt.hpp.

◆ to_string()

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

Return the log message.

Returns
std::string

Implements openvpn::Action.

Definition at line 491 of file nrpt.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ process_id_

template<typename REG , typename NETAPI >
DWORD openvpn::TunWin::Nrpt< REG, NETAPI >::ActionDelete::process_id_
protected

Definition at line 499 of file nrpt.hpp.


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