Home | History | Annotate | Download | only in linux
      1 #ifndef _IF_TUNNEL_H_
      2 #define _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 
     17 #define GRE_CSUM	__cpu_to_be16(0x8000)
     18 #define GRE_ROUTING	__cpu_to_be16(0x4000)
     19 #define GRE_KEY		__cpu_to_be16(0x2000)
     20 #define GRE_SEQ		__cpu_to_be16(0x1000)
     21 #define GRE_STRICT	__cpu_to_be16(0x0800)
     22 #define GRE_REC		__cpu_to_be16(0x0700)
     23 #define GRE_FLAGS	__cpu_to_be16(0x00F8)
     24 #define GRE_VERSION	__cpu_to_be16(0x0007)
     25 
     26 struct ip_tunnel_parm
     27 {
     28 	char			name[IFNAMSIZ];
     29 	int			link;
     30 	__be16			i_flags;
     31 	__be16			o_flags;
     32 	__be32			i_key;
     33 	__be32			o_key;
     34 	struct iphdr		iph;
     35 };
     36 
     37 /* SIT-mode i_flags */
     38 #define	SIT_ISATAP	0x0001
     39 
     40 struct ip_tunnel_prl {
     41 	__be32			addr;
     42 	__u16			flags;
     43 	__u16			__reserved;
     44 	__u32			datalen;
     45 	__u32			__reserved2;
     46 	/* data follows */
     47 };
     48 
     49 /* PRL flags */
     50 #define	PRL_DEFAULT		0x0001
     51 
     52 enum
     53 {
     54 	IFLA_GRE_UNSPEC,
     55 	IFLA_GRE_LINK,
     56 	IFLA_GRE_IFLAGS,
     57 	IFLA_GRE_OFLAGS,
     58 	IFLA_GRE_IKEY,
     59 	IFLA_GRE_OKEY,
     60 	IFLA_GRE_LOCAL,
     61 	IFLA_GRE_REMOTE,
     62 	IFLA_GRE_TTL,
     63 	IFLA_GRE_TOS,
     64 	IFLA_GRE_PMTUDISC,
     65 	__IFLA_GRE_MAX,
     66 };
     67 
     68 #define IFLA_GRE_MAX	(__IFLA_GRE_MAX - 1)
     69 
     70 #endif /* _IF_TUNNEL_H_ */
     71