Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _IF_TUNNEL_H_ |
| 2 | #define _IF_TUNNEL_H_ |
| 3 | |
Masahide NAKAMURA | 6fd8bb8 | 2007-01-23 22:17:23 -0800 | [diff] [blame] | 4 | #include <linux/types.h> |
Herbert Xu | c19e654 | 2008-10-09 11:59:55 -0700 | [diff] [blame] | 5 | #include <linux/ip.h> |
Masahide NAKAMURA | 6fd8bb8 | 2007-01-23 22:17:23 -0800 | [diff] [blame] | 6 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) |
| 8 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
| 9 | #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) |
| 10 | #define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3) |
YOSHIFUJI Hideaki | 300aaee | 2008-03-24 18:28:39 +0900 | [diff] [blame] | 11 | #define SIOCGETPRL (SIOCDEVPRIVATE + 4) |
Templin, Fred L | fadf6bf | 2008-03-11 18:35:59 -0400 | [diff] [blame] | 12 | #define SIOCADDPRL (SIOCDEVPRIVATE + 5) |
| 13 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) |
| 14 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
| 16 | #define GRE_CSUM __constant_htons(0x8000) |
| 17 | #define GRE_ROUTING __constant_htons(0x4000) |
| 18 | #define GRE_KEY __constant_htons(0x2000) |
| 19 | #define GRE_SEQ __constant_htons(0x1000) |
| 20 | #define GRE_STRICT __constant_htons(0x0800) |
| 21 | #define GRE_REC __constant_htons(0x0700) |
| 22 | #define GRE_FLAGS __constant_htons(0x00F8) |
| 23 | #define GRE_VERSION __constant_htons(0x0007) |
| 24 | |
| 25 | struct ip_tunnel_parm |
| 26 | { |
| 27 | char name[IFNAMSIZ]; |
| 28 | int link; |
Al Viro | d5a0a1e | 2006-11-08 00:23:14 -0800 | [diff] [blame] | 29 | __be16 i_flags; |
| 30 | __be16 o_flags; |
| 31 | __be32 i_key; |
| 32 | __be32 o_key; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | struct iphdr iph; |
| 34 | }; |
| 35 | |
Templin, Fred L | fadf6bf | 2008-03-11 18:35:59 -0400 | [diff] [blame] | 36 | /* SIT-mode i_flags */ |
| 37 | #define SIT_ISATAP 0x0001 |
| 38 | |
| 39 | struct ip_tunnel_prl { |
| 40 | __be32 addr; |
| 41 | __u16 flags; |
| 42 | __u16 __reserved; |
YOSHIFUJI Hideaki | 300aaee | 2008-03-24 18:28:39 +0900 | [diff] [blame] | 43 | __u32 datalen; |
| 44 | __u32 __reserved2; |
YOSHIFUJI Hideaki | 2b4743b | 2008-06-16 16:48:20 -0700 | [diff] [blame] | 45 | /* data follows */ |
Templin, Fred L | fadf6bf | 2008-03-11 18:35:59 -0400 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | /* PRL flags */ |
| 49 | #define PRL_DEFAULT 0x0001 |
| 50 | |
Herbert Xu | c19e654 | 2008-10-09 11:59:55 -0700 | [diff] [blame] | 51 | enum |
| 52 | { |
| 53 | IFLA_GRE_UNSPEC, |
| 54 | IFLA_GRE_LINK, |
| 55 | IFLA_GRE_IFLAGS, |
| 56 | IFLA_GRE_OFLAGS, |
| 57 | IFLA_GRE_IKEY, |
| 58 | IFLA_GRE_OKEY, |
| 59 | IFLA_GRE_LOCAL, |
| 60 | IFLA_GRE_REMOTE, |
| 61 | IFLA_GRE_TTL, |
| 62 | IFLA_GRE_TOS, |
| 63 | IFLA_GRE_PMTUDISC, |
| 64 | __IFLA_GRE_MAX, |
| 65 | }; |
| 66 | |
| 67 | #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) |
| 68 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | #endif /* _IF_TUNNEL_H_ */ |