On Wed, Jun 13, 2001 at 04:07:16AM +0900, Hajimu UMEMOTO wrote:
> I like your idea.
> I'm serving tunnel broker using DTCP (Dynamic Tunnel Configuration
> Protocol) in our ISP. So, I'm grad if we have dynamic gif creation,
> too.
Ok, after a week and a half of doing other things, I've got a patch
together which adds interface cloning based on NetBSD's code. The
difference is that you may pass an interface of the from gif# if you
don't need a specific number. The ioctl now returns a potentialy
modified ifreq which contains the new interface name. This changes the
way drivers implement cloning in that they may return a different unit
then they were passed and they must do their own resource management
rather then relying on the clone functionality in sys/net/if.c to do it
for them.
The patch is at:
http://people.freebsd.org/~brooks/patches/gif.diff
The patch can be applied as follows (you need to make the directories):
cd /usr/src
mkdir sys/modules/if_gif sys/modules/if_stf
patch < /tmp/gif.diff
The patch does the following:
- adds interface cloning support to the kernel
- adds interface cloning support to ifconfig
- makes gif clonable
- makes gif usable as a module
- removes the need for NGIF and gif.h
- removes va_args usage in in_gif_input to remove a warning
- removes gif dependencies from stf
- makes stf usable as a module
-- Brooks
--
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
PGP signature