#define pr_fmt(fmt) …
#include <linux/icmp.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/random.h>
#include <linux/socket.h>
#include <linux/l2tp.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <net/sock.h>
#include <net/ip.h>
#include <net/icmp.h>
#include <net/udp.h>
#include <net/inet_common.h>
#include <net/tcp_states.h>
#include <net/protocol.h>
#include <net/xfrm.h>
#include <net/transp_v6.h>
#include <net/addrconf.h>
#include <net/ip6_route.h>
#include "l2tp_core.h"
struct l2tp_ip6_sock { … };
static DEFINE_RWLOCK(l2tp_ip6_lock);
static struct hlist_head l2tp_ip6_table;
static struct hlist_head l2tp_ip6_bind_table;
static inline struct l2tp_ip6_sock *l2tp_ip6_sk(const struct sock *sk)
{ … }
static struct sock *__l2tp_ip6_bind_lookup(const struct net *net,
const struct in6_addr *laddr,
const struct in6_addr *raddr,
int dif, u32 tunnel_id)
{ … }
static int l2tp_ip6_recv(struct sk_buff *skb)
{ … }
static int l2tp_ip6_hash(struct sock *sk)
{ … }
static void l2tp_ip6_unhash(struct sock *sk)
{ … }
static int l2tp_ip6_open(struct sock *sk)
{ … }
static void l2tp_ip6_close(struct sock *sk, long timeout)
{ … }
static void l2tp_ip6_destroy_sock(struct sock *sk)
{ … }
static int l2tp_ip6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{ … }
static int l2tp_ip6_connect(struct sock *sk, struct sockaddr *uaddr,
int addr_len)
{ … }
static int l2tp_ip6_disconnect(struct sock *sk, int flags)
{ … }
static int l2tp_ip6_getname(struct socket *sock, struct sockaddr *uaddr,
int peer)
{ … }
static int l2tp_ip6_backlog_recv(struct sock *sk, struct sk_buff *skb)
{ … }
static int l2tp_ip6_push_pending_frames(struct sock *sk)
{ … }
static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
{ … }
static int l2tp_ip6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
int flags, int *addr_len)
{ … }
static struct proto l2tp_ip6_prot = …;
static const struct proto_ops l2tp_ip6_ops = …;
static struct inet_protosw l2tp_ip6_protosw = …;
static struct inet6_protocol l2tp_ip6_protocol __read_mostly = …;
static int __init l2tp_ip6_init(void)
{ … }
static void __exit l2tp_ip6_exit(void)
{ … }
module_init(…) …;
module_exit(l2tp_ip6_exit);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…) …;
MODULE_ALIAS_NET_PF_PROTO_TYPE(…);
MODULE_ALIAS_NET_PF_PROTO(…);