From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LmAKF-0000wE-Fk for qemu-devel@nongnu.org; Tue, 24 Mar 2009 13:22:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LmAKA-0000rh-NJ for qemu-devel@nongnu.org; Tue, 24 Mar 2009 13:22:07 -0400 Received: from [199.232.76.173] (port=60889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmAKA-0000rQ-Gu for qemu-devel@nongnu.org; Tue, 24 Mar 2009 13:22:02 -0400 Received: from gecko.sbs.de ([194.138.37.40]:20809) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LmAK9-0007Cs-7w for qemu-devel@nongnu.org; Tue, 24 Mar 2009 13:22:02 -0400 Message-ID: <49C916AF.3010307@siemens.com> Date: Tue, 24 Mar 2009 18:21:51 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <49C0BFCD.1040304@siemens.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Add pcap-based host network bridge 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: Jung-uk Kim Sebastian Herbszt wrote: > Jan Kiszka wrote: >> This introduces bridged networking via pcap. Both Unix and Windows >> platforms are supported. >> >> While tap-based bridging provides basically the same support pcap does, >> the latter is often more handy to set up. Under Linux, it doesn't >> require to configure a bridge and it is able to bypass the ebtables if >> this is desired. Also under Windows, the bridge setup can be lengthy >> procedure compared to using the pcap interface. > > This looks like the pcap approach by Jung-uk Kim [1]. It was reported that > guest <-> host communication didn't work on Linux [2]. Is this also true > for > this patch? Yes, it is, see my reply to Anthony. > > [1] http://article.gmane.org/gmane.comp.emulators.qemu/27304 > [2] http://article.gmane.org/gmane.comp.emulators.qemu/27553 > >> Signed-off-by: Klaus Wenninger >> Signed-off-by: Jan Kiszka >> --- >> >> Makefile.target | 2 configure | 35 ++++++++ >> net.c | 252 >> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> qemu-doc.texi | 14 +++ >> vl.c | 4 + >> 5 files changed, 305 insertions(+), 2 deletions(-) >> > > [snip] > >> diff --git a/net.c b/net.c >> index c853daf..3cf372d 100644 >> --- a/net.c >> +++ b/net.c >> @@ -93,6 +93,13 @@ >> #endif >> #endif >> >> +#if defined(CONFIG_PCAP) >> +#include >> +#ifdef _WIN32 >> +#include >> +#endif /* _WIN32 */ >> +#endif /* CONFIG_PCAP */ >> + >> #if defined(__OpenBSD__) >> #include >> #endif >> @@ -1033,6 +1040,241 @@ static int net_tap_init(VLANState *vlan, const >> char *model, >> >> #endif /* !_WIN32 */ >> >> +#if defined(CONFIG_PCAP) >> + >> +#ifdef _WIN32 >> +#define ADAPTER_KEY >> "SYSTEM\\CurrentControlSet\\Control\\Class" \ >> + >> "\\{4D36E972-E325-11CE-BFC1-08002BE10318}" >> +#define NETWORK_CONNECTIONS_KEY >> "SYSTEM\\CurrentControlSet\\Control\\Network" \ >> + >> "\\{4D36E972-E325-11CE-BFC1-08002BE10318}" >> +#endif > > ADAPTER_KEY doesn't seem to be used. > Thanks, will drop it when posting an update. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux