add import parser

Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
This commit is contained in:
2025-10-11 01:01:31 +05:30
parent e4575a6b1e
commit 68e9693f9a
2 changed files with 75 additions and 4 deletions

View File

@ -1,6 +1,8 @@
from pythonbpf import bpf, map, section, bpfglobal, compile, compile_to_ir
from pythonbpf.maps import HashMap
from vmlinux import struct_xdp_md, XDP_PASS
from pythonbpf.helper import XDP_PASS
from vmlinux import struct_xdp_md
# from vmlinux import XDP_PASS
from ctypes import c_int64
# Instructions to how to run this program
@ -10,7 +12,6 @@ from ctypes import c_int64
# 4. Attach object file to any network device with something like ./check.sh xdp examples/xdp_pass.o tailscale0
# 5. send traffic through the device and observe effects
@bpf
@map
def count() -> HashMap: