add runtime code

This commit is contained in:
2025-04-15 19:59:12 +08:00
parent 0a5f457059
commit 51aa9cb67f
34 changed files with 1941 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
struct sock_key {
__u32 sip;
__u32 dip;
__u32 sport;
__u32 dport;
__u32 family;
};
struct {
__uint(type, BPF_MAP_TYPE_SOCKHASH);
__uint(max_entries, 65535);
__type(key, struct sock_key);
__type(value, int);
} sock_ops_map SEC(".maps");