#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/netpoll.h>
#include <linux/rtnetlink.h>
#include <linux/if_vlan.h>
#include <linux/pci.h>
#include <net/sch_generic.h>
#include <uapi/linux/if_arp.h>
#include <net/net_failover.h>
static bool net_failover_xmit_ready(struct net_device *dev)
{ … }
static int net_failover_open(struct net_device *dev)
{ … }
static int net_failover_close(struct net_device *dev)
{ … }
static netdev_tx_t net_failover_drop_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static netdev_tx_t net_failover_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static u16 net_failover_select_queue(struct net_device *dev,
struct sk_buff *skb,
struct net_device *sb_dev)
{ … }
static void net_failover_fold_stats(struct rtnl_link_stats64 *_res,
const struct rtnl_link_stats64 *_new,
const struct rtnl_link_stats64 *_old)
{ … }
static void net_failover_get_stats(struct net_device *dev,
struct rtnl_link_stats64 *stats)
{ … }
static int net_failover_change_mtu(struct net_device *dev, int new_mtu)
{ … }
static void net_failover_set_rx_mode(struct net_device *dev)
{ … }
static int net_failover_vlan_rx_add_vid(struct net_device *dev, __be16 proto,
u16 vid)
{ … }
static int net_failover_vlan_rx_kill_vid(struct net_device *dev, __be16 proto,
u16 vid)
{ … }
static const struct net_device_ops failover_dev_ops = …;
#define FAILOVER_NAME …
#define FAILOVER_VERSION …
static void nfo_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *drvinfo)
{ … }
static int nfo_ethtool_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{ … }
static const struct ethtool_ops failover_ethtool_ops = …;
static rx_handler_result_t net_failover_handle_frame(struct sk_buff **pskb)
{ … }
static void net_failover_compute_features(struct net_device *dev)
{ … }
static void net_failover_lower_state_changed(struct net_device *slave_dev,
struct net_device *primary_dev,
struct net_device *standby_dev)
{ … }
static int net_failover_slave_pre_register(struct net_device *slave_dev,
struct net_device *failover_dev)
{ … }
static int net_failover_slave_register(struct net_device *slave_dev,
struct net_device *failover_dev)
{ … }
static int net_failover_slave_pre_unregister(struct net_device *slave_dev,
struct net_device *failover_dev)
{ … }
static int net_failover_slave_unregister(struct net_device *slave_dev,
struct net_device *failover_dev)
{ … }
static int net_failover_slave_link_change(struct net_device *slave_dev,
struct net_device *failover_dev)
{ … }
static int net_failover_slave_name_change(struct net_device *slave_dev,
struct net_device *failover_dev)
{ … }
static struct failover_ops net_failover_ops = …;
struct failover *net_failover_create(struct net_device *standby_dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void net_failover_destroy(struct failover *failover)
{ … }
EXPORT_SYMBOL_GPL(…);
static __init int
net_failover_init(void)
{ … }
module_init(…) …;
static __exit
void net_failover_exit(void)
{ … }
module_exit(net_failover_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;