Modify bindings for newly designed classes

This commit is contained in:
Pragyansh Chaturvedi
2025-10-19 02:40:06 +05:30
parent 4a5ff0c1c2
commit 744a50925e
3 changed files with 47 additions and 28 deletions

View File

@ -1,3 +1,4 @@
#include "bpf_object.h"
#include "bpf_program.h"
#include "bpf_exception.h"
#include <cerrno>

View File

@ -4,6 +4,7 @@
#include <libbpf.h>
#include <memory>
#include <string>
#include <cstring>
class BpfObject;
@ -26,8 +27,8 @@ public:
BpfProgram(BpfProgram &&) noexcept;
BpfProgram &operator=(BpfProgram &&) noexcept;
bool attach();
bool detach();
void attach();
void detach();
[[nodiscard]] bool is_attached() const { return link_ != nullptr; }
[[nodiscard]] std::string get_name() const { return program_name_; }