mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
cleanup and rename
This commit is contained in:
18
tests/c-form/example.bpf.c
Normal file
18
tests/c-form/example.bpf.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void test_function() {
|
||||
bpf_printk("test_function called");
|
||||
}
|
||||
|
||||
SEC("tracepoint/syscalls/sys_enter_execve")
|
||||
int trace_execve(void *ctx)
|
||||
{
|
||||
bpf_printk("execve called");
|
||||
bpf_printk("execve2 called");
|
||||
test_function();
|
||||
return 0;
|
||||
}
|
||||
|
||||
char LICENSE[] SEC("license") = "GPL";
|
||||
Reference in New Issue
Block a user