tc: bpf: add checksum helpers
[cascardo/linux.git] / samples / bpf / bpf_helpers.h
index ca03331..72540ec 100644 (file)
@@ -37,4 +37,11 @@ struct bpf_map_def {
        unsigned int max_entries;
 };
 
+static int (*bpf_skb_store_bytes)(void *ctx, int off, void *from, int len, int flags) =
+       (void *) BPF_FUNC_skb_store_bytes;
+static int (*bpf_l3_csum_replace)(void *ctx, int off, int from, int to, int flags) =
+       (void *) BPF_FUNC_l3_csum_replace;
+static int (*bpf_l4_csum_replace)(void *ctx, int off, int from, int to, int flags) =
+       (void *) BPF_FUNC_l4_csum_replace;
+
 #endif