mirror of
https://github.com/varun-r-mallya/pylibbpf.git
synced 2026-02-12 16:11:00 +00:00
Reimplement BpfProgram
This commit is contained in:
@ -16,7 +16,7 @@ private:
|
||||
std::string program_name_;
|
||||
|
||||
public:
|
||||
explicit BpfProgram(std::shared_ptr<BpfObject> parent, struct bpf_program *raw_prog, std::string program_name = "");
|
||||
explicit BpfProgram(std::shared_ptr<BpfObject> parent, struct bpf_program *raw_prog, const std::string& program_name);
|
||||
|
||||
~BpfProgram();
|
||||
|
||||
@ -28,8 +28,6 @@ public:
|
||||
bool attach();
|
||||
bool detach();
|
||||
|
||||
void load_and_attach();
|
||||
|
||||
[[nodiscard]] bool is_attached() const { return link_ != nullptr; }
|
||||
[[nodiscard]] std::string get_name() const { return program_name_; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user