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);
110 LIBBPF_API libbpf_print_fn_t libbpf_set_print(libbpf_print_fn_t fn);
215 LIBBPF_API struct bpf_object *bpf_object__open(const char *path);
227 LIBBPF_API struct bpf_object *
240 LIBBPF_API struct bpf_object *
251 LIBBPF_API int bpf_object__load(struct bpf_object *obj);
258 LIBBPF_API void bpf_object__close(struct bpf_object *obj);
271 LIBBPF_API int bpf_object__pin_maps(struct bpf_object *obj, const char *path);
284 LIBBPF_API int bpf_object__unpin_maps(struct bpf_object *obj,
286 LIBBPF_API int bpf_object__pin_programs(struct bpf_object *obj,
288 LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj,
290 LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
291 LIBBPF_API int bpf_object__unpin(struct bpf_object *object, const char *path);
293 LIBBPF_API const char *bpf_object__name(const struct bpf_object *obj);
294 LIBBPF_API unsigned int bpf_object__kversion(const struct bpf_object *obj);
295 LIBBPF_API int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version);
303 LIBBPF_API int bpf_object__token_fd(const struct bpf_object *obj);
306 LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
307 LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
309 LIBBPF_API struct bpf_program *
313 LIBBPF_API int
316 LIBBPF_API int libbpf_attach_type_by_name(const char *name,
318 LIBBPF_API int libbpf_find_vmlinux_btf_id(const char *name,
324 LIBBPF_API struct bpf_program *
332 LIBBPF_API struct bpf_program *
335 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog,
338 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog);
339 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog);
340 LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog);
341 LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
342 LIBBPF_API bool bpf_program__autoattach(const struct bpf_program *prog);
343 LIBBPF_API void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach);
367 LIBBPF_API const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog);
383 LIBBPF_API int bpf_program__set_insns(struct bpf_program *prog,
395 LIBBPF_API size_t bpf_program__insn_cnt(const struct bpf_program *prog);
397 LIBBPF_API int bpf_program__fd(const struct bpf_program *prog);
409 LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path);
423 LIBBPF_API int bpf_program__unpin(struct bpf_program *prog, const char *path);
424 LIBBPF_API void bpf_program__unload(struct bpf_program *prog);
428 LIBBPF_API struct bpf_link *bpf_link__open(const char *path);
429 LIBBPF_API int bpf_link__fd(const struct bpf_link *link);
430 LIBBPF_API const char *bpf_link__pin_path(const struct bpf_link *link);
442 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path);
456 LIBBPF_API int bpf_link__unpin(struct bpf_link *link);
457 LIBBPF_API int bpf_link__update_program(struct bpf_link *link,
459 LIBBPF_API void bpf_link__disconnect(struct bpf_link *link);
460 LIBBPF_API int bpf_link__detach(struct bpf_link *link);
461 LIBBPF_API int bpf_link__destroy(struct bpf_link *link);
479 LIBBPF_API struct bpf_link *
493 LIBBPF_API struct bpf_link *
496 LIBBPF_API struct bpf_link *
532 LIBBPF_API struct bpf_link *
535 LIBBPF_API struct bpf_link *
562 LIBBPF_API struct bpf_link *
613 LIBBPF_API struct bpf_link *
661 LIBBPF_API struct bpf_link *
707 LIBBPF_API struct bpf_link *
726 LIBBPF_API struct bpf_link *
756 LIBBPF_API struct bpf_link *
770 LIBBPF_API struct bpf_link *
774 LIBBPF_API struct bpf_link *
787 LIBBPF_API struct bpf_link *
790 LIBBPF_API struct bpf_link *
803 LIBBPF_API struct bpf_link *
805 LIBBPF_API struct bpf_link *
808 LIBBPF_API struct bpf_link *
810 LIBBPF_API struct bpf_link *
812 LIBBPF_API struct bpf_link *
814 LIBBPF_API struct bpf_link *
816 LIBBPF_API struct bpf_link *
818 LIBBPF_API struct bpf_link *
833 LIBBPF_API struct bpf_link *
848 LIBBPF_API struct bpf_link *
863 LIBBPF_API struct bpf_link *
869 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(const struct bpf_map *map);
870 LIBBPF_API int bpf_link__update_map(struct bpf_link *link, const struct bpf_map *map);
879 LIBBPF_API struct bpf_link *
883 LIBBPF_API enum bpf_prog_type bpf_program__type(const struct bpf_program *prog);
896 LIBBPF_API int bpf_program__set_type(struct bpf_program *prog,
899 LIBBPF_API enum bpf_attach_type
914 LIBBPF_API int
918 LIBBPF_API __u32 bpf_program__flags(const struct bpf_program *prog);
919 LIBBPF_API int bpf_program__set_flags(struct bpf_program *prog, __u32 flags);
925 LIBBPF_API __u32 bpf_program__log_level(const struct bpf_program *prog);
926 LIBBPF_API int bpf_program__set_log_level(struct bpf_program *prog, __u32 log_level);
927 LIBBPF_API const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size);
928 LIBBPF_API int bpf_program__set_log_buf(struct bpf_program *prog, char *log_buf, size_t log_size);
941 LIBBPF_API int
953 LIBBPF_API struct bpf_map *
956 LIBBPF_API int
959 LIBBPF_API struct bpf_map *
968 LIBBPF_API struct bpf_map *
990 LIBBPF_API int bpf_map__set_autocreate(struct bpf_map *map, bool autocreate);
991 LIBBPF_API bool bpf_map__autocreate(const struct bpf_map *map);
1000 LIBBPF_API int bpf_map__set_autoattach(struct bpf_map *map, bool autoattach);
1008 LIBBPF_API bool bpf_map__autoattach(const struct bpf_map *map);
1016 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
1017 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
1019 LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
1021 LIBBPF_API enum bpf_map_type bpf_map__type(const struct bpf_map *map);
1022 LIBBPF_API int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type);
1024 LIBBPF_API __u32 bpf_map__max_entries(const struct bpf_map *map);
1025 LIBBPF_API int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);
1027 LIBBPF_API __u32 bpf_map__map_flags(const struct bpf_map *map);
1028 LIBBPF_API int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags);
1030 LIBBPF_API __u32 bpf_map__numa_node(const struct bpf_map *map);
1031 LIBBPF_API int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node);
1033 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
1034 LIBBPF_API int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
1036 LIBBPF_API __u32 bpf_map__value_size(const struct bpf_map *map);
1051 LIBBPF_API int bpf_map__set_value_size(struct bpf_map *map, __u32 size);
1053 LIBBPF_API __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
1054 LIBBPF_API __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
1056 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
1057 LIBBPF_API int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex);
1059 LIBBPF_API __u64 bpf_map__map_extra(const struct bpf_map *map);
1060 LIBBPF_API int bpf_map__set_map_extra(struct bpf_map *map, __u64 map_extra);
1062 LIBBPF_API int bpf_map__set_initial_value(struct bpf_map *map,
1064 LIBBPF_API void *bpf_map__initial_value(const struct bpf_map *map, size_t *psize);
1073 LIBBPF_API bool bpf_map__is_internal(const struct bpf_map *map);
1082 LIBBPF_API int bpf_map__set_pin_path(struct bpf_map *map, const char *path);
1090 LIBBPF_API const char *bpf_map__pin_path(const struct bpf_map *map);
1098 LIBBPF_API bool bpf_map__is_pinned(const struct bpf_map *map);
1112 LIBBPF_API int bpf_map__pin(struct bpf_map *map, const char *path);
1125 LIBBPF_API int bpf_map__unpin(struct bpf_map *map, const char *path);
1127 LIBBPF_API int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd);
1128 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
1150 LIBBPF_API int bpf_map__lookup_elem(const struct bpf_map *map,
1174 LIBBPF_API int bpf_map__update_elem(const struct bpf_map *map,
1190 LIBBPF_API int bpf_map__delete_elem(const struct bpf_map *map,
1213 LIBBPF_API int bpf_map__lookup_and_delete_elem(const struct bpf_map *map,
1231 LIBBPF_API int bpf_map__get_next_key(const struct bpf_map *map,
1261 LIBBPF_API int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags,
1263 LIBBPF_API int bpf_xdp_detach(int ifindex, __u32 flags,
1265 LIBBPF_API int bpf_xdp_query(int ifindex, int flags, struct bpf_xdp_query_opts *opts);
1266 LIBBPF_API int bpf_xdp_query_id(int ifindex, int flags, __u32 *prog_id);
1302 LIBBPF_API int bpf_tc_hook_create(struct bpf_tc_hook *hook);
1303 LIBBPF_API int bpf_tc_hook_destroy(struct bpf_tc_hook *hook);
1304 LIBBPF_API int bpf_tc_attach(const struct bpf_tc_hook *hook,
1306 LIBBPF_API int bpf_tc_detach(const struct bpf_tc_hook *hook,
1308 LIBBPF_API int bpf_tc_query(const struct bpf_tc_hook *hook,
1324 LIBBPF_API struct ring_buffer *
1327 LIBBPF_API void ring_buffer__free(struct ring_buffer *rb);
1328 LIBBPF_API int ring_buffer__add(struct ring_buffer *rb, int map_fd,
1330 LIBBPF_API int ring_buffer__poll(struct ring_buffer *rb, int timeout_ms);
1331 LIBBPF_API int ring_buffer__consume(struct ring_buffer *rb);
1332 LIBBPF_API int ring_buffer__consume_n(struct ring_buffer *rb, size_t n);
1333 LIBBPF_API int ring_buffer__epoll_fd(const struct ring_buffer *rb);
1346 LIBBPF_API struct ring *ring_buffer__ring(struct ring_buffer *rb,
1356 LIBBPF_API unsigned long ring__consumer_pos(const struct ring *r);
1365 LIBBPF_API unsigned long ring__producer_pos(const struct ring *r);
1376 LIBBPF_API size_t ring__avail_data_size(const struct ring *r);
1386 LIBBPF_API size_t ring__size(const struct ring *r);
1395 LIBBPF_API int ring__map_fd(const struct ring *r);
1405 LIBBPF_API int ring__consume(struct ring *r);
1416 LIBBPF_API int ring__consume_n(struct ring *r, size_t n);
1433 LIBBPF_API struct user_ring_buffer *
1455 LIBBPF_API void *user_ring_buffer__reserve(struct user_ring_buffer *rb, __u32 size);
1498 LIBBPF_API void *user_ring_buffer__reserve_blocking(struct user_ring_buffer *rb,
1511 LIBBPF_API void user_ring_buffer__submit(struct user_ring_buffer *rb, void *sample);
1521 LIBBPF_API void user_ring_buffer__discard(struct user_ring_buffer *rb, void *sample);
1528 LIBBPF_API void user_ring_buffer__free(struct user_ring_buffer *rb);
1557 LIBBPF_API struct perf_buffer *
1591 LIBBPF_API struct perf_buffer *
1596 LIBBPF_API void perf_buffer__free(struct perf_buffer *pb);
1597 LIBBPF_API int perf_buffer__epoll_fd(const struct perf_buffer *pb);
1598 LIBBPF_API int perf_buffer__poll(struct perf_buffer *pb, int timeout_ms);
1599 LIBBPF_API int perf_buffer__consume(struct perf_buffer *pb);
1600 LIBBPF_API int perf_buffer__consume_buffer(struct perf_buffer *pb, size_t buf_idx);
1601 LIBBPF_API size_t perf_buffer__buffer_cnt(const struct perf_buffer *pb);
1602 LIBBPF_API int perf_buffer__buffer_fd(const struct perf_buffer *pb, size_t buf_idx);
1617 LIBBPF_API int perf_buffer__buffer(struct perf_buffer *pb, int buf_idx, void **buf,
1623 LIBBPF_API void bpf_prog_linfo__free(struct bpf_prog_linfo *prog_linfo);
1624 LIBBPF_API struct bpf_prog_linfo *
1626 LIBBPF_API const struct bpf_line_info *
1629 LIBBPF_API const struct bpf_line_info *
1654 LIBBPF_API int libbpf_probe_bpf_prog_type(enum bpf_prog_type prog_type, const void *opts);
1667 LIBBPF_API int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts);
1681 LIBBPF_API int libbpf_probe_bpf_helper(enum bpf_prog_type prog_type,
1698 LIBBPF_API int libbpf_num_possible_cpus(void);
1731 LIBBPF_API int
1734 LIBBPF_API int bpf_object__load_skeleton(struct bpf_object_skeleton *s);
1735 LIBBPF_API int bpf_object__attach_skeleton(struct bpf_object_skeleton *s);
1736 LIBBPF_API void bpf_object__detach_skeleton(struct bpf_object_skeleton *s);
1737 LIBBPF_API void bpf_object__destroy_skeleton(struct bpf_object_skeleton *s);
1763 LIBBPF_API int
1765 LIBBPF_API void
1777 LIBBPF_API int bpf_object__gen_loader(struct bpf_object *obj,
1800 LIBBPF_API struct bpf_linker *bpf_linker__new(const char *filename, struct bpf_linker_opts *opts);
1801 LIBBPF_API struct bpf_linker *bpf_linker__new_fd(int fd, struct bpf_linker_opts *opts);
1802 LIBBPF_API int bpf_linker__add_file(struct bpf_linker *linker,
1805 LIBBPF_API int bpf_linker__add_fd(struct bpf_linker *linker, int fd,
1807 LIBBPF_API int bpf_linker__add_buf(struct bpf_linker *linker, void *buf, size_t buf_sz,
1809 LIBBPF_API int bpf_linker__finalize(struct bpf_linker *linker);
1810 LIBBPF_API void bpf_linker__free(struct bpf_linker *linker);
1903 LIBBPF_API int libbpf_register_prog_handler(const char *sec,
1919 LIBBPF_API int libbpf_unregister_prog_handler(int handler_id);