Return to BSD News archive
Newsgroups: comp.unix.bsd.freebsd.misc Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!munnari.oz.au!spool.mu.edu!usenet.eel.ufl.edu!news.mathworks.com!tank.news.pipex.net!pipex!uknet!eldorado.net-tel.co.uk!usenet From: Andrew Gordon <andrew.gordon@net-tel.co.uk> Subject: Re: Documentation for tun ? X-Nntp-Posting-Host: evening-star.net-tel.co.uk Content-Type: text/plain; charset=us-ascii Message-ID: <DE2LH3.27K@net-tel.co.uk> Sender: usenet@net-tel.co.uk (usenet poster) Content-Transfer-Encoding: 7bit Organization: NET-TEL Computer Systems Ltd References: <41l6ai$7fu@multivac.orthanc.com> <41s47n$qm7@bonnie.tcd-dresden.de> Mime-Version: 1.0 Date: Tue, 29 Aug 1995 11:34:13 GMT X-Mailer: Mozilla 1.1N (Macintosh; I; PPC) X-Url: news:41s47n$qm7@bonnie.tcd-dresden.de Lines: 15 j@bonnie.heep.sax.de (J Wunsch) wrote: >Lyndon Nerenberg <lyndon@orthanc.com> wrote: >>Is there any documentation for using the tun interface in 2.0.5? I've >>poked around everywhere I can think of and can't come up with anything >>other than deciphering the source code. > >If i were you, i'd have a look into iijppp for an example. It seems to be quite simple. You just open the device, and each read() call returns precisely one packet; conversely, each write() injects one packet. select() works as normal. It also has an ioctl interface - see /usr/include/net/if_tun.h - though you don't need to use this.