OpenVPN 3 Core Library
|
Base class for WFP actions. More...
#include <wfp.hpp>
Public Member Functions | |
void | execute (std::ostream &log) override |
Invoke the context class to block / unblock traffic. | |
std::string | to_string () const override |
![]() | |
virtual Json::Value | to_json () const |
virtual | ~Action ()=default |
![]() | |
RC () noexcept=default | |
RC (const RC &)=delete | |
virtual | ~RC ()=default |
RC & | operator= (const RC &)=delete |
olong | use_count () const noexcept |
Delegates call to RCImpl and returns the result. | |
Protected Member Functions | |
ActionBase (const bool block, const std::wstring &openvpn_app_path, const NET_IFINDEX itf_index, const Block block_type, const Context::Ptr &ctx) | |
Private Attributes | |
const bool | block_ |
const std::wstring | openvpn_app_path_ |
const NET_IFINDEX | itf_index_ |
const Block | block_type_ |
Context::Ptr | ctx_ |
Additional Inherited Members | |
![]() | |
typedef RCPtr< Action > | Ptr |
![]() | |
typedef RCPtr< RC > | Ptr |
![]() | |
static constexpr bool | is_thread_safe () |
Delegates call to RCImpl and returns the result. | |
![]() | |
std::string | mark |
Base class for WFP actions.
It holds a pointer to the WFP context and blocks / unblocks using the context, when it is invoked. This class cannot be constructed, use the derived ActionBlock and ActionUnblock classes to manage the firewall rules.
|
inlineprotected |
|
inlineoverridevirtual |
Invoke the context class to block / unblock traffic.
log | the log stream for diagnostics |
Implements openvpn::Action.
|
inlineoverridevirtual |
Implements openvpn::Action.
Definition at line 218 of file wfp.hpp.
|
private |
|
private |
|
private |
|
private |