#include <EBPFMon.hpp>
Public Member Functions | |
| EBPFMon () | |
| ~EBPFMon () | |
| EBPFMon (const EBPFMon &)=delete | |
| EBPFMon & | operator= (const EBPFMon &)=delete |
| bool | start (const std::string &obj_path="/usr/lib/bastionguard-sc/bsc_ebpf.o") |
| void | stop () |
| std::vector< bsc::model::Connection > | drain () |
| bool | active () const noexcept |
Private Member Functions | |
| void | drain_loop () |
Private Attributes | |
| std::atomic_bool | active_ {false} |
| std::atomic_bool | stop_ {false} |
| std::thread | thread_ |
| std::mutex | buf_mutex_ |
| std::vector< bsc::model::Connection > | buf_ |
| void * | bpf_obj_ {nullptr} |
| void * | ring_buf_ {nullptr} |
| std::vector< void * > | links_ |
Friends | |
| int | ringbuf_callback (void *ctx, void *data, size_t size) |
Definition at line 76 of file EBPFMon.hpp.
|
default |
References EBPFMon().
Referenced by EBPFMon(), EBPFMon(), and operator=().
| bsc::ebpf::EBPFMon::~EBPFMon | ( | ) |
|
delete |
References EBPFMon().
|
inlinenoexcept |
| std::vector< bsc::model::Connection > bsc::ebpf::EBPFMon::drain | ( | ) |
Definition at line 286 of file EBPFMon.cpp.
Referenced by bsc::net::SocketSnapshot::collect_connections(), bsc::net::SocketSnapshot::discard_pending_events(), bsc::net::SocketSnapshot::enrich_connection(), bsc::net::SocketSnapshot::find_connection(), and operator=().
|
private |
Definition at line 288 of file EBPFMon.cpp.
| bool bsc::ebpf::EBPFMon::start | ( | const std::string & | obj_path = "/usr/lib/bastionguard-sc/bsc_ebpf.o" | ) |
Definition at line 277 of file EBPFMon.cpp.
References bsc::logging::Logger::info(), and bsc::logging::Logger::instance().
Referenced by operator=(), and bsc::net::SocketSnapshot::start_ebpf().
| void bsc::ebpf::EBPFMon::stop | ( | ) |
Definition at line 284 of file EBPFMon.cpp.
Referenced by operator=(), bsc::net::SocketSnapshot::stop_ebpf(), and ~EBPFMon().
|
friend |
|
private |
Definition at line 120 of file EBPFMon.hpp.
Referenced by active().
|
private |
Definition at line 129 of file EBPFMon.hpp.
|
private |
Definition at line 125 of file EBPFMon.hpp.
|
mutableprivate |
Definition at line 124 of file EBPFMon.hpp.
|
private |
Definition at line 134 of file EBPFMon.hpp.
|
private |
Definition at line 130 of file EBPFMon.hpp.
|
private |
Definition at line 121 of file EBPFMon.hpp.
|
private |
Definition at line 122 of file EBPFMon.hpp.