[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] Add pcap-based host network bridge

From: Sebastian Herbszt
Subject: [Qemu-devel] Re: [PATCH] Add pcap-based host network bridge
Date: Sun, 22 Mar 2009 22:38:24 +0100

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?

[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 <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>

Makefile.target | 2 configure | 35 ++++++++
net.c           |  252 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
qemu-doc.texi   |   14 +++
vl.c            |    4 +
5 files changed, 305 insertions(+), 2 deletions(-)


diff --git a/net.c b/net.c
index c853daf..3cf372d 100644
--- a/net.c
+++ b/net.c
@@ -93,6 +93,13 @@

+#if defined(CONFIG_PCAP)
+#include <pcap.h>
+#ifdef _WIN32
+#include <remote-ext.h>
+#endif /* _WIN32 */
+#endif /* CONFIG_PCAP */
#if defined(__OpenBSD__)
#include <util.h>
@@ -1033,6 +1040,241 @@ static int net_tap_init(VLANState *vlan, const char 

#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}"

ADAPTER_KEY doesn't seem to be used.

- Sebastian

reply via email to

[Prev in Thread] Current Thread [Next in Thread]