linux/include/linux/if_tunnel.h
<<
>>
Prefs
   1#ifndef _IF_TUNNEL_H_
   2#define _IF_TUNNEL_H_
   3
   4#include <linux/types.h>
   5#include <asm/byteorder.h>
   6
   7#ifdef __KERNEL__
   8#include <linux/ip.h>
   9#include <linux/in6.h>
  10#endif
  11
  12#define SIOCGETTUNNEL   (SIOCDEVPRIVATE + 0)
  13#define SIOCADDTUNNEL   (SIOCDEVPRIVATE + 1)
  14#define SIOCDELTUNNEL   (SIOCDEVPRIVATE + 2)
  15#define SIOCCHGTUNNEL   (SIOCDEVPRIVATE + 3)
  16#define SIOCGETPRL      (SIOCDEVPRIVATE + 4)
  17#define SIOCADDPRL      (SIOCDEVPRIVATE + 5)
  18#define SIOCDELPRL      (SIOCDEVPRIVATE + 6)
  19#define SIOCCHGPRL      (SIOCDEVPRIVATE + 7)
  20#define SIOCGET6RD      (SIOCDEVPRIVATE + 8)
  21#define SIOCADD6RD      (SIOCDEVPRIVATE + 9)
  22#define SIOCDEL6RD      (SIOCDEVPRIVATE + 10)
  23#define SIOCCHG6RD      (SIOCDEVPRIVATE + 11)
  24
  25#define GRE_CSUM        __cpu_to_be16(0x8000)
  26#define GRE_ROUTING     __cpu_to_be16(0x4000)
  27#define GRE_KEY         __cpu_to_be16(0x2000)
  28#define GRE_SEQ         __cpu_to_be16(0x1000)
  29#define GRE_STRICT      __cpu_to_be16(0x0800)
  30#define GRE_REC         __cpu_to_be16(0x0700)
  31#define GRE_FLAGS       __cpu_to_be16(0x00F8)
  32#define GRE_VERSION     __cpu_to_be16(0x0007)
  33
  34struct ip_tunnel_parm {
  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
  47struct 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
  59struct ip_tunnel_6rd {
  60        struct in6_addr         prefix;
  61        __be32                  relay_prefix;
  62        __u16                   prefixlen;
  63        __u16                   relay_prefixlen;
  64};
  65
  66enum {
  67        IFLA_GRE_UNSPEC,
  68        IFLA_GRE_LINK,
  69        IFLA_GRE_IFLAGS,
  70        IFLA_GRE_OFLAGS,
  71        IFLA_GRE_IKEY,
  72        IFLA_GRE_OKEY,
  73        IFLA_GRE_LOCAL,
  74        IFLA_GRE_REMOTE,
  75        IFLA_GRE_TTL,
  76        IFLA_GRE_TOS,
  77        IFLA_GRE_PMTUDISC,
  78        __IFLA_GRE_MAX,
  79};
  80
  81#define IFLA_GRE_MAX    (__IFLA_GRE_MAX - 1)
  82
  83/* VTI-mode i_flags */
  84#define VTI_ISVTI 0x0001
  85
  86enum {
  87        IFLA_VTI_UNSPEC,
  88        IFLA_VTI_LINK,
  89        IFLA_VTI_IKEY,
  90        IFLA_VTI_OKEY,
  91        IFLA_VTI_LOCAL,
  92        IFLA_VTI_REMOTE,
  93        __IFLA_VTI_MAX,
  94};
  95
  96#define IFLA_VTI_MAX    (__IFLA_VTI_MAX - 1)
  97#endif /* _IF_TUNNEL_H_ */
  98
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.