summaryrefslogtreecommitdiff
path: root/internal/c
diff options
context:
space:
mode:
Diffstat (limited to 'internal/c')
-rw-r--r--internal/c/ior.bpf.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/c/ior.bpf.c b/internal/c/ior.bpf.c
new file mode 100644
index 0000000..7c41551
--- /dev/null
+++ b/internal/c/ior.bpf.c
@@ -0,0 +1,20 @@
+//+build ignore
+
+#include "vmlinux.h"
+#include <bpf/bpf_helpers.h>
+#include "types.h"
+#include "maps.h"
+#include "flags.h"
+
+/**
+ * Including .c files, as linking several .o files into one single .o file doesn't work
+ * with shared BPF state such as ring buffers, maps and globals so well. Other BPF projects
+ * come along with one huuuuughe .c file with all the BPF code in it. I am rather
+ * splitting the code up into several smaller files.
+ */
+#include "filter.c"
+
+// Auto-generated tracepoints.
+#include "generated/tracepoints.c"
+
+char LICENSE[] SEC("license") = "Dual BSD/GPL";