Skip to content
API Documentation
BastionGuard™
bsc::rule::Rule Struct Reference

#include <Rule.hpp>

Public Member Functions

bool matches (const bsc::model::Connection &conn) const

Public Attributes

std::int64_t created {0}
std::string name
std::string description
bool enabled {true}
bool precedence {false}
bool nolog {false}
std::string action {"allow"}
std::string duration {"once"}
Operator op

Detailed Description

Definition at line 23 of file Rule.hpp.

Member Function Documentation

◆ matches()

bool bsc::rule::Rule::matches ( const bsc::model::Connection & conn) const
nodiscard

Definition at line 290 of file Rule.cpp.

290{ return enabled && op.matches(conn); }
bool matches(const bsc::model::Connection &conn) const
Definition Rule.cpp:230
Operator op
Definition Rule.hpp:32

References enabled, bsc::rule::Operator::matches(), and op.

Member Data Documentation

◆ action

std::string bsc::rule::Rule::action {"allow"}

Definition at line 30 of file Rule.hpp.

Referenced by bsc::service::DaemonService::persist_learned_rule().

◆ created

std::int64_t bsc::rule::Rule::created {0}

Definition at line 24 of file Rule.hpp.

Referenced by bsc::service::DaemonService::persist_learned_rule().

◆ description

std::string bsc::rule::Rule::description

Definition at line 26 of file Rule.hpp.

Referenced by bsc::service::DaemonService::persist_learned_rule().

◆ duration

std::string bsc::rule::Rule::duration {"once"}

Definition at line 31 of file Rule.hpp.

Referenced by bsc::service::DaemonService::persist_learned_rule().

◆ enabled

bool bsc::rule::Rule::enabled {true}

Definition at line 27 of file Rule.hpp.

Referenced by matches(), and bsc::service::DaemonService::persist_learned_rule().

◆ name

std::string bsc::rule::Rule::name

Definition at line 25 of file Rule.hpp.

Referenced by bsc::service::DaemonService::persist_learned_rule().

◆ nolog

bool bsc::rule::Rule::nolog {false}

Definition at line 29 of file Rule.hpp.

Referenced by bsc::service::DaemonService::persist_learned_rule().

◆ op

Operator bsc::rule::Rule::op

Definition at line 32 of file Rule.hpp.

Referenced by matches(), and bsc::service::DaemonService::persist_learned_rule().

◆ precedence

bool bsc::rule::Rule::precedence {false}

Definition at line 28 of file Rule.hpp.

Referenced by bsc::service::DaemonService::persist_learned_rule().


The documentation for this struct was generated from the following files:
  • BastionGuard/thirdparty/bastionguard-secure-connection/daemon/include/bsc/rule/Rule.hpp
  • BastionGuard/thirdparty/bastionguard-secure-connection/daemon/src/rule/Rule.cpp