blob: f1fbe9c930d77a3742de987c0545eed6b40f9614 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _IF_TUNNEL_H_
2#define _IF_TUNNEL_H_
3
Masahide NAKAMURA6fd8bb82007-01-23 22:17:23 -08004#include <linux/types.h>
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
7#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
8#define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2)
9#define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3)
YOSHIFUJI Hideaki300aaee2008-03-24 18:28:39 +090010#define SIOCGETPRL (SIOCDEVPRIVATE + 4)
Templin, Fred Lfadf6bf2008-03-11 18:35:59 -040011#define SIOCADDPRL (SIOCDEVPRIVATE + 5)
12#define SIOCDELPRL (SIOCDEVPRIVATE + 6)
13#define SIOCCHGPRL (SIOCDEVPRIVATE + 7)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15#define GRE_CSUM __constant_htons(0x8000)
16#define GRE_ROUTING __constant_htons(0x4000)
17#define GRE_KEY __constant_htons(0x2000)
18#define GRE_SEQ __constant_htons(0x1000)
19#define GRE_STRICT __constant_htons(0x0800)
20#define GRE_REC __constant_htons(0x0700)
21#define GRE_FLAGS __constant_htons(0x00F8)
22#define GRE_VERSION __constant_htons(0x0007)
23
24struct ip_tunnel_parm
25{
26 char name[IFNAMSIZ];
27 int link;
Al Virod5a0a1e2006-11-08 00:23:14 -080028 __be16 i_flags;
29 __be16 o_flags;
30 __be32 i_key;
31 __be32 o_key;
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 struct iphdr iph;
33};
34
Templin, Fred Lfadf6bf2008-03-11 18:35:59 -040035/* SIT-mode i_flags */
36#define SIT_ISATAP 0x0001
37
38struct ip_tunnel_prl {
39 __be32 addr;
40 __u16 flags;
41 __u16 __reserved;
YOSHIFUJI Hideaki300aaee2008-03-24 18:28:39 +090042 __u32 datalen;
43 __u32 __reserved2;
44 void __user *data;
Templin, Fred Lfadf6bf2008-03-11 18:35:59 -040045};
46
47/* PRL flags */
48#define PRL_DEFAULT 0x0001
49
Linus Torvalds1da177e2005-04-16 15:20:36 -070050#endif /* _IF_TUNNEL_H_ */