Fix imports for bpf_get_current_uid_gid

This commit is contained in:
Pragyansh Chaturvedi
2025-11-02 03:35:41 +05:30
parent 5b7769dd38
commit 4884ed7577
2 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,7 @@ from .helpers import (
random,
probe_read,
smp_processor_id,
uid,
XDP_DROP,
XDP_PASS,
)
@ -79,6 +80,7 @@ __all__ = [
"random",
"probe_read",
"smp_processor_id",
"uid",
"XDP_DROP",
"XDP_PASS",
]

View File

@ -42,6 +42,11 @@ def smp_processor_id():
return ctypes.c_int32(0)
def uid():
"""get current user id"""
return ctypes.c_int32(0)
XDP_ABORTED = ctypes.c_int64(0)
XDP_DROP = ctypes.c_int64(1)
XDP_PASS = ctypes.c_int64(2)