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:
@ -1,4 +1,4 @@
|
||||
from pythonbpf import bpf, section, bpfglobal, compile, BPF
|
||||
from pythonbpf import bpf, section, bpfglobal, BPF
|
||||
from ctypes import c_void_p, c_int64
|
||||
|
||||
# Instructions to how to run this program
|
||||
@ -13,11 +13,13 @@ def hello_world(ctx: c_void_p) -> c_int64:
|
||||
print("Hello, World!")
|
||||
return c_int64(0)
|
||||
|
||||
|
||||
@bpf
|
||||
@bpfglobal
|
||||
def LICENSE() -> str:
|
||||
return "GPL"
|
||||
|
||||
|
||||
b = BPF()
|
||||
b.load_and_attach()
|
||||
if b.is_loaded() and b.is_attached():
|
||||
|
||||
Reference in New Issue
Block a user