IPv6: Fix 6RD build error
[linux-2.6.git] / include / linux / if_tunnel.h
1 #ifndef _IF_TUNNEL_H_
2 #define _IF_TUNNEL_H_
3
4 #include <linux/types.h>
5
6 #ifdef __KERNEL__
7 #include <linux/ip.h>
8 #include <linux/in6.h>
9 #endif
10
11 #define SIOCGETTUNNEL   (SIOCDEVPRIVATE + 0)
12 #define SIOCADDTUNNEL   (SIOCDEVPRIVATE + 1)
13 #define SIOCDELTUNNEL   (SIOCDEVPRIVATE + 2)
14 #define SIOCCHGTUNNEL   (SIOCDEVPRIVATE + 3)
15 #define SIOCGETPRL      (SIOCDEVPRIVATE + 4)
16 #define SIOCADDPRL      (SIOCDEVPRIVATE + 5)
17 #define SIOCDELPRL      (SIOCDEVPRIVATE + 6)
18 #define SIOCCHGPRL      (SIOCDEVPRIVATE + 7)
19 #define SIOCGET6RD      (SIOCDEVPRIVATE + 8)
20 #define SIOCADD6RD      (SIOCDEVPRIVATE + 9)
21 #define SIOCDEL6RD      (SIOCDEVPRIVATE + 10)
22 #define SIOCCHG6RD      (SIOCDEVPRIVATE + 11)
23
24 #define GRE_CSUM        __cpu_to_be16(0x8000)
25 #define GRE_ROUTING     __cpu_to_be16(0x4000)
26 #define GRE_KEY         __cpu_to_be16(0x2000)
27 #define GRE_SEQ         __cpu_to_be16(0x1000)
28 #define GRE_STRICT      __cpu_to_be16(0x0800)
29 #define GRE_REC         __cpu_to_be16(0x0700)
30 #define GRE_FLAGS       __cpu_to_be16(0x00F8)
31 #define GRE_VERSION     __cpu_to_be16(0x0007)
32
33 struct ip_tunnel_parm
34 {
35         char                    name[IFNAMSIZ];
36         int                     link;
37         __be16                  i_flags;
38         __be16                  o_flags;
39         __be32                  i_key;
40         __be32                  o_key;
41         struct iphdr            iph;
42 };
43
44 /* SIT-mode i_flags */
45 #define SIT_ISATAP      0x0001
46
47 struct ip_tunnel_prl {
48         __be32                  addr;
49         __u16                   flags;
50         __u16                   __reserved;
51         __u32                   datalen;
52         __u32                   __reserved2;
53         /* data follows */
54 };
55
56 /* PRL flags */
57 #define PRL_DEFAULT             0x0001
58
59 struct ip_tunnel_6rd {
60         struct in6_addr         prefix;
61         __be32                  relay_prefix;
62         __u16                   prefixlen;
63         __u16                   relay_prefixlen;
64 };
65
66 enum
67 {
68         IFLA_GRE_UNSPEC,
69         IFLA_GRE_LINK,
70         IFLA_GRE_IFLAGS,
71         IFLA_GRE_OFLAGS,
72         IFLA_GRE_IKEY,
73         IFLA_GRE_OKEY,
74         IFLA_GRE_LOCAL,
75         IFLA_GRE_REMOTE,
76         IFLA_GRE_TTL,
77         IFLA_GRE_TOS,
78         IFLA_GRE_PMTUDISC,
79         __IFLA_GRE_MAX,
80 };
81
82 #define IFLA_GRE_MAX    (__IFLA_GRE_MAX - 1)
83
84 #endif /* _IF_TUNNEL_H_ */