xdp_tx_iptunnel_common.h 485 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2016 Facebook
  3. */
  4. #ifndef _SAMPLES_BPF_XDP_TX_IPTNL_COMMON_H
  5. #define _SAMPLES_BPF_XDP_TX_IPTNL_COMMON_H
  6. #include <linux/types.h>
  7. #define MAX_IPTNL_ENTRIES 256U
  8. struct vip {
  9. union {
  10. __u32 v6[4];
  11. __u32 v4;
  12. } daddr;
  13. __u16 dport;
  14. __u16 family;
  15. __u8 protocol;
  16. };
  17. struct iptnl_info {
  18. union {
  19. __u32 v6[4];
  20. __u32 v4;
  21. } saddr;
  22. union {
  23. __u32 v6[4];
  24. __u32 v4;
  25. } daddr;
  26. __u16 family;
  27. __u8 dmac[6];
  28. };
  29. #endif