linux/net/atm/br2684.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Ethernet netdevice using ATM AAL5 as underlying carrier
 * (RFC1483 obsoleted by RFC2684) for Linux
 *
 * Authors: Marcell GAL, 2000, XDSL Ltd, Hungary
 *          Eric Kinzie, 2006-2007, US Naval Research Laboratory
 */

#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 {};

/*
 * This lock should be held for writing any time the list of devices or
 * their attached vcc's could be altered.  It should be held for reading
 * any time these are being queried.  Note that we sometimes need to
 * do read-locking under interrupting context, so write locking must block
 * the current CPU's interrupts.
 */
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)
{}

/* Caller should hold read_lock(&devs_lock) */
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 =;

/* chained vcc->pop function.  Check if we should wake the netif_queue */
static void br2684_pop(struct atm_vcc *vcc, struct sk_buff *skb)
{}

/*
 * Send a packet out a particular vcc.  Not to useful right now, but paves
 * the way for multiple vcc's per itf.  Returns true if we can send,
 * otherwise false
 */
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)
{}

/*
 * We remember when the MAC gets set, so we don't override it later with
 * the ESI of the ATM card of the first VC
 */
static int br2684_mac_addr(struct net_device *dev, void *p)
{}

#ifdef CONFIG_ATM_BR2684_IPFILTER
/* this IOCTL is experimental. */
static int br2684_setfilt(struct atm_vcc *atmvcc, void __user * arg)
{}

/* Returns 1 if packet should be dropped */
static inline int
packet_fails_filter(__be16 type, struct br2684_vcc *brvcc, struct sk_buff *skb)
{}
#endif /* CONFIG_ATM_BR2684_IPFILTER */

static void br2684_close_vcc(struct br2684_vcc *brvcc)
{}

/* when AAL5 PDU comes in: */
static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
{}

/*
 * Assign a vcc to a dev
 * Note: we do not have explicit unassign, but look at _push()
 */
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)
{}

/*
 * This handles ioctls actually performed on our vcc - we must return
 * -ENOIOCTLCMD for any unrecognized ioctl
 */
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;	/* from proc.c */
#endif /* CONFIG_PROC_FS */

static int __init br2684_init(void)
{}

static void __exit br2684_exit(void)
{}

module_init();
module_exit(br2684_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();