From owner-freebsd-current@FreeBSD.ORG Tue May 30 08:49:03 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 8167D16A6A6 for ; Tue, 30 May 2006 08:49:03 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id F10DE43D46 for ; Tue, 30 May 2006 08:49:02 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 10B8F46D04; Tue, 30 May 2006 04:49:02 -0400 (EDT) Date: Tue, 30 May 2006 09:49:01 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Brooks Davis In-Reply-To: <20060530013856.GA26022@odin.ac.hmc.edu> Message-ID: <20060530094715.L79162@fledge.watson.org> References: <20060530013856.GA26022@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 08:49:11 -0000 On Mon, 29 May 2006, Brooks Davis wrote: > 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 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 thus > can not be created with ifconfig. This should be fixed, but the /dev based > cloning hackes they use make this difficult. I've never quite understood if this is a problem or a benefit. Devfs-cloning of tap and tun are very convenient from an application writer perspective -- you just open /dev/tap or /dev/tun, and magic happens. With our current ifnet cloning interface, is it possible to say "atomically create and return the next available interface number"? Robert N M Watson