Skip to content

Commit 67c9d9b

Browse files
committed
Fix imports for bpf_skb_store_bytes
1 parent f757a32 commit 67c9d9b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

pythonbpf/helper/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
probe_read,
1212
smp_processor_id,
1313
uid,
14+
skb_store_bytes,
1415
XDP_DROP,
1516
XDP_PASS,
1617
)
@@ -81,6 +82,7 @@ def helper_call_handler(
8182
"probe_read",
8283
"smp_processor_id",
8384
"uid",
85+
"skb_store_bytes",
8486
"XDP_DROP",
8587
"XDP_PASS",
8688
]

pythonbpf/helper/helpers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ def uid():
4747
return ctypes.c_int32(0)
4848

4949

50+
def skb_store_bytes(skb, offset, from_buf, size, flags=0):
51+
"""store bytes into a socket buffer"""
52+
return ctypes.c_int64(0)
53+
54+
5055
XDP_ABORTED = ctypes.c_int64(0)
5156
XDP_DROP = ctypes.c_int64(1)
5257
XDP_PASS = ctypes.c_int64(2)

0 commit comments

Comments
 (0)