From owner-freebsd-arch Sun Jun 24 9:31:40 2001 Delivered-To: freebsd-arch@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id B5F8737B406; Sun, 24 Jun 2001 09:31:25 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:OH2hwKyzlYgzEtWJ5iprGG7pdQxUFRRL2H3OOkMuttbmbv7BXTD1U8iQX2Qag7pz@localhost [::1]) (authenticated as ume with CRAM-MD5) by peace.mahoroba.org (8.11.4/8.11.4/peace) with ESMTP/inet6 id f5OGV9R76497; Mon, 25 Jun 2001 01:31:09 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Mon, 25 Jun 2001 01:31:06 +0900 (JST) Message-Id: <20010625.013106.78752396.ume@mahoroba.org> To: brooks@one-eyed-alien.net Cc: hackers@FreeBSD.ORG, brian@Awfulhak.org, phk@critter.freebsd.dk, arch@FreeBSD.ORG Subject: Re: cloning network interfaces From: Hajimu UMEMOTO In-Reply-To: <20010622125113.A30459@Odin.AC.HMC.Edu> References: <20010611142030.A15283@Odin.AC.HMC.Edu> <20010613.040716.115941864.ume@mahoroba.org> <20010622125113.A30459@Odin.AC.HMC.Edu> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 >>>>> On Fri, 22 Jun 2001 12:51:13 -0700 >>>>> Brooks Davis said: brooks> Ok, after a week and a half of doing other things, I've got a patch brooks> together which adds interface cloning based on NetBSD's code. The brooks> difference is that you may pass an interface of the from gif# if you brooks> don't need a specific number. The ioctl now returns a potentialy brooks> modified ifreq which contains the new interface name. This changes the brooks> way drivers implement cloning in that they may return a different unit brooks> then they were passed and they must do their own resource management brooks> rather then relying on the clone functionality in sys/net/if.c to do it brooks> for them. brooks> The patch is at: brooks> http://people.freebsd.org/~brooks/patches/gif.diff brooks> The patch can be applied as follows (you need to make the directories): brooks> cd /usr/src brooks> mkdir sys/modules/if_gif sys/modules/if_stf brooks> patch < /tmp/gif.diff brooks> The patch does the following: brooks> - adds interface cloning support to the kernel brooks> - adds interface cloning support to ifconfig brooks> - makes gif clonable brooks> - makes gif usable as a module brooks> - removes the need for NGIF and gif.h brooks> - removes va_args usage in in_gif_input to remove a warning brooks> - removes gif dependencies from stf brooks> - makes stf usable as a module It seems fine to me. I just tried it on my box. You forget to include prototype change of in_gif_input() in sys/net/if_gif.h. BTW, why did you change gif_ioctl() to gif_ifioctl()? gif related modules are shared among *BSDs and maintained in KAME CVS repository. Could you please keep local changes small as possible? -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message