tun man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]

TUN(4)			    BSD Programmer's Manual			TUN(4)

NAME
     tun - network tunnel interface driver

SYNOPSIS
     #include <sys/types.h>
     #include <sys/socket.h>
     #include <net/if.h>
     #include <net/if_tun.h>
     #include <net/if_types.h>

     pseudo-device tun count

DESCRIPTION
     The network tunnel interface driver allows privileged processes to enable
     a network interface and exchange packets with the kernel packet forward-
     ing facilities.

     The interface created is a point-to-point (POINTOPOINT) interface with an
     initial maximum transmission unit (MTU) of TUNMTU (currently 1500), an
     initial interface type of IFT_PROPVIRTUAL and an initial interface speed
     of 0.

     Opening /dev/tunX enables the tunX interface, for example, opening
     /dev/tun1 enables the tun1 interface.  Once the local and remote address-
     es have been configured, a process can exchange packets with the kernel.
     I/O to the tunnel device is atomic, each write generates one packet and
     each read accepts only one packet.	 If the specified buffer size used to
     read a packet is too small, the remainder of the packet is discarded.

     The select(2) system call may be used to wait for a packet to be read,
     the tunnel network interface device is always ready for writing.

     The default interface speed, type and MTU can be queried and changed by
     using the TUNGIFINFO and TUNSIFINFO ioctl(2) calls which take the follow-
     ing structure as an argument:

     struct tuninfo {
	     int	 baudrate;	/* line-speed in bits per second */
	     short	 mtu;		/* maximum transmission unit */
	     u_char	 type;		/* ethernet, tokenring, etc. */
	     u_char	 dummy;		/* place holder */
     };

     The number of network tunnel interfaces may be increased by adjusting
     count at kernel config time, modifying the ntun variable in the system
     with bpatch(1) before booting, or by modifying the
     net.link_layer.generic.tun.numif variable with sysctl(1).

SEE ALSO
     sysctl(1),	 ioctl(2),  read(2),  select(2),  socket(2),  write(2),
     inet(4),  intro(4),  netintro(4),	ifconfig(8),

BSDI BSD/OS			 July 19, 1996				     1
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net