blob: 4f729bc6775304b46f38c9ccd2923b4dab1babe1 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#ifndef TRACE_AUGMENT_H
#define TRACE_AUGMENT_H
#include <linux/compiler.h>
struct bpf_program;
struct evlist;
#ifdef HAVE_BPF_SKEL
int augmented_syscalls__prepare(void);
int augmented_syscalls__create_bpf_output(struct evlist *evlist);
void augmented_syscalls__setup_bpf_output(void);
int augmented_syscalls__set_filter_pids(unsigned int nr, pid_t *pids);
int augmented_syscalls__get_map_fds(int *enter_fd, int *exit_fd, int *beauty_fd);
struct bpf_program *augmented_syscalls__find_by_title(const char *name);
struct bpf_program *augmented_syscalls__unaugmented(void);
void augmented_syscalls__cleanup(void);
#else /* !HAVE_BPF_SKEL */
static inline int augmented_syscalls__prepare(void)
{
return -1;
}
static inline int augmented_syscalls__create_bpf_output(struct evlist *evlist __maybe_unused)
{
return -1;
}
static inline void augmented_syscalls__setup_bpf_output(void)
{
}
static inline int augmented_syscalls__set_filter_pids(unsigned int nr __maybe_unused,
pid_t *pids __maybe_unused)
{
return 0;
}
static inline int augmented_syscalls__get_map_fds(int *enter_fd __maybe_unused,
int *exit_fd __maybe_unused,
int *beauty_fd __maybe_unused)
{
return -1;
}
static inline struct bpf_program *
augmented_syscalls__find_by_title(const char *name __maybe_unused)
{
return NULL;
}
static inline struct bpf_program *augmented_syscalls__unaugmented(void)
{
return NULL;
}
static inline void augmented_syscalls__cleanup(void)
{
}
#endif /* HAVE_BPF_SKEL */
#endif
|