Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2001 12:51:13 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Hajimu UMEMOTO <ume@mahoroba.org>
Cc:        hackers@FreeBSD.ORG, brian@Awfulhak.org, phk@critter.freebsd.dk, arch@FreeBSD.ORG
Subject:   Re: cloning network interfaces
Message-ID:  <20010622125113.A30459@Odin.AC.HMC.Edu>
In-Reply-To: <20010613.040716.115941864.ume@mahoroba.org>; from ume@mahoroba.org on Wed, Jun 13, 2001 at 04:07:16AM %2B0900
References:  <20010608191904.A18847@Odin.AC.HMC.Edu> <20010610.232907.74740159.ume@mahoroba.org> <20010611142030.A15283@Odin.AC.HMC.Edu> <20010613.040716.115941864.ume@mahoroba.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--zhXaljGHf11kAtnf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

--=20
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

--zhXaljGHf11kAtnf
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7M6GxXY6L6fI4GtQRAk2oAKDkCdhGxDAZS1q+F7P+dk7cNx5lkACcCxL9
8vq8z+ZPJeSt8+WFubuJpsA=
=LY+F
-----END PGP SIGNATURE-----

--zhXaljGHf11kAtnf--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010622125113.A30459>