#include <linux/string.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/net.h>
#include <linux/skbuff.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/ppp_channel.h>
#include <linux/ppp_defs.h>
#include <linux/if_pppox.h>
#include <linux/ppp-ioctl.h>
#include <linux/notifier.h>
#include <linux/file.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/rcupdate.h>
#include <linux/security.h>
#include <linux/spinlock.h>
#include <net/sock.h>
#include <net/protocol.h>
#include <net/ip.h>
#include <net/icmp.h>
#include <net/route.h>
#include <net/gre.h>
#include <net/pptp.h>
#include <linux/uaccess.h>
#define PPTP_DRIVER_VERSION …
#define MAX_CALLID …
static DECLARE_BITMAP(callid_bitmap, MAX_CALLID + 1);
static struct pppox_sock __rcu **callid_sock;
static DEFINE_SPINLOCK(chan_lock);
static struct proto pptp_sk_proto __read_mostly;
static const struct ppp_channel_ops pptp_chan_ops;
static const struct proto_ops pptp_ops;
static struct pppox_sock *lookup_chan(u16 call_id, __be32 s_addr)
{ … }
static int lookup_chan_dst(u16 call_id, __be32 d_addr)
{ … }
static int add_chan(struct pppox_sock *sock,
struct pptp_addr *sa)
{ … }
static void del_chan(struct pppox_sock *sock)
{ … }
static struct rtable *pptp_route_output(const struct pppox_sock *po,
struct flowi4 *fl4)
{ … }
static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
{ … }
static int pptp_rcv_core(struct sock *sk, struct sk_buff *skb)
{ … }
static int pptp_rcv(struct sk_buff *skb)
{ … }
static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,
int sockaddr_len)
{ … }
static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
int sockaddr_len, int flags)
{ … }
static int pptp_getname(struct socket *sock, struct sockaddr *uaddr,
int peer)
{ … }
static int pptp_release(struct socket *sock)
{ … }
static void pptp_sock_destruct(struct sock *sk)
{ … }
static int pptp_create(struct net *net, struct socket *sock, int kern)
{ … }
static int pptp_ppp_ioctl(struct ppp_channel *chan, unsigned int cmd,
unsigned long arg)
{ … }
static const struct ppp_channel_ops pptp_chan_ops = …;
static struct proto pptp_sk_proto __read_mostly = …;
static const struct proto_ops pptp_ops = …;
static const struct pppox_proto pppox_pptp_proto = …;
static const struct gre_protocol gre_pptp_protocol = …;
static int __init pptp_init_module(void)
{ … }
static void __exit pptp_exit_module(void)
{ … }
module_init(…) …;
module_exit(pptp_exit_module);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_NET_PF_PROTO(…);