blob: f20c224d544c7887d3c9b0cb154cfbdef61bbd91 [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)
Templin, Fred Lfadf6bf2008-03-11 18:35:59 -040010#define SIOCADDPRL (SIOCDEVPRIVATE + 5)
11#define SIOCDELPRL (SIOCDEVPRIVATE + 6)
12#define SIOCCHGPRL (SIOCDEVPRIVATE + 7)
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
14#define GRE_CSUM __constant_htons(0x8000)
15#define GRE_ROUTING __constant_htons(0x4000)
16#define GRE_KEY __constant_htons(0x2000)
17#define GRE_SEQ __constant_htons(0x1000)
18#define GRE_STRICT __constant_htons(0x0800)
19#define GRE_REC __constant_htons(0x0700)
20#define GRE_FLAGS __constant_htons(0x00F8)
21#define GRE_VERSION __constant_htons(0x0007)
22
23struct ip_tunnel_parm
24{
25 char name[IFNAMSIZ];
26 int link;
Al Virod5a0a1e2006-11-08 00:23:14 -080027 __be16 i_flags;
28 __be16 o_flags;
29 __be32 i_key;
30 __be32 o_key;
Linus Torvalds1da177e2005-04-16 15:20:36 -070031 struct iphdr iph;
32};
33
Templin, Fred Lfadf6bf2008-03-11 18:35:59 -040034/* SIT-mode i_flags */
35#define SIT_ISATAP 0x0001
36
37struct ip_tunnel_prl {
38 __be32 addr;
39 __u16 flags;
40 __u16 __reserved;
41};
42
43/* PRL flags */
44#define PRL_DEFAULT 0x0001
45
Linus Torvalds1da177e2005-04-16 15:20:36 -070046#endif /* _IF_TUNNEL_H_ */