Re: How to add virtual devices at run-time?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 11 Jan 1999 01:06:56 +0000 (GMT)


> 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?

For socket ioctls the sock_ioctl code is called - net/socket.c and that
calls the protocol specific handler for the socket (eg
inet_ioctl in net/ipv4/af_inet.c) which then calls dev_ioctl.

> 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?

The wanrouter has a /proc directory it puts physical devices in, which you
can then open and ioctl on to create logical channels. Thats a fairly clean
example of driving /proc

Alan

-
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/