Lines Matching refs:LIBBPF_API
27 LIBBPF_API __u32 libbpf_major_version(void);
28 LIBBPF_API __u32 libbpf_minor_version(void);
29 LIBBPF_API const char *libbpf_version_string(void);
52 LIBBPF_API int libbpf_strerror(int err, char *buf, size_t size);
61 LIBBPF_API const char *libbpf_bpf_attach_type_str(enum bpf_attach_type t);
70 LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
79 LIBBPF_API const char *libbpf_bpf_map_type_str(enum bpf_map_type t);
88 LIBBPF_API const char *libbpf_bpf_prog_type_str(enum bpf_prog_type t);
105 LIBBPF_API libbpf_print_fn_t libbpf_set_print(libbpf_print_fn_t fn);
191 LIBBPF_API struct bpf_object *bpf_object__open(const char *path);
203 LIBBPF_API struct bpf_object *
216 LIBBPF_API struct bpf_object *
227 LIBBPF_API int bpf_object__load(struct bpf_object *obj);
234 LIBBPF_API void bpf_object__close(struct bpf_object *obj);
247 LIBBPF_API int bpf_object__pin_maps(struct bpf_object *obj, const char *path);
260 LIBBPF_API int bpf_object__unpin_maps(struct bpf_object *obj,
262 LIBBPF_API int bpf_object__pin_programs(struct bpf_object *obj,
264 LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj,
266 LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
268 LIBBPF_API const char *bpf_object__name(const struct bpf_object *obj);
269 LIBBPF_API unsigned int bpf_object__kversion(const struct bpf_object *obj);
270 LIBBPF_API int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version);
273 LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
274 LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
276 LIBBPF_API struct bpf_program *
280 LIBBPF_API int
283 LIBBPF_API int libbpf_attach_type_by_name(const char *name,
285 LIBBPF_API int libbpf_find_vmlinux_btf_id(const char *name,
291 LIBBPF_API struct bpf_program *
299 LIBBPF_API struct bpf_program *
302 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog,
305 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog);
306 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog);
307 LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog);
308 LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
309 LIBBPF_API bool bpf_program__autoattach(const struct bpf_program *prog);
310 LIBBPF_API void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach);
334 LIBBPF_API const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog);
350 LIBBPF_API int bpf_program__set_insns(struct bpf_program *prog,
362 LIBBPF_API size_t bpf_program__insn_cnt(const struct bpf_program *prog);
364 LIBBPF_API int bpf_program__fd(const struct bpf_program *prog);
376 LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path);
390 LIBBPF_API int bpf_program__unpin(struct bpf_program *prog, const char *path);
391 LIBBPF_API void bpf_program__unload(struct bpf_program *prog);
395 LIBBPF_API struct bpf_link *bpf_link__open(const char *path);
396 LIBBPF_API int bpf_link__fd(const struct bpf_link *link);
397 LIBBPF_API const char *bpf_link__pin_path(const struct bpf_link *link);
409 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path);
423 LIBBPF_API int bpf_link__unpin(struct bpf_link *link);
424 LIBBPF_API int bpf_link__update_program(struct bpf_link *link,
426 LIBBPF_API void bpf_link__disconnect(struct bpf_link *link);
427 LIBBPF_API int bpf_link__detach(struct bpf_link *link);
428 LIBBPF_API int bpf_link__destroy(struct bpf_link *link);
446 LIBBPF_API struct bpf_link *
457 LIBBPF_API struct bpf_link *
460 LIBBPF_API struct bpf_link *
477 LIBBPF_API struct bpf_link *
480 LIBBPF_API struct bpf_link *
503 LIBBPF_API struct bpf_link *
549 LIBBPF_API struct bpf_link *
593 LIBBPF_API struct bpf_link *
612 LIBBPF_API struct bpf_link *
642 LIBBPF_API struct bpf_link *
656 LIBBPF_API struct bpf_link *
660 LIBBPF_API struct bpf_link *
666 LIBBPF_API struct bpf_link *
678 LIBBPF_API struct bpf_link *
680 LIBBPF_API struct bpf_link *
683 LIBBPF_API struct bpf_link *
685 LIBBPF_API struct bpf_link *
687 LIBBPF_API struct bpf_link *
689 LIBBPF_API struct bpf_link *
691 LIBBPF_API struct bpf_link *
697 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(const struct bpf_map *map);
706 LIBBPF_API struct bpf_link *
710 LIBBPF_API enum bpf_prog_type bpf_program__type(const struct bpf_program *prog);
723 LIBBPF_API int bpf_program__set_type(struct bpf_program *prog,
726 LIBBPF_API enum bpf_attach_type
741 LIBBPF_API int
745 LIBBPF_API __u32 bpf_program__flags(const struct bpf_program *prog);
746 LIBBPF_API int bpf_program__set_flags(struct bpf_program *prog, __u32 flags);
752 LIBBPF_API __u32 bpf_program__log_level(const struct bpf_program *prog);
753 LIBBPF_API int bpf_program__set_log_level(struct bpf_program *prog, __u32 log_level);
754 LIBBPF_API const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size);
755 LIBBPF_API int bpf_program__set_log_buf(struct bpf_program *prog, char *log_buf, size_t log_size);
768 LIBBPF_API int
780 LIBBPF_API struct bpf_map *
783 LIBBPF_API int
786 LIBBPF_API struct bpf_map *
795 LIBBPF_API struct bpf_map *
817 LIBBPF_API int bpf_map__set_autocreate(struct bpf_map *map, bool autocreate);
818 LIBBPF_API bool bpf_map__autocreate(const struct bpf_map *map);
826 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
827 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
829 LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
831 LIBBPF_API enum bpf_map_type bpf_map__type(const struct bpf_map *map);
832 LIBBPF_API int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type);
834 LIBBPF_API __u32 bpf_map__max_entries(const struct bpf_map *map);
835 LIBBPF_API int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);
837 LIBBPF_API __u32 bpf_map__map_flags(const struct bpf_map *map);
838 LIBBPF_API int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags);
840 LIBBPF_API __u32 bpf_map__numa_node(const struct bpf_map *map);
841 LIBBPF_API int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node);
843 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
844 LIBBPF_API int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
846 LIBBPF_API __u32 bpf_map__value_size(const struct bpf_map *map);
847 LIBBPF_API int bpf_map__set_value_size(struct bpf_map *map, __u32 size);
849 LIBBPF_API __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
850 LIBBPF_API __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
852 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
853 LIBBPF_API int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex);
855 LIBBPF_API __u64 bpf_map__map_extra(const struct bpf_map *map);
856 LIBBPF_API int bpf_map__set_map_extra(struct bpf_map *map, __u64 map_extra);
858 LIBBPF_API int bpf_map__set_initial_value(struct bpf_map *map,
860 LIBBPF_API const void *bpf_map__initial_value(struct bpf_map *map, size_t *psize);
869 LIBBPF_API bool bpf_map__is_internal(const struct bpf_map *map);
878 LIBBPF_API int bpf_map__set_pin_path(struct bpf_map *map, const char *path);
886 LIBBPF_API const char *bpf_map__pin_path(const struct bpf_map *map);
894 LIBBPF_API bool bpf_map__is_pinned(const struct bpf_map *map);
908 LIBBPF_API int bpf_map__pin(struct bpf_map *map, const char *path);
921 LIBBPF_API int bpf_map__unpin(struct bpf_map *map, const char *path);
923 LIBBPF_API int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd);
924 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
946 LIBBPF_API int bpf_map__lookup_elem(const struct bpf_map *map,
970 LIBBPF_API int bpf_map__update_elem(const struct bpf_map *map,
986 LIBBPF_API int bpf_map__delete_elem(const struct bpf_map *map,
1009 LIBBPF_API int bpf_map__lookup_and_delete_elem(const struct bpf_map *map,
1027 LIBBPF_API int bpf_map__get_next_key(const struct bpf_map *map,
1056 LIBBPF_API int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags,
1058 LIBBPF_API int bpf_xdp_detach(int ifindex, __u32 flags,
1060 LIBBPF_API int bpf_xdp_query(int ifindex, int flags, struct bpf_xdp_query_opts *opts);
1061 LIBBPF_API int bpf_xdp_query_id(int ifindex, int flags, __u32 *prog_id);
1097 LIBBPF_API int bpf_tc_hook_create(struct bpf_tc_hook *hook);
1098 LIBBPF_API int bpf_tc_hook_destroy(struct bpf_tc_hook *hook);
1099 LIBBPF_API int bpf_tc_attach(const struct bpf_tc_hook *hook,
1101 LIBBPF_API int bpf_tc_detach(const struct bpf_tc_hook *hook,
1103 LIBBPF_API int bpf_tc_query(const struct bpf_tc_hook *hook,
1118 LIBBPF_API struct ring_buffer *
1121 LIBBPF_API void ring_buffer__free(struct ring_buffer *rb);
1122 LIBBPF_API int ring_buffer__add(struct ring_buffer *rb, int map_fd,
1124 LIBBPF_API int ring_buffer__poll(struct ring_buffer *rb, int timeout_ms);
1125 LIBBPF_API int ring_buffer__consume(struct ring_buffer *rb);
1126 LIBBPF_API int ring_buffer__epoll_fd(const struct ring_buffer *rb);
1143 LIBBPF_API struct user_ring_buffer *
1165 LIBBPF_API void *user_ring_buffer__reserve(struct user_ring_buffer *rb, __u32 size);
1208 LIBBPF_API void *user_ring_buffer__reserve_blocking(struct user_ring_buffer *rb,
1221 LIBBPF_API void user_ring_buffer__submit(struct user_ring_buffer *rb, void *sample);
1231 LIBBPF_API void user_ring_buffer__discard(struct user_ring_buffer *rb, void *sample);
1238 LIBBPF_API void user_ring_buffer__free(struct user_ring_buffer *rb);
1267 LIBBPF_API struct perf_buffer *
1301 LIBBPF_API struct perf_buffer *
1306 LIBBPF_API void perf_buffer__free(struct perf_buffer *pb);
1307 LIBBPF_API int perf_buffer__epoll_fd(const struct perf_buffer *pb);
1308 LIBBPF_API int perf_buffer__poll(struct perf_buffer *pb, int timeout_ms);
1309 LIBBPF_API int perf_buffer__consume(struct perf_buffer *pb);
1310 LIBBPF_API int perf_buffer__consume_buffer(struct perf_buffer *pb, size_t buf_idx);
1311 LIBBPF_API size_t perf_buffer__buffer_cnt(const struct perf_buffer *pb);
1312 LIBBPF_API int perf_buffer__buffer_fd(const struct perf_buffer *pb, size_t buf_idx);
1327 LIBBPF_API int perf_buffer__buffer(struct perf_buffer *pb, int buf_idx, void **buf,
1333 LIBBPF_API void bpf_prog_linfo__free(struct bpf_prog_linfo *prog_linfo);
1334 LIBBPF_API struct bpf_prog_linfo *
1336 LIBBPF_API const struct bpf_line_info *
1339 LIBBPF_API const struct bpf_line_info *
1364 LIBBPF_API int libbpf_probe_bpf_prog_type(enum bpf_prog_type prog_type, const void *opts);
1377 LIBBPF_API int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts);
1391 LIBBPF_API int libbpf_probe_bpf_helper(enum bpf_prog_type prog_type,
1408 LIBBPF_API int libbpf_num_possible_cpus(void);
1440 LIBBPF_API int
1443 LIBBPF_API int bpf_object__load_skeleton(struct bpf_object_skeleton *s);
1444 LIBBPF_API int bpf_object__attach_skeleton(struct bpf_object_skeleton *s);
1445 LIBBPF_API void bpf_object__detach_skeleton(struct bpf_object_skeleton *s);
1446 LIBBPF_API void bpf_object__destroy_skeleton(struct bpf_object_skeleton *s);
1472 LIBBPF_API int
1474 LIBBPF_API void
1486 LIBBPF_API int bpf_object__gen_loader(struct bpf_object *obj,
1509 LIBBPF_API struct bpf_linker *bpf_linker__new(const char *filename, struct bpf_linker_opts *opts);
1510 LIBBPF_API int bpf_linker__add_file(struct bpf_linker *linker,
1513 LIBBPF_API int bpf_linker__finalize(struct bpf_linker *linker);
1514 LIBBPF_API void bpf_linker__free(struct bpf_linker *linker);
1607 LIBBPF_API int libbpf_register_prog_handler(const char *sec,
1623 LIBBPF_API int libbpf_unregister_prog_handler(int handler_id);