diff options
author | 2007-02-21 15:01:28 +0000 | |
---|---|---|
committer | 2007-02-21 15:01:28 +0000 | |
commit | 8b19875dd46b53591328188e3be1945687285e85 (patch) | |
tree | 5ab2f00fbb15d37e3f78c05352ac4249a0b140d1 | |
parent | Make the firmware load on big endian systems and while there make sure that (diff) | |
download | wireguard-openbsd-8b19875dd46b53591328188e3be1945687285e85.tar.xz wireguard-openbsd-8b19875dd46b53591328188e3be1945687285e85.zip |
Sync with reality. Initial diff by Ingo Schwarze additional help by jmc@
-rw-r--r-- | share/man/man4/tun.4 | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4 index 7f01e8f2267..436bccb3827 100644 --- a/share/man/man4/tun.4 +++ b/share/man/man4/tun.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tun.4,v 1.34 2006/05/09 19:03:04 jmc Exp $ +.\" $OpenBSD: tun.4,v 1.35 2007/02/21 15:01:28 claudio Exp $ .\" .\" Copyright (c) 2003 Marcus D. Watts All rights reserved. .\" @@ -75,13 +75,17 @@ Each packet read or written is prefixed with a tunnel header consisting of a 4-byte network byte order integer containing the address family in the case of layer 3 tunneling. In layer 2 mode the 4-byte tunnel header is replaced with an Ethernet header. -On the last close of the device, all packets are discarded, -the device is marked down, and all routes via the device -are removed. +On the last close of the device, all queued packets are discarded. +If the device was created by opening +.Pa /dev/tunN , +it will be automatically destroyed. +Devices created via +.Xr ifconfig 8 +are only marked as not running and traffic will be dropped returning +.Er EHOSTDOWN . .Pp Writes never block. -If the protocol queue is full, the packet is dropped, -a +If the protocol queue is full, the packet is dropped, a .Dq collision is counted, and .Er ENOBUFS @@ -115,8 +119,13 @@ can include one or more of .Dv IFF_POINTOPOINT , .Dv IFF_MULTICAST , .Dv IFF_BROADCAST . -It defaults to -.Dv IFF_POINTOPOINT . +Flags given will be set; flags omitted will be cleared; flags not in this list +will not be changed even when given. +Flags default to +.Dv IFF_POINTOPOINT +for layer 3 and to +.Dv IFF_BROADCAST \&| IFF_MULTICAST +for layer 2 mode. It is an error to set both .Dv IFF_POINTOPOINT and @@ -124,13 +133,17 @@ and .\" should say what type affects... .Va type defaults to -.Dv IFT_PROPVIRTUAL -but can be set to -.Dv IFT_PPP . +.Dv IFT_TUNNEL +for layer 3 and +.Dv IFT_ETHER +for layer 2 tunneling mode. This sets the interface media address header type. .Pp .It Dv TUNSIFMODE Fa int *flags Set just the interface flags. +The same restrictions as for +.Dv TUNSIFINFO +apply. .Pp .It Dv FIONBIO Fa int *flag Set non-blocking I/O. @@ -235,10 +248,3 @@ interface address assigned to it, such as via .Xr hostname.if 5 , .Xr ifconfig 8 , .Xr netstart 8 -.Sh BUGS -There is no way to set -.Dv TUN_STAYUP . -.Pp -.Dv TUNSIFINFO -does no checking on -.Va flags . |