49 const struct
bpf_map* map, const struct bpf_object* obj);
64 const struct
bpf_map* map, const struct bpf_object* obj);
75 struct bpf_object*
obj;
108 __declspec(deprecated("Track bpf_objects in application code instead.")) struct bpf_object*
bpf_object__next(
109 struct bpf_object* prev);
111 #define bpf_object__for_each_safe(pos, tmp) \
112 for ((pos) = bpf_object__next(NULL), (tmp) = bpf_object__next(pos); (pos) != NULL; \
113 (pos) = (tmp), (tmp) = bpf_object__next(tmp))
129 __declspec(deprecated(
"Use bpf_object__close() instead.")) int
bpf_object__unload(struct bpf_object* obj);
165 const
char* file, enum
bpf_prog_type type, struct bpf_object** pobj,
int* prog_fd);
180 struct bpf_program* prog, const struct bpf_object* obj);
195 struct bpf_program* prog, const struct bpf_object* obj);
bpf_prog_type
Definition: ebpf_structs.h:171
int bpf_object__load(struct bpf_object *obj)
Load all the programs in a given object.
size_t bpf_program__insn_cnt(const struct bpf_program *prog)
bpf_program__insn_cnt() returns number of struct bpf_insn's that form specified BPF program.
struct bpf_object * bpf_object__open(const char *path)
Open a file without loading the programs.
struct bpf_map * bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *map)
Get the next map for a given eBPF object.
struct bpf_program * bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *prog)
Get the previous eBPF program for a given eBPF object.
struct bpf_program * bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prog)
Get the next program for a given eBPF object.
struct bpf_map * bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *map)
Get the previous map for a given eBPF object.
size_t bpf_program__size(const struct bpf_program *prog)
Get the eBPF program size in bytes.
struct bpf_object * bpf_object__next(struct bpf_object *prev)
Get the next eBPF object opened by the calling process.
int bpf_object__unload(struct bpf_object *obj)
Unload all the programs in a given object.
int bpf_prog_load_deprecated(const char *file, enum bpf_prog_type type, struct bpf_object **pobj, int *prog_fd)
Load (but do not attach) eBPF maps and programs from an ELF file.
int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags)
Attach an XDP program to a given interface.
struct bpf_map * bpf_map__prev(const struct bpf_map *map, const struct bpf_object *obj)
Get the previous map for a given eBPF object.
struct bpf_program * bpf_program__next(struct bpf_program *prog, const struct bpf_object *obj)
Get the next program for a given eBPF object.
struct bpf_map * bpf_map__next(const struct bpf_map *map, const struct bpf_object *obj)
Get the next map for a given eBPF object.
struct bpf_program * bpf_program__prev(struct bpf_program *prog, const struct bpf_object *obj)
Get the previous eBPF program for a given eBPF object.
int bpf_object__load_xattr(struct bpf_object_load_attr *attr)
Load all the programs in a given object.
Definition: libbpf_legacy.h:74
struct bpf_object * obj
Definition: libbpf_legacy.h:75
int log_level
Definition: libbpf_legacy.h:76
const char * target_btf_path
Definition: libbpf_legacy.h:77
uint32_t __u32
Definition: types.h:6