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);
107 LIBBPF_API libbpf_print_fn_t libbpf_set_print(libbpf_print_fn_t fn);
193 LIBBPF_API struct bpf_object *bpf_object__open(const char *path);
205 LIBBPF_API struct bpf_object *
218 LIBBPF_API struct bpf_object *
229 LIBBPF_API int bpf_object__load(struct bpf_object *obj);
236 LIBBPF_API void bpf_object__close(struct bpf_object *obj);
249 LIBBPF_API int bpf_object__pin_maps(struct bpf_object *obj, const char *path);
262 LIBBPF_API int bpf_object__unpin_maps(struct bpf_object *obj,
264 LIBBPF_API int bpf_object__pin_programs(struct bpf_object *obj,
266 LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj,
268 LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
269 LIBBPF_API int bpf_object__unpin(struct bpf_object *object, const char *path);
271 LIBBPF_API const char *bpf_object__name(const struct bpf_object *obj);
272 LIBBPF_API unsigned int bpf_object__kversion(const struct bpf_object *obj);
273 LIBBPF_API int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version);
276 LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
277 LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
279 LIBBPF_API struct bpf_program *
283 LIBBPF_API int
286 LIBBPF_API int libbpf_attach_type_by_name(const char *name,
288 LIBBPF_API int libbpf_find_vmlinux_btf_id(const char *name,
294 LIBBPF_API struct bpf_program *
302 LIBBPF_API struct bpf_program *
305 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog,
308 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog);
309 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog);
310 LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog);
311 LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
312 LIBBPF_API bool bpf_program__autoattach(const struct bpf_program *prog);
313 LIBBPF_API void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach);
337 LIBBPF_API const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog);
353 LIBBPF_API int bpf_program__set_insns(struct bpf_program *prog,
365 LIBBPF_API size_t bpf_program__insn_cnt(const struct bpf_program *prog);
367 LIBBPF_API int bpf_program__fd(const struct bpf_program *prog);
379 LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path);
393 LIBBPF_API int bpf_program__unpin(struct bpf_program *prog, const char *path);
394 LIBBPF_API void bpf_program__unload(struct bpf_program *prog);
398 LIBBPF_API struct bpf_link *bpf_link__open(const char *path);
399 LIBBPF_API int bpf_link__fd(const struct bpf_link *link);
400 LIBBPF_API const char *bpf_link__pin_path(const struct bpf_link *link);
412 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path);
426 LIBBPF_API int bpf_link__unpin(struct bpf_link *link);
427 LIBBPF_API int bpf_link__update_program(struct bpf_link *link,
429 LIBBPF_API void bpf_link__disconnect(struct bpf_link *link);
430 LIBBPF_API int bpf_link__detach(struct bpf_link *link);
431 LIBBPF_API int bpf_link__destroy(struct bpf_link *link);
449 LIBBPF_API struct bpf_link *
463 LIBBPF_API struct bpf_link *
466 LIBBPF_API struct bpf_link *
502 LIBBPF_API struct bpf_link *
505 LIBBPF_API struct bpf_link *
528 LIBBPF_API struct bpf_link *
577 LIBBPF_API struct bpf_link *
625 LIBBPF_API struct bpf_link *
671 LIBBPF_API struct bpf_link *
690 LIBBPF_API struct bpf_link *
720 LIBBPF_API struct bpf_link *
734 LIBBPF_API struct bpf_link *
738 LIBBPF_API struct bpf_link *
744 LIBBPF_API struct bpf_link *
756 LIBBPF_API struct bpf_link *
758 LIBBPF_API struct bpf_link *
761 LIBBPF_API struct bpf_link *
763 LIBBPF_API struct bpf_link *
765 LIBBPF_API struct bpf_link *
767 LIBBPF_API struct bpf_link *
769 LIBBPF_API struct bpf_link *
784 LIBBPF_API struct bpf_link *
799 LIBBPF_API struct bpf_link *
805 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(const struct bpf_map *map);
806 LIBBPF_API int bpf_link__update_map(struct bpf_link *link, const struct bpf_map *map);
815 LIBBPF_API struct bpf_link *
819 LIBBPF_API enum bpf_prog_type bpf_program__type(const struct bpf_program *prog);
832 LIBBPF_API int bpf_program__set_type(struct bpf_program *prog,
835 LIBBPF_API enum bpf_attach_type
850 LIBBPF_API int
854 LIBBPF_API __u32 bpf_program__flags(const struct bpf_program *prog);
855 LIBBPF_API int bpf_program__set_flags(struct bpf_program *prog, __u32 flags);
861 LIBBPF_API __u32 bpf_program__log_level(const struct bpf_program *prog);
862 LIBBPF_API int bpf_program__set_log_level(struct bpf_program *prog, __u32 log_level);
863 LIBBPF_API const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size);
864 LIBBPF_API int bpf_program__set_log_buf(struct bpf_program *prog, char *log_buf, size_t log_size);
877 LIBBPF_API int
889 LIBBPF_API struct bpf_map *
892 LIBBPF_API int
895 LIBBPF_API struct bpf_map *
904 LIBBPF_API struct bpf_map *
926 LIBBPF_API int bpf_map__set_autocreate(struct bpf_map *map, bool autocreate);
927 LIBBPF_API bool bpf_map__autocreate(const struct bpf_map *map);
935 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
936 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
938 LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
940 LIBBPF_API enum bpf_map_type bpf_map__type(const struct bpf_map *map);
941 LIBBPF_API int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type);
943 LIBBPF_API __u32 bpf_map__max_entries(const struct bpf_map *map);
944 LIBBPF_API int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);
946 LIBBPF_API __u32 bpf_map__map_flags(const struct bpf_map *map);
947 LIBBPF_API int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags);
949 LIBBPF_API __u32 bpf_map__numa_node(const struct bpf_map *map);
950 LIBBPF_API int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node);
952 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
953 LIBBPF_API int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
955 LIBBPF_API __u32 bpf_map__value_size(const struct bpf_map *map);
970 LIBBPF_API int bpf_map__set_value_size(struct bpf_map *map, __u32 size);
972 LIBBPF_API __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
973 LIBBPF_API __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
975 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
976 LIBBPF_API int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex);
978 LIBBPF_API __u64 bpf_map__map_extra(const struct bpf_map *map);
979 LIBBPF_API int bpf_map__set_map_extra(struct bpf_map *map, __u64 map_extra);
981 LIBBPF_API int bpf_map__set_initial_value(struct bpf_map *map,
983 LIBBPF_API void *bpf_map__initial_value(struct bpf_map *map, size_t *psize);
992 LIBBPF_API bool bpf_map__is_internal(const struct bpf_map *map);
1001 LIBBPF_API int bpf_map__set_pin_path(struct bpf_map *map, const char *path);
1009 LIBBPF_API const char *bpf_map__pin_path(const struct bpf_map *map);
1017 LIBBPF_API bool bpf_map__is_pinned(const struct bpf_map *map);
1031 LIBBPF_API int bpf_map__pin(struct bpf_map *map, const char *path);
1044 LIBBPF_API int bpf_map__unpin(struct bpf_map *map, const char *path);
1046 LIBBPF_API int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd);
1047 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
1069 LIBBPF_API int bpf_map__lookup_elem(const struct bpf_map *map,
1093 LIBBPF_API int bpf_map__update_elem(const struct bpf_map *map,
1109 LIBBPF_API int bpf_map__delete_elem(const struct bpf_map *map,
1132 LIBBPF_API int bpf_map__lookup_and_delete_elem(const struct bpf_map *map,
1150 LIBBPF_API int bpf_map__get_next_key(const struct bpf_map *map,
1180 LIBBPF_API int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags,
1182 LIBBPF_API int bpf_xdp_detach(int ifindex, __u32 flags,
1184 LIBBPF_API int bpf_xdp_query(int ifindex, int flags, struct bpf_xdp_query_opts *opts);
1185 LIBBPF_API int bpf_xdp_query_id(int ifindex, int flags, __u32 *prog_id);
1221 LIBBPF_API int bpf_tc_hook_create(struct bpf_tc_hook *hook);
1222 LIBBPF_API int bpf_tc_hook_destroy(struct bpf_tc_hook *hook);
1223 LIBBPF_API int bpf_tc_attach(const struct bpf_tc_hook *hook,
1225 LIBBPF_API int bpf_tc_detach(const struct bpf_tc_hook *hook,
1227 LIBBPF_API int bpf_tc_query(const struct bpf_tc_hook *hook,
1242 LIBBPF_API struct ring_buffer *
1245 LIBBPF_API void ring_buffer__free(struct ring_buffer *rb);
1246 LIBBPF_API int ring_buffer__add(struct ring_buffer *rb, int map_fd,
1248 LIBBPF_API int ring_buffer__poll(struct ring_buffer *rb, int timeout_ms);
1249 LIBBPF_API int ring_buffer__consume(struct ring_buffer *rb);
1250 LIBBPF_API int ring_buffer__epoll_fd(const struct ring_buffer *rb);
1267 LIBBPF_API struct user_ring_buffer *
1289 LIBBPF_API void *user_ring_buffer__reserve(struct user_ring_buffer *rb, __u32 size);
1332 LIBBPF_API void *user_ring_buffer__reserve_blocking(struct user_ring_buffer *rb,
1345 LIBBPF_API void user_ring_buffer__submit(struct user_ring_buffer *rb, void *sample);
1355 LIBBPF_API void user_ring_buffer__discard(struct user_ring_buffer *rb, void *sample);
1362 LIBBPF_API void user_ring_buffer__free(struct user_ring_buffer *rb);
1391 LIBBPF_API struct perf_buffer *
1425 LIBBPF_API struct perf_buffer *
1430 LIBBPF_API void perf_buffer__free(struct perf_buffer *pb);
1431 LIBBPF_API int perf_buffer__epoll_fd(const struct perf_buffer *pb);
1432 LIBBPF_API int perf_buffer__poll(struct perf_buffer *pb, int timeout_ms);
1433 LIBBPF_API int perf_buffer__consume(struct perf_buffer *pb);
1434 LIBBPF_API int perf_buffer__consume_buffer(struct perf_buffer *pb, size_t buf_idx);
1435 LIBBPF_API size_t perf_buffer__buffer_cnt(const struct perf_buffer *pb);
1436 LIBBPF_API int perf_buffer__buffer_fd(const struct perf_buffer *pb, size_t buf_idx);
1451 LIBBPF_API int perf_buffer__buffer(struct perf_buffer *pb, int buf_idx, void **buf,
1457 LIBBPF_API void bpf_prog_linfo__free(struct bpf_prog_linfo *prog_linfo);
1458 LIBBPF_API struct bpf_prog_linfo *
1460 LIBBPF_API const struct bpf_line_info *
1463 LIBBPF_API const struct bpf_line_info *
1488 LIBBPF_API int libbpf_probe_bpf_prog_type(enum bpf_prog_type prog_type, const void *opts);
1501 LIBBPF_API int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts);
1515 LIBBPF_API int libbpf_probe_bpf_helper(enum bpf_prog_type prog_type,
1532 LIBBPF_API int libbpf_num_possible_cpus(void);
1564 LIBBPF_API int
1567 LIBBPF_API int bpf_object__load_skeleton(struct bpf_object_skeleton *s);
1568 LIBBPF_API int bpf_object__attach_skeleton(struct bpf_object_skeleton *s);
1569 LIBBPF_API void bpf_object__detach_skeleton(struct bpf_object_skeleton *s);
1570 LIBBPF_API void bpf_object__destroy_skeleton(struct bpf_object_skeleton *s);
1596 LIBBPF_API int
1598 LIBBPF_API void
1610 LIBBPF_API int bpf_object__gen_loader(struct bpf_object *obj,
1633 LIBBPF_API struct bpf_linker *bpf_linker__new(const char *filename, struct bpf_linker_opts *opts);
1634 LIBBPF_API int bpf_linker__add_file(struct bpf_linker *linker,
1637 LIBBPF_API int bpf_linker__finalize(struct bpf_linker *linker);
1638 LIBBPF_API void bpf_linker__free(struct bpf_linker *linker);
1731 LIBBPF_API int libbpf_register_prog_handler(const char *sec,
1747 LIBBPF_API int libbpf_unregister_prog_handler(int handler_id);