aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/seccomp/seccomp-export.h
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-01-25 12:59:11 +0900
committerOphestra <cat@gensokyo.uk>2025-01-25 12:59:11 +0900
commit163f15e93f009d15ecc2f93932e26728aff9904b (patch)
treedbc225ab0f19da2cb5d70bed1fe5fc79986fd427 /helper/seccomp/seccomp-export.h
parent016da204435b19813862ae0498bf2058c6024eda (diff)
helper/seccomp: separate seccomp package
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper/seccomp/seccomp-export.h')
-rw-r--r--helper/seccomp/seccomp-export.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/helper/seccomp/seccomp-export.h b/helper/seccomp/seccomp-export.h
new file mode 100644
index 00000000..90640d8f
--- /dev/null
+++ b/helper/seccomp/seccomp-export.h
@@ -0,0 +1,23 @@
+#include <stdint.h>
+#include <seccomp.h>
+
+#if (SCMP_VER_MAJOR < 2) || \
+ (SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 5) || \
+ (SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR == 5 && SCMP_VER_MICRO < 1)
+#error This package requires libseccomp >= v2.5.1
+#endif
+
+typedef enum {
+ F_EXT = 1 << 0,
+ F_DENY_NS = 1 << 1,
+ F_DENY_TTY = 1 << 2,
+ F_DENY_DEVEL = 1 << 3,
+ F_MULTIARCH = 1 << 4,
+ F_LINUX32 = 1 << 5,
+ F_CAN = 1 << 6,
+ F_BLUETOOTH = 1 << 7,
+} f_syscall_opts;
+
+extern void F_println(char *v);
+int f_tmpfile_fd();
+int32_t f_export_bpf(int fd, uint32_t arch, uint32_t multiarch, f_syscall_opts opts); \ No newline at end of file