mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Fix examples/hello_world to use latest pylibbpf
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
from pythonbpf import bpf, section, bpfglobal, BPF
|
from pythonbpf import bpf, section, bpfglobal, BPF, trace_pipe
|
||||||
from ctypes import c_void_p, c_int64
|
from ctypes import c_void_p, c_int64
|
||||||
|
|
||||||
# Instructions to how to run this program
|
# Instructions to how to run this program
|
||||||
@ -21,10 +21,6 @@ def LICENSE() -> str:
|
|||||||
|
|
||||||
|
|
||||||
b = BPF()
|
b = BPF()
|
||||||
b.load_and_attach()
|
b.load()
|
||||||
if b.is_loaded() and b.is_attached():
|
b.attach_all()
|
||||||
print("Successfully loaded and attached")
|
trace_pipe()
|
||||||
else:
|
|
||||||
print("Could not load successfully")
|
|
||||||
|
|
||||||
# Now cat /sys/kernel/debug/tracing/trace_pipe to see results of the execve syscall.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user