Create an interface
From: Gabriele Pongelli
Date: Thu Mar 12 2009 - 08:18:57 EST
Hi all,
I'm working on my thesis and I need to create an ethernet virtual
interface (I will not use it for packet transmission).
Do you know how it's possible doing this ?
I've tried with creating a function with these instructions
-----
dev = alloc_etherdev(sizeof(struct net_device));
dev->open = do_up ;
dev->stop = do_down ;
dev->do_ioctl = the_ioctl ;
dev->hard_start_xmit = transmit ;
dev->set_multicast_list = mcast_list ;
dev->change_mtu = ch_mtu ;
dev->tx_timeout = transm_timeout ;
dev->set_mac_address = set_MAC_virtual_interface;
-----
every function doesn't contain any instruction, only "return 0" one.
set_MAC_virtual_interface set a random MAC to the interface; after
these instruction I register the interface.
The module is loaded correctly but, when unloading, the
"rollback_registered function is unable to handle NULL pointer", which
is the needed pointer ?
Can anyone tell me how is possible to create a virtual interface?
Is there a manual/howto/article to help me ?
Thank you in advance!
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html