mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add PID helper
This commit is contained in:
@ -3,6 +3,9 @@ import ctypes
|
||||
def ktime():
|
||||
return ctypes.c_int64(0)
|
||||
|
||||
def pid():
|
||||
return ctypes.c_int32(0)
|
||||
|
||||
def deref(ptr):
|
||||
"dereference a pointer"
|
||||
result = ctypes.cast(ptr, ctypes.POINTER(ctypes.c_void_p)).contents.value
|
||||
|
||||
Reference in New Issue
Block a user