> In message <[EMAIL PROTECTED]>, Brooks Davis writes:
>
> >With network devices that are also normal devices the way tun is,
> >you do this by just implementing a dev_clone event handler so when the
> >user attempts to open a non-existent instance it's created. The problem
> >with gif is that there's no device in /dev to open. Since most network
> >devices at attached to hardware this usually doesn't matter, but in this
> >case it does.
> >
> >[...]
> >
> >How would this work anyway?
> >
> >Comments, thoughts, ideas?
>
> The quick and dirty way:
>
> Make a clone handler despite the fact that there is no /dev
> entry needed. You don't actually have to create a dev entry
> in the clone handler, you could just create the gif_interface.
>
> Applications would then:
>
> stat("/dev/gif345") /* Ignore error */
> system("ifconfig gif345 bla bla bla");
>
> The slower but less dirty:
>
> Make a sysctl which returns an integer which is the next
> free gif device.
>
> The really slow and very dirty:
>
> Implement cloning in ifconfig.
Maybe a reasonable alternative would be to have a /dev/if_gif device
with ioctls for creating and destroying interfaces. ifconfig(8)
could be taught to create (and maybe even to delete) them.
> --
> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
> [EMAIL PROTECTED] | TCP/IP since RFC 956
> FreeBSD committer | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
--
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