From owner-freebsd-current@FreeBSD.ORG Tue May 30 17:38:22 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90D7916A689; Tue, 30 May 2006 17:38:22 +0000 (UTC) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F8E643D5A; Tue, 30 May 2006 17:38:21 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k4UHcH7W016466; Tue, 30 May 2006 10:38:17 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k4UHcHlV016465; Tue, 30 May 2006 10:38:17 -0700 Date: Tue, 30 May 2006 10:38:17 -0700 From: Brooks Davis To: Robert Watson Message-ID: <20060530173817.GB6706@odin.ac.hmc.edu> References: <20060530013856.GA26022@odin.ac.hmc.edu> <20060530094715.L79162@fledge.watson.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JYK4vJDZwFMowpUq" Content-Disposition: inline In-Reply-To: <20060530094715.L79162@fledge.watson.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new Cc: freebsd-current@FreeBSD.org, Goran Gajic Subject: Re: question regarding tap/tun devices X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2006 17:38:26 -0000 --JYK4vJDZwFMowpUq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 30, 2006 at 09:49:01AM +0100, Robert Watson wrote: >=20 > On Mon, 29 May 2006, Brooks Davis wrote: >=20 > >On Sun, May 28, 2006 at 08:33:32PM +0200, Goran Gajic wrote: > >>I'm running 7.0-CURRENT build Thu May 25 23:17:10 CEST 2006 GENERIC=20 > >>config. > >>While playing with dynamips emulator which uses tap I've noticed that > >>ifconifg tun0 create or ifconfig tap0 create doesn't work (this doesn't > >>have anything to do with emulator which works great). > > > >These interfaces don't use the network interface cloning interface and= =20 > >thus can not be created with ifconfig. This should be fixed, but the /d= ev=20 > >based cloning hackes they use make this difficult. >=20 > I've never quite understood if this is a problem or a benefit. =20 > Devfs-cloning of tap and tun are very convenient from an application writ= er=20 > perspective -- you just open /dev/tap or /dev/tun, and magic happens. Wi= th=20 > our current ifnet cloning interface, is it possible to say "atomically=20 > create and return the next available interface number"? If you don't provide a unit number (i.e. "ifconfig gif create") you get the next available one and ifconfig outputs it on stdout (unless you rename it in the same command). I think we'll need to support /dev/{tap,tun} style cloning in the future (there's way too much code that depends on it), but I think we also should support ifconfig cloning as well. The two main reasons I see for doing so are that users now expect it and that is provides a way to remove the interfaces. -- 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 --JYK4vJDZwFMowpUq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFEfIMHXY6L6fI4GtQRArTKAKCofa4tw8Ga4Qnu/xrHed1joR/rdQCgnrmD e5bydga1MAZdlK+C5imopbA= =KHwt -----END PGP SIGNATURE----- --JYK4vJDZwFMowpUq--