ioam6_iptunnel.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
  2. /*
  3. * IPv6 IOAM Lightweight Tunnel API
  4. *
  5. * Author:
  6. * Justin Iurman <justin.iurman@uliege.be>
  7. */
  8. #ifndef _LINUX_IOAM6_IPTUNNEL_H
  9. #define _LINUX_IOAM6_IPTUNNEL_H
  10. /* Encap modes:
  11. * - inline: direct insertion
  12. * - encap: ip6ip6 encapsulation
  13. * - auto: __inline__ for local packets, encap for in-transit packets
  14. */
  15. enum {
  16. __IOAM6_IPTUNNEL_MODE_MIN,
  17. IOAM6_IPTUNNEL_MODE_INLINE,
  18. IOAM6_IPTUNNEL_MODE_ENCAP,
  19. IOAM6_IPTUNNEL_MODE_AUTO,
  20. __IOAM6_IPTUNNEL_MODE_MAX,
  21. };
  22. #define IOAM6_IPTUNNEL_MODE_MIN (__IOAM6_IPTUNNEL_MODE_MIN + 1)
  23. #define IOAM6_IPTUNNEL_MODE_MAX (__IOAM6_IPTUNNEL_MODE_MAX - 1)
  24. enum {
  25. IOAM6_IPTUNNEL_UNSPEC,
  26. /* Encap mode */
  27. IOAM6_IPTUNNEL_MODE, /* u8 */
  28. /* Tunnel dst address.
  29. * For encap,auto modes.
  30. */
  31. IOAM6_IPTUNNEL_DST, /* struct in6_addr */
  32. /* IOAM Trace Header */
  33. IOAM6_IPTUNNEL_TRACE, /* struct ioam6_trace_hdr */
  34. /* Insertion frequency:
  35. * "k over n" packets (0 < k <= n)
  36. * [0.0001% ... 100%]
  37. */
  38. #define IOAM6_IPTUNNEL_FREQ_MIN 1
  39. #define IOAM6_IPTUNNEL_FREQ_MAX 1000000
  40. IOAM6_IPTUNNEL_FREQ_K, /* u32 */
  41. IOAM6_IPTUNNEL_FREQ_N, /* u32 */
  42. __IOAM6_IPTUNNEL_MAX,
  43. };
  44. #define IOAM6_IPTUNNEL_MAX (__IOAM6_IPTUNNEL_MAX - 1)
  45. #endif /* _LINUX_IOAM6_IPTUNNEL_H */