aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Elston <celston@katalix.com>2012-04-29 21:48:54 +0000
committerDavid S. Miller <davem@davemloft.net>2012-05-01 09:30:55 -0400
commita32e0eec7042b21ccb52896cf715e3e2641fed93 (patch)
tree12880271e8f5fb4c5e48a0633e9a38d5a67a3448 /include
parentipv6: Export ipv6 functions for use by other protocols (diff)
downloadlinux-dev-a32e0eec7042b21ccb52896cf715e3e2641fed93.tar.xz
linux-dev-a32e0eec7042b21ccb52896cf715e3e2641fed93.zip
l2tp: introduce L2TPv3 IP encapsulation support for IPv6
L2TPv3 defines an IP encapsulation packet format where data is carried directly over IP (no UDP). The kernel already has support for L2TP IP encapsulation over IPv4 (l2tp_ip). This patch introduces support for L2TP IP encapsulation over IPv6. The implementation is derived from ipv6/raw and ipv4/l2tp_ip. Signed-off-by: Chris Elston <celston@katalix.com> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/l2tp.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/l2tp.h b/include/linux/l2tp.h
index 16b834741d16..7eab668f60f3 100644
--- a/include/linux/l2tp.h
+++ b/include/linux/l2tp.h
@@ -11,6 +11,7 @@
#include <linux/socket.h>
#ifdef __KERNEL__
#include <linux/in.h>
+#include <linux/in6.h>
#else
#include <netinet/in.h>
#endif
@@ -39,6 +40,22 @@ struct sockaddr_l2tpip {
sizeof(__u32)];
};
+/**
+ * struct sockaddr_l2tpip6 - the sockaddr structure for L2TP-over-IPv6 sockets
+ * @l2tp_family: address family number AF_L2TPIP.
+ * @l2tp_addr: protocol specific address information
+ * @l2tp_conn_id: connection id of tunnel
+ */
+struct sockaddr_l2tpip6 {
+ /* The first fields must match struct sockaddr_in6 */
+ __kernel_sa_family_t l2tp_family; /* AF_INET6 */
+ __be16 l2tp_unused; /* INET port number (unused) */
+ __be32 l2tp_flowinfo; /* IPv6 flow information */
+ struct in6_addr l2tp_addr; /* IPv6 address */
+ __u32 l2tp_scope_id; /* scope id (new in RFC2553) */
+ __u32 l2tp_conn_id; /* Connection ID of tunnel */
+};
+
/*****************************************************************************
* NETLINK_GENERIC netlink family.
*****************************************************************************/