We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b7769d commit 4884ed7Copy full SHA for 4884ed7
pythonbpf/helper/__init__.py
@@ -10,6 +10,7 @@
10
random,
11
probe_read,
12
smp_processor_id,
13
+ uid,
14
XDP_DROP,
15
XDP_PASS,
16
)
@@ -79,6 +80,7 @@ def helper_call_handler(
79
80
"random",
81
"probe_read",
82
"smp_processor_id",
83
+ "uid",
84
"XDP_DROP",
85
"XDP_PASS",
86
]
pythonbpf/helper/helpers.py
@@ -42,6 +42,11 @@ def smp_processor_id():
42
return ctypes.c_int32(0)
43
44
45
+def uid():
46
+ """get current user id"""
47
+ return ctypes.c_int32(0)
48
+
49
50
XDP_ABORTED = ctypes.c_int64(0)
51
XDP_DROP = ctypes.c_int64(1)
52
XDP_PASS = ctypes.c_int64(2)
0 commit comments