2 * Common eBPF ELF object loading operations.
4 * Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org>
5 * Copyright (C) 2015 Wang Nan <wangnan0@huawei.com>
6 * Copyright (C) 2015 Huawei Inc.
14 * In include/linux/compiler-gcc.h, __printf is defined. However
15 * it should be better if libbpf.h doesn't depend on Linux header file.
16 * So instead of __printf, here we use gcc attribute directly.
18 typedef int (*libbpf_print_fn_t
)(const char *, ...)
19 __attribute__((format(printf
, 1, 2)));
21 void libbpf_set_print(libbpf_print_fn_t warn
,
22 libbpf_print_fn_t info
,
23 libbpf_print_fn_t debug
);
25 /* Hide internal to user */
28 struct bpf_object
*bpf_object__open(const char *path
);
29 struct bpf_object
*bpf_object__open_buffer(void *obj_buf
,
31 void bpf_object__close(struct bpf_object
*object
);
34 * We don't need __attribute__((packed)) now since it is
35 * unnecessary for 'bpf_map_def' because they are all aligned.
36 * In addition, using it will trigger -Wpacked warning message,
37 * and will be treated as an error due to -Werror.
41 unsigned int key_size
;
42 unsigned int value_size
;
43 unsigned int max_entries
;
This page took 0.049412 seconds and 6 git commands to generate.