Skip to content

Commit

Permalink
cc: define load_func and unload_func public (iovisor#1065)
Browse files Browse the repository at this point in the history
With the current API it is not possible to load any kind of ebpf
program, for example BPF_PROG_TYPE_SCHED_CLS, this commit solves that by
defining load_func and unload_func as part of the public API.

Signed-off-by: Mauricio Vasquez B <[email protected]>
  • Loading branch information
mauriciovasquezbernal authored and goldshtn committed Mar 27, 2017
1 parent 277ebbc commit 26383f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cc/BPF.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ class BPF {
StatusTuple close_perf_buffer(const std::string& name);
void poll_perf_buffer(const std::string& name, int timeout = -1);

private:
StatusTuple load_func(const std::string& func_name, enum bpf_prog_type type,
int& fd);
StatusTuple unload_func(const std::string& func_name);

private:
std::string get_kprobe_event(const std::string& kernel_func,
bpf_probe_attach_type type);
std::string get_uprobe_event(const std::string& binary_path, uint64_t offset,
Expand Down

0 comments on commit 26383f2

Please sign in to comment.