* Network driver: problem with insane (ported in 2.4.3)
@ 2001-04-24 14:35 Stephane List
0 siblings, 0 replies; only message in thread
From: Stephane List @ 2001-04-24 14:35 UTC (permalink / raw)
To: linux-kernel
Hi all,
Has anybody ported insane or snull from Rubini to kernel 2.4.3?
I'm porting Rubini's example: "insane".
/* --------------------------------------------------------------------------
* definition of the "private" data structure used by this interface
*/
struct insane_private {
struct net_device_stats priv_stats;
struct net_device *priv_device; /* interface used to xmit data */
int priv_mode; /* how to drop packets */
int priv_arg1; /* arguments to the dropping mode */
int priv_arg2;
};
int insane_open(struct net_device *dev)
{
/* mark the device as operational */
/* dev->start = 1;
dev->tbusy = 0;*/
netif_start_queue(dev);
MOD_INC_USE_COUNT;
return 0;
}
int insane_close(struct net_device *dev)
{
/* dev->start = 0;
dev->tbusy = 1;*/
netif_stop_queue(dev);
MOD_DEC_USE_COUNT;
return 0;
}
int insane_xmit(struct sk_buff *skb, struct net_device *dev)
{
... /* state if the packet must be transmit or nor, and if it must */
skb->dev = priv->priv_device;
skb->priority = 1;
printk("enqueue len=%d\n", skb->len);
{
int ret = dev_queue_xmit (skb);
printk("enqueue ret=%d\n", ret);
}
return 0;
}
Everything looks OK, dev_queue_xmit returns 0, but nothing comes back when I
ping through insane.
Has anybody ported insane or snull from Rubini to kernel 2.4.3?
Thanks a lot
Stephane
--
Stéphane LIST -- <stephane.list@fr.alcove.com>
Alcôve, liberating software -- <http://www.alcove.com/>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-24 14:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-24 14:35 Network driver: problem with insane (ported in 2.4.3) Stephane List
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).