unix.7: Mention SOCK_STREAM socket for ioctl_type of ioctl()

from https://bugzilla.redhat.com/show_bug.cgi?id=1110401.

unix.7 is not clear about socket type of ioctl_type argument of
ioctl() function. The description of SIOCINQ is applicable only
for SOCK_STREAM socket. For SOCK_DGRAM, udp(7) man page gives
correct description of SIOCINQ

Signed-off-by: Jan Chaloupka <jchaloup@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Jan Chaloupka 2014-10-18 17:36:00 +02:00 committed by Michael Kerrisk
parent 4b081d8d9d
commit 170e5f0d95
1 changed files with 12 additions and 2 deletions

View File

@ -382,7 +382,9 @@ The correct syntax is:
can be:
.TP
.B SIOCINQ
Returns the amount of queued unread data in the receive buffer.
For
.B SOCK_STREAM
socket the function returns the amount of queued unread data in the receive buffer.
The socket must not be in LISTEN state, otherwise an error
.RB ( EINVAL )
is returned.
@ -402,6 +404,13 @@ defined in
.\" That number is normally larger than the number of bytes of pending
.\" output. Since this info is, from userland's point of view, imprecise,
.\" and it may well change, probably best not to document this now.
For
.B SOCK_DGRAM
socket,
the returned value is the same as
for Internet domain datagram socket;
see
.BR udp (7).
.SH ERRORS
.TP
.B EADDRINUSE
@ -621,4 +630,5 @@ see
.BR cmsg (3),
.BR capabilities (7),
.BR credentials (7),
.BR socket (7)
.BR socket (7),
.BR udp (7)