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 *
264 LIBBPF_API int bpf_object__load(struct bpf_object *obj);
271 LIBBPF_API void bpf_object__close(struct bpf_object *obj);
284 LIBBPF_API int bpf_object__pin_maps(struct bpf_object *obj, const char *path);
297 LIBBPF_API int bpf_object__unpin_maps(struct bpf_object *obj,
299 LIBBPF_API int bpf_object__pin_programs(struct bpf_object *obj,
301 LIBBPF_API int bpf_object__unpin_programs(struct bpf_object *obj,
303 LIBBPF_API int bpf_object__pin(struct bpf_object *object, const char *path);
304 LIBBPF_API int bpf_object__unpin(struct bpf_object *object, const char *path);
306 LIBBPF_API const char *bpf_object__name(const struct bpf_object *obj);
307 LIBBPF_API unsigned int bpf_object__kversion(const struct bpf_object *obj);
308 LIBBPF_API int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version);
316 LIBBPF_API int bpf_object__token_fd(const struct bpf_object *obj);
319 LIBBPF_API struct btf *bpf_object__btf(const struct bpf_object *obj);
320 LIBBPF_API int bpf_object__btf_fd(const struct bpf_object *obj);
322 LIBBPF_API struct bpf_program *
326 LIBBPF_API int
329 LIBBPF_API int libbpf_attach_type_by_name(const char *name,
331 LIBBPF_API int libbpf_find_vmlinux_btf_id(const char *name,
337 LIBBPF_API struct bpf_program *
345 LIBBPF_API struct bpf_program *
348 LIBBPF_API void bpf_program__set_ifindex(struct bpf_program *prog,
351 LIBBPF_API const char *bpf_program__name(const struct bpf_program *prog);
352 LIBBPF_API const char *bpf_program__section_name(const struct bpf_program *prog);
353 LIBBPF_API bool bpf_program__autoload(const struct bpf_program *prog);
354 LIBBPF_API int bpf_program__set_autoload(struct bpf_program *prog, bool autoload);
355 LIBBPF_API bool bpf_program__autoattach(const struct bpf_program *prog);
356 LIBBPF_API void bpf_program__set_autoattach(struct bpf_program *prog, bool autoattach);
380 LIBBPF_API const struct bpf_insn *bpf_program__insns(const struct bpf_program *prog);
396 LIBBPF_API int bpf_program__set_insns(struct bpf_program *prog,
408 LIBBPF_API size_t bpf_program__insn_cnt(const struct bpf_program *prog);
410 LIBBPF_API int bpf_program__fd(const struct bpf_program *prog);
422 LIBBPF_API int bpf_program__pin(struct bpf_program *prog, const char *path);
436 LIBBPF_API int bpf_program__unpin(struct bpf_program *prog, const char *path);
437 LIBBPF_API void bpf_program__unload(struct bpf_program *prog);
441 LIBBPF_API struct bpf_link *bpf_link__open(const char *path);
442 LIBBPF_API int bpf_link__fd(const struct bpf_link *link);
443 LIBBPF_API const char *bpf_link__pin_path(const struct bpf_link *link);
455 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path);
469 LIBBPF_API int bpf_link__unpin(struct bpf_link *link);
470 LIBBPF_API int bpf_link__update_program(struct bpf_link *link,
472 LIBBPF_API void bpf_link__disconnect(struct bpf_link *link);
473 LIBBPF_API int bpf_link__detach(struct bpf_link *link);
474 LIBBPF_API int bpf_link__destroy(struct bpf_link *link);
492 LIBBPF_API struct bpf_link *
506 LIBBPF_API struct bpf_link *
509 LIBBPF_API struct bpf_link *
545 LIBBPF_API struct bpf_link *
548 LIBBPF_API struct bpf_link *
575 LIBBPF_API struct bpf_link *
626 LIBBPF_API struct bpf_link *
674 LIBBPF_API struct bpf_link *
720 LIBBPF_API struct bpf_link *
739 LIBBPF_API struct bpf_link *
769 LIBBPF_API struct bpf_link *
783 LIBBPF_API struct bpf_link *
787 LIBBPF_API struct bpf_link *
800 LIBBPF_API struct bpf_link *
803 LIBBPF_API struct bpf_link *
816 LIBBPF_API struct bpf_link *
818 LIBBPF_API struct bpf_link *
821 LIBBPF_API struct bpf_link *
823 LIBBPF_API struct bpf_link *
825 LIBBPF_API struct bpf_link *
827 LIBBPF_API struct bpf_link *
829 LIBBPF_API struct bpf_link *
831 LIBBPF_API struct bpf_link *
846 LIBBPF_API struct bpf_link *
861 LIBBPF_API struct bpf_link *
876 LIBBPF_API struct bpf_link *
882 LIBBPF_API struct bpf_link *bpf_map__attach_struct_ops(const struct bpf_map *map);
883 LIBBPF_API int bpf_link__update_map(struct bpf_link *link, const struct bpf_map *map);
892 LIBBPF_API struct bpf_link *
896 LIBBPF_API enum bpf_prog_type bpf_program__type(const struct bpf_program *prog);
909 LIBBPF_API int bpf_program__set_type(struct bpf_program *prog,
912 LIBBPF_API enum bpf_attach_type
927 LIBBPF_API int
931 LIBBPF_API __u32 bpf_program__flags(const struct bpf_program *prog);
932 LIBBPF_API int bpf_program__set_flags(struct bpf_program *prog, __u32 flags);
938 LIBBPF_API __u32 bpf_program__log_level(const struct bpf_program *prog);
939 LIBBPF_API int bpf_program__set_log_level(struct bpf_program *prog, __u32 log_level);
940 LIBBPF_API const char *bpf_program__log_buf(const struct bpf_program *prog, size_t *log_size);
941 LIBBPF_API int bpf_program__set_log_buf(struct bpf_program *prog, char *log_buf, size_t log_size);
954 LIBBPF_API int
966 LIBBPF_API struct bpf_map *
969 LIBBPF_API int
972 LIBBPF_API struct bpf_map *
981 LIBBPF_API struct bpf_map *
1003 LIBBPF_API int bpf_map__set_autocreate(struct bpf_map *map, bool autocreate);
1004 LIBBPF_API bool bpf_map__autocreate(const struct bpf_map *map);
1013 LIBBPF_API int bpf_map__set_autoattach(struct bpf_map *map, bool autoattach);
1021 LIBBPF_API bool bpf_map__autoattach(const struct bpf_map *map);
1029 LIBBPF_API int bpf_map__fd(const struct bpf_map *map);
1030 LIBBPF_API int bpf_map__reuse_fd(struct bpf_map *map, int fd);
1032 LIBBPF_API const char *bpf_map__name(const struct bpf_map *map);
1034 LIBBPF_API enum bpf_map_type bpf_map__type(const struct bpf_map *map);
1035 LIBBPF_API int bpf_map__set_type(struct bpf_map *map, enum bpf_map_type type);
1037 LIBBPF_API __u32 bpf_map__max_entries(const struct bpf_map *map);
1038 LIBBPF_API int bpf_map__set_max_entries(struct bpf_map *map, __u32 max_entries);
1040 LIBBPF_API __u32 bpf_map__map_flags(const struct bpf_map *map);
1041 LIBBPF_API int bpf_map__set_map_flags(struct bpf_map *map, __u32 flags);
1043 LIBBPF_API __u32 bpf_map__numa_node(const struct bpf_map *map);
1044 LIBBPF_API int bpf_map__set_numa_node(struct bpf_map *map, __u32 numa_node);
1046 LIBBPF_API __u32 bpf_map__key_size(const struct bpf_map *map);
1047 LIBBPF_API int bpf_map__set_key_size(struct bpf_map *map, __u32 size);
1049 LIBBPF_API __u32 bpf_map__value_size(const struct bpf_map *map);
1064 LIBBPF_API int bpf_map__set_value_size(struct bpf_map *map, __u32 size);
1066 LIBBPF_API __u32 bpf_map__btf_key_type_id(const struct bpf_map *map);
1067 LIBBPF_API __u32 bpf_map__btf_value_type_id(const struct bpf_map *map);
1069 LIBBPF_API __u32 bpf_map__ifindex(const struct bpf_map *map);
1070 LIBBPF_API int bpf_map__set_ifindex(struct bpf_map *map, __u32 ifindex);
1072 LIBBPF_API __u64 bpf_map__map_extra(const struct bpf_map *map);
1073 LIBBPF_API int bpf_map__set_map_extra(struct bpf_map *map, __u64 map_extra);
1075 LIBBPF_API int bpf_map__set_initial_value(struct bpf_map *map,
1077 LIBBPF_API void *bpf_map__initial_value(const struct bpf_map *map, size_t *psize);
1086 LIBBPF_API bool bpf_map__is_internal(const struct bpf_map *map);
1095 LIBBPF_API int bpf_map__set_pin_path(struct bpf_map *map, const char *path);
1103 LIBBPF_API const char *bpf_map__pin_path(const struct bpf_map *map);
1111 LIBBPF_API bool bpf_map__is_pinned(const struct bpf_map *map);
1125 LIBBPF_API int bpf_map__pin(struct bpf_map *map, const char *path);
1138 LIBBPF_API int bpf_map__unpin(struct bpf_map *map, const char *path);
1140 LIBBPF_API int bpf_map__set_inner_map_fd(struct bpf_map *map, int fd);
1141 LIBBPF_API struct bpf_map *bpf_map__inner_map(struct bpf_map *map);
1163 LIBBPF_API int bpf_map__lookup_elem(const struct bpf_map *map,
1187 LIBBPF_API int bpf_map__update_elem(const struct bpf_map *map,
1203 LIBBPF_API int bpf_map__delete_elem(const struct bpf_map *map,
1226 LIBBPF_API int bpf_map__lookup_and_delete_elem(const struct bpf_map *map,
1244 LIBBPF_API int bpf_map__get_next_key(const struct bpf_map *map,
1274 LIBBPF_API int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags,
1276 LIBBPF_API int bpf_xdp_detach(int ifindex, __u32 flags,
1278 LIBBPF_API int bpf_xdp_query(int ifindex, int flags, struct bpf_xdp_query_opts *opts);
1279 LIBBPF_API int bpf_xdp_query_id(int ifindex, int flags, __u32 *prog_id);
1315 LIBBPF_API int bpf_tc_hook_create(struct bpf_tc_hook *hook);
1316 LIBBPF_API int bpf_tc_hook_destroy(struct bpf_tc_hook *hook);
1317 LIBBPF_API int bpf_tc_attach(const struct bpf_tc_hook *hook,
1319 LIBBPF_API int bpf_tc_detach(const struct bpf_tc_hook *hook,
1321 LIBBPF_API int bpf_tc_query(const struct bpf_tc_hook *hook,
1337 LIBBPF_API struct ring_buffer *
1340 LIBBPF_API void ring_buffer__free(struct ring_buffer *rb);
1341 LIBBPF_API int ring_buffer__add(struct ring_buffer *rb, int map_fd,
1343 LIBBPF_API int ring_buffer__poll(struct ring_buffer *rb, int timeout_ms);
1344 LIBBPF_API int ring_buffer__consume(struct ring_buffer *rb);
1345 LIBBPF_API int ring_buffer__consume_n(struct ring_buffer *rb, size_t n);
1346 LIBBPF_API int ring_buffer__epoll_fd(const struct ring_buffer *rb);
1359 LIBBPF_API struct ring *ring_buffer__ring(struct ring_buffer *rb,
1369 LIBBPF_API unsigned long ring__consumer_pos(const struct ring *r);
1378 LIBBPF_API unsigned long ring__producer_pos(const struct ring *r);
1389 LIBBPF_API size_t ring__avail_data_size(const struct ring *r);
1399 LIBBPF_API size_t ring__size(const struct ring *r);
1408 LIBBPF_API int ring__map_fd(const struct ring *r);
1418 LIBBPF_API int ring__consume(struct ring *r);
1429 LIBBPF_API int ring__consume_n(struct ring *r, size_t n);
1446 LIBBPF_API struct user_ring_buffer *
1468 LIBBPF_API void *user_ring_buffer__reserve(struct user_ring_buffer *rb, __u32 size);
1511 LIBBPF_API void *user_ring_buffer__reserve_blocking(struct user_ring_buffer *rb,
1524 LIBBPF_API void user_ring_buffer__submit(struct user_ring_buffer *rb, void *sample);
1534 LIBBPF_API void user_ring_buffer__discard(struct user_ring_buffer *rb, void *sample);
1541 LIBBPF_API void user_ring_buffer__free(struct user_ring_buffer *rb);
1570 LIBBPF_API struct perf_buffer *
1604 LIBBPF_API struct perf_buffer *
1609 LIBBPF_API void perf_buffer__free(struct perf_buffer *pb);
1610 LIBBPF_API int perf_buffer__epoll_fd(const struct perf_buffer *pb);
1611 LIBBPF_API int perf_buffer__poll(struct perf_buffer *pb, int timeout_ms);
1612 LIBBPF_API int perf_buffer__consume(struct perf_buffer *pb);
1613 LIBBPF_API int perf_buffer__consume_buffer(struct perf_buffer *pb, size_t buf_idx);
1614 LIBBPF_API size_t perf_buffer__buffer_cnt(const struct perf_buffer *pb);
1615 LIBBPF_API int perf_buffer__buffer_fd(const struct perf_buffer *pb, size_t buf_idx);
1630 LIBBPF_API int perf_buffer__buffer(struct perf_buffer *pb, int buf_idx, void **buf,
1636 LIBBPF_API void bpf_prog_linfo__free(struct bpf_prog_linfo *prog_linfo);
1637 LIBBPF_API struct bpf_prog_linfo *
1639 LIBBPF_API const struct bpf_line_info *
1642 LIBBPF_API const struct bpf_line_info *
1667 LIBBPF_API int libbpf_probe_bpf_prog_type(enum bpf_prog_type prog_type, const void *opts);
1680 LIBBPF_API int libbpf_probe_bpf_map_type(enum bpf_map_type map_type, const void *opts);
1694 LIBBPF_API int libbpf_probe_bpf_helper(enum bpf_prog_type prog_type,
1711 LIBBPF_API int libbpf_num_possible_cpus(void);
1744 LIBBPF_API int
1747 LIBBPF_API int bpf_object__load_skeleton(struct bpf_object_skeleton *s);
1748 LIBBPF_API int bpf_object__attach_skeleton(struct bpf_object_skeleton *s);
1749 LIBBPF_API void bpf_object__detach_skeleton(struct bpf_object_skeleton *s);
1750 LIBBPF_API void bpf_object__destroy_skeleton(struct bpf_object_skeleton *s);
1776 LIBBPF_API int
1778 LIBBPF_API void
1790 LIBBPF_API int bpf_object__gen_loader(struct bpf_object *obj,
1813 LIBBPF_API struct bpf_linker *bpf_linker__new(const char *filename, struct bpf_linker_opts *opts);
1814 LIBBPF_API struct bpf_linker *bpf_linker__new_fd(int fd, struct bpf_linker_opts *opts);
1815 LIBBPF_API int bpf_linker__add_file(struct bpf_linker *linker,
1818 LIBBPF_API int bpf_linker__add_fd(struct bpf_linker *linker, int fd,
1820 LIBBPF_API int bpf_linker__add_buf(struct bpf_linker *linker, void *buf, size_t buf_sz,
1822 LIBBPF_API int bpf_linker__finalize(struct bpf_linker *linker);
1823 LIBBPF_API void bpf_linker__free(struct bpf_linker *linker);
1916 LIBBPF_API int libbpf_register_prog_handler(const char *sec,
1932 LIBBPF_API int libbpf_unregister_prog_handler(int handler_id);