/* * IPv6 tunneling device * Linux INET6 implementation * * Authors: * Ville Nuorvala <vnuorval@tcs.hut.fi> * Yasuyuki Kozakai <kozakai@linux-ipv6.org> * * $Id$ * * Based on: * linux/net/ipv6/sit.c and linux/net/ipv4/ipip.c * * RFC 2473 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * */#include<linux/module.h>#include<linux/capability.h>#include<linux/errno.h>#include<linux/types.h>#include<linux/sockios.h>#include<linux/icmp.h>#include<linux/if.h>#include<linux/in.h>#include<linux/ip.h>#include<linux/if_tunnel.h>#include<linux/net.h>#include<linux/in6.h>#include<linux/netdevice.h>#include<linux/if_arp.h>#include<linux/icmpv6.h>#include<linux/init.h>#include<linux/route.h>#include<linux/rtnetlink.h>#include<linux/netfilter_ipv6.h>#include<asm/uaccess.h>#include<asm/atomic.h>#include<net/icmp.h>#include<net/ip.h>#include<net/ipv6.h>#include<net/ip6_route.h>#include<net/addrconf.h>#include<net/ip6_tunnel.h>#include<net/xfrm.h>#include<net/dsfield.h>#include<net/inet_ecn.h>MODULE_AUTHOR("Ville Nuorvala");MODULE_DESCRIPTION("IPv6 tunneling device");MODULE_LICENSE("GPL");#define IPV6_TLV_TEL_DST_SIZE 8#ifdef IP6_TNL_DEBUG#define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __FUNCTION__)#else#define IP6_TNL_TRACE(x...) do {;} while(0)#endif#define IPV6_TCLASS_MASK (IPV6_FLOWINFO_MASK & ~IPV6_FLOWLABEL_MASK)#define IPV6_TCLASS_SHIFT 20#define HASH_SIZE 32#define HASH(addr) ((__force u32)((addr)->s6_addr32[0] ^ (addr)->s6_addr32[1] ^ \ (addr)->s6_addr32[2] ^ (addr)->s6_addr32[3]) & \ (HASH_SIZE - 1))staticintip6_fb_tnl_dev_init(structnet_device*dev);staticintip6_tnl_dev_init(struct