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);
110 LIBBPF_API struct bpf_object *bpf_object__open(const char *path);
111 LIBBPF_API struct bpf_object *
113 LIBBPF_API struct bpf_object *
118 LIBBPF_API struct bpf_object *
121 LIBBPF_API struct bpf_object *
134 LIBBPF_API int bpf_object__pin_maps(struct bpf_object *obj, const char *path);
135 LIBBPF_API int bpf_object__unpin_maps(struct bpf_object *obj,
137 LIBBPF_API int bpf_object__pin_programs(struct bpf_object *obj,
139 LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj,
141 LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
142 LIBBPF_API void bpf_object__close(struct bpf_object *object);
151 LIBBPF_API int bpf_object__load(struct bpf_object *obj);
152 LIBBPF_API int bpf_object__load_xattr(struct bpf_object_load_attr *attr);
154 LIBBPF_API int bpf_object__unload(struct bpf_object *obj);
156 LIBBPF_API const char *bpf_object__name(const struct bpf_object *obj);
157 LIBBPF_API unsigned int bpf_object__kversion(const struct bpf_object *obj);
158 LIBBPF_API int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version);
161 LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
162 LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
164 LIBBPF_API struct bpf_program *
167 LIBBPF_API struct bpf_program *
171 LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 7, "track bpf_objects in application code instead")
180 LIBBPF_API int bpf_object__set_priv(struct bpf_object *obj, void *priv,
182 LIBBPF_API void *bpf_object__priv(const struct bpf_object *prog);
184 LIBBPF_API int
187 LIBBPF_API int libbpf_attach_type_by_name(const char *name,
189 LIBBPF_API int libbpf_find_vmlinux_btf_id(const char *name,
194 LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__next_program() instead")
197 LIBBPF_API struct bpf_program *
205 LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__prev_program() instead")
208 LIBBPF_API struct bpf_program *
213 LIBBPF_API int bpf_program__set_priv(struct bpf_program *prog, void *priv,
216 LIBBPF_API void *bpf_program__priv(const struct bpf_program *prog);
217 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog,
220 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog);
221 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog);
222 LIBBPF_API LIBBPF_DEPRECATED("BPF program title is confusing term; please use bpf_program__section_…
224 LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog);
225 LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
229 LIBBPF_API size_t bpf_program__size(const struct bpf_program *prog);
253 LIBBPF_API const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog);
263 LIBBPF_API size_t bpf_program__insn_cnt(const struct bpf_program *prog);
265 LIBBPF_API int bpf_program__load(struct bpf_program *prog, char *license,
267 LIBBPF_API int bpf_program__fd(const struct bpf_program *prog);
269 LIBBPF_API int bpf_program__pin_instance(struct bpf_program *prog,
273 LIBBPF_API int bpf_program__unpin_instance(struct bpf_program *prog,
276 LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path);
277 LIBBPF_API int bpf_program__unpin(struct bpf_program *prog, const char *path);
278 LIBBPF_API void bpf_program__unload(struct bpf_program *prog);
282 LIBBPF_API struct bpf_link *bpf_link__open(const char *path);
283 LIBBPF_API int bpf_link__fd(const struct bpf_link *link);
284 LIBBPF_API const char *bpf_link__pin_path(const struct bpf_link *link);
285 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path);
286 LIBBPF_API int bpf_link__unpin(struct bpf_link *link);
287 LIBBPF_API int bpf_link__update_program(struct bpf_link *link,
289 LIBBPF_API void bpf_link__disconnect(struct bpf_link *link);
290 LIBBPF_API int bpf_link__detach(struct bpf_link *link);
291 LIBBPF_API int bpf_link__destroy(struct bpf_link *link);
293 LIBBPF_API struct bpf_link *
304 LIBBPF_API struct bpf_link *
307 LIBBPF_API struct bpf_link *
324 LIBBPF_API struct bpf_link *
327 LIBBPF_API struct bpf_link *
347 LIBBPF_API struct bpf_link *
351 LIBBPF_API struct bpf_link *
364 LIBBPF_API struct bpf_link *
368 LIBBPF_API struct bpf_link *
374 LIBBPF_API struct bpf_link *
377 LIBBPF_API struct bpf_link *
379 LIBBPF_API struct bpf_link *
381 LIBBPF_API struct bpf_link *
383 LIBBPF_API struct bpf_link *
385 LIBBPF_API struct bpf_link *
387 LIBBPF_API struct bpf_link *
393 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(const struct bpf_map *map);
402 LIBBPF_API struct bpf_link *
464 LIBBPF_API int bpf_program__set_prep(struct bpf_program *prog, int nr_instance,
468 LIBBPF_API int bpf_program__nth_fd(const struct bpf_program *prog, int n);
473 LIBBPF_API int bpf_program__set_socket_filter(struct bpf_program *prog);
474 LIBBPF_API int bpf_program__set_tracepoint(struct bpf_program *prog);
475 LIBBPF_API int bpf_program__set_raw_tracepoint(struct bpf_program *prog);
476 LIBBPF_API int bpf_program__set_kprobe(struct bpf_program *prog);
477 LIBBPF_API int bpf_program__set_lsm(struct bpf_program *prog);
478 LIBBPF_API int bpf_program__set_sched_cls(struct bpf_program *prog);
479 LIBBPF_API int bpf_program__set_sched_act(struct bpf_program *prog);
480 LIBBPF_API int bpf_program__set_xdp(struct bpf_program *prog);
481 LIBBPF_API int bpf_program__set_perf_event(struct bpf_program *prog);
482 LIBBPF_API int bpf_program__set_tracing(struct bpf_program *prog);
483 LIBBPF_API int bpf_program__set_struct_ops(struct bpf_program *prog);
484 LIBBPF_API int bpf_program__set_extension(struct bpf_program *prog);
485 LIBBPF_API int bpf_program__set_sk_lookup(struct bpf_program *prog);
487 LIBBPF_API enum bpf_prog_type bpf_program__get_type(const struct bpf_program *prog);
488 LIBBPF_API void bpf_program__set_type(struct bpf_program *prog,
491 LIBBPF_API enum bpf_attach_type
493 LIBBPF_API void
497 LIBBPF_API int
501 LIBBPF_API bool bpf_program__is_socket_filter(const struct bpf_program *prog);
502 LIBBPF_API bool bpf_program__is_tracepoint(const struct bpf_program *prog);
503 LIBBPF_API bool bpf_program__is_raw_tracepoint(const struct bpf_program *prog);
504 LIBBPF_API bool bpf_program__is_kprobe(const struct bpf_program *prog);
505 LIBBPF_API bool bpf_program__is_lsm(const struct bpf_program *prog);
506 LIBBPF_API bool bpf_program__is_sched_cls(const struct bpf_program *prog);
507 LIBBPF_API bool bpf_program__is_sched_act(const struct bpf_program *prog);
508 LIBBPF_API bool bpf_program__is_xdp(const struct bpf_program *prog);
509 LIBBPF_API bool bpf_program__is_perf_event(const struct bpf_program *prog);
510 LIBBPF_API bool bpf_program__is_tracing(const struct bpf_program *prog);
511 LIBBPF_API bool bpf_program__is_struct_ops(const struct bpf_program *prog);
512 LIBBPF_API bool bpf_program__is_extension(const struct bpf_program *prog);
513 LIBBPF_API bool bpf_program__is_sk_lookup(const struct bpf_program *prog);
537 LIBBPF_API struct bpf_map *
540 LIBBPF_API int
547 LIBBPF_API struct bpf_map *
550 LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__next_map() instead")
552 LIBBPF_API struct bpf_map *
561 LIBBPF_API LIBBPF_DEPRECATED_SINCE(0, 7, "use bpf_object__prev_map() instead")
563 LIBBPF_API struct bpf_map *
572 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
573 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
575 LIBBPF_API const struct bpf_map_def *bpf_map__def(const struct bpf_map *map);
577 LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
579 LIBBPF_API enum bpf_map_type bpf_map__type(const struct bpf_map *map);
580 LIBBPF_API int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type);
582 LIBBPF_API __u32 bpf_map__max_entries(const struct bpf_map *map);
583 LIBBPF_API int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);
584 LIBBPF_API int bpf_map__resize(struct bpf_map *map, __u32 max_entries);
586 LIBBPF_API __u32 bpf_map__map_flags(const struct bpf_map *map);
587 LIBBPF_API int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags);
589 LIBBPF_API __u32 bpf_map__numa_node(const struct bpf_map *map);
590 LIBBPF_API int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node);
592 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
593 LIBBPF_API int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
595 LIBBPF_API __u32 bpf_map__value_size(const struct bpf_map *map);
596 LIBBPF_API int bpf_map__set_value_size(struct bpf_map *map, __u32 size);
598 LIBBPF_API __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
599 LIBBPF_API __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
601 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
602 LIBBPF_API int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex);
604 LIBBPF_API __u64 bpf_map__map_extra(const struct bpf_map *map);
605 LIBBPF_API int bpf_map__set_map_extra(struct bpf_map *map, __u64 map_extra);
608 LIBBPF_API int bpf_map__set_priv(struct bpf_map *map, void *priv,
610 LIBBPF_API void *bpf_map__priv(const struct bpf_map *map);
611 LIBBPF_API int bpf_map__set_initial_value(struct bpf_map *map,
613 LIBBPF_API const void *bpf_map__initial_value(struct bpf_map *map, size_t *psize);
614 LIBBPF_API bool bpf_map__is_offload_neutral(const struct bpf_map *map);
623 LIBBPF_API bool bpf_map__is_internal(const struct bpf_map *map);
624 LIBBPF_API int bpf_map__set_pin_path(struct bpf_map *map, const char *path);
625 LIBBPF_API const char *bpf_map__get_pin_path(const struct bpf_map *map);
626 LIBBPF_API const char *bpf_map__pin_path(const struct bpf_map *map);
627 LIBBPF_API bool bpf_map__is_pinned(const struct bpf_map *map);
628 LIBBPF_API int bpf_map__pin(struct bpf_map *map, const char *path);
629 LIBBPF_API int bpf_map__unpin(struct bpf_map *map, const char *path);
631 LIBBPF_API int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd);
632 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
666 LIBBPF_API long libbpf_get_error(const void *ptr);
677 LIBBPF_API int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
679 LIBBPF_API int bpf_prog_load(const char *file, enum bpf_prog_type type,
698 LIBBPF_API int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags);
699 LIBBPF_API int bpf_set_link_xdp_fd_opts(int ifindex, int fd, __u32 flags,
701 LIBBPF_API int bpf_get_link_xdp_id(int ifindex, __u32 *prog_id, __u32 flags);
702 LIBBPF_API int bpf_get_link_xdp_info(int ifindex, struct xdp_link_info *info,
739 LIBBPF_API int bpf_tc_hook_create(struct bpf_tc_hook *hook);
740 LIBBPF_API int bpf_tc_hook_destroy(struct bpf_tc_hook *hook);
741 LIBBPF_API int bpf_tc_attach(const struct bpf_tc_hook *hook,
743 LIBBPF_API int bpf_tc_detach(const struct bpf_tc_hook *hook,
745 LIBBPF_API int bpf_tc_query(const struct bpf_tc_hook *hook,
759 LIBBPF_API struct ring_buffer *
762 LIBBPF_API void ring_buffer__free(struct ring_buffer *rb);
763 LIBBPF_API int ring_buffer__add(struct ring_buffer *rb, int map_fd,
765 LIBBPF_API int ring_buffer__poll(struct ring_buffer *rb, int timeout_ms);
766 LIBBPF_API int ring_buffer__consume(struct ring_buffer *rb);
767 LIBBPF_API int ring_buffer__epoll_fd(const struct ring_buffer *rb);
786 LIBBPF_API struct perf_buffer *
819 LIBBPF_API struct perf_buffer *
823 LIBBPF_API void perf_buffer__free(struct perf_buffer *pb);
824 LIBBPF_API int perf_buffer__epoll_fd(const struct perf_buffer *pb);
825 LIBBPF_API int perf_buffer__poll(struct perf_buffer *pb, int timeout_ms);
826 LIBBPF_API int perf_buffer__consume(struct perf_buffer *pb);
827 LIBBPF_API int perf_buffer__consume_buffer(struct perf_buffer *pb, size_t buf_idx);
828 LIBBPF_API size_t perf_buffer__buffer_cnt(const struct perf_buffer *pb);
829 LIBBPF_API int perf_buffer__buffer_fd(const struct perf_buffer *pb, size_t buf_idx);
834 LIBBPF_API enum bpf_perf_event_ret
842 LIBBPF_API void bpf_prog_linfo__free(struct bpf_prog_linfo *prog_linfo);
843 LIBBPF_API struct bpf_prog_linfo *
845 LIBBPF_API const struct bpf_line_info *
848 LIBBPF_API const struct bpf_line_info *
860 LIBBPF_API bool bpf_probe_prog_type(enum bpf_prog_type prog_type,
862 LIBBPF_API bool bpf_probe_map_type(enum bpf_map_type map_type, __u32 ifindex);
863 LIBBPF_API bool bpf_probe_helper(enum bpf_func_id id,
865 LIBBPF_API bool bpf_probe_large_insn_limit(__u32 ifindex);
921 LIBBPF_API struct bpf_prog_info_linear *
924 LIBBPF_API void
927 LIBBPF_API void
944 LIBBPF_API int libbpf_num_possible_cpus(void);
976 LIBBPF_API int
979 LIBBPF_API int bpf_object__load_skeleton(struct bpf_object_skeleton *s);
980 LIBBPF_API int bpf_object__attach_skeleton(struct bpf_object_skeleton *s);
981 LIBBPF_API void bpf_object__detach_skeleton(struct bpf_object_skeleton *s);
982 LIBBPF_API void bpf_object__destroy_skeleton(struct bpf_object_skeleton *s);
993 LIBBPF_API int bpf_object__gen_loader(struct bpf_object *obj,
1016 LIBBPF_API struct bpf_linker *bpf_linker__new(const char *filename, struct bpf_linker_opts *opts);
1017 LIBBPF_API int bpf_linker__add_file(struct bpf_linker *linker,
1020 LIBBPF_API int bpf_linker__finalize(struct bpf_linker *linker);
1021 LIBBPF_API void bpf_linker__free(struct bpf_linker *linker);