From 67c9d9b9326a94a9154dd76cf1ee2d2790f4c4e5 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 2 Nov 2025 04:33:45 +0530 Subject: [PATCH] Fix imports for bpf_skb_store_bytes --- pythonbpf/helper/__init__.py | 2 ++ pythonbpf/helper/helpers.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pythonbpf/helper/__init__.py b/pythonbpf/helper/__init__.py index a243140..4c1d283 100644 --- a/pythonbpf/helper/__init__.py +++ b/pythonbpf/helper/__init__.py @@ -11,6 +11,7 @@ from .helpers import ( probe_read, smp_processor_id, uid, + skb_store_bytes, XDP_DROP, XDP_PASS, ) @@ -81,6 +82,7 @@ __all__ = [ "probe_read", "smp_processor_id", "uid", + "skb_store_bytes", "XDP_DROP", "XDP_PASS", ] diff --git a/pythonbpf/helper/helpers.py b/pythonbpf/helper/helpers.py index 84ffd9a..0e55a20 100644 --- a/pythonbpf/helper/helpers.py +++ b/pythonbpf/helper/helpers.py @@ -47,6 +47,11 @@ def uid(): return ctypes.c_int32(0) +def skb_store_bytes(skb, offset, from_buf, size, flags=0): + """store bytes into a socket buffer""" + return ctypes.c_int64(0) + + XDP_ABORTED = ctypes.c_int64(0) XDP_DROP = ctypes.c_int64(1) XDP_PASS = ctypes.c_int64(2)