Skip to contentSkip to conversation

Network driver: problem with insane (ported in 2.4.3)

DISCUSSION Stephane List 1 participant 1 message Apr 24, 2001

lore
Share & tools
lore
#0 lore raw

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

Signature · 2 lines
Stéphane LIST                     -- <[email protected]>
Alcôve, liberating software       -- <http://www.alcove.com/>