tun(4) and tap(4)
Faried Nawaz
fn at hungry.com
Sun Jun 22 16:53:41 PDT 2003
[ no need to cc me ]
Hello,
I'm running -current. There's some Linux code in plex86
(http://plex86.sf.net/) that does something like
fdTunTap = open("/dev/net/tun", O_RDWR);
// IFF_TAP is for Ethernet frames.
// IFF_TUN is for IP.
// IFF_NO_PI is for not receiving extra meta packet information.
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
err = ioctl(fdTunTap, TUNSETIFF, (void *) &ifr);
Is this roughly equivalent to
fdTunTap = open("/dev/tap", O_RDWR);
?
IFF_NO_PI seems to be equivalent to FreeBSD's tun(4)'s TUNSLMODE | TUNSIFHEAD.
Thanks,
Faried.
--
The Great GNU has arrived, infidels, behold his wrath !
"If a MOO runs on a port no one accesses, does it run?"
More information about the freebsd-hackers
mailing list