# HG changeset patch # User Florian Pose # Date 1162308777 0 # Node ID 0a6bd71bf4d33a28ec7e300b455a9b28f928f23d # Parent 4ec31555832b6bc10b11c2e27eaca1f9bf2348ec Fixed debug interfaces. diff -r 4ec31555832b -r 0a6bd71bf4d3 configure.ac --- a/configure.ac Tue Oct 31 14:25:01 2006 +0000 +++ b/configure.ac Tue Oct 31 15:32:57 2006 +0000 @@ -56,7 +56,7 @@ # Debug interface #------------------------------------------------------------------------------ -AC_ARG_ENABLE([debug-if], +AC_ARG_ENABLE([dbg-if], AS_HELP_STRING([--enable-dbg-if], [Create a debug interface for each master @<:@NO@:>@]), [ diff -r 4ec31555832b -r 0a6bd71bf4d3 master/debug.c --- a/master/debug.c Tue Oct 31 14:25:01 2006 +0000 +++ b/master/debug.c Tue Oct 31 15:32:57 2006 +0000 @@ -49,6 +49,7 @@ // net_device functions int ec_dbgdev_open(struct net_device *); int ec_dbgdev_stop(struct net_device *); +int ec_dbgdev_tx(struct sk_buff *, struct net_device *); struct net_device_stats *ec_dbgdev_stats(struct net_device *); /*****************************************************************************/ @@ -74,6 +75,7 @@ // initialize net_device dbg->dev->open = ec_dbgdev_open; dbg->dev->stop = ec_dbgdev_stop; + dbg->dev->hard_start_xmit = ec_dbgdev_tx; dbg->dev->get_stats = ec_dbgdev_stats; // initialize private data @@ -177,6 +179,23 @@ /*****************************************************************************/ /** + Transmits data via the virtual network device. +*/ + +int ec_dbgdev_tx(struct sk_buff *skb, /**< transmit socket buffer */ + struct net_device *dev /**< EoE net_device */ + ) +{ + ec_debug_t *dbg = *((ec_debug_t **) netdev_priv(dev)); + + dev_kfree_skb(skb); + dbg->stats.tx_dropped++; + return 0; +} + +/*****************************************************************************/ + +/** Gets statistics about the virtual network device. */