#define pr_fmt(fmt) …
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/net.h>
#include <linux/inet.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <linux/uaccess.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/stat.h>
#include <linux/module.h>
#include <linux/lapb.h>
#include <linux/init.h>
#include <net/x25device.h>
static const u8 bcast_addr[6] = …;
#define MAXLAPBDEV …
struct lapbethdev { … };
static LIST_HEAD(lapbeth_devices);
static void lapbeth_connected(struct net_device *dev, int reason);
static void lapbeth_disconnected(struct net_device *dev, int reason);
static struct lapbethdev *lapbeth_get_x25_dev(struct net_device *dev)
{ … }
static __inline__ int dev_is_ethdev(struct net_device *dev)
{ … }
static int lapbeth_napi_poll(struct napi_struct *napi, int budget)
{ … }
static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *ptype, struct net_device *orig_dev)
{ … }
static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
{ … }
static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb)
{ … }
static void lapbeth_connected(struct net_device *dev, int reason)
{ … }
static void lapbeth_disconnected(struct net_device *dev, int reason)
{ … }
static int lapbeth_set_mac_address(struct net_device *dev, void *addr)
{ … }
static const struct lapb_register_struct lapbeth_callbacks = …;
static int lapbeth_open(struct net_device *dev)
{ … }
static int lapbeth_close(struct net_device *dev)
{ … }
static const struct net_device_ops lapbeth_netdev_ops = …;
static void lapbeth_setup(struct net_device *dev)
{ … }
static int lapbeth_new_device(struct net_device *dev)
{ … }
static void lapbeth_free_device(struct lapbethdev *lapbeth)
{ … }
static int lapbeth_device_event(struct notifier_block *this,
unsigned long event, void *ptr)
{ … }
static struct packet_type lapbeth_packet_type __read_mostly = …;
static struct notifier_block lapbeth_dev_notifier = …;
static const char banner[] __initconst = …;
static int __init lapbeth_init_driver(void)
{ … }
module_init(…) …;
static void __exit lapbeth_cleanup_driver(void)
{ … }
module_exit(lapbeth_cleanup_driver);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;