linux/drivers/net/wan/lapbether.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	"LAPB via ethernet" driver release 001
 *
 *	This code REQUIRES 2.1.15 or higher/ NET3.038
 *
 *	This is a "pseudo" network driver to allow LAPB over Ethernet.
 *
 *	This driver can use any ethernet destination address, and can be
 *	limited to accept frames from one dedicated ethernet card only.
 *
 *	History
 *	LAPBETH 001	Jonathan Naylor		Cloned from bpqether.c
 *	2000-10-29	Henner Eisen	lapb_data_indication() return status.
 *	2000-11-14	Henner Eisen	dev_hold/put, NETDEV_GOING_DOWN support
 */

#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] =;

/* If this number is made larger, check that the temporary string buffer
 * in lapbeth_new_device is large enough to store the probe device name.
 */
#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);

/* ------------------------------------------------------------------------ */

/*	Get the LAPB device for the ethernet device
 */
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)
{}

/*	Receive a LAPB frame via an ethernet interface.
 */
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)
{}

/*	Send a LAPB frame via an ethernet interface
 */
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)
{}

/*	Set AX.25 callsign
 */
static int lapbeth_set_mac_address(struct net_device *dev, void *addr)
{}

static const struct lapb_register_struct lapbeth_callbacks =;

/* open/close a device
 */
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)
{}

/*	Setup a new device.
 */
static int lapbeth_new_device(struct net_device *dev)
{}

/*	Free a lapb network device.
 */
static void lapbeth_free_device(struct lapbethdev *lapbeth)
{}

/*	Handle device status changes.
 *
 * Called from notifier with RTNL held.
 */
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();