From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ELTTw-0000hs-RS for qemu-devel@nongnu.org; Fri, 30 Sep 2005 18:35:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ELTTl-0000ZO-LI for qemu-devel@nongnu.org; Fri, 30 Sep 2005 18:35:49 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ELTTi-0000Qq-1Y for qemu-devel@nongnu.org; Fri, 30 Sep 2005 18:35:42 -0400 Received: from [65.74.133.11] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1ELTG0-0007dh-Np for qemu-devel@nongnu.org; Fri, 30 Sep 2005 18:21:32 -0400 From: Paul Brook Subject: Re: [Qemu-devel] tun/tap networking Date: Fri, 30 Sep 2005 23:21:24 +0100 References: <20050930221321.C7BED31C14@ravel.n2.net> In-Reply-To: <20050930221321.C7BED31C14@ravel.n2.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509302321.29051.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Don Kitchen > I have some questions about the networking that I hope someone can answer. > Qemu is able to use tun & tap devices. I've taken the tundev.c program, > which opens a tun device and passes the fd to qemu, and compared it to > the tapdev.c program (which qemu is also able to use) and there's very > little difference to how it's opened. According to the little tun/tap > documentation I understand, the tap descriptor should be providing > ethernet frames instead of the IP packets [ethernet payloads] that tun > should be providing. But qemu does not seem to differentiate between the > two types of file descriptors passed by tundev and tapdev respectively, > so I am a little confused how qemu can work with both types of fd's. Qemu only uses tap devices (ie. ethernet frames). > I'm interested in the handling of ethernet frames because I haven't been > able to get the bridge to pass packets between added interfaces (yes, > they're all up and promisc) and I'm not too thrilled with networking being > bridged anyway, and it seems to me that if an fd were hooked up to a > BPF capturing everything from the real ethernet device in promiscuous > mode, and pushing out any raw frames it receives, that I could bypass > the bridge and make it as if the emulator's virtual ethernet device is > a real one. Or is there some reason this won't work? (after all, other > products don't have this, there must be a reason right?) The host doesn't see the packets set with BFP. Paul