mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
add import parser
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user