]> git.proxmox.com Git - mirror_iproute2.git/blob - examples/bpf/bpf_shared.h
{f,m}_bpf: allow for sharing maps
[mirror_iproute2.git] / examples / bpf / bpf_shared.h
1 #ifndef __BPF_SHARED__
2 #define __BPF_SHARED__
3
4 enum {
5 BPF_MAP_ID_PROTO,
6 BPF_MAP_ID_QUEUE,
7 BPF_MAP_ID_DROPS,
8 __BPF_MAP_ID_MAX,
9 #define BPF_MAP_ID_MAX __BPF_MAP_ID_MAX
10 };
11
12 struct count_tuple {
13 long packets; /* type long for __sync_fetch_and_add() */
14 long bytes;
15 };
16
17 struct count_queue {
18 long total;
19 long mismatch;
20 };
21
22 #endif /* __BPF_SHARED__ */