Re: Configure network
Brought to you by:
aeb,
bencollins
From: <fra...@ya...> - 2000-05-03 13:32:49
|
I suppose you use the ether_setup() function in the init function of your ethernet driver. ( I will called it ether1394_init() ) The ether_setup() fonction assign lot of things for your driver and can assign its name like "eth1" or "eth2", depands on number of ethernet interface are "up" in the kernel. But for this, you have to define a global char buffer inside your module : char etherdev_name[8]; then the field 'name' of your network device must point to this buffer : static struct device ether1394_dev = { etherdev_name, // pointe vers une zone memoire qui a ete reservee 0, 0, 0, 0, // shmem adresse 0x0000, // IOport 0, // irq 0, 0, 0, // flags NULL, // next NULL, // init = null, pour le moment }; And in your init_module() function you should : // refer to your network device init function : ether1394_dev.init = ether1394_init; // put a blank char on the name buffer of your network device // So the ether_setup() function will assign // a name like "eth1" ether1394_dev.name[0] = ' '; // and register your ethernet driver // this will call your ether1394_init() function register_netdev(ðer1394_dev) Now you can insmod ether1394 and ifup eth1 --- Phat Huynh <pha...@ax...> a écrit: > Hi, > I started to work on a ethernet encapsulation driver > two days ago and I > tried to insert the driver into the kernel by first > insmod all the > ieee1394 modules and the executing this command: > > ifconfig ether1394 172.21.2.190 up > > but I received this error-message: > > SIOCSIFADDR: No such device > ether1394: unknown interface: No such device > ether1394: unknown interface: No such device > > Do you know why the kernel fails to locate the > ether1394 driver although > the driver is loaded into kernel already (I've > checked it)? > > -- > Phat Huynh > Axis Communications > > > ___________________________________________________________ Do You Yahoo!? Achetez, vendez! À votre prix! Sur http://encheres.yahoo.fr |