From: Herbert Poetzl <herbert@13thfloor.at>
To: "Jim C. Brown" <jma5@umd.edu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] make qemu use tap0 instead of tun0
Date: Thu, 7 Jul 2005 03:55:30 +0200 [thread overview]
Message-ID: <20050707015530.GC20325@MAIL.13thfloor.at> (raw)
In-Reply-To: <20050706230842.GA14066@jbrown.mylinuxbox.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
next prev parent reply other threads:[~2005-07-07 2:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-06 23:08 [Qemu-devel] make qemu use tap0 instead of tun0 Jim C. Brown
2005-07-07 1:55 ` Herbert Poetzl [this message]
2005-07-07 2:06 ` Jim C. Brown
[not found] ` <20050707020551.GA15727@jbrown.mylinuxbox.org>
2005-07-07 2:19 ` Jim C. Brown
2005-07-10 5:07 ` Henrik Nordstrom
2005-07-10 5:03 ` Henrik Nordstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050707015530.GC20325@MAIL.13thfloor.at \
--to=herbert@13thfloor.at \
--cc=jma5@umd.edu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).