1 #ifndef _UAPI_IF_TUNNEL_H_ 2 #define _UAPI_IF_TUNNEL_H_ 3 4 #include <linux/types.h> 5 #include <asm/byteorder.h> 6 7 8 #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) 9 #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) 10 #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) 11 #define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3) 12 #define SIOCGETPRL (SIOCDEVPRIVATE + 4) 13 #define SIOCADDPRL (SIOCDEVPRIVATE + 5) 14 #define SIOCDELPRL (SIOCDEVPRIVATE + 6) 15 #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) 16 #define SIOCGET6RD (SIOCDEVPRIVATE + 8) 17 #define SIOCADD6RD (SIOCDEVPRIVATE + 9) 18 #define SIOCDEL6RD (SIOCDEVPRIVATE + 10) 19 #define SIOCCHG6RD (SIOCDEVPRIVATE + 11) 20 21 #define GRE_CSUM __cpu_to_be16(0x8000) 22 #define GRE_ROUTING __cpu_to_be16(0x4000) 23 #define GRE_KEY __cpu_to_be16(0x2000) 24 #define GRE_SEQ __cpu_to_be16(0x1000) 25 #define GRE_STRICT __cpu_to_be16(0x0800) 26 #define GRE_REC __cpu_to_be16(0x0700) 27 #define GRE_FLAGS __cpu_to_be16(0x00F8) 28 #define GRE_VERSION __cpu_to_be16(0x0007) 29 30 struct ip_tunnel_parm { 31 char name[IFNAMSIZ]; 32 int link; 33 __be16 i_flags; 34 __be16 o_flags; 35 __be32 i_key; 36 __be32 o_key; 37 struct iphdr iph; 38 }; 39 40 enum { 41 IFLA_IPTUN_UNSPEC, 42 IFLA_IPTUN_LINK, 43 IFLA_IPTUN_LOCAL, 44 IFLA_IPTUN_REMOTE, 45 IFLA_IPTUN_TTL, 46 IFLA_IPTUN_TOS, 47 IFLA_IPTUN_ENCAP_LIMIT, 48 IFLA_IPTUN_FLOWINFO, 49 IFLA_IPTUN_FLAGS, 50 IFLA_IPTUN_PROTO, 51 IFLA_IPTUN_PMTUDISC, 52 IFLA_IPTUN_6RD_PREFIX, 53 IFLA_IPTUN_6RD_RELAY_PREFIX, 54 IFLA_IPTUN_6RD_PREFIXLEN, 55 IFLA_IPTUN_6RD_RELAY_PREFIXLEN, 56 __IFLA_IPTUN_MAX, 57 }; 58 #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) 59 60 /* SIT-mode i_flags */ 61 #define SIT_ISATAP 0x0001 62 63 struct ip_tunnel_prl { 64 __be32 addr; 65 __u16 flags; 66 __u16 __reserved; 67 __u32 datalen; 68 __u32 __reserved2; 69 /* data follows */ 70 }; 71 72 /* PRL flags */ 73 #define PRL_DEFAULT 0x0001 74 75 struct ip_tunnel_6rd { 76 struct in6_addr prefix; 77 __be32 relay_prefix; 78 __u16 prefixlen; 79 __u16 relay_prefixlen; 80 }; 81 82 enum { 83 IFLA_GRE_UNSPEC, 84 IFLA_GRE_LINK, 85 IFLA_GRE_IFLAGS, 86 IFLA_GRE_OFLAGS, 87 IFLA_GRE_IKEY, 88 IFLA_GRE_OKEY, 89 IFLA_GRE_LOCAL, 90 IFLA_GRE_REMOTE, 91 IFLA_GRE_TTL, 92 IFLA_GRE_TOS, 93 IFLA_GRE_PMTUDISC, 94 IFLA_GRE_ENCAP_LIMIT, 95 IFLA_GRE_FLOWINFO, 96 IFLA_GRE_FLAGS, 97 __IFLA_GRE_MAX, 98 }; 99 100 #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) 101 102 /* VTI-mode i_flags */ 103 #define VTI_ISVTI 0x0001 104 105 enum { 106 IFLA_VTI_UNSPEC, 107 IFLA_VTI_LINK, 108 IFLA_VTI_IKEY, 109 IFLA_VTI_OKEY, 110 IFLA_VTI_LOCAL, 111 IFLA_VTI_REMOTE, 112 __IFLA_VTI_MAX, 113 }; 114 115 #define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1) 116 #endif /* _UAPI_IF_TUNNEL_H_ */ 117