From owner-freebsd-arch Fri Jun 22 12:51:27 2001 Delivered-To: freebsd-arch@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 5094737B407; Fri, 22 Jun 2001 12:51:21 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5MJpDe06722; Fri, 22 Jun 2001 12:51:13 -0700 Date: Fri, 22 Jun 2001 12:51:13 -0700 From: Brooks Davis To: Hajimu UMEMOTO 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> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010613.040716.115941864.ume@mahoroba.org>; from ume@mahoroba.org on Wed, Jun 13, 2001 at 04:07:16AM +0900 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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-arch" in the body of the message