problem with registering net_dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am a newbie trying to learn working of network device.
I was trying a stripped down version of snull.c example in ldd3

I am not able to load the module.

dmesg says

 net_drive: disagrees about version of symbol alloc_netdev
 net_drive: Unknown symbol alloc_netdev

Even though I am running 2.6.20 and my code is also compiled against 2.6.20, they both are different kernels.
Is this a problem, I dont think so.

My relevant code snippet is

int snull_init_module(void)
{
        int result, i, ret = -ENOMEM;

         /* Allocate the devices */
        snull_devs[0] = alloc_netdev(sizeof(struct snull_priv), "sn%d",
                        snull_init);
        snull_devs[1] = alloc_netdev(sizeof(struct snull_priv), "sn%d",
                        snull_init);
        if (snull_devs[0] == NULL || snull_devs[1] == NULL)
                goto out;
  
   out:
        if (ret)
           return ret;
}

void snull_init(struct net_device *dev )
{
        return;
}

module_init(snull_init_module);


Any help or pointers are appreciated.

Thanks
Prasad.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux