summaryrefslogtreecommitdiff
path: root/maps.bpf.h
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-13 11:50:48 +0200
committerPaul Buetow <paul@buetow.org>2024-02-13 11:50:48 +0200
commitcf73e5aa79cc6f6e147a5df55bad52f30706a5c3 (patch)
treef6a808171f18bfb7f022629dc51d6d8f669b1885 /maps.bpf.h
parent6c6e3ea33241042e8a1efc04cee3bfb3559dd210 (diff)
can pass UID via map from userland to BPF part
Diffstat (limited to 'maps.bpf.h')
-rw-r--r--maps.bpf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/maps.bpf.h b/maps.bpf.h
index 355bba6..bb44627 100644
--- a/maps.bpf.h
+++ b/maps.bpf.h
@@ -4,6 +4,18 @@
#define MAX_FILENAME_LENGTH 256
#define MAX_PROGNAME_LENGTH 16
+struct config {
+ int x;
+ char y;
+};
+
+struct {
+ __uint(type, BPF_MAP_TYPE_HASH);
+ __type(key, u32);
+ __type(value, struct config);
+ __uint(max_entries, 1 << 24);
+} config_map SEC(".maps");
+
struct open_event {
__s32 fd;
__s32 op_id;