From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ELffu-0002Op-9k for qemu-devel@nongnu.org; Sat, 01 Oct 2005 07:37:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ELffs-0002Ny-EA for qemu-devel@nongnu.org; Sat, 01 Oct 2005 07:37:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ELffq-0002JT-Ck for qemu-devel@nongnu.org; Sat, 01 Oct 2005 07:37:03 -0400 Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1ELfZD-0004Wq-KJ for qemu-devel@nongnu.org; Sat, 01 Oct 2005 07:30:11 -0400 Message-ID: <433E733E.9000209@gmx.de> Date: Sat, 01 Oct 2005 13:30:06 +0200 From: Oliver Gerlich MIME-Version: 1.0 Subject: Re: [Qemu-devel] tun/tap networking References: <20050930221321.C7BED31C14@ravel.n2.net> <20050930230149.GA20433@jbrown.mylinuxbox.org> In-Reply-To: <20050930230149.GA20433@jbrown.mylinuxbox.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jim C. Brown schrieb: > On Fri, Sep 30, 2005 at 03:13:21PM -0700, Don Kitchen wrote: > [...] > >>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, > > > Do you mean the kernel bridge, br0? Or are you talking about some sort of > user space bridge, like bridged (which uses a series of packet sockets to > bridge between multiple ethernet (ethX) devices) ? > > >>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?) > > > Ah, you're talking about using a packet socket, right? > > That works fine for the most part. There is one thing that you have missed > though: guest->host communication doesn't work when you do that. > > When you push out a raw frame, it leaves the real ethernet device before the > host sees it. So guest->host doesn't work. You need to find another way to > send packets from the guest to the host. Most host OSes will not let you > do this at all. (Windows seems to be the exception, winpcap's pcap_sendpacket() > appears to work fine for that job.) > That means it would work if the host NIC is connected to a switch? Then the switch would send packets from the guest which are meant for the host back to the host NIC and everything's fine! Or did I misunderstand that now? Regards, Oliver Gerlich -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDPnM2TFOM6DcNJ6cRAlTaAJ9gxN9CUnSEeKl5lPbURTEh33Rl8QCgpmNV cUuiGGOkpPVYxzeo9ZoksWM= =tEkV -----END PGP SIGNATURE-----