blob: 4754bd8ca9e06345f34e1a5efa6eb8d2727b7c07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* Common function that with time should be moved to libbpf */
#ifndef __COMMON_LIBBPF_H
#define __COMMON_LIBBPF_H
struct bpf_pinned_map {
const char *name;
const char *filename;
int map_fd;
};
/* bpf_prog_load_attr extended */
struct bpf_prog_load_attr_maps {
const char *file;
enum bpf_prog_type prog_type;
enum bpf_attach_type expected_attach_type;
int ifindex;
int nr_pinned_maps;
struct bpf_pinned_map *pinned_maps;
};
int bpf_prog_load_xattr_maps(const struct bpf_prog_load_attr_maps *attr,
struct bpf_object **pobj, int *prog_fd);
#endif /* __COMMON_LIBBPF_H */
|