From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DqM6q-0005wv-Ie for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:27:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DqM6m-0005uc-B5 for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:27:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DqM6l-0005tp-S2 for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:27:23 -0400 Received: from [128.8.10.164] (helo=po2.wam.umd.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DqM5G-00005b-0q for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:25:50 -0400 Date: Wed, 6 Jul 2005 22:19:13 -0400 From: "Jim C. Brown" Subject: Re: [Qemu-devel] make qemu use tap0 instead of tun0 Message-ID: <20050707021913.GA16038@jbrown.mylinuxbox.org> References: <20050706230842.GA14066@jbrown.mylinuxbox.org> <20050707015530.GC20325@MAIL.13thfloor.at> <20050707020551.GA15727@jbrown.mylinuxbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050707020551.GA15727@jbrown.mylinuxbox.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Herbert Poetzl Cc: qemu-devel@nongnu.org On Wed, Jul 06, 2005 at 10:05:51PM -0400, Jim C. Brown wrote: > I know this. Actually that page seems out of date, as Linux's tuntap now sends > all accesses to /dev/net/tun regardless of the type of device (tun or tap). > I should also add that on Linux, you can set the device name to what you want - the requirement for tapX for tap devices and tunX for tun devices is not enforced. Note that for BSD, the function tun_open() in vl.c does open /dev/tap. > The current NE2000 emulation (or any hardware nic emulation for that matter) > would not work if qemu used an actual tun device. > Ok this is not 100% true either. It wouldn't be too difficult to add a layer on top of the nic hw emulation that did ethernet frame to ip frame and vice versa before passing the frames to a tun device. (The user mode networking code already does ethernet frame conversion.) So it wouldn't be that difficult to get to work, and you wouldn't lose too much either (only IP-based protocols such as TCP or UDP would work, but I've never heard of anyone trying to use IPX or even IPv6 with qemu so that probably is not an issue). -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.