mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
format chore and pre commit hook addition
This commit is contained in:
@ -10,16 +10,19 @@ from ctypes import c_int32, c_uint64, c_void_p
|
||||
def mymap() -> HashMap:
|
||||
return HashMap(key=c_int32, value=c_uint64, max_entries=16)
|
||||
|
||||
|
||||
@bpf
|
||||
@section("tracepoint/syscalls/sys_enter_clone")
|
||||
def testing(ctx: c_void_p) -> c_int32:
|
||||
return c_int32(0)
|
||||
|
||||
|
||||
@bpf
|
||||
@bpfglobal
|
||||
def LICENSE() -> str:
|
||||
return "GPL"
|
||||
|
||||
|
||||
# Load program (no sections -> nothing attached, just map exists)
|
||||
b = BPF()
|
||||
b.load_and_attach()
|
||||
|
||||
Reference in New Issue
Block a user