blob: be839892caff0b32c5dfcc7c1a3e7b9aca758300 [file] [log] [blame]
Thomas Gleixner25763b32019-05-28 10:10:09 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Martin KaFai Lau12d8bb62016-12-07 15:53:14 -08002/* Copyright (c) 2016 Facebook
Martin KaFai Lau12d8bb62016-12-07 15:53:14 -08003 */
4#ifndef _SAMPLES_BPF_XDP_TX_IPTNL_COMMON_H
5#define _SAMPLES_BPF_XDP_TX_IPTNL_COMMON_H
6
7#include <linux/types.h>
8
9#define MAX_IPTNL_ENTRIES 256U
10
11struct vip {
12 union {
13 __u32 v6[4];
14 __u32 v4;
15 } daddr;
16 __u16 dport;
17 __u16 family;
18 __u8 protocol;
19};
20
21struct iptnl_info {
22 union {
23 __u32 v6[4];
24 __u32 v4;
25 } saddr;
26 union {
27 __u32 v6[4];
28 __u32 v4;
29 } daddr;
30 __u16 family;
31 __u8 dmac[6];
32};
33
34#endif