diff options
Diffstat (limited to 'man7/socket.7')
| -rw-r--r-- | man7/socket.7 | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/man7/socket.7 b/man7/socket.7 index f2683f2d87..d49d0bb6ed 100644 --- a/man7/socket.7 +++ b/man7/socket.7 @@ -175,9 +175,9 @@ T} .PP An alternative to -.BR poll () +.BR poll (2) and -.BR select () +.BR select (2) is to let the kernel inform the application about events via a .B SIGIO @@ -207,12 +207,12 @@ for all sockets: .B SO_ACCEPTCONN Returns a value indicating whether or not this socket has been marked to accept connections with -.BR listen (). +.BR listen (2). The value 0 indicates that this is not a listening socket, the value 1 indicates that this is a listening socket. Can only be read with -.BR getsockopt (). +.BR getsockopt (2). .TP .B SO_BINDTODEVICE Bind this socket to a particular device like \(lqeth0\(rq, @@ -261,7 +261,7 @@ capability or an effective user ID of 0. .B SO_ERROR Get and clear the pending socket error. Only valid as a -.BR getsockopt (). +.BR getsockopt (2). Expects an integer. .TP .B SO_DONTROUTE @@ -341,7 +341,7 @@ Argument is a .I ucred structure. Only valid as a -.BR getsockopt (). +.BR getsockopt (2). .TP .B SO_PRIORITY Set the protocol-defined priority for all packets to be sent on @@ -361,9 +361,9 @@ Sets or gets the maximum socket receive buffer in bytes. The kernel doubles this value (to allow space for bookkeeping overhead) when it is set using .\" Most (all?) other implementations do not do this -- MTK, Dec 05 -.BR setsockopt (), +.BR setsockopt (2), and this doubled value is returned by -.BR getsockopt (). +.BR getsockopt (2). The default value is set by the .B rmem_default sysctl and the maximum allowed value is set by the @@ -446,9 +446,9 @@ Sets or gets the maximum socket send buffer in bytes. The kernel doubles this value (to allow space for bookkeeping overhead) when it is set using .\" Most (all?) other implementations do not do this -- MTK, Dec 05 -.BR setsockopt (), +.BR setsockopt (2), and this doubled value is returned by -.BR getsockopt (). +.BR getsockopt (2). The default value is set by the .B wmem_default sysctl and the maximum allowed value is set by the @@ -486,7 +486,7 @@ Gets the socket type as an integer (like .BR SOCK_STREAM ). Can only be read with -.BR getsockopt (). +.BR getsockopt (2). .SH SIGNALS When writing onto a connection-oriented socket that has been shut down (by the local or the remote end) @@ -501,10 +501,10 @@ flag. .PP When requested with the .B FIOSETOWN -.BR fcntl () +.BR fcntl (2) or .B SIOCSPGRP -.BR ioctl (), +.BR ioctl (2), .B SIGIO is sent when an I/O event occurs. It is possible to use @@ -514,7 +514,7 @@ or in the signal handler to find out which socket the event occurred on. An alternative (in Linux 2.2) is to set a realtime signal using the .B F_SETSIG -.BR fcntl (); +.BR fcntl (2); the handler of the real time signal will be called with the file descriptor in the .I si_fd @@ -595,7 +595,7 @@ last packet that was received while .B SO_TIMESTAMP was not set, or it fails if no such packet has been received, (i.e., -.BR ioctl () +.BR ioctl (2) returns \-1 with .I errno set to @@ -643,16 +643,16 @@ or 0 when none is set. .PP Valid -.BR fcntl () +.BR fcntl (2) operations: .TP .BR FIOGETOWN The same as the SIOCGPGRP -.BR ioctl (). +.BR ioctl (2). .TP .BR FIOSETOWN The same as the SIOCSPGRP -.BR ioctl (). +.BR ioctl (2). .SH NOTES Linux assumes that half of the send/receive buffer is used for internal kernel structures; thus the sysctls are twice what can be observed @@ -660,7 +660,7 @@ on the wire. Linux will only allow port re-use with the SO_REUSEADDR option when this option was set both in the previous program that performed a -.BR bind () +.BR bind (2) to the port and in the program that wants to re-use the port. This differs from some implementations (e.g., FreeBSD) where only the later program needs to set the SO_REUSEADDR option. |
