Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jun 2003 04:53:17 +0500
From:      Faried Nawaz <fn@hungry.com>
To:        freebsd-hackers@freebsd.org
Subject:   tun(4) and tap(4)
Message-ID:  <m3u1ahoej6.fsf@xpf.nilpotent.org>

next in thread | raw e-mail | index | archive | help

[ 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?"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m3u1ahoej6.fsf>