Lines Matching refs:LIBBPF_API

48 LIBBPF_API int libbpf_strerror(int err, char *buf, size_t size);
59 LIBBPF_API libbpf_print_fn_t libbpf_set_print(libbpf_print_fn_t fn);
107 LIBBPF_API struct bpf_object *bpf_object__open(const char *path);
108 LIBBPF_API struct bpf_object *
110 LIBBPF_API struct bpf_object *
115 LIBBPF_API struct bpf_object *
118 LIBBPF_API struct bpf_object *
131 LIBBPF_API int bpf_object__pin_maps(struct bpf_object *obj, const char *path);
132 LIBBPF_API int bpf_object__unpin_maps(struct bpf_object *obj,
134 LIBBPF_API int bpf_object__pin_programs(struct bpf_object *obj,
136 LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj,
138 LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
139 LIBBPF_API void bpf_object__close(struct bpf_object *object);
148 LIBBPF_API int bpf_object__load(struct bpf_object *obj);
149 LIBBPF_API int bpf_object__load_xattr(struct bpf_object_load_attr *attr);
150 LIBBPF_API int bpf_object__unload(struct bpf_object *obj);
152 LIBBPF_API const char *bpf_object__name(const struct bpf_object *obj);
153 LIBBPF_API unsigned int bpf_object__kversion(const struct bpf_object *obj);
154 LIBBPF_API int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version);
157 LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
158 LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
160 LIBBPF_API struct bpf_program *
163 LIBBPF_API struct bpf_program *
167 LIBBPF_API struct bpf_object *bpf_object__next(struct bpf_object *prev);
175 LIBBPF_API int bpf_object__set_priv(struct bpf_object *obj, void *priv,
177 LIBBPF_API void *bpf_object__priv(const struct bpf_object *prog);
179 LIBBPF_API int
182 LIBBPF_API int libbpf_attach_type_by_name(const char *name,
184 LIBBPF_API int libbpf_find_vmlinux_btf_id(const char *name,
189 LIBBPF_API struct bpf_program *bpf_program__next(struct bpf_program *prog,
197 LIBBPF_API struct bpf_program *bpf_program__prev(struct bpf_program *prog,
202 LIBBPF_API int bpf_program__set_priv(struct bpf_program *prog, void *priv,
205 LIBBPF_API void *bpf_program__priv(const struct bpf_program *prog);
206 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog,
209 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog);
210 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog);
211 LIBBPF_API LIBBPF_DEPRECATED("BPF program title is confusing term; please use bpf_program__section_…
213 LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog);
214 LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
217 LIBBPF_API size_t bpf_program__size(const struct bpf_program *prog);
219 LIBBPF_API int bpf_program__load(struct bpf_program *prog, char *license,
221 LIBBPF_API int bpf_program__fd(const struct bpf_program *prog);
222 LIBBPF_API int bpf_program__pin_instance(struct bpf_program *prog,
225 LIBBPF_API int bpf_program__unpin_instance(struct bpf_program *prog,
228 LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path);
229 LIBBPF_API int bpf_program__unpin(struct bpf_program *prog, const char *path);
230 LIBBPF_API void bpf_program__unload(struct bpf_program *prog);
234 LIBBPF_API struct bpf_link *bpf_link__open(const char *path);
235 LIBBPF_API int bpf_link__fd(const struct bpf_link *link);
236 LIBBPF_API const char *bpf_link__pin_path(const struct bpf_link *link);
237 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path);
238 LIBBPF_API int bpf_link__unpin(struct bpf_link *link);
239 LIBBPF_API int bpf_link__update_program(struct bpf_link *link,
241 LIBBPF_API void bpf_link__disconnect(struct bpf_link *link);
242 LIBBPF_API int bpf_link__detach(struct bpf_link *link);
243 LIBBPF_API int bpf_link__destroy(struct bpf_link *link);
245 LIBBPF_API struct bpf_link *
256 LIBBPF_API struct bpf_link *
259 LIBBPF_API struct bpf_link *
276 LIBBPF_API struct bpf_link *
279 LIBBPF_API struct bpf_link *
299 LIBBPF_API struct bpf_link *
303 LIBBPF_API struct bpf_link *
316 LIBBPF_API struct bpf_link *
320 LIBBPF_API struct bpf_link *
326 LIBBPF_API struct bpf_link *
329 LIBBPF_API struct bpf_link *
331 LIBBPF_API struct bpf_link *
333 LIBBPF_API struct bpf_link *
335 LIBBPF_API struct bpf_link *
337 LIBBPF_API struct bpf_link *
339 LIBBPF_API struct bpf_link *
345 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(struct bpf_map *map);
354 LIBBPF_API struct bpf_link *
417 LIBBPF_API int bpf_program__set_prep(struct bpf_program *prog, int nr_instance,
420 LIBBPF_API int bpf_program__nth_fd(const struct bpf_program *prog, int n);
425 LIBBPF_API int bpf_program__set_socket_filter(struct bpf_program *prog);
426 LIBBPF_API int bpf_program__set_tracepoint(struct bpf_program *prog);
427 LIBBPF_API int bpf_program__set_raw_tracepoint(struct bpf_program *prog);
428 LIBBPF_API int bpf_program__set_kprobe(struct bpf_program *prog);
429 LIBBPF_API int bpf_program__set_lsm(struct bpf_program *prog);
430 LIBBPF_API int bpf_program__set_sched_cls(struct bpf_program *prog);
431 LIBBPF_API int bpf_program__set_sched_act(struct bpf_program *prog);
432 LIBBPF_API int bpf_program__set_xdp(struct bpf_program *prog);
433 LIBBPF_API int bpf_program__set_perf_event(struct bpf_program *prog);
434 LIBBPF_API int bpf_program__set_tracing(struct bpf_program *prog);
435 LIBBPF_API int bpf_program__set_struct_ops(struct bpf_program *prog);
436 LIBBPF_API int bpf_program__set_extension(struct bpf_program *prog);
437 LIBBPF_API int bpf_program__set_sk_lookup(struct bpf_program *prog);
439 LIBBPF_API enum bpf_prog_type bpf_program__get_type(const struct bpf_program *prog);
440 LIBBPF_API void bpf_program__set_type(struct bpf_program *prog,
443 LIBBPF_API enum bpf_attach_type
445 LIBBPF_API void
449 LIBBPF_API int
453 LIBBPF_API bool bpf_program__is_socket_filter(const struct bpf_program *prog);
454 LIBBPF_API bool bpf_program__is_tracepoint(const struct bpf_program *prog);
455 LIBBPF_API bool bpf_program__is_raw_tracepoint(const struct bpf_program *prog);
456 LIBBPF_API bool bpf_program__is_kprobe(const struct bpf_program *prog);
457 LIBBPF_API bool bpf_program__is_lsm(const struct bpf_program *prog);
458 LIBBPF_API bool bpf_program__is_sched_cls(const struct bpf_program *prog);
459 LIBBPF_API bool bpf_program__is_sched_act(const struct bpf_program *prog);
460 LIBBPF_API bool bpf_program__is_xdp(const struct bpf_program *prog);
461 LIBBPF_API bool bpf_program__is_perf_event(const struct bpf_program *prog);
462 LIBBPF_API bool bpf_program__is_tracing(const struct bpf_program *prog);
463 LIBBPF_API bool bpf_program__is_struct_ops(const struct bpf_program *prog);
464 LIBBPF_API bool bpf_program__is_extension(const struct bpf_program *prog);
465 LIBBPF_API bool bpf_program__is_sk_lookup(const struct bpf_program *prog);
485 LIBBPF_API struct bpf_map *
488 LIBBPF_API int
495 LIBBPF_API struct bpf_map *
498 LIBBPF_API struct bpf_map *
506 LIBBPF_API struct bpf_map *
510 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
511 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
513 LIBBPF_API const struct bpf_map_def *bpf_map__def(const struct bpf_map *map);
515 LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
517 LIBBPF_API enum bpf_map_type bpf_map__type(const struct bpf_map *map);
518 LIBBPF_API int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type);
520 LIBBPF_API __u32 bpf_map__max_entries(const struct bpf_map *map);
521 LIBBPF_API int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);
522 LIBBPF_API int bpf_map__resize(struct bpf_map *map, __u32 max_entries);
524 LIBBPF_API __u32 bpf_map__map_flags(const struct bpf_map *map);
525 LIBBPF_API int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags);
527 LIBBPF_API __u32 bpf_map__numa_node(const struct bpf_map *map);
528 LIBBPF_API int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node);
530 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
531 LIBBPF_API int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
533 LIBBPF_API __u32 bpf_map__value_size(const struct bpf_map *map);
534 LIBBPF_API int bpf_map__set_value_size(struct bpf_map *map, __u32 size);
536 LIBBPF_API __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
537 LIBBPF_API __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
539 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
540 LIBBPF_API int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex);
543 LIBBPF_API int bpf_map__set_priv(struct bpf_map *map, void *priv,
545 LIBBPF_API void *bpf_map__priv(const struct bpf_map *map);
546 LIBBPF_API int bpf_map__set_initial_value(struct bpf_map *map,
548 LIBBPF_API const void *bpf_map__initial_value(struct bpf_map *map, size_t *psize);
549 LIBBPF_API bool bpf_map__is_offload_neutral(const struct bpf_map *map);
550 LIBBPF_API bool bpf_map__is_internal(const struct bpf_map *map);
551 LIBBPF_API int bpf_map__set_pin_path(struct bpf_map *map, const char *path);
552 LIBBPF_API const char *bpf_map__get_pin_path(const struct bpf_map *map);
553 LIBBPF_API const char *bpf_map__pin_path(const struct bpf_map *map);
554 LIBBPF_API bool bpf_map__is_pinned(const struct bpf_map *map);
555 LIBBPF_API int bpf_map__pin(struct bpf_map *map, const char *path);
556 LIBBPF_API int bpf_map__unpin(struct bpf_map *map, const char *path);
558 LIBBPF_API int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd);
559 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
561 LIBBPF_API long libbpf_get_error(const void *ptr);
572 LIBBPF_API int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
574 LIBBPF_API int bpf_prog_load(const char *file, enum bpf_prog_type type,
593 LIBBPF_API int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags);
594 LIBBPF_API int bpf_set_link_xdp_fd_opts(int ifindex, int fd, __u32 flags,
596 LIBBPF_API int bpf_get_link_xdp_id(int ifindex, __u32 *prog_id, __u32 flags);
597 LIBBPF_API int bpf_get_link_xdp_info(int ifindex, struct xdp_link_info *info,
634 LIBBPF_API int bpf_tc_hook_create(struct bpf_tc_hook *hook);
635 LIBBPF_API int bpf_tc_hook_destroy(struct bpf_tc_hook *hook);
636 LIBBPF_API int bpf_tc_attach(const struct bpf_tc_hook *hook,
638 LIBBPF_API int bpf_tc_detach(const struct bpf_tc_hook *hook,
640 LIBBPF_API int bpf_tc_query(const struct bpf_tc_hook *hook,
654 LIBBPF_API struct ring_buffer *
657 LIBBPF_API void ring_buffer__free(struct ring_buffer *rb);
658 LIBBPF_API int ring_buffer__add(struct ring_buffer *rb, int map_fd,
660 LIBBPF_API int ring_buffer__poll(struct ring_buffer *rb, int timeout_ms);
661 LIBBPF_API int ring_buffer__consume(struct ring_buffer *rb);
662 LIBBPF_API int ring_buffer__epoll_fd(const struct ring_buffer *rb);
681 LIBBPF_API struct perf_buffer *
714 LIBBPF_API struct perf_buffer *
718 LIBBPF_API void perf_buffer__free(struct perf_buffer *pb);
719 LIBBPF_API int perf_buffer__epoll_fd(const struct perf_buffer *pb);
720 LIBBPF_API int perf_buffer__poll(struct perf_buffer *pb, int timeout_ms);
721 LIBBPF_API int perf_buffer__consume(struct perf_buffer *pb);
722 LIBBPF_API int perf_buffer__consume_buffer(struct perf_buffer *pb, size_t buf_idx);
723 LIBBPF_API size_t perf_buffer__buffer_cnt(const struct perf_buffer *pb);
724 LIBBPF_API int perf_buffer__buffer_fd(const struct perf_buffer *pb, size_t buf_idx);
729 LIBBPF_API enum bpf_perf_event_ret
737 LIBBPF_API void bpf_prog_linfo__free(struct bpf_prog_linfo *prog_linfo);
738 LIBBPF_API struct bpf_prog_linfo *
740 LIBBPF_API const struct bpf_line_info *
743 LIBBPF_API const struct bpf_line_info *
755 LIBBPF_API bool bpf_probe_prog_type(enum bpf_prog_type prog_type,
757 LIBBPF_API bool bpf_probe_map_type(enum bpf_map_type map_type, __u32 ifindex);
758 LIBBPF_API bool bpf_probe_helper(enum bpf_func_id id,
760 LIBBPF_API bool bpf_probe_large_insn_limit(__u32 ifindex);
816 LIBBPF_API struct bpf_prog_info_linear *
819 LIBBPF_API void
822 LIBBPF_API void
839 LIBBPF_API int libbpf_num_possible_cpus(void);
871 LIBBPF_API int
874 LIBBPF_API int bpf_object__load_skeleton(struct bpf_object_skeleton *s);
875 LIBBPF_API int bpf_object__attach_skeleton(struct bpf_object_skeleton *s);
876 LIBBPF_API void bpf_object__detach_skeleton(struct bpf_object_skeleton *s);
877 LIBBPF_API void bpf_object__destroy_skeleton(struct bpf_object_skeleton *s);
888 LIBBPF_API int bpf_object__gen_loader(struct bpf_object *obj,
911 LIBBPF_API struct bpf_linker *bpf_linker__new(const char *filename, struct bpf_linker_opts *opts);
912 LIBBPF_API int bpf_linker__add_file(struct bpf_linker *linker,
915 LIBBPF_API int bpf_linker__finalize(struct bpf_linker *linker);
916 LIBBPF_API void bpf_linker__free(struct bpf_linker *linker);