ip6_tunnel.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _IP6_TUNNEL_H
  2. #define _IP6_TUNNEL_H
  3. #include <linux/types.h>
  4. #define IPV6_TLV_TNL_ENCAP_LIMIT 4
  5. #define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
  6. /* don't add encapsulation limit if one isn't present in inner packet */
  7. #define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1
  8. /* copy the traffic class field from the inner packet */
  9. #define IP6_TNL_F_USE_ORIG_TCLASS 0x2
  10. /* copy the flowlabel from the inner packet */
  11. #define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4
  12. /* being used for Mobile IPv6 */
  13. #define IP6_TNL_F_MIP6_DEV 0x8
  14. /* copy DSCP from the outer packet */
  15. #define IP6_TNL_F_RCV_DSCP_COPY 0x10
  16. /* copy fwmark from inner packet */
  17. #define IP6_TNL_F_USE_ORIG_FWMARK 0x20
  18. struct ip6_tnl_parm {
  19. char name[IFNAMSIZ]; /* name of tunnel device */
  20. int link; /* ifindex of underlying L2 interface */
  21. __u8 proto; /* tunnel protocol */
  22. __u8 encap_limit; /* encapsulation limit for tunnel */
  23. __u8 hop_limit; /* hop limit for tunnel */
  24. __be32 flowinfo; /* traffic class and flowlabel for tunnel */
  25. __u32 flags; /* tunnel flags */
  26. struct in6_addr laddr; /* local tunnel end-point address */
  27. struct in6_addr raddr; /* remote tunnel end-point address */
  28. };
  29. struct ip6_tnl_parm2 {
  30. char name[IFNAMSIZ]; /* name of tunnel device */
  31. int link; /* ifindex of underlying L2 interface */
  32. __u8 proto; /* tunnel protocol */
  33. __u8 encap_limit; /* encapsulation limit for tunnel */
  34. __u8 hop_limit; /* hop limit for tunnel */
  35. __be32 flowinfo; /* traffic class and flowlabel for tunnel */
  36. __u32 flags; /* tunnel flags */
  37. struct in6_addr laddr; /* local tunnel end-point address */
  38. struct in6_addr raddr; /* remote tunnel end-point address */
  39. __be16 i_flags;
  40. __be16 o_flags;
  41. __be32 i_key;
  42. __be32 o_key;
  43. };
  44. #endif