Skip to content

Commit

Permalink
refactor(userspace): remove libs relative imports
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Dec 1, 2023
1 parent 6411eed commit e4256d5
Show file tree
Hide file tree
Showing 36 changed files with 48 additions and 48 deletions.
9 changes: 4 additions & 5 deletions userspace/engine/evttype_index_ruleset.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ limitations under the License.
#include <map>

#include "filter_ruleset.h"
#include "sinsp.h"
#include "filter.h"
#include "event.h"

#include "gen_filter.h"
#include <libsinsp/sinsp.h>
#include <libsinsp/filter.h>
#include <libsinsp/event.h>
#include <libsinsp/gen_filter.h>

/*!
\brief A filter_ruleset that indexes enabled rules by event type,
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/falco_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include <string>
#include <exception>
#include <mutex>
#include <sinsp.h>
#include <libsinsp/sinsp.h>

//
// equivalent to an "unbounded queue" in TBB terms or largest long value
Expand Down
6 changes: 3 additions & 3 deletions userspace/engine/falco_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ limitations under the License.

#include <nlohmann/json.hpp>

#include <sinsp.h>
#include <plugin.h>
#include <libsinsp/sinsp.h>
#include <libsinsp/plugin.h>
#include <libsinsp/utils.h>

#include "falco_engine.h"
#include "falco_utils.h"
Expand All @@ -43,7 +44,6 @@ limitations under the License.

#include "formats.h"

#include "utils.h"
#include "evttype_index_ruleset.h"

const std::string falco_engine::s_default_ruleset = "falco-default-ruleset";
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/falco_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ limitations under the License.

#include <nlohmann/json.hpp>

#include "gen_filter.h"
#include <libsinsp/gen_filter.h>
#include "filter_ruleset.h"
#include "rule_loader.h"
#include "rule_loader_collector.h"
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/falco_rule.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <string>
#include "falco_common.h"

#include <filter/ast.h>
#include <libsinsp/filter/ast.h>

/*!
\brief Represents a list in the Falco Engine.
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/falco_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <iomanip>

#include "falco_utils.h"
#include "utils.h"
#include <libsinsp/utils.h>

#include <re2/re2.h>

Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/filter_details_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#pragma once

#include <filter/parser.h>
#include <libsinsp/filter/parser.h>
#include <string>
#include <unordered_set>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/filter_macro_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#pragma once

#include <filter/parser.h>
#include <libsinsp/filter/parser.h>
#include <string>
#include <unordered_set>
#include <unordered_map>
Expand Down
10 changes: 5 additions & 5 deletions userspace/engine/filter_ruleset.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ limitations under the License.
#pragma once

#include "falco_rule.h"
#include <filter/ast.h>
#include <filter.h>
#include <event.h>
#include <gen_filter.h>
#include <events/sinsp_events.h>
#include <libsinsp/filter/ast.h>
#include <libsinsp/filter.h>
#include <libsinsp/event.h>
#include <libsinsp/gen_filter.h>
#include <libsinsp/events/sinsp_events.h>

/*!
\brief Manages a set of rulesets. A ruleset is a set of
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/filter_warning_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#include <sinsp.h>
#include <libsinsp/sinsp.h>
#include "filter_warning_resolver.h"

using namespace falco;
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/filter_warning_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#pragma once

#include <filter/parser.h>
#include <libsinsp/filter/parser.h>
#include <string>
#include <set>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.

#include <string>
#include <map>
#include <gen_filter.h>
#include <libsinsp/gen_filter.h>
#include "falco_engine.h"

class falco_formats
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/rule_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ limitations under the License.
#include "falco_source.h"
#include "falco_load_result.h"
#include "indexed_vector.h"
#include "version.h"
#include <libsinsp/version.h>

namespace rule_loader
{
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/rule_loader_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*/

#include <string>
#include <version.h>
#include <libsinsp/version.h>

#include "falco_engine.h"
#include "rule_loader_collector.h"
Expand Down
2 changes: 1 addition & 1 deletion userspace/engine/rule_loader_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

#include "rule_loader_reader.h"
#include "falco_engine_version.h"
#include "logger.h"
#include <libsinsp/logger.h>

#define THROW(cond, err, ctx) { if ((cond)) { throw rule_loader::rule_load_exception(falco::load_result::LOAD_ERR_YAML_VALIDATE, (err), (ctx)); } }

Expand Down
4 changes: 2 additions & 2 deletions userspace/engine/rule_loader_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.

#include "rule_loader.h"
#include "rule_loader_collector.h"
#include "logger.h"
#include "version.h"
#include <libsinsp/logger.h>
#include <libsinsp/version.h>
#include "falco_engine_version.h"

namespace rule_loader
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/helpers_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*/

#include "helpers.h"
#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

#include <unordered_set>

Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/helpers_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
#include <sys/stat.h>
#include <fcntl.h>

#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>
#include <configuration.h>

#include "helpers.h"
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/init_falco_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*/

#include "actions.h"
#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

using namespace falco::app;
using namespace falco::app::actions;
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/init_inspectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

#include <unordered_set>

#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

using namespace falco::app;
using namespace falco::app::actions;
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/list_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include "actions.h"
#include "helpers.h"

#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

using namespace falco::app;
using namespace falco::app::actions;
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/load_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*/

#include "actions.h"
#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

using namespace falco::app;
using namespace falco::app::actions;
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/load_rules_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include "actions.h"
#include "helpers.h"

#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

#include <unordered_set>

Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/print_plugin_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include "actions.h"
#include "helpers.h"

#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

using namespace falco::app;
using namespace falco::app::actions;
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/actions/process_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ limitations under the License.
#include "../../falco_outputs.h"
#include "../../event_drops.h"

#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

using namespace falco::app;
using namespace falco::app::actions;
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#pragma once

#include <event.h>
#include <libsinsp/event.h>

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/app/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ limitations under the License.
#include "../webserver.h"
#endif

#include <sinsp.h>
#include <libsinsp/sinsp.h>

#include <string>
#include <memory>
Expand Down
4 changes: 2 additions & 2 deletions userspace/falco/event_drops.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.
#include <memory>
#include <unordered_set>

#include <sinsp.h>
#include <token_bucket.h>
#include <libsinsp/sinsp.h>
#include <libsinsp/token_bucket.h>

#include "logger.h"
#include "falco_outputs.h"
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/falco_outputs.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include <memory>
#include <map>

#include "gen_filter.h"
#include <libsinsp/gen_filter.h>
#include "falco_common.h"
#include "falco_engine.h"
#include "outputs.h"
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#pragma once

#include "sinsp.h"
#include <libsinsp/sinsp.h>
#ifndef _WIN32
#include <syslog.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/outputs.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <map>

#include "falco_common.h"
#include "gen_filter.h"
#include <libsinsp/gen_filter.h>
#include <nlohmann/json.hpp>

namespace falco
Expand Down
3 changes: 2 additions & 1 deletion userspace/falco/stats_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ limitations under the License.
#include "stats_writer.h"
#include "logger.h"
#include "config_falco.h"
#include "strl.h"
#include <libscap/strl.h>
#include <libscap/scap_vtable.h>

// note: ticker_t is an uint16_t, which is enough because we don't care about
// overflows here. Threads calling stats_writer::handle() will just
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/stats_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <string>
#include <unordered_map>

#include <sinsp.h>
#include <libsinsp/sinsp.h>

#ifndef __EMSCRIPTEN__
#include "tbb/concurrent_queue.h"
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/versions_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include "config_falco.h"
#include "falco_engine_version.h"

#include <plugin_manager.h>
#include <libsinsp/plugin_manager.h>

// todo: move string conversion to scap
static std::string get_driver_api_version(const std::shared_ptr<sinsp>& s)
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/versions_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include <memory>
#include <string>
#include <unordered_map>
#include <sinsp.h>
#include <libsinsp/sinsp.h>
#include <nlohmann/json.hpp>

namespace falco
Expand Down
2 changes: 1 addition & 1 deletion userspace/falco/webserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <httplib.h>
#include <thread>
#include <memory>
#include <sinsp.h>
#include <libsinsp/sinsp.h>
#include "configuration.h"

class falco_webserver
Expand Down

0 comments on commit e4256d5

Please sign in to comment.