Add bpf_get_prandom_u32 helper

This commit is contained in:
Pragyansh Chaturvedi
2025-10-27 01:08:56 +05:30
parent 5c1e7103a6
commit 5cbd9a531e
3 changed files with 30 additions and 1 deletions

View File

@ -27,6 +27,11 @@ def probe_read_str(dst, src):
return ctypes.c_int64(0)
def random():
"""get a pseudorandom u32 number"""
return ctypes.c_int32(0)
XDP_ABORTED = ctypes.c_int64(0)
XDP_DROP = ctypes.c_int64(1)
XDP_PASS = ctypes.c_int64(2)