summaryrefslogtreecommitdiffstats
path: root/src/core/bpf-foreign.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/bpf-foreign.h')
-rw-r--r--src/core/bpf-foreign.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/bpf-foreign.h b/src/core/bpf-foreign.h
new file mode 100644
index 0000000..e387b1b
--- /dev/null
+++ b/src/core/bpf-foreign.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#pragma once
+
+#include "unit.h"
+
+static inline int bpf_foreign_supported(void) {
+ return cg_all_unified();
+}
+
+/*
+ * Attach cgroup-bpf programs foreign to systemd, i.e. loaded to the kernel by an entity
+ * external to systemd.
+ */
+int bpf_foreign_install(Unit *u);