0001
0002
0003
0004 #ifndef _SAMPLES_BPF_XDP_TX_IPTNL_COMMON_H
0005 #define _SAMPLES_BPF_XDP_TX_IPTNL_COMMON_H
0006
0007 #include <linux/types.h>
0008
0009 #define MAX_IPTNL_ENTRIES 256U
0010
0011 struct vip {
0012 union {
0013 __u32 v6[4];
0014 __u32 v4;
0015 } daddr;
0016 __u16 dport;
0017 __u16 family;
0018 __u8 protocol;
0019 };
0020
0021 struct iptnl_info {
0022 union {
0023 __u32 v6[4];
0024 __u32 v4;
0025 } saddr;
0026 union {
0027 __u32 v6[4];
0028 __u32 v4;
0029 } daddr;
0030 __u16 family;
0031 __u8 dmac[6];
0032 };
0033
0034 #endif