test_select_reuseport_common.h 587 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2018 Facebook */
  3. #ifndef __TEST_SELECT_REUSEPORT_COMMON_H
  4. #define __TEST_SELECT_REUSEPORT_COMMON_H
  5. #include <linux/types.h>
  6. enum result {
  7. DROP_ERR_INNER_MAP,
  8. DROP_ERR_SKB_DATA,
  9. DROP_ERR_SK_SELECT_REUSEPORT,
  10. DROP_MISC,
  11. PASS,
  12. PASS_ERR_SK_SELECT_REUSEPORT,
  13. NR_RESULTS,
  14. };
  15. struct cmd {
  16. __u32 reuseport_index;
  17. __u32 pass_on_failure;
  18. };
  19. struct data_check {
  20. __u32 ip_protocol;
  21. __u32 skb_addrs[8];
  22. __u16 skb_ports[2];
  23. __u16 eth_protocol;
  24. __u8 bind_inany;
  25. __u8 equal_check_end[0];
  26. __u32 len;
  27. __u32 hash;
  28. };
  29. #endif