lkml.org 
[lkml]   [1999]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to add virtual devices at run-time?
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 have added the pairs to dev_ioctl() and (I believe)
the appropriate header files.

However, I am at a loss as to what I would have to do to
get dev_ioctl called with the appropriate arguments. For
example, the sys_ioctl() method seems to expect a file descriptor,
but I'm talking about a device here, so I've no idea how to get
this file descriptor (does this have something to do with the /proc
file system?)

I would imagine that somewhere down the call stack from sys_ioctl()
I would need to add a switch for the ADD/DELETE device ioctl
values to tell it to go get dev_ioctl() to handle the request. Any
idea where that might be?

If I could figure out how to add a /proc entry, maybe I could
just control these things by echo'ing commands to that file?

Gonna keep digging, thanks for any help or pointers you may
have to offer!

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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.085 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site