#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>
#include <linux/ip.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <net/arp.h>
#include <linux/atm.h>
#include <linux/atmdev.h>
#include <linux/capability.h>
#include <linux/seq_file.h>
#include <linux/atmbr2684.h>
#include "common.h"
static void skb_debug(const struct sk_buff *skb)
{ … }
#define BR2684_ETHERTYPE_LEN …
#define BR2684_PAD_LEN …
#define LLC …
#define SNAP_BRIDGED …
#define SNAP_ROUTED …
#define PID_ETHERNET …
#define ETHERTYPE_IPV4 …
#define ETHERTYPE_IPV6 …
#define PAD_BRIDGED …
static const unsigned char ethertype_ipv4[] = …;
static const unsigned char ethertype_ipv6[] = …;
static const unsigned char llc_oui_pid_pad[] = …;
static const unsigned char pad[] = …;
static const unsigned char llc_oui_ipv4[] = …;
static const unsigned char llc_oui_ipv6[] = …;
enum br2684_encaps { … };
struct br2684_vcc { … };
struct br2684_dev { … };
static DEFINE_RWLOCK(devs_lock);
static LIST_HEAD(br2684_devs);
static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev)
{ … }
static inline struct net_device *list_entry_brdev(const struct list_head *le)
{ … }
static inline struct br2684_vcc *BR2684_VCC(const struct atm_vcc *atmvcc)
{ … }
static inline struct br2684_vcc *list_entry_brvcc(const struct list_head *le)
{ … }
static struct net_device *br2684_find_dev(const struct br2684_if_spec *s)
{ … }
static int atm_dev_event(struct notifier_block *this, unsigned long event,
void *arg)
{ … }
static struct notifier_block atm_dev_notifier = …;
static void br2684_pop(struct atm_vcc *vcc, struct sk_buff *skb)
{ … }
static int br2684_xmit_vcc(struct sk_buff *skb, struct net_device *dev,
struct br2684_vcc *brvcc)
{ … }
static void br2684_release_cb(struct atm_vcc *atmvcc)
{ … }
static inline struct br2684_vcc *pick_outgoing_vcc(const struct sk_buff *skb,
const struct br2684_dev *brdev)
{ … }
static netdev_tx_t br2684_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static int br2684_mac_addr(struct net_device *dev, void *p)
{ … }
#ifdef CONFIG_ATM_BR2684_IPFILTER
static int br2684_setfilt(struct atm_vcc *atmvcc, void __user * arg)
{ … }
static inline int
packet_fails_filter(__be16 type, struct br2684_vcc *brvcc, struct sk_buff *skb)
{ … }
#endif
static void br2684_close_vcc(struct br2684_vcc *brvcc)
{ … }
static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
{ … }
static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
{ … }
static const struct net_device_ops br2684_netdev_ops = …;
static const struct net_device_ops br2684_netdev_ops_routed = …;
static void br2684_setup(struct net_device *netdev)
{ … }
static void br2684_setup_routed(struct net_device *netdev)
{ … }
static int br2684_create(void __user *arg)
{ … }
static int br2684_ioctl(struct socket *sock, unsigned int cmd,
unsigned long arg)
{ … }
static struct atm_ioctl br2684_ioctl_ops = …;
#ifdef CONFIG_PROC_FS
static void *br2684_seq_start(struct seq_file *seq, loff_t * pos)
__acquires(devs_lock)
{ … }
static void *br2684_seq_next(struct seq_file *seq, void *v, loff_t * pos)
{ … }
static void br2684_seq_stop(struct seq_file *seq, void *v)
__releases(devs_lock)
{ … }
static int br2684_seq_show(struct seq_file *seq, void *v)
{ … }
static const struct seq_operations br2684_seq_ops = …;
extern struct proc_dir_entry *atm_proc_root;
#endif
static int __init br2684_init(void)
{ … }
static void __exit br2684_exit(void)
{ … }
module_init(…) …;
module_exit(br2684_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;