We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e68d6d commit 7b0e8a2Copy full SHA for 7b0e8a2
1 file changed
tests/passing_tests/return/xdp.py
@@ -0,0 +1,19 @@
1
+from pythonbpf import bpf, section, bpfglobal, compile
2
+from ctypes import c_void_p, c_int64
3
+from pythonbpf.helper import XDP_PASS
4
+
5
6
+@bpf
7
+@section("tracepoint/syscalls/sys_enter_execve")
8
+def hello_world(ctx: c_void_p) -> c_int64:
9
+ print("Hello, World!")
10
+ return XDP_PASS
11
12
13
14
+@bpfglobal
15
+def LICENSE() -> str:
16
+ return "GPL"
17
18
19
+compile()
0 commit comments