mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-02 01:22:16 +00:00
remove sinsp.h public dependencies
Signed-off-by: VadimZy <vadim.zyarko@sysdig.com>
This commit is contained in:
parent
5745faeccc
commit
0de617a7fb
@ -27,6 +27,13 @@ static bool is_evttype_operator(const string& op)
|
|||||||
return op == "==" || op == "=" || op == "!=" || op == "in";
|
return op == "==" || op == "=" || op == "!=" || op == "in";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
size_t falco_event_types::get_ppm_event_max()
|
||||||
|
{
|
||||||
|
return PPM_EVENT_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void filter_evttype_resolver::visitor::inversion(falco_event_types& types)
|
void filter_evttype_resolver::visitor::inversion(falco_event_types& types)
|
||||||
{
|
{
|
||||||
falco_event_types all_types;
|
falco_event_types all_types;
|
||||||
|
@ -16,8 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sinsp.h>
|
|
||||||
|
|
||||||
#include <filter/parser.h>
|
#include <filter/parser.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -32,7 +30,8 @@ private:
|
|||||||
|
|
||||||
static inline void check_range(uint16_t e)
|
static inline void check_range(uint16_t e)
|
||||||
{
|
{
|
||||||
if(e > PPM_EVENT_MAX)
|
static const auto enum_max = get_ppm_event_max();
|
||||||
|
if(e > enum_max)
|
||||||
{
|
{
|
||||||
throw std::range_error("invalid event type");
|
throw std::range_error("invalid event type");
|
||||||
}
|
}
|
||||||
@ -44,8 +43,10 @@ public:
|
|||||||
falco_event_types& operator=(falco_event_types&&) = default;
|
falco_event_types& operator=(falco_event_types&&) = default;
|
||||||
falco_event_types& operator=(const falco_event_types&) = default;
|
falco_event_types& operator=(const falco_event_types&) = default;
|
||||||
|
|
||||||
|
static size_t get_ppm_event_max();
|
||||||
|
|
||||||
inline falco_event_types():
|
inline falco_event_types():
|
||||||
m_types(PPM_EVENT_MAX + 1, 0)
|
m_types(get_ppm_event_max() + 1, 0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +58,7 @@ public:
|
|||||||
|
|
||||||
void merge(const falco_event_types& other)
|
void merge(const falco_event_types& other)
|
||||||
{
|
{
|
||||||
for(int i = 0; i <= PPM_EVENT_MAX; ++i)
|
for(size_t i = 0; i <= get_ppm_event_max(); ++i)
|
||||||
{
|
{
|
||||||
m_types[i] |= other.m_types[i];
|
m_types[i] |= other.m_types[i];
|
||||||
}
|
}
|
||||||
@ -93,7 +94,7 @@ public:
|
|||||||
falco_event_types diff(const falco_event_types& other)
|
falco_event_types diff(const falco_event_types& other)
|
||||||
{
|
{
|
||||||
falco_event_types ret;
|
falco_event_types ret;
|
||||||
for(size_t i = 0; i <= PPM_EVENT_MAX; ++i)
|
for(size_t i = 0; i <= get_ppm_event_max(); ++i)
|
||||||
{
|
{
|
||||||
if(m_types[i] == 1 && other.m_types[i] == 0)
|
if(m_types[i] == 1 && other.m_types[i] == 0)
|
||||||
{
|
{
|
||||||
@ -106,7 +107,7 @@ public:
|
|||||||
falco_event_types intersect(const falco_event_types& other)
|
falco_event_types intersect(const falco_event_types& other)
|
||||||
{
|
{
|
||||||
falco_event_types ret;
|
falco_event_types ret;
|
||||||
for(size_t i = 0; i <= PPM_EVENT_MAX; ++i)
|
for(size_t i = 0; i <= get_ppm_event_max(); ++i)
|
||||||
{
|
{
|
||||||
if(m_types[i] == 1 && other.m_types[i] == 1)
|
if(m_types[i] == 1 && other.m_types[i] == 1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user