All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Patch] Support for bridged networking on Mac OS X
@ 2013-05-09 18:44 Alasdair McLeay
  2013-05-10  7:37 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Alasdair McLeay @ 2013-05-09 18:44 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

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

I've included it below in what I hope is the correct format (I used git diff, as I'm not checking in anywhere).

Thanks,
Ali


Signed-off-by: Alasdair McLeay <alasdair.mcleay@me.com>


diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index bcdb268..54cb305 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -44,7 +44,7 @@ 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];


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3774 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-10  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-09 18:44 [Qemu-devel] [Patch] Support for bridged networking on Mac OS X Alasdair McLeay
2013-05-10  7:37 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.