mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Fix imports for bpf_skb_store_bytes
This commit is contained in:
@ -11,6 +11,7 @@ from .helpers import (
|
|||||||
probe_read,
|
probe_read,
|
||||||
smp_processor_id,
|
smp_processor_id,
|
||||||
uid,
|
uid,
|
||||||
|
skb_store_bytes,
|
||||||
XDP_DROP,
|
XDP_DROP,
|
||||||
XDP_PASS,
|
XDP_PASS,
|
||||||
)
|
)
|
||||||
@ -81,6 +82,7 @@ __all__ = [
|
|||||||
"probe_read",
|
"probe_read",
|
||||||
"smp_processor_id",
|
"smp_processor_id",
|
||||||
"uid",
|
"uid",
|
||||||
|
"skb_store_bytes",
|
||||||
"XDP_DROP",
|
"XDP_DROP",
|
||||||
"XDP_PASS",
|
"XDP_PASS",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -47,6 +47,11 @@ def uid():
|
|||||||
return ctypes.c_int32(0)
|
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_ABORTED = ctypes.c_int64(0)
|
||||||
XDP_DROP = ctypes.c_int64(1)
|
XDP_DROP = ctypes.c_int64(1)
|
||||||
XDP_PASS = ctypes.c_int64(2)
|
XDP_PASS = ctypes.c_int64(2)
|
||||||
|
|||||||
Reference in New Issue
Block a user