diff -ubwr ../../work.patched/qemu-1.0.1/Makefile.objs ./Makefile.objs
--- ../../work.patched/qemu-1.0.1/Makefile.objs	2012-02-17 20:45:39.000000000 +0100
+++ ./Makefile.objs	2012-05-30 21:20:36.000000000 +0200
@@ -47,9 +47,9 @@
 net-nested-y += socket.o
 net-nested-y += dump.o
 net-nested-$(CONFIG_POSIX) += tap.o
-net-nested-$(CONFIG_LINUX) += tap-linux.o
+net-nested-$(CONFIG_LINUX) += tap-linux.o qemu-netmap.o
 net-nested-$(CONFIG_WIN32) += tap-win32.o
-net-nested-$(CONFIG_BSD) += tap-bsd.o
+net-nested-$(CONFIG_BSD) += tap-bsd.o qemu-netmap.o
 net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
 net-nested-$(CONFIG_AIX) += tap-aix.o
 net-nested-$(CONFIG_HAIKU) += tap-haiku.o
diff -ubwr ../../work.patched/qemu-1.0.1/net/tap.h ./net/tap.h
--- ../../work.patched/qemu-1.0.1/net/tap.h	2012-05-28 19:14:09.000000000 +0200
+++ ./net/tap.h	2012-05-28 19:46:57.000000000 +0200
@@ -32,6 +32,10 @@
 #define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup"
 #define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown"
 
+#if 1 // DEV_NETMAP
+int net_init_netmap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);
+#endif // DEV_NETMAP
+
 int net_init_tap(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan);
 
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required);
diff -ubwr ../../work.patched/qemu-1.0.1/net.c ./net.c
--- ../../work.patched/qemu-1.0.1/net.c	2012-05-28 19:14:09.000000000 +0200
+++ ./net.c	2012-06-01 09:16:06.000000000 +0200
@@ -1152,6 +1157,22 @@
         },
     },
 #endif
+
+#if 1 // DEV_NETMAP 
+    [NET_CLIENT_TYPE_NETMAP] = {
+        .type = "netmap",
+        .init = net_init_netmap,
+        .desc = {
+            NET_COMMON_PARAMS_DESC,
+            {
+                .name = "ifname",
+                .type = QEMU_OPT_STRING,
+                .help = "interface name",
+            },
+        },
+    },
+#endif // DEV_NETMAP
+
     [NET_CLIENT_TYPE_TAP] = {
         .type = "tap",
         .init = net_init_tap,
diff -ubwr ../../work.patched/qemu-1.0.1/net.h ./net.h
--- ../../work.patched/qemu-1.0.1/net.h	2012-05-28 19:14:09.000000000 +0200
+++ ./net.h	2012-05-30 21:25:30.000000000 +0200
@@ -37,6 +37,7 @@
     NET_CLIENT_TYPE_VDE,
     NET_CLIENT_TYPE_PCAP,
     NET_CLIENT_TYPE_DUMP,
+    NET_CLIENT_TYPE_NETMAP,	// XXX lr 20120528
 
     NET_CLIENT_TYPE_MAX
 } net_client_type;
diff -ubwr ../../work.patched/qemu-1.0.1/qemu-common.h ./qemu-common.h
--- ../../work.patched/qemu-1.0.1/qemu-common.h	2012-02-17 20:45:39.000000000 +0100
+++ ./qemu-common.h	2012-05-30 15:48:54.000000000 +0200
@@ -38,6 +38,30 @@
 #include <signal.h>
 #include <glib.h>
 
+#ifndef RATE_ME
+/*
+ * XXX the following routine is used to compute average rates.
+ */
+struct nm_rate {
+        uint64_t prev, curr, delta;
+        struct timeval t_prev, t_curr;
+        char name[128];
+};
+
+/* report. Delta = -1 resets the count, delta < -1 sets delta */
+void nm_report_rate(struct nm_rate *r, int delta);
+void nm_report_name(struct nm_rate *r, char *name);
+
+#define RATE_ME(_nm, _de, _inc)                         \
+    do { static struct nm_rate __r;                     \
+        if (__r.delta == 0) {                           \
+                __r.delta = _de;                        \
+                strcpy(__r.name, _nm);                \
+        }                                               \
+        nm_report_rate(&__r, _inc);                    \
+    } while (0)
+
+#endif /* RATE_ME */
 #ifdef _WIN32
 #include "qemu-os-win32.h"
 #endif
