Re: How to add devices at run-time?

Ben Greear (greear@cyberhighway.net)
Tue, 22 Dec 1998 16:40:32 -0700


Alan Cox wrote:
>
> > act very much like Ethernet Devices, but of course since they
> > are only in software, it is impossible to probe for them at
> > boot, as the Ethernet devices are probed and created.)
> >
> > This is probably a fairly detailed and complex question, so I
> > would really like a pointer to some other code that does
> > something similar.
>
> Its actually an "unsolved problem" as such. Its something that needs cleaner
> handling for Frame LCN's and other stuff too. My guess is you need to add
> an ioctl pair for it (add/del logical device) and put add/del logical device
> in the struct device (include/linux/netdevice.h)

I added the ioctl pair, but I made the pair specifically for
VLANs. I didn't see a good way to generalize it. I did not
add the methods to the device struct, because when I want to add a
new device, I don't have that device allocated yet. I do have
a method that I can call, so I just make that call from the dev.c
ioctl method.

So, got all this compiling, but I still have a large gap in
my understanding of the whole thing: What calls dev_ioctl with
the specific arguments that will allow me to create new VLANs?

If someone could show me the call path from user space down to
dev_ioctl, I would be greatful. A code example (btw, where's the
best place to get the source for ifconfig??) would be marvelous!

Thanks,
Ben

-- 
Ben Greear (greear@cyberhighway.net)  http://www.primenet.com/~greear 
Author of ScryMUD:  mud.primenet.com 4444
http://www.primenet.com/~greear/ScryMUD/scry.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/