mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Get ex2 running
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
from pythonbpf.decorators import tracepoint, syscalls
|
||||
# This is what it is going to look like
|
||||
# pylint: disable-all# type: ignore
|
||||
from pythonbpf.decorators import tracepoint, syscalls, bpfglobal, bpf
|
||||
from ctypes import c_void_p, c_int32
|
||||
|
||||
|
||||
@bpf
|
||||
@tracepoint(syscalls.sys_clone)
|
||||
def trace_clone(ctx: c_void_p) -> c_int32:
|
||||
print("Hello, World!")
|
||||
return c_int32(0)
|
||||
|
||||
|
||||
LICENSE = "GPL"
|
||||
@bpf
|
||||
@bpfglobal
|
||||
def LICENSE() -> str:
|
||||
return "GPL"
|
||||
|
||||
Reference in New Issue
Block a user