From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DqLkD-0006zb-0A for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:04:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DqLk2-0006uq-W7 for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:03:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DqLk2-0006sj-LD for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:03:54 -0400 Received: from [212.16.62.50] (helo=mail.13thfloor.at) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DqLiI-0006zO-Cb for qemu-devel@nongnu.org; Wed, 06 Jul 2005 22:02:06 -0400 Date: Thu, 7 Jul 2005 03:55:30 +0200 From: Herbert Poetzl Subject: Re: [Qemu-devel] make qemu use tap0 instead of tun0 Message-ID: <20050707015530.GC20325@MAIL.13thfloor.at> References: <20050706230842.GA14066@jbrown.mylinuxbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050706230842.GA14066@jbrown.mylinuxbox.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jim C. Brown" Cc: qemu-devel@nongnu.org On Wed, Jul 06, 2005 at 07:08:42PM -0400, Jim C. Brown wrote: > When in tuntap mode, qemu creates a tap device with names like tun0, tun1, > etc. which seems to confuse some users (the smart ones who ask why qemu uses > IP frames instead of ethernet frames ... or something along those lines). > Theses should be named tap0, tap1, etc. This patch fixes qemu. > > I don't think this would break anything (correct qemu-ifup scripts shouldn't > care about the name of the tuntap device that qemu uses). > > -- > Infinite complexity begets infinite beauty. > Infinite precision begets infinite perfection. > --- vl.c.1 Wed Jul 6 19:03:45 2005 > +++ vl.c Wed Jul 6 19:04:23 2005 > @@ -1629,7 +1629,7 @@ > } > memset(&ifr, 0, sizeof(ifr)); > ifr.ifr_flags = IFF_TAP | IFF_NO_PI; > - pstrcpy(ifr.ifr_name, IFNAMSIZ, "tun%d"); > + pstrcpy(ifr.ifr_name, IFNAMSIZ, "tap%d"); > ret = ioctl(fd, TUNSETIFF, (void *) &ifr); > if (ret != 0) { > fprintf(stderr, "warning: could not configure /dev/net/tun: no virtual network emulation\n"); 1.1 What is the TUN ? The TUN is Virtual Point-to-Point network device. TUN driver was designed as low level kernel support for IP tunneling. It provides to userland application two interfaces: - /dev/tunX - character device; - tunX - virtual Point-to-Point interface. Userland application can write IP frame to /dev/tunX and kernel will receive this frame from tunX interface. In the same time every frame that kernel writes to tunX interface can be read by userland application from /dev/tunX device. 1.2 What is the TAP ? The TAP is a Virtual Ethernet network device. TAP driver was designed as low level kernel support for Ethernet tunneling. It provides to userland application two interfaces: - /dev/tapX - character device; - tapX - virtual Ethernet interface. Userland application can write Ethernet frame to /dev/tapX and kernel will receive this frame from tapX interface. In the same time every frame that kernel writes to tapX interface can be read by userland application from /dev/tapX device. (from http://vtun.sourceforge.net/tun/faq.html) best, Herbert > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel