#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/in.h>
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/string.h>
#include <linux/sockios.h>
#include <linux/net.h>
#include <linux/slab.h>
#include <net/ax25.h>
#include <linux/inet.h>
#include <linux/netdevice.h>
#include <net/arp.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/tcp_states.h>
#include <linux/uaccess.h>
#include <linux/fcntl.h>
#include <linux/termios.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/init.h>
#include <net/rose.h>
#include <linux/seq_file.h>
#include <linux/export.h>
static unsigned int rose_neigh_no = …;
static struct rose_node *rose_node_list;
static DEFINE_SPINLOCK(rose_node_list_lock);
static struct rose_neigh *rose_neigh_list;
static DEFINE_SPINLOCK(rose_neigh_list_lock);
static struct rose_route *rose_route_list;
static DEFINE_SPINLOCK(rose_route_list_lock);
struct rose_neigh *rose_loopback_neigh;
static int __must_check rose_add_node(struct rose_route_struct *rose_route,
struct net_device *dev)
{ … }
static void rose_remove_node(struct rose_node *rose_node)
{ … }
static void rose_remove_neigh(struct rose_neigh *rose_neigh)
{ … }
static void rose_remove_route(struct rose_route *rose_route)
{ … }
static int rose_del_node(struct rose_route_struct *rose_route,
struct net_device *dev)
{ … }
void rose_add_loopback_neigh(void)
{ … }
int rose_add_loopback_node(const rose_address *address)
{ … }
void rose_del_loopback_node(const rose_address *address)
{ … }
void rose_rt_device_down(struct net_device *dev)
{ … }
#if 0
void rose_route_device_down(struct net_device *dev)
{
struct rose_route *s, *rose_route;
spin_lock_bh(&rose_route_list_lock);
rose_route = rose_route_list;
while (rose_route != NULL) {
s = rose_route;
rose_route = rose_route->next;
if (s->neigh1->dev == dev || s->neigh2->dev == dev)
rose_remove_route(s);
}
spin_unlock_bh(&rose_route_list_lock);
}
#endif
static int rose_clear_routes(void)
{ … }
static struct net_device *rose_ax25_dev_find(char *devname)
{ … }
struct net_device *rose_dev_first(void)
{ … }
struct net_device *rose_dev_get(rose_address *addr)
{ … }
static int rose_dev_exists(rose_address *addr)
{ … }
struct rose_route *rose_route_free_lci(unsigned int lci, struct rose_neigh *neigh)
{ … }
struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause,
unsigned char *diagnostic, int route_frame)
{ … }
int rose_rt_ioctl(unsigned int cmd, void __user *arg)
{ … }
static void rose_del_route_by_neigh(struct rose_neigh *rose_neigh)
{ … }
void rose_link_failed(ax25_cb *ax25, int reason)
{ … }
void rose_link_device_down(struct net_device *dev)
{ … }
int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
{ … }
#ifdef CONFIG_PROC_FS
static void *rose_node_start(struct seq_file *seq, loff_t *pos)
__acquires(rose_node_list_lock)
{ … }
static void *rose_node_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static void rose_node_stop(struct seq_file *seq, void *v)
__releases(rose_node_list_lock)
{ … }
static int rose_node_show(struct seq_file *seq, void *v)
{ … }
const struct seq_operations rose_node_seqops = …;
static void *rose_neigh_start(struct seq_file *seq, loff_t *pos)
__acquires(rose_neigh_list_lock)
{ … }
static void *rose_neigh_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static void rose_neigh_stop(struct seq_file *seq, void *v)
__releases(rose_neigh_list_lock)
{ … }
static int rose_neigh_show(struct seq_file *seq, void *v)
{ … }
const struct seq_operations rose_neigh_seqops = …;
static void *rose_route_start(struct seq_file *seq, loff_t *pos)
__acquires(rose_route_list_lock)
{ … }
static void *rose_route_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static void rose_route_stop(struct seq_file *seq, void *v)
__releases(rose_route_list_lock)
{ … }
static int rose_route_show(struct seq_file *seq, void *v)
{ … }
struct seq_operations rose_route_seqops = …;
#endif
void __exit rose_rt_free(void)
{ … }