> Ok, I've got the quick and dirty way working for testing (a nine line
> clone handler works great for that), but I think Brian's suggestion is
> probably best for a real solution especialy since it's rather easier to
> check for permissions before allowing creation this way. My current
> patch lets joe user create 2^15 gif devices by doing "ls /dev/gif###"
> 2^15 times because I didn't have a proc structure handy. The other
> advantage is that it should be fairly easy to backport to -stable which
> is where the project I'm working on this for is currently being developed.
>
> I think I'll add a to ifconfig function styled after ifmaybeload() that
> trys to create interfaces if the user trys to do something with them.
> I'm still thinking about the right way to handle creation of new, free
> devices, perhaps a syntax like:
>
> ifconfig gif#
>
> where ifconfig returns the interface name the way mdconfig does when you
> don't specify a unit. If we decied that interfaces that want to grow
> this way will have a /dev/if_<name> device that accepts the appropriate
> ioctl(s), that should be fairly easy to implement so it works in all
> cases without further hacks to ifconfig.
I think it'd be better to use the solaris ``plumb'' keyword. I can't
recall how it works (something like ``ifconfig gif0 plumb'' - I
haven't got a Solaris machine handy here), but it seemed cleaner,
making it more obvious what's being done. An ``unplumb'' keyword may
be appropriate for doing the removal.
> -- Brooks
--
Brian <[EMAIL PROTECTED]> <brian@[uk.]FreeBSD.org>
<http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message