diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-01-09 09:25:17 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-01-09 09:25:17 +0000 |
commit | a3a80036388055ac6667cff179210d1737425cd2 (patch) | |
tree | bb10b716648ea98e030e7c43fc3013c97be575cd /share | |
parent | c6768aa490b1bfc2841693536906eaaba6bea4cb (diff) |
Cleanup ioctl(2) list. FIONBIO, FIOASYNC and FIONREAD are not defined
in <net/if_tun.h> also there is no need to document them again. Instead
reference to ioctl(2) that has all the info. Also remove TIOCSPGRP and
TIOCGPGRP and replace them with FIOSETOWN and FIOGETOWN. Users should
use those ioctl(2) to set the process / process group to be signaled
when FIOASYNC is set.
OK visa@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/tap.4 | 37 | ||||
-rw-r--r-- | share/man/man4/tun.4 | 36 |
2 files changed, 27 insertions, 46 deletions
diff --git a/share/man/man4/tap.4 b/share/man/man4/tap.4 index 7f613f4ad8e..16ce0dbdf77 100644 --- a/share/man/man4/tap.4 +++ b/share/man/man4/tap.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tap.4,v 1.3 2017/10/17 22:47:58 schwarze Exp $ +.\" $OpenBSD: tap.4,v 1.4 2020/01/09 09:25:16 claudio Exp $ .\" .\" Copyright (c) 2003 Marcus D. Watts All rights reserved. .\" @@ -26,7 +26,7 @@ .\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 17 2017 $ +.Dd $Mdocdate: January 9 2020 $ .Dt TAP 4 .Os .Sh NAME @@ -118,33 +118,21 @@ defaults to .Dv IFT_ETHER . This sets the interface media address header type. .Pp -.It Dv TUNSIFMODE Fa int *flags +.It Dv TUNSIFMODE Fa int * 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. -.Pp -.It Dv FIOASYNC Fa int *flag -Cause signal -.Dv SIGIO -to be sent when a packet can be read. -.Pp -.It Dv TIOCSPGRP Fa int *pgrp -.It Dv TIOCGPGRP Fa int *pgrp -Get or set the process group to which signals might be sent -via -.Dv FIOASYNC . -.Pp -.It Dv FIONREAD Fa int *count -Get the byte count of the next packet available to be read. -.Pp -.It Dv SIOCGIFADDR Fa struct ether_addr *addr -.It Dv SIOCSIFADDR Fa struct ether_addr *addr -Get or set the Ethernet address of the device. .El +.Pp +The generic ioctls +.Dv FIONREAD , +.Dv FIONBIO , +.Dv FIOASYNC , +.Dv FIOSETOWN , +.Dv FIOGETOWN +are supported by +.Nm . .Sh FILES .Bl -tag -width /dev/tap* -compact .It Pa /dev/tap* @@ -214,6 +202,7 @@ interface address assigned to it, such as via .Dv SIOCSIFADDR . .El .Sh SEE ALSO +.Xr ioctl 2 , .Xr inet 4 , .Xr intro 4 , .Xr netintro 4 , diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4 index 44487cac9cb..9bae0ff4c89 100644 --- a/share/man/man4/tun.4 +++ b/share/man/man4/tun.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tun.4,v 1.44 2019/01/06 18:32:34 tedu Exp $ +.\" $OpenBSD: tun.4,v 1.45 2020/01/09 09:25:16 claudio Exp $ .\" .\" Copyright (c) 2003 Marcus D. Watts All rights reserved. .\" @@ -26,7 +26,7 @@ .\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: January 6 2019 $ +.Dd $Mdocdate: January 9 2020 $ .Dt TUN 4 .Os .Sh NAME @@ -79,8 +79,7 @@ is counted, and .Er ENOBUFS is returned. .Pp -In addition to the usual network interface -ioctl commands described in +In addition to the usual network interface ioctl commands described in .Xr netintro 4 , the following special commands defined in .In net/if_tun.h @@ -121,29 +120,21 @@ defaults to .Dv IFT_TUNNEL . This sets the interface media address header type. .Pp -.It Dv TUNSIFMODE Fa int *flags +.It Dv TUNSIFMODE Fa int * 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. -.Pp -.It Dv FIOASYNC Fa int *flag -Cause signal -.Dv SIGIO -to be sent when a packet can be read. -.Pp -.It Dv TIOCSPGRP Fa int *pgrp -.It Dv TIOCGPGRP Fa int *pgrp -Get or set the process group to which signals might be sent -via -.Dv FIOASYNC . -.Pp -.It Dv FIONREAD Fa int *count -Get the byte count of the next packet available to be read. .El +.Pp +The generic ioctls +.Dv FIONREAD , +.Dv FIONBIO , +.Dv FIOASYNC , +.Dv FIOSETOWN , +.Dv FIOGETOWN +are supported by +.Nm . .Sh FILES .Bl -tag -width /dev/tun* -compact .It Pa /dev/tun* @@ -217,6 +208,7 @@ interface address assigned to it, such as via .Dv SIOCSIFADDR . .El .Sh SEE ALSO +.Xr ioctl 2 , .Xr inet 4 , .Xr intro 4 , .Xr netintro 4 , |