From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uft8a-0008PU-8l for qemu-devel@nongnu.org; Fri, 24 May 2013 10:38:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uft8S-0005I0-DW for qemu-devel@nongnu.org; Fri, 24 May 2013 10:38:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uft8S-0005He-4d for qemu-devel@nongnu.org; Fri, 24 May 2013 10:38:24 -0400 From: Stefan Hajnoczi Date: Fri, 24 May 2013 16:38:14 +0200 Message-Id: <1369406295-20411-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1369406295-20411-1-git-send-email-stefanha@redhat.com> References: <1369406295-20411-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] net: support for bridged networking on Mac OS X List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alasdair McLeay , Anthony Liguori , Stefan Hajnoczi From: Alasdair McLeay tun tap can be implemented on Mac OS X using http://tuntaposx.sourceforge.net It behaves in the same way as FreeBSD/OpenBSD implementations, but Qemu needs a patch to use the OpenBS/FreeBSD code. As per the patch listed in this forum thread: http://forum.gns3.net/post17679.html#p17679 And also as used in the MacPorts installation: https://trac.macports.org/browser/trunk/dports/emulators/qemu/files/patch-net-tap-interface.diff Signed-off-by: Alasdair McLeay Signed-off-by: Stefan Hajnoczi --- net/tap-bsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tap-bsd.c b/net/tap-bsd.c index bcdb268..f61d580 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -44,7 +44,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, struct stat s; #endif -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ + defined(__OpenBSD__) || defined(__APPLE__) /* if no ifname is given, always start the search from tap0/tun0. */ int i; char dname[100]; -- 1.8.1.4