if_tunnel.h 782 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _IF_TUNNEL_H_
  2. #define _IF_TUNNEL_H_
  3. #include <linux/types.h>
  4. #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
  5. #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
  6. #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2)
  7. #define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3)
  8. #define GRE_CSUM __constant_htons(0x8000)
  9. #define GRE_ROUTING __constant_htons(0x4000)
  10. #define GRE_KEY __constant_htons(0x2000)
  11. #define GRE_SEQ __constant_htons(0x1000)
  12. #define GRE_STRICT __constant_htons(0x0800)
  13. #define GRE_REC __constant_htons(0x0700)
  14. #define GRE_FLAGS __constant_htons(0x00F8)
  15. #define GRE_VERSION __constant_htons(0x0007)
  16. struct ip_tunnel_parm
  17. {
  18. char name[IFNAMSIZ];
  19. int link;
  20. __be16 i_flags;
  21. __be16 o_flags;
  22. __be32 i_key;
  23. __be32 o_key;
  24. struct iphdr iph;
  25. };
  26. #endif /* _IF_TUNNEL_H_ */