summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2020-01-27 02:58:29 -0800
committerMaciej Żenczykowski <maze@google.com>2020-02-14 23:27:45 +0000
commit6f87896bdf30bcbca4616b3afa8e328d939d0c97 (patch)
tree108aaffbdeb61e713642242caedd435ce65e994c /progs
parent669f7388dff2718515570fa25cc89a7acb284dde (diff)
downloadbpf-6f87896bdf30bcbca4616b3afa8e328d939d0c97.tar.gz
bpfloader - add AID_* constants to bpf_map_def.h
Test: build, atest Bug: 149434314 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I607f304a7e7bd76b8ce33489f9e239596f4d7398
Diffstat (limited to 'progs')
-rw-r--r--progs/include/bpf_map_def.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/progs/include/bpf_map_def.h b/progs/include/bpf_map_def.h
index 86708fc..89a96d4 100644
--- a/progs/include/bpf_map_def.h
+++ b/progs/include/bpf_map_def.h
@@ -22,6 +22,24 @@
#include <linux/bpf.h>
+// These AID_* constants are permanent constants pulled from:
+// system/core/libcutils/include/private/android_filesystem_config.h
+//
+// We need access to them from ebpf C code for map definitions
+// and thus don't want to pull in the entire header file.
+//
+// TODO(149434314) - switch to including some appropriate header portion
+#define AID_ROOT 0
+#define AID_SYSTEM 1000
+#define AID_NETWORK_STACK 1073
+#define AID_NET_BT_ADMIN 3001
+#define AID_NET_BT 3002
+#define AID_INET 3003
+#define AID_NET_RAW 3004
+#define AID_NET_ADMIN 3005
+#define AID_NET_BW_STATS 3006
+#define AID_NET_BW_ACCT 3007
+
/*
* Map structure to be used by Android eBPF C programs. The Android eBPF loader
* uses this structure from eBPF object to create maps at boot time.