mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add shorter examples
This commit is contained in:
10
examples/c-form/ex2.bpf.c
Normal file
10
examples/c-form/ex2.bpf.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
|
||||
SEC("kprobe/sys_clone")
|
||||
int hello(struct pt_regs *ctx) {
|
||||
bpf_printk("Hello, World!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
char LICENSE[] SEC("license") = "GPL";
|
||||
Reference in New Issue
Block a user