format chore

This commit is contained in:
2025-11-05 17:44:45 +05:30
parent 44c6ceda27
commit b0d35693b9
4 changed files with 21 additions and 11 deletions

View File

@ -1,8 +1,9 @@
from ctypes import c_int64, c_int32, c_void_p
from ctypes import c_int64, c_void_p
from pythonbpf import bpf, section, bpfglobal, compile_to_ir, compile
from vmlinux import struct_xdp_md
from vmlinux import XDP_PASS
@bpf
@section("xdp")
def print_xdp_dat2a(ct2x: struct_xdp_md) -> c_int64:
@ -10,6 +11,7 @@ def print_xdp_dat2a(ct2x: struct_xdp_md) -> c_int64:
print(f"ct2x->data = {data}")
return c_int64(XDP_PASS)
@bpf
@section("xdp")
def print_xdp_data(ctx: struct_xdp_md) -> c_int64:
@ -18,6 +20,7 @@ def print_xdp_data(ctx: struct_xdp_md) -> c_int64:
print(f"ctx->data = {something}")
return c_int64(XDP_PASS)
@bpf
@bpfglobal
def LICENSE() -> str: