Update bpf examples and remove function pass code

This commit is contained in:
2025-09-04 10:33:43 +05:30
parent 9b4ef23a62
commit ba3030a694
4 changed files with 7 additions and 52 deletions

View File

@ -1,12 +1,10 @@
from pythonbpf.decorators import section
# from pythonbpf.decorators import tracepoint, syscalls
from ctypes import c_void_p, c_int32
#This is a test function
def test_function():
print("test_function called")
# @tracepoint(syscalls.sys_enter_execve)
@section("tracepoint/syscalls/sys_enter_execve")
def trace_execve(ctx: c_void_p) -> c_int32:
print("execve called")
@ -14,5 +12,4 @@ def trace_execve(ctx: c_void_p) -> c_int32:
test_function()
return c_int32(0)
LICENSE = "GPL"