Subject: Re: Tap(4) interface in NetBSD?
To: Antti Kantee <pooka@cs.hut.fi>
From: Andrew Brown <atatat@atatdot.net>
List: current-users
Date: 04/27/2003 13:28:26
>> i'm not trying to be a stick in the mud, but what's the advantage of
>> /dev/tap over /dev/tun?  i don't get it.
>
>You get the complete ethernet frame including headers out of it whereas
>tun operates higher above. I remember I once needed this for something
>and started porting tap from FreeBSD, but since it seems like I never
>finished the job, I guess I found another way to do what I wanted.

no, i know what it does (and how it differs from /dev/tun), i just
don't know *why* it's useful.

i guess i must be wrong, but i presume that if i read from it, i get
copies of all ethernet frames received by the host (which is somewhat
like reading from an AF_INET, SOCK_RAW socket), but that doesn't seem
of much utility to me.

as for writing to it, i suppose the kernel examines the ip header and
forwards the datagram based on that, albeit with the hardware
addresses as included in the datagram?  after all, it can't easily
route based on an ethernet header alone.

>Sorry for not being more specific ;)

i can't either, so don't worry.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."